Class: LockstepSdk::ProvisioningModel

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

Overview

Represents the data sent during the onboarding flow

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ProvisioningModel

Initialize the ProvisioningModel using the provided prototype



25
26
27
28
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 25

def initialize(params = {})
    @full_name = params.dig(:full_name)
    @erp = params.dig(:erp)
end

Instance Attribute Details

#erpErpInfoModel

Returns The information necessary to enroll the user in their ERP.

Returns:

  • (ErpInfoModel)

    The information necessary to enroll the user in their ERP



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

def erp
  @erp
end

#full_nameString

Returns The full name of the new user.

Returns:

  • (String)

    The full name of the new user



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

def full_name
  @full_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



40
41
42
43
44
45
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 40

def as_json(options={})
    {
        'fullName' => @full_name,
        'erp' => @erp,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



49
50
51
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 49

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