Class: LockstepSdk::MagicLinkStatusModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/magic_link_status_model.rb

Overview

Contains information about the user’s magic link

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ MagicLinkStatusModel

Initialize the MagicLinkStatusModel using the provided prototype



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

def initialize(params = {})
    @magic_link_id = params.dig(:magic_link_id)
    @application_id = params.dig(:application_id)
    @company_id = params.dig(:company_id)
    @accounting_profile_id = params.dig(:accounting_profile_id)
    @expires = params.dig(:expires)
end

Instance Attribute Details

#accounting_profile_idUuid

Returns The id of the accounting profile for the Magic Link.

Returns:

  • (Uuid)

    The id of the accounting profile for the Magic Link



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

def accounting_profile_id
  @accounting_profile_id
end

#application_idUuid

Returns The id of the application for the Magic Link.

Returns:

  • (Uuid)

    The id of the application for the Magic Link



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

def application_id
  @application_id
end

#company_idUuid

Returns The id of the target company for the Magic Link.

Returns:

  • (Uuid)

    The id of the target company for the Magic Link



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

def company_id
  @company_id
end

#expiresDate-time

Returns The UTC date and time when this magic link expires.

Returns:

  • (Date-time)

    The UTC date and time when this magic link expires.



51
52
53
# File 'lib/lockstep_sdk/models/magic_link_status_model.rb', line 51

def expires
  @expires
end

Returns The id of the Magic link used to authenticate.

Returns:

  • (Uuid)

    The id of the Magic link used to authenticate.



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

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



55
56
57
58
59
60
61
62
63
# File 'lib/lockstep_sdk/models/magic_link_status_model.rb', line 55

def as_json(options={})
    {
        'magicLinkId' => @magic_link_id,
        'applicationId' => @application_id,
        'companyId' => @company_id,
        'accountingProfileId' => @accounting_profile_id,
        'expires' => @expires,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



67
68
69
# File 'lib/lockstep_sdk/models/magic_link_status_model.rb', line 67

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