Class: LockstepSdk::CodeDefinitionModel

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

Overview

Represents a Code Definition. Codes can be used as shortened, human readable strings. Additionally, this table can be used to store lists of system values for Lockstep objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ CodeDefinitionModel

Initialize the CodeDefinitionModel using the provided prototype



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 28

def initialize(params = {})
    @code_definition_id = params.dig(:code_definition_id)
    @group_key = params.dig(:group_key)
    @code_type = params.dig(:code_type)
    @code = params.dig(:code)
    @code_description = params.dig(:code_description)
    @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

#codeString

Returns The Code to be defined.

Returns:

  • (String)

    The Code to be defined.



54
55
56
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 54

def code
  @code
end

#code_definition_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



42
43
44
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 42

def code_definition_id
  @code_definition_id
end

#code_descriptionString

Returns The definition of the Code.

Returns:

  • (String)

    The definition of the Code



58
59
60
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 58

def code_description
  @code_description
end

#code_typeString

Returns The type of the Code Definition.

Returns:

  • (String)

    The type of the Code Definition



50
51
52
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 50

def code_type
  @code_type
end

#createdDate-time

Returns The date that the Code Definition was created.

Returns:

  • (Date-time)

    The date that the Code Definition was created



62
63
64
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 62

def created
  @created
end

#created_user_idUuid

Returns The ID of the user who created the Code Definition.

Returns:

  • (Uuid)

    The ID of the user who created the Code Definition



66
67
68
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 66

def created_user_id
  @created_user_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).



46
47
48
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 46

def group_key
  @group_key
end

#modifiedDate-time

Returns The date the Code Definition was last modified.

Returns:

  • (Date-time)

    The date the Code Definition was last modified



70
71
72
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 70

def modified
  @modified
end

#modified_user_idUuid

Returns The ID of the user who last modified the Code Definition.

Returns:

  • (Uuid)

    The ID of the user who last modified the Code Definition



74
75
76
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 74

def modified_user_id
  @modified_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



78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 78

def as_json(options={})
    {
        'codeDefinitionId' => @code_definition_id,
        'groupKey' => @group_key,
        'codeType' => @code_type,
        'code' => @code,
        'codeDescription' => @code_description,
        '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



94
95
96
# File 'lib/lockstep_sdk/models/code_definition_model.rb', line 94

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