Class: LockstepSdk::SyncRequestModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/sync_request_model.rb

Overview

Represents a user request to sync data

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ SyncRequestModel

Initialize the SyncRequestModel using the provided prototype



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 28

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_idUuid

Returns App enrollment sync request is for.

Returns:

  • (Uuid)

    App enrollment sync request is for



58
59
60
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 58

def app_enrollment_id
  @app_enrollment_id
end

#createdDate-time

Returns The date this sync request was created.

Returns:

  • (Date-time)

    The date this sync request was created



62
63
64
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 62

def created
  @created
end

#detailsObject

Returns The detailed results from the sync. To retrieve this collection, set `includeDetails` to true in your GET requests.

Returns:

  • (Object)

    The detailed results from the sync. To retrieve this collection, set `includeDetails` to true in your GET requests.



74
75
76
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 74

def details
  @details
end

#group_keyUuid

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).

Returns:

  • (Uuid)

    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).



46
47
48
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 46

def group_key
  @group_key
end

#modifiedDate-time

Returns The date this sync request was last modified.

Returns:

  • (Date-time)

    The date this sync request was last modified



66
67
68
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 66

def modified
  @modified
end

#modified_user_idUuid

Returns The ID number of the user who most recently modified this sync request.

Returns:

  • (Uuid)

    The ID number of the user who most recently modified this sync request.



70
71
72
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 70

def modified_user_id
  @modified_user_id
end

#process_result_messageString

Returns Message containing information about the sync request results.

Returns:

  • (String)

    Message containing information about the sync request results



54
55
56
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 54

def process_result_message
  @process_result_message
end

#status_codeString

Returns Potential values = Cancelled, Ready, In Progress, Success, Failed.

Returns:

  • (String)

    Potential values = Cancelled, Ready, In Progress, Success, Failed



50
51
52
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 50

def status_code
  @status_code
end

#sync_request_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



42
43
44
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 42

def sync_request_id
  @sync_request_id
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 78

def as_json(options={})
    {
        '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.

Returns:

  • (String)

    This object converted to a JSON string



94
95
96
# File 'lib/lockstep_sdk/models/sync_request_model.rb', line 94

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end