Class: ProfilesAccountingClient

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

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ ProfilesAccountingClient

Initialize the ProfilesAccountingClient class with an API client instance.

Parameters:

  • connection (LockstepApi)

    The API client object for this connection



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

def initialize(connection)
    @connection = connection
end

Instance Method Details

#create_accounting_profiles(body:) ⇒ Object

Creates one or more accounting profiles from a given model.

An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.

Parameters:

  • body (AccountingProfileRequest)

    The Accounting Profiles to create



71
72
73
74
# File 'lib/lockstep_sdk/clients/profiles_accounting_client.rb', line 71

def create_accounting_profiles(body:)
    path = "/api/v1/profiles/accounting"
    @connection.request(:post, path, body, nil)
end

#delete_accounting_profile(id:) ⇒ Object

Delete the Accounting Profile referred to by this unique identifier.

An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Accounting Profile to disable



60
61
62
63
# File 'lib/lockstep_sdk/clients/profiles_accounting_client.rb', line 60

def delete_accounting_profile(id:)
    path = "/api/v1/profiles/accounting/#{id}"
    @connection.request(:delete, path, nil, nil)
end

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

Queries Accounting Profiles for this account 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.

An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.

Parameters:



88
89
90
91
92
# File 'lib/lockstep_sdk/clients/profiles_accounting_client.rb', line 88

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

#retrieve_accounting_profile(id:, include_param:) ⇒ Object

Retrieves the Accounting Profile specified by this unique identifier, optionally including nested data sets.

An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this Accounting Profile

  • include_param (string)

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



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

def retrieve_accounting_profile(id:, include_param:)
    path = "/api/v1/profiles/accounting/#{id}"
    params = {:include => include_param}
    @connection.request(:get, path, nil, params)
end

#update_accounting_profile(id:, body:) ⇒ Object

Updates an accounting profile that matches the specified id with the requested information.

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.

An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Accounting Profile to update

  • body (object)

    A list of changes to apply to this Accounting Profile



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

def update_accounting_profile(id:, body:)
    path = "/api/v1/profiles/accounting/#{id}"
    @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
end