Class: InvoiceAddressesClient
- Inherits:
-
Object
- Object
- InvoiceAddressesClient
- Defined in:
- lib/lockstep_sdk/clients/invoice_addresses_client.rb
Instance Method Summary collapse
-
#create_invoice_address(body:) ⇒ Object
Creates one or more Invoice Addresses within this account and returns the records as created.
-
#delete_invoice_address(id:) ⇒ Object
Deletes the Invoice Address by this unique identifier.
-
#initialize(connection) ⇒ InvoiceAddressesClient
constructor
Initialize the InvoiceAddressesClient class with an API client instance.
-
#query_invoice_addresses(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoice Addresses for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_invoice_address(id:, include_param:) ⇒ Object
Retrieves the invoice address specified by this unique identifier, optionally including nested data sets.
-
#update_invoice_address(id:, body:) ⇒ Object
Updates an existing Invoice Address with the information supplied to this PATCH call.
Constructor Details
#initialize(connection) ⇒ InvoiceAddressesClient
Initialize the InvoiceAddressesClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#create_invoice_address(body:) ⇒ Object
Creates one or more Invoice Addresses within this account and returns the records as created.
An Invoice Address contains address information about an invoice. You can use Invoice Addresses to track information about locations important to an invoice such as: where a company’s goods are shipped from, where a company’s goods are shipped to or billing addresses to name a few.
71 72 73 74 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 71 def create_invoice_address(body:) path = "/api/v1/invoice-addresses" @connection.request(:post, path, body, nil) end |
#delete_invoice_address(id:) ⇒ Object
Deletes the Invoice Address by this unique identifier.
An Invoice Address contains address information about an invoice. You can use Invoice Addresses to track information about locations important to an invoice such as: where a company’s goods are shipped from, where a company’s goods are shipped to or billing addresses to name a few.
46 47 48 49 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 46 def delete_invoice_address(id:) path = "/api/v1/invoice-addresses/#{id}" @connection.request(:delete, path, nil, nil) end |
#query_invoice_addresses(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Invoice Addresses 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.
86 87 88 89 90 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 86 def query_invoice_addresses(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/invoice-addresses/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_invoice_address(id:, include_param:) ⇒ Object
Retrieves the invoice address specified by this unique identifier, optionally including nested data sets.
An Invoice Address contains address information about an invoice. You can use Invoice Addresses to track information about locations important to an invoice such as: where a company’s goods are shipped from, where a company’s goods are shipped to or billing addresses to name a few.
34 35 36 37 38 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 34 def retrieve_invoice_address(id:, include_param:) path = "/api/v1/invoice-addresses/#{id}" params = {:include => include_param} @connection.request(:get, path, nil, params) end |
#update_invoice_address(id:, body:) ⇒ Object
Updates an existing Invoice Address 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 Address contains address information about an invoice. You can use Invoice Addresses to track information about locations important to an invoice such as: where a company’s goods are shipped from, where a company’s goods are shipped to or billing addresses to name a few.
60 61 62 63 |
# File 'lib/lockstep_sdk/clients/invoice_addresses_client.rb', line 60 def update_invoice_address(id:, body:) path = "/api/v1/invoice-addresses/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |