Class: LockstepSdk::ErpInfoModel
- Inherits:
-
Object
- Object
- LockstepSdk::ErpInfoModel
- Defined in:
- lib/lockstep_sdk/models/erp_info_model.rb
Overview
Represents the ERP object sent in a provisioning request
Instance Attribute Summary collapse
-
#app_id ⇒ Uuid
The id of the ERP’s App.
-
#data ⇒ ConnectorInfoModel
The data required to store for connector access.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ErpInfoModel
constructor
Initialize the ErpInfoModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ErpInfoModel
Initialize the ErpInfoModel using the provided prototype
27 28 29 30 |
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 27 def initialize(params = {}) @app_id = params.dig(:app_id) @data = params.dig(:data) end |
Instance Attribute Details
#app_id ⇒ Uuid
Returns The id of the ERP’s App.
34 35 36 |
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 34 def app_id @app_id end |
#data ⇒ ConnectorInfoModel
Returns The data required to store for connector access.
38 39 40 |
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 38 def data @data end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
42 43 44 45 46 47 |
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 42 def as_json(={}) { 'appId' => @app_id, 'data' => @data, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
51 52 53 |
# File 'lib/lockstep_sdk/models/erp_info_model.rb', line 51 def to_json(*) "[#{as_json(*).to_json(*)}]" end |