Class: LockstepSdk::PaymentModelErpWriteResult

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

Overview

Contains results of a write back request

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PaymentModelErpWriteResult

Initialize the PaymentModelErpWriteResult using the provided prototype



25
26
27
28
29
30
31
32
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 25

def initialize(params = {})
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @erp_key = params.dig(:erp_key)
    @group_key = params.dig(:group_key)
    @message = params.dig(:message)
    @sync_request_id = params.dig(:sync_request_id)
    @results = params.dig(:results)
end

Instance Attribute Details

#app_enrollment_idUuid

Returns The id of the connected AppEnrollmentModel.

Returns:

  • (Uuid)

    The id of the connected AppEnrollmentModel



36
37
38
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 36

def app_enrollment_id
  @app_enrollment_id
end

#erp_keyString

Returns The ErpKey for the object written to the Erp if created.

Returns:

  • (String)

    The ErpKey for the object written to the Erp if created



40
41
42
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 40

def erp_key
  @erp_key
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).



44
45
46
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 44

def group_key
  @group_key
end

#messageString

Returns An optional message to return with the result.

Returns:

  • (String)

    An optional message to return with the result



48
49
50
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 48

def message
  @message
end

#resultsPaymentModel

Returns Results from the ERP write operation.

Returns:



56
57
58
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 56

def results
  @results
end

#sync_request_idUuid

Returns The id of the SyncRequestModel the requests were added to.

Returns:

  • (Uuid)

    The id of the SyncRequestModel the requests were added to



52
53
54
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 52

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



60
61
62
63
64
65
66
67
68
69
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 60

def as_json(options={})
    {
        'appEnrollmentId' => @app_enrollment_id,
        'erpKey' => @erp_key,
        'groupKey' => @group_key,
        'message' => @message,
        'syncRequestId' => @sync_request_id,
        'results' => @results,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



73
74
75
# File 'lib/lockstep_sdk/models/payment_model_erp_write_result.rb', line 73

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