Class: LockstepSdk::SyncRequestModel
- Inherits:
-
Object
- Object
- LockstepSdk::SyncRequestModel
- Defined in:
- lib/lockstep_sdk/models/sync_request_model.rb
Overview
Represents a user request to sync data
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
App enrollment sync request is for.
-
#created ⇒ Date-time
The date this sync request was created.
-
#details ⇒ Object
The detailed results from the sync.
-
#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
Potential values = Cancelled, Ready, In Progress, Success, Failed.
-
#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
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 26 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 App enrollment sync request is for.
47 48 49 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 47 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns The date this sync request was created.
49 50 51 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 49 def created @created end |
#details ⇒ Object
Returns The detailed results from the sync. To retrieve this collection, set `includeDetails` to true in your GET requests.
55 56 57 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 55 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).
41 42 43 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 41 def group_key @group_key end |
#modified ⇒ Date-time
Returns The date this sync request was last modified.
51 52 53 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 51 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID number of the user who most recently modified this sync request.
53 54 55 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 53 def modified_user_id @modified_user_id end |
#process_result_message ⇒ String
Returns Message containing information about the sync request results.
45 46 47 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 45 def @process_result_message end |
#status_code ⇒ String
Returns Potential values = Cancelled, Ready, In Progress, Success, Failed.
43 44 45 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 43 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.
39 40 41 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 39 def sync_request_id @sync_request_id end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 58 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.
73 74 75 |
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 73 def to_json(*) "[#{as_json(*).to_json(*)}]" end |