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



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

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

Instance Attribute Details

#companyCompanyModel

Returns The company information for the new user and group.

Returns:

  • (CompanyModel)

    The company information for the new user and group



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

def company
  @company
end

#default_currencyString

Returns The default currency of the new user.

Returns:

  • (String)

    The default currency of the new user



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

def default_currency
  @default_currency
end

#erpErpInfoModel

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

Returns:

  • (ErpInfoModel)

    The information necessary to enroll the user in their ERP



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

def erp
  @erp
end

#full_nameString

Returns The full name of the new user.

Returns:

  • (String)

    The full name of the new user



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

def full_name
  @full_name
end

#time_zoneString

Returns The time zone of the new user.

Returns:

  • (String)

    The time zone of the new user



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

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



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

def as_json(options={})
    {
        'fullName' => @full_name,
        'timeZone' => @time_zone,
        'defaultCurrency' => @default_currency,
        'erp' => @erp,
        'company' => @company,
    }
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/provisioning_model.rb', line 57

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