Class: LockstepSdk::ProvisioningResponseModel
- Inherits:
-
Object
- Object
- LockstepSdk::ProvisioningResponseModel
- Defined in:
- lib/lockstep_sdk/models/provisioning_response_model.rb
Overview
Represents the response to either a successful or failed account provisioning
Instance Attribute Summary collapse
-
#account_name ⇒ String
If provisioning is successful, contains subscription account name of created user.
-
#app_enrollment_id ⇒ Uuid
If provisioning is successful, contains the app enrollment id of the created app enrollment.
-
#error_message ⇒ String
The error message(s).
-
#group_key ⇒ Uuid
If provisioning is successful, contains the group key of the created user.
-
#sync_request_id ⇒ Uuid
If provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.
-
#user_id ⇒ Uuid
If provisioning is successful, contains the unique identifier of the created user.
-
#user_name ⇒ String
If provisioning is successful, contains the username of the created user.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ProvisioningResponseModel
constructor
Initialize the ProvisioningResponseModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ProvisioningResponseModel
Initialize the ProvisioningResponseModel using the provided prototype
28 29 30 31 32 33 34 35 36 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 28 def initialize(params = {}) @user_name = params.dig(:user_name) @account_name = params.dig(:account_name) @user_id = params.dig(:user_id) @group_key = params.dig(:group_key) @app_enrollment_id = params.dig(:app_enrollment_id) @sync_request_id = params.dig(:sync_request_id) @error_message = params.dig(:error_message) end |
Instance Attribute Details
#account_name ⇒ String
Returns If provisioning is successful, contains subscription account name of created user.
44 45 46 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 44 def account_name @account_name end |
#app_enrollment_id ⇒ Uuid
Returns If provisioning is successful, contains the app enrollment id of the created app enrollment.
56 57 58 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 56 def app_enrollment_id @app_enrollment_id end |
#error_message ⇒ String
Returns The error message(s).
64 65 66 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 64 def @error_message end |
#group_key ⇒ Uuid
Returns If provisioning is successful, contains the group key of the created user.
52 53 54 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 52 def group_key @group_key end |
#sync_request_id ⇒ Uuid
Returns if provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.
60 61 62 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 60 def sync_request_id @sync_request_id end |
#user_id ⇒ Uuid
Returns If provisioning is successful, contains the unique identifier of the created user.
48 49 50 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 48 def user_id @user_id end |
#user_name ⇒ String
Returns If provisioning is successful, contains the username of the created user.
40 41 42 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 40 def user_name @user_name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 68 def as_json(={}) { 'userName' => @user_name, 'accountName' => @account_name, 'userId' => @user_id, 'groupKey' => @group_key, 'appEnrollmentId' => @app_enrollment_id, 'syncRequestId' => @sync_request_id, 'errorMessage' => @error_message, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
82 83 84 |
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 82 def to_json(*) "[#{as_json(*).to_json(*)}]" end |