Class: InvoicesClient
- Inherits:
-
Object
- Object
- InvoicesClient
- Defined in:
- lib/lockstep_sdk/clients/invoices_client.rb
Instance Method Summary collapse
-
#create_invoices(body:) ⇒ Object
Creates one or more Invoices within this account and returns the records as created.
-
#delete_invoice(id:) ⇒ Object
Deletes the Invoice referred to by this unique identifier.
-
#initialize(lockstepsdk) ⇒ InvoicesClient
constructor
Initialize the InvoicesClient class with a lockstepsdk instance.
-
#query_at_risk_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries At Risk Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#query_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#query_invoices(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_invoice(id:, include_param:) ⇒ Object
Retrieves the Invoice specified by this unique identifier, optionally including nested data sets.
-
#update_invoice(id:, body:) ⇒ Object
Updates an existing Invoice with the information supplied to this PATCH call.
Constructor Details
#initialize(lockstepsdk) ⇒ InvoicesClient
Initialize the InvoicesClient class with a lockstepsdk instance.
25 26 27 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 25 def initialize(lockstepsdk) @lockstepsdk = lockstepsdk end |
Instance Method Details
#create_invoices(body:) ⇒ Object
Creates one or more Invoices within this account and returns the records as created.
An Invoice represents a bill sent from one company to another. The creator of the invoice is identified by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the invoice. Invoices have a total amount and a due date, and when some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be different.
70 71 72 73 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 70 def create_invoices(body:) path = "/api/v1/Invoices" @lockstepsdk.request(:post, path, body, nil) end |
#delete_invoice(id:) ⇒ Object
Deletes the Invoice referred to by this unique identifier. An Invoice represents a bill sent from one company to another. The creator of the invoice is identified by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the invoice. Invoices have a total amount and a due date, and when some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be different.
59 60 61 62 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 59 def delete_invoice(id:) path = "/api/v1/Invoices/#{id}" @lockstepsdk.request(:delete, path, nil, nil) end |
#query_at_risk_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries At Risk Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. Display the results using the At Risk Invoice Summary View format.
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.
The At Risk Invoice Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the At Risk Invoice Summary Model.
121 122 123 124 125 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 121 def query_at_risk_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Invoices/views/at-risk-summary" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#query_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. Display the results using the Invoice Summary View format.
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.
The Invoice Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Invoice Summary Model.
103 104 105 106 107 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 103 def query_invoice_summary_view(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Invoices/views/summary" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#query_invoices(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoices 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 Invoice represents a bill sent from one company to another. The creator of the invoice is identified by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the invoice. Invoices have a total amount and a due date, and when some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be different.
85 86 87 88 89 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 85 def query_invoices(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Invoices/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_invoice(id:, include_param:) ⇒ Object
Retrieves the Invoice specified by this unique identifier, optionally including nested data sets.
An Invoice represents a bill sent from one company to another. The creator of the invoice is identified by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the invoice. Invoices have a total amount and a due date, and when some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be different.
37 38 39 40 41 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 37 def retrieve_invoice(id:, include_param:) path = "/api/v1/Invoices/#{id}" params = {:include => include_param} @lockstepsdk.request(:get, path, nil, params) end |
#update_invoice(id:, body:) ⇒ Object
Updates an existing Invoice 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. An Invoice represents a bill sent from one company to another. The creator of the invoice is identified by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the invoice. Invoices have a total amount and a due date, and when some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be different.
50 51 52 53 |
# File 'lib/lockstep_sdk/clients/invoices_client.rb', line 50 def update_invoice(id:, body:) path = "/api/v1/Invoices/#{id}" @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil) end |