Class: LockstepSdk::ProvisioningResponseModel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ProvisioningResponseModel

Initialize the ProvisioningResponseModel using the provided prototype



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

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_nameString

Returns If provisioning is successful, contains subscription account name of created user.

Returns:

  • (String)

    If provisioning is successful, contains subscription account name of created user.



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

def 
  @account_name
end

#app_enrollment_idUuid

Returns If provisioning is successful, contains the app enrollment id of the created app enrollment.

Returns:

  • (Uuid)

    If provisioning is successful, contains the app enrollment id of the created app enrollment.



45
46
47
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 45

def app_enrollment_id
  @app_enrollment_id
end

#error_messageString

Returns The error message(s).

Returns:

  • (String)

    The error message(s).



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

def error_message
  @error_message
end

#group_keyUuid

Returns If provisioning is successful, contains the group key of the created user.

Returns:

  • (Uuid)

    If provisioning is successful, contains the group key of the created user.



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

def group_key
  @group_key
end

#sync_request_idUuid

Returns if provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.

Returns:

  • (Uuid)

    if provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.



47
48
49
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 47

def sync_request_id
  @sync_request_id
end

#user_idUuid

Returns If provisioning is successful, contains the unique identifier of the created user.

Returns:

  • (Uuid)

    If provisioning is successful, contains the unique identifier of the created user.



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

def user_id
  @user_id
end

#user_nameString

Returns If provisioning is successful, contains the username of the created user.

Returns:

  • (String)

    If provisioning is successful, contains the username of the created user.



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

def user_name
  @user_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



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 52

def as_json(options={})
    {
        '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.

Returns:

  • (String)

    This object converted to a JSON string



65
66
67
# File 'lib/lockstep_sdk/models/provisioning_response_model.rb', line 65

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