Class: LockstepSdk::CustomFieldDefinitionModel
- Inherits:
-
Object
- Object
- LockstepSdk::CustomFieldDefinitionModel
- Defined in:
- lib/lockstep_sdk/models/custom_field_definition_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 record.
-
#app_id ⇒ Uuid
Id of app this definition belongs to.
-
#created ⇒ Date-time
Date created.
-
#created_user_id ⇒ Uuid
Id of user who created this definition.
-
#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 definition.
-
#sort_order ⇒ Int32
Used for display logic when multiple custom fields exist.
-
#table_key ⇒ String
Table to which this definition belongs.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CustomFieldDefinitionModel
constructor
Initialize the CustomFieldDefinitionModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CustomFieldDefinitionModel
Initialize the CustomFieldDefinitionModel using the provided prototype
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 30 def initialize(params = {}) @group_key = params.dig(:group_key) @custom_field_definition_id = params.dig(:custom_field_definition_id) @table_key = params.dig(:table_key) @app_id = params.dig(:app_id) @custom_field_label = params.dig(:custom_field_label) @data_type = params.dig(:data_type) @sort_order = params.dig(:sort_order) @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) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the application that imported this 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.
91 92 93 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 91 def app_enrollment_id @app_enrollment_id end |
#app_id ⇒ Uuid
Returns Id of app this definition belongs to.
59 60 61 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 59 def app_id @app_id end |
#created ⇒ Date-time
Returns Date created.
75 76 77 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 75 def created @created end |
#created_user_id ⇒ Uuid
Returns Id of user who created this definition.
79 80 81 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 79 def created_user_id @created_user_id 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.
51 52 53 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 51 def custom_field_definition_id @custom_field_definition_id end |
#custom_field_label ⇒ String
Returns Text to display in-application for custom field.
63 64 65 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 63 def custom_field_label @custom_field_label end |
#data_type ⇒ String
Returns Data type of this definition.
67 68 69 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 67 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).
47 48 49 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 47 def group_key @group_key end |
#modified ⇒ Date-time
Returns Date modified.
83 84 85 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 83 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns Id of user who modified this definition.
87 88 89 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 87 def modified_user_id @modified_user_id end |
#sort_order ⇒ Int32
Returns Used for display logic when multiple custom fields exist.
71 72 73 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 71 def sort_order @sort_order end |
#table_key ⇒ String
Returns Table to which this definition belongs.
55 56 57 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 55 def table_key @table_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 95 def as_json(={}) { 'groupKey' => @group_key, 'customFieldDefinitionId' => @custom_field_definition_id, 'tableKey' => @table_key, 'appId' => @app_id, 'customFieldLabel' => @custom_field_label, 'dataType' => @data_type, 'sortOrder' => @sort_order, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'appEnrollmentId' => @app_enrollment_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
114 115 116 |
# File 'lib/lockstep_sdk/models/custom_field_definition_model.rb', line 114 def to_json(*) "[#{as_json(*).to_json(*)}]" end |