Class: LockstepSdk::MagicLinkModel
- Inherits:
-
Object
- Object
- LockstepSdk::MagicLinkModel
- Defined in:
- lib/lockstep_sdk/models/magic_link_model.rb
Overview
Represents a magic link that can be used to log in to a Lockstep application.
Instance Attribute Summary collapse
-
#accounting_profile_id ⇒ Uuid
The ID of the accounting profile associated to this magic link.
-
#application_id ⇒ Uuid
The ID of the application for this magic link.
-
#company_id ⇒ Uuid
The ID of the company associated to this magic link.
-
#created ⇒ Date-time
The date that the magic link was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created the magic link.
-
#expires ⇒ Date-time
The UTC date and time when this magic link expires.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#magic_link_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#magic_link_url ⇒ String
The created magic link URL.
-
#modified ⇒ Date-time
The date that the magic link was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified the magic link.
-
#revoked ⇒ Date-time
The UTC date and time when this magic link was revoked.
-
#user ⇒ UserAccountModel
The user associated with this magic link.
-
#user_id ⇒ Uuid
The unique ID of the user that this magic link is associated with.
-
#user_role ⇒ Uuid
The ID of the user role for the magic link.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ MagicLinkModel
constructor
Initialize the MagicLinkModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ MagicLinkModel
Initialize the MagicLinkModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 25 def initialize(params = {}) @magic_link_id = params.dig(:magic_link_id) @group_key = params.dig(:group_key) @user_id = params.dig(:user_id) @user_role = params.dig(:user_role) @application_id = params.dig(:application_id) @expires = params.dig(:expires) @revoked = params.dig(:revoked) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @company_id = params.dig(:company_id) @accounting_profile_id = params.dig(:accounting_profile_id) @magic_link_url = params.dig(:magic_link_url) @user = params.dig(:user) end |
Instance Attribute Details
#accounting_profile_id ⇒ Uuid
Returns The ID of the accounting profile associated to this magic link.
93 94 95 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 93 def accounting_profile_id @accounting_profile_id end |
#application_id ⇒ Uuid
Returns The ID of the application for this magic link.
61 62 63 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 61 def application_id @application_id end |
#company_id ⇒ Uuid
Returns The ID of the company associated to this magic link.
89 90 91 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 89 def company_id @company_id end |
#created ⇒ Date-time
Returns The date that the magic link was created.
73 74 75 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 73 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created the magic link.
77 78 79 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 77 def created_user_id @created_user_id end |
#expires ⇒ Date-time
Returns The UTC date and time when this magic link expires.
65 66 67 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 65 def expires @expires end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created.
49 50 51 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 49 def group_key @group_key end |
#magic_link_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
45 46 47 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 45 def magic_link_id @magic_link_id end |
#magic_link_url ⇒ String
Returns The created magic link URL. This will only be returned upon creation of the magic link. All other times, this value will be ‘null`.
97 98 99 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 97 def magic_link_url @magic_link_url end |
#modified ⇒ Date-time
Returns The date that the magic link was last modified.
81 82 83 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 81 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified the magic link.
85 86 87 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 85 def modified_user_id @modified_user_id end |
#revoked ⇒ Date-time
Returns The UTC date and time when this magic link was revoked.
69 70 71 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 69 def revoked @revoked end |
#user ⇒ UserAccountModel
Returns The user associated with this magic link. To retrieve this item, specify ‘User` in the “Include” parameter for your query.
101 102 103 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 101 def user @user end |
#user_id ⇒ Uuid
Returns The unique ID of the user that this magic link is associated with.
53 54 55 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 53 def user_id @user_id end |
#user_role ⇒ Uuid
Returns The ID of the user role for the magic link.
57 58 59 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 57 def user_role @user_role end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 105 def as_json(={}) { 'magicLinkId' => @magic_link_id, 'groupKey' => @group_key, 'userId' => @user_id, 'userRole' => @user_role, 'applicationId' => @application_id, 'expires' => @expires, 'revoked' => @revoked, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'companyId' => @company_id, 'accountingProfileId' => @accounting_profile_id, 'magicLinkUrl' => @magic_link_url, 'user' => @user, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
127 128 129 |
# File 'lib/lockstep_sdk/models/magic_link_model.rb', line 127 def to_json(*) "[#{as_json(*).to_json(*)}]" end |