Class: LockstepSdk::ErpModel
- Inherits:
-
Object
- Object
- LockstepSdk::ErpModel
- Defined in:
- lib/lockstep_sdk/models/erp_model.rb
Overview
Represents unsupported ERP systems
Instance Attribute Summary collapse
-
#erp_system_id ⇒ Uuid
Unique ID for this ERP.
-
#is_supported ⇒ Boolean
Flag to indicate if ERP is supported.
-
#name ⇒ String
Name of ERP.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ErpModel
constructor
Initialize the ErpModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ErpModel
Initialize the ErpModel using the provided prototype
28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 28 def initialize(params = {}) @erp_system_id = params.dig(:erp_system_id) @name = params.dig(:name) @is_supported = params.dig(:is_supported) end |
Instance Attribute Details
#erp_system_id ⇒ Uuid
Returns Unique ID for this ERP.
36 37 38 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 36 def erp_system_id @erp_system_id end |
#is_supported ⇒ Boolean
Returns Flag to indicate if ERP is supported.
44 45 46 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 44 def is_supported @is_supported end |
#name ⇒ String
Returns Name of ERP.
40 41 42 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 40 def name @name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
48 49 50 51 52 53 54 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 48 def as_json(={}) { 'erpSystemId' => @erp_system_id, 'name' => @name, 'isSupported' => @is_supported, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
58 59 60 |
# File 'lib/lockstep_sdk/models/erp_model.rb', line 58 def to_json(*) "[#{as_json(*).to_json(*)}]" end |