Class: LockstepSdk::ProvisioningModel
- Inherits:
-
Object
- Object
- LockstepSdk::ProvisioningModel
- Defined in:
- lib/lockstep_sdk/models/provisioning_model.rb
Overview
Represents the data sent during the onboarding flow
Instance Attribute Summary collapse
-
#company ⇒ CompanyModel
The company information for the new user and group.
-
#default_currency ⇒ String
The default currency of the new user.
-
#erp ⇒ ErpInfoModel
The information necessary to enroll the user in their ERP.
-
#full_name ⇒ String
The full name of the new user.
-
#time_zone ⇒ String
The time zone of the new user.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ProvisioningModel
constructor
Initialize the ProvisioningModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ProvisioningModel
Initialize the ProvisioningModel using the provided prototype
28 29 30 31 32 33 34 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 28 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
#company ⇒ CompanyModel
Returns The company information for the new user and group.
54 55 56 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 54 def company @company end |
#default_currency ⇒ String
Returns The default currency of the new user.
46 47 48 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 46 def default_currency @default_currency end |
#erp ⇒ ErpInfoModel
Returns The information necessary to enroll the user in their ERP.
50 51 52 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 50 def erp @erp end |
#full_name ⇒ String
Returns The full name of the new user.
38 39 40 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 38 def full_name @full_name end |
#time_zone ⇒ String
Returns The time zone of the new user.
42 43 44 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 42 def time_zone @time_zone end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
58 59 60 61 62 63 64 65 66 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 58 def as_json(={}) { '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.
70 71 72 |
# File 'lib/lockstep_sdk/models/provisioning_model.rb', line 70 def to_json(*) "[#{as_json(*).to_json(*)}]" end |