Class: CreditMemosAppliedClient
- Inherits:
-
Object
- Object
- CreditMemosAppliedClient
- Defined in:
- lib/lockstep_sdk/clients/credit_memos_applied_client.rb
Instance Method Summary collapse
-
#create_credit_memos_applied(body:) ⇒ Object
Creates one or more Credit Memos Applied within this account and returns the records as created.
-
#delete_credit_memo_applied(id:) ⇒ Object
Deletes the Credit Memo Applied referred to by this unique identifier.
-
#initialize(connection) ⇒ CreditMemosAppliedClient
constructor
Initialize the CreditMemosAppliedClient class with an API client instance.
-
#query_credit_memos_applied(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Credit Memos Applied for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_credit_memo_applied(id:, include_param:) ⇒ Object
Retrieves the Credit Memo Applied specified by this unique identifier, optionally including nested data sets.
-
#update_credit_memos_applied(id:, body:) ⇒ Object
Updates an existing Credit Memo Applied with the information supplied to this PATCH call.
Constructor Details
#initialize(connection) ⇒ CreditMemosAppliedClient
Initialize the CreditMemosAppliedClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#create_credit_memos_applied(body:) ⇒ Object
Creates one or more Credit Memos Applied within this account and returns the records as created.
Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Applied record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Applied records to track which Invoices were paid using this Credit.
71 72 73 74 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 71 def create_credit_memos_applied(body:) path = "/api/v1/credit-memos-applied" @connection.request(:post, path, body, nil) end |
#delete_credit_memo_applied(id:) ⇒ Object
Deletes the Credit Memo Applied referred to by this unique identifier.
Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Applied record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Applied records to track which Invoices were paid using this Credit.
60 61 62 63 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 60 def delete_credit_memo_applied(id:) path = "/api/v1/credit-memos-applied/#{id}" @connection.request(:delete, path, nil, nil) end |
#query_credit_memos_applied(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Credit Memos Applied 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.
Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Applied record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Applied records to track which Invoices were paid using this Credit.
88 89 90 91 92 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 88 def query_credit_memos_applied(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/credit-memos-applied/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_credit_memo_applied(id:, include_param:) ⇒ Object
Retrieves the Credit Memo Applied specified by this unique identifier, optionally including nested data sets.
Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Applied record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Applied records to track which Invoices were paid using this Credit.
34 35 36 37 38 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 34 def retrieve_credit_memo_applied(id:, include_param:) path = "/api/v1/credit-memos-applied/#{id}" params = {:include => include_param} @connection.request(:get, path, nil, params) end |
#update_credit_memos_applied(id:, body:) ⇒ Object
Updates an existing Credit Memo Applied 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.
Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Applied record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Applied records to track which Invoices were paid using this Credit.
49 50 51 52 |
# File 'lib/lockstep_sdk/clients/credit_memos_applied_client.rb', line 49 def update_credit_memos_applied(id:, body:) path = "/api/v1/credit-memos-applied/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |