Class: InvoiceLinesClient
- Inherits:
-
Object
- Object
- InvoiceLinesClient
- Defined in:
- lib/lockstep_sdk/clients/invoice_lines_client.rb
Instance Method Summary collapse
-
#create_invoiceline(body:) ⇒ Object
Creates one or more invoice lines within this account and returns the created records.
- #delete_invoice_lines(body:) ⇒ Object
- #deletes_invoice_line(invoice_line_id:) ⇒ Object
-
#initialize(connection) ⇒ InvoiceLinesClient
constructor
Initialize the InvoiceLinesClient class with an API client instance.
-
#query_invoice_lines(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoice Lines for the account using specified filtering 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.
- #retrieves_invoice_line(invoice_line_id:) ⇒ Object
-
#update_invoice_line(invoice_line_id:, body:) ⇒ Object
Updates an existing Invoice Line with the information supplied to this PATCH call.
Constructor Details
#initialize(connection) ⇒ InvoiceLinesClient
Initialize the InvoiceLinesClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#create_invoiceline(body:) ⇒ Object
Creates one or more invoice lines within this account and returns the created records
31 32 33 34 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 31 def create_invoiceline(body:) path = "/api/v1/invoice-lines" @connection.request(:post, path, body, nil) end |
#delete_invoice_lines(body:) ⇒ Object
40 41 42 43 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 40 def delete_invoice_lines(body:) path = "/api/v1/invoice-lines" @connection.request(:delete, path, body, nil) end |
#deletes_invoice_line(invoice_line_id:) ⇒ Object
70 71 72 73 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 70 def deletes_invoice_line(invoice_line_id:) path = "/api/v1/invoice-lines/#{invoiceLineId}" @connection.request(:delete, path, nil, nil) end |
#query_invoice_lines(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoice Lines for the account using specified filtering 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.
83 84 85 86 87 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 83 def query_invoice_lines(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/invoice-lines/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieves_invoice_line(invoice_line_id:) ⇒ Object
49 50 51 52 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 49 def retrieves_invoice_line(invoice_line_id:) path = "/api/v1/invoice-lines/#{invoiceLineId}" @connection.request(:get, path, nil, nil) end |
#update_invoice_line(invoice_line_id:, body:) ⇒ Object
Updates an existing Invoice Line 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.
61 62 63 64 |
# File 'lib/lockstep_sdk/clients/invoice_lines_client.rb', line 61 def update_invoice_line(invoice_line_id:, body:) path = "/api/v1/invoice-lines/#{invoiceLineId}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |