Class: InvoiceHistoryClient

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

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ InvoiceHistoryClient

Initialize the InvoiceHistoryClient class with an API client instance.

Parameters:

  • connection (LockstepApi)

    The API client object for this connection



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

def initialize(connection)
    @connection = connection
end

Instance Method Details

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

Queries Invoice History for this account using the specified filtering, sorting, and pagination rules requested.

An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to monitor and observe the changes of this Invoice and track the dates when changes occurred.

Parameters:



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

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

#retrieve_invoice_history(id:) ⇒ Object

Retrieves the history of the Invoice specified by this unique identifier.

An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to monitor and observe the changes of this Invoice and track the dates when changes occurred.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this invoice; NOT the customer’s ERP key



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

def retrieve_invoice_history(id:)
    path = "/api/v1/InvoiceHistory/#{id}"
    @connection.request(:get, path, nil, nil)
end