Class: LockstepSdk::GroupAccountModel

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

Overview

Represents an account for an entire group

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ GroupAccountModel

Initialize the GroupAccountModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @group_name = params.dig(:group_name)
    @primary_user_id = params.dig(:primary_user_id)
    @group_company_id = params.dig(:group_company_id)
    @is_active = params.dig(:is_active)
    @onboarding_scheduled = params.dig(:onboarding_scheduled)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
end

Instance Attribute Details

#createdDate-time

Returns The date this group account was created.

Returns:

  • (Date-time)

    The date this group account was created



64
65
66
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 64

def created
  @created
end

#created_user_idUuid

Returns The ID of the user who created this group account.

Returns:

  • (Uuid)

    The ID of the user who created this group account



68
69
70
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 68

def created_user_id
  @created_user_id
end

#group_company_idUuid

Returns The CompanyId of the Company the group is associated with.

Returns:

  • (Uuid)

    The CompanyId of the Company the group is associated with



52
53
54
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 52

def group_company_id
  @group_company_id
end

#group_keyUuid

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. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    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. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



40
41
42
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 40

def group_key
  @group_key
end

#group_nameString

Returns The name of the group.

Returns:

  • (String)

    The name of the group



44
45
46
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 44

def group_name
  @group_name
end

#is_activeBoolean

Returns The active status of the group.

Returns:

  • (Boolean)

    The active status of the group



56
57
58
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 56

def is_active
  @is_active
end

#modifiedDate-time

Returns The date this group account was last modified.

Returns:

  • (Date-time)

    The date this group account was last modified



72
73
74
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 72

def modified
  @modified
end

#modified_user_idUuid

Returns The ID of the user who last modified this group account.

Returns:

  • (Uuid)

    The ID of the user who last modified this group account



76
77
78
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 76

def modified_user_id
  @modified_user_id
end

#onboarding_scheduledBoolean

Returns The onboarding session status of the group.

Returns:

  • (Boolean)

    The onboarding session status of the group



60
61
62
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 60

def onboarding_scheduled
  @onboarding_scheduled
end

#primary_user_idUuid

Returns The primary user for the group.

Returns:

  • (Uuid)

    The primary user for the group



48
49
50
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 48

def primary_user_id
  @primary_user_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



80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 80

def as_json(options={})
    {
        'groupKey' => @group_key,
        'groupName' => @group_name,
        'primaryUserId' => @primary_user_id,
        'groupCompanyId' => @group_company_id,
        'isActive' => @is_active,
        'onboardingScheduled' => @onboarding_scheduled,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



97
98
99
# File 'lib/lockstep_sdk/models/group_account_model.rb', line 97

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