Class: LockstepSdk::CustomFieldValueModel
- Inherits:
-
Object
- Object
- LockstepSdk::CustomFieldValueModel
- Defined in:
- lib/lockstep_sdk/models/custom_field_value_model.rb
Overview
A Custom Field represents metadata added to an object within the Lockstep Platform. Lockstep provides a core definition for each object. The core definition is intended to represent a level of compatibility that provides support across most accounting systems and products. When a user or developer requires information beyond this core definition, you can use Custom Fields to represent this information.
See [Extensibility](developer.lockstep.io/docs/extensibility) for more information.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this attachment record.
-
#created ⇒ Date-time
Date created.
-
#created_user_id ⇒ Uuid
Id of user who created this value.
-
#custom_field_definition ⇒ CustomFieldDefinitionModel
Definition of the value.
-
#custom_field_definition_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#custom_field_label ⇒ String
Text to display in-application for custom field.
-
#data_type ⇒ String
Data type of this definition.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#modified ⇒ Date-time
Date modified.
-
#modified_user_id ⇒ Uuid
Id of user who modified this value.
-
#numeric_value ⇒ Double
Number data for field.
-
#record_key ⇒ Uuid
Additional key if source table doesn’t have a unique id.
-
#string_value ⇒ String
String of data for field.
-
#table_key ⇒ String
Table to which this definition belongs.
-
#value ⇒ String
The value of this custom field.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CustomFieldValueModel
constructor
Initialize the CustomFieldValueModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CustomFieldValueModel
Initialize the CustomFieldValueModel using the provided prototype
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 30 def initialize(params = {}) @group_key = params.dig(:group_key) @custom_field_definition_id = params.dig(:custom_field_definition_id) @record_key = params.dig(:record_key) @table_key = params.dig(:table_key) @custom_field_label = params.dig(:custom_field_label) @data_type = params.dig(:data_type) @string_value = params.dig(:string_value) @numeric_value = params.dig(:numeric_value) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @app_enrollment_id = params.dig(:app_enrollment_id) @value = params.dig(:value) @custom_field_definition = params.dig(:custom_field_definition) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the application that imported this attachment record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
98 99 100 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 98 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns Date created.
82 83 84 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 82 def created @created end |
#created_user_id ⇒ Uuid
Returns Id of user who created this value.
86 87 88 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 86 def created_user_id @created_user_id end |
#custom_field_definition ⇒ CustomFieldDefinitionModel
Returns Definition of the value.
106 107 108 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 106 def custom_field_definition @custom_field_definition end |
#custom_field_definition_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
54 55 56 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 54 def custom_field_definition_id @custom_field_definition_id end |
#custom_field_label ⇒ String
Returns Text to display in-application for custom field.
66 67 68 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 66 def custom_field_label @custom_field_label end |
#data_type ⇒ String
Returns Data type of this definition.
70 71 72 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 70 def data_type @data_type 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. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
50 51 52 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 50 def group_key @group_key end |
#modified ⇒ Date-time
Returns Date modified.
90 91 92 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 90 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns Id of user who modified this value.
94 95 96 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 94 def modified_user_id @modified_user_id end |
#numeric_value ⇒ Double
Returns Number data for field.
78 79 80 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 78 def numeric_value @numeric_value end |
#record_key ⇒ Uuid
Returns Additional key if source table doesn’t have a unique id.
58 59 60 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 58 def record_key @record_key end |
#string_value ⇒ String
Returns String of data for field.
74 75 76 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 74 def string_value @string_value end |
#table_key ⇒ String
Returns Table to which this definition belongs.
62 63 64 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 62 def table_key @table_key end |
#value ⇒ String
Returns The value of this custom field.
102 103 104 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 102 def value @value end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 110 def as_json(={}) { 'groupKey' => @group_key, 'customFieldDefinitionId' => @custom_field_definition_id, 'recordKey' => @record_key, 'tableKey' => @table_key, 'customFieldLabel' => @custom_field_label, 'dataType' => @data_type, 'stringValue' => @string_value, 'numericValue' => @numeric_value, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'appEnrollmentId' => @app_enrollment_id, 'value' => @value, 'customFieldDefinition' => @custom_field_definition, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
132 133 134 |
# File 'lib/lockstep_sdk/models/custom_field_value_model.rb', line 132 def to_json(*) "[#{as_json(*).to_json(*)}]" end |