Class: CustomFieldValuesClient

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

Instance Method Summary collapse

Constructor Details

#initialize(lockstepsdk) ⇒ CustomFieldValuesClient

Initialize the CustomFieldValuesClient class with a lockstepsdk instance.

Parameters:

  • lockstepsdk (LockstepApi)

    The Lockstep API client object for this connection



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

def initialize(lockstepsdk)
    @lockstepsdk = lockstepsdk
end

Instance Method Details

#create_fieldsObject

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.

Parameters:

  • body (CustomFieldValueModel)

    The Custom Fields to create



70
71
72
73
# File 'lib/lockstep_sdk/clients/custom_field_values.rb', line 70

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

#delete_field(definitionId:, recordKey:) ⇒ 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.

Parameters:

  • definitionId (uuid)

    The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.

  • recordKey (uuid)

    The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.



61
62
63
64
65
# File 'lib/lockstep_sdk/clients/custom_field_values.rb', line 61

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

#query_fields(filter:, include_param:, order:, pageSize:, pageNumber:) ⇒ 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.

Parameters:



86
87
88
89
90
# File 'lib/lockstep_sdk/clients/custom_field_values.rb', line 86

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

#retrieve_field(definitionId:, recordKey:, 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.

Parameters:

  • definitionId (uuid)

    The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.

  • recordKey (uuid)

    The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.

  • include_param (string)

    To fetch additional data on this object, specify the list of elements to retrieve. Available collections: CustomFieldDefinition



34
35
36
37
38
# File 'lib/lockstep_sdk/clients/custom_field_values.rb', line 34

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

#update_field(definitionId:, recordKey:) ⇒ 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.

Parameters:

  • definitionId (uuid)

    The unique Lockstep Platform ID number of the Custom Field Definition for the Custom Field Value to retrieve.

  • recordKey (uuid)

    The unique Lockstep Platform ID number of the Lockstep Platform object the Custom Field Value is attached to.

  • body (object)

    A list of changes to apply to this Custom Field



49
50
51
52
53
# File 'lib/lockstep_sdk/clients/custom_field_values.rb', line 49

def update_field(definitionId:, recordKey:)
    path = "/api/v1/CustomFieldValues/#{definitionId}/#{recordKey}"
    params = {}
    @lockstepsdk.request(:patch, path, body, params)
end