Class: LockstepSdk::ErpModel

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

Overview

Represents unsupported ERP systems

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ErpModel

Initialize the ErpModel using the provided prototype



27
28
29
30
31
# File 'lib/lockstep_sdk/models/erp_model.rb', line 27

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_idUuid

Returns Unique ID for this ERP.

Returns:

  • (Uuid)

    Unique ID for this ERP



35
36
37
# File 'lib/lockstep_sdk/models/erp_model.rb', line 35

def erp_system_id
  @erp_system_id
end

#is_supportedBoolean

Returns Flag to indicate if ERP is supported.

Returns:

  • (Boolean)

    Flag to indicate if ERP is supported



43
44
45
# File 'lib/lockstep_sdk/models/erp_model.rb', line 43

def is_supported
  @is_supported
end

#nameString

Returns Name of ERP.

Returns:

  • (String)

    Name of ERP



39
40
41
# File 'lib/lockstep_sdk/models/erp_model.rb', line 39

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



47
48
49
50
51
52
53
# File 'lib/lockstep_sdk/models/erp_model.rb', line 47

def as_json(options={})
    {
        'erpSystemId' => @erp_system_id,
        'name' => @name,
        'isSupported' => @is_supported,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



57
58
59
# File 'lib/lockstep_sdk/models/erp_model.rb', line 57

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