Class: ProfilesAccountingContactsClient

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

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ ProfilesAccountingContactsClient

Initialize the ProfilesAccountingContactsClient 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_contacts_client.rb', line 22

def initialize(connection)
    @connection = connection
end

Instance Method Details

#create_accounting_profile_contacts(body:) ⇒ Object

Creates one or more Accounting Profile Contacts from a given model.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

Parameters:

  • body (AccountingProfileContactModel)

    The Accounting Profile Contacts to create



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

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

#delete_accounting_profile_contact(id:) ⇒ Object

Delete the Accounting Profile Contact referred to by this unique identifier.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Accounting Profile Contact to delete



44
45
46
47
# File 'lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb', line 44

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

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

Queries Accounting Profile Contacts 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 page on the Lockstep Developer website.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

Parameters:



72
73
74
75
76
# File 'lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb', line 72

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

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

Queries Accounting Profile Contacts and Contacts 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 page on the Lockstep Developer website.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.

Parameters:



92
93
94
95
96
# File 'lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb', line 92

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

#retrieve_accounting_profile_contact(id:) ⇒ Object

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

A Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this Accounting Profile Contact



33
34
35
36
# File 'lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb', line 33

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

#set_secondary_contact_as_primary(id:) ⇒ Object

Reverses the isPrimary fields on the primary and secondary contact to reflect a swap and returns the new primary accounting profile contact model.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Accounting Profile Contact to set as primary



104
105
106
107
# File 'lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb', line 104

def set_secondary_contact_as_primary(id:)
    path = "/api/v1/profiles/accounting/contacts/#{id}/primary"
    @connection.request(:patch, path, nil, nil)
end