Class: LockstepSdk::ErpInfoModel

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

Overview

Represents the ERP object sent in a provisioning request

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ErpInfoModel

Initialize the ErpInfoModel using the provided prototype



26
27
28
29
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 26

def initialize(params = {})
    @app_id = params.dig(:app_id)
    @data = params.dig(:data)
end

Instance Attribute Details

#app_idUuid

Returns The id of the ERP's App.

Returns:

  • (Uuid)

    The id of the ERP's App



32
33
34
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 32

def app_id
  @app_id
end

#dataConnectorInfoModel

Returns The data required to store for connector access.

Returns:



34
35
36
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 34

def data
  @data
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



37
38
39
40
41
42
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 37

def as_json(options={})
    {
        'appId' => @app_id,
        'data' => @data,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



45
46
47
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 45

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