Class: LockstepSdk::SyncRequestModel
- Inherits:
-
Object
- Object
- LockstepSdk::SyncRequestModel
- Defined in:
- lib/lockstep_sdk/models/sync_request_model.rb
Overview
Represents a Sync action that loads data from a connector into the Lockstep Platform. Users can request Sync actions manually using Lockstep Inbox, or via the [Create Sync API](developer.lockstep.io/reference/post_api-v1-sync). Each Sync action is tied to an [AppEnrollment](developer.lockstep.io/docs/applications-and-enrollments). When the Sync action is complete, the field ‘StatusCode` will be set to either `Success` or `Failed`.
You can fetch a list of detailed results for the Sync API by calling Retrieve or Query with an ‘include` parameter of `details`. These detailed results contain line-by-line errors that were detected during processing of this sync.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the AppEnrollment object that executed this sync request.
-
#created ⇒ Date-time
The date this sync request was created.
-
#details ⇒ Object
The detailed list of results and errors that occurred during the processing of this SyncRequest.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#modified ⇒ Date-time
The date this sync request was last modified.
-
#modified_user_id ⇒ Uuid
The ID number of the user who most recently modified this sync request.
-
#process_result_message ⇒ String
Message containing information about the sync request results.
-
#status_code ⇒ String
The status of processing for this SyncRequest.
-
#sync_request_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ SyncRequestModel
constructor
Initialize the SyncRequestModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ SyncRequestModel
Initialize the SyncRequestModel using the provided prototype
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 34 def initialize(params = {}) @sync_request_id = params.dig(:sync_request_id) @group_key = params.dig(:group_key) @status_code = params.dig(:status_code) @process_result_message = params.dig(:process_result_message) @app_enrollment_id = params.dig(:app_enrollment_id) @created = params.dig(:created) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @details = params.dig(:details) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the AppEnrollment object that executed this sync request.
64 65 66 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 64 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns The date this sync request was created.
68 69 70 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 68 def created @created end |
#details ⇒ Object
Returns The detailed list of results and errors that occurred during the processing of this SyncRequest. This information is available only after the SyncRequest has completed. You will only be able to fetch this field if the SyncRequest’s ‘StatusCode` field is set to `Cancelled`, `Success`, or `Failed`. To retrieve this collection, add the keyword `details` to the `include` parameter on your Retrieve or Query requests.
80 81 82 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 80 def details @details end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
52 53 54 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 52 def group_key @group_key end |
#modified ⇒ Date-time
Returns The date this sync request was last modified.
72 73 74 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 72 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID number of the user who most recently modified this sync request.
76 77 78 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 76 def modified_user_id @modified_user_id end |
#process_result_message ⇒ String
Returns Message containing information about the sync request results.
60 61 62 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 60 def @process_result_message end |
#status_code ⇒ String
Returns The status of processing for this SyncRequest. When a SyncRequest is created, it is flagged as ‘Ready`. When it is picked up for execution, its status moves to `In Progress`. When it is complete, its status will move to `Success` or `Failed`. If another API call cancels the SyncRequest, its status will move to `Cancelled`. * Ready * In Progress * Cancelled * Failed * Success.
56 57 58 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 56 def status_code @status_code end |
#sync_request_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
48 49 50 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 48 def sync_request_id @sync_request_id end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 84 def as_json(={}) { 'syncRequestId' => @sync_request_id, 'groupKey' => @group_key, 'statusCode' => @status_code, 'processResultMessage' => @process_result_message, 'appEnrollmentId' => @app_enrollment_id, 'created' => @created, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'details' => @details, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
100 101 102 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 100 def to_json(*) "[#{as_json(*).to_json(*)}]" end |