Class: CustomFieldValuesClient

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/clients/custom_field_values_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ CustomFieldValuesClient

Initialize the CustomFieldValuesClient class with an API client instance.



22
23
24
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 22

def initialize(connection)
    @connection = connection
end

Instance Method Details

#create_fields(body:) ⇒ Object

Creates one or more Custom Fields and returns the records as created.

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.



82
83
84
85
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 82

def create_fields(body:)
    path = "/api/v1/CustomFieldValues"
    @connection.request(:post, path, body, nil)
end

#delete_field(definition_id:, record_key:) ⇒ Object

Deletes the Custom Field referred to by this unique identifier.

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.



69
70
71
72
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 69

def delete_field(definition_id:, record_key:)
    path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
    @connection.request(:delete, path, nil, nil)
end

#query_fields(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object

Queries Custom Fields within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.

More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.

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.



101
102
103
104
105
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 101

def query_fields(filter:, include_param:, order:, page_size:, page_number:)
    path = "/api/v1/CustomFieldValues/query"
    params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
    @connection.request(:get, path, nil, params)
end

#retrieve_field(definition_id:, record_key:, include_param:) ⇒ Object

Retrieves all Custom Field Definitions.

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.



37
38
39
40
41
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 37

def retrieve_field(definition_id:, record_key:, include_param:)
    path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
    params = {:include => include_param}
    @connection.request(:get, path, nil, params)
end

#update_field(definition_id:, record_key:, body:) ⇒ Object

Updates an existing Custom Field with the information supplied to this PATCH call.

The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.

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.



55
56
57
58
# File 'lib/lockstep_sdk/clients/custom_field_values_client.rb', line 55

def update_field(definition_id:, record_key:, body:)
    path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
    @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
end