Class: PaymentsClient
- Inherits:
-
Object
- Object
- PaymentsClient
- Defined in:
- lib/lockstep_sdk/clients/payments.rb
Instance Method Summary collapse
-
#create_payments(body:) ⇒ Object
Creates one or more Payments within this account and returns the records as created.
-
#delete_payment(id:) ⇒ Object
Deletes the Payment referred to by this unique identifier.
-
#initialize(lockstepsdk) ⇒ PaymentsClient
constructor
Initialize the PaymentsClient class with a lockstepsdk instance.
-
#query_payment_detail_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#query_payment_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#query_payments(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_payment(id:, include_param:) ⇒ Object
Retrieves the Payment specified by this unique identifier, optionally including nested data sets.
-
#retrieve_payment_detail_header ⇒ Object
Retrieves aggregated payment data from your account.
-
#update_payment(id:, body:) ⇒ Object
Updates an existing Payment with the information supplied to this PATCH call.
Constructor Details
#initialize(lockstepsdk) ⇒ PaymentsClient
Initialize the PaymentsClient class with a lockstepsdk instance.
24 25 26 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 24 def initialize(lockstepsdk) @lockstepsdk = lockstepsdk end |
Instance Method Details
#create_payments(body:) ⇒ Object
Creates one or more Payments within this account and returns the records as created.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
69 70 71 72 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 69 def create_payments(body:) path = "/api/v1/Payments" @lockstepsdk.request(:post, path, body, nil) end |
#delete_payment(id:) ⇒ Object
Deletes the Payment referred to by this unique identifier.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
59 60 61 62 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 59 def delete_payment(id:) path = "/api/v1/Payments/#{id}" @lockstepsdk.request(:delete, path, nil, nil) end |
#query_payment_detail_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments within the Lockstep platform 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. A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the CustomerId field, and the recipient of the Payment is identified by the CompanyId field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero UnappliedAmount value, which represents a deposit that has been paid and not yet applied to an Invoice.
124 125 126 127 128 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 124 def query_payment_detail_view(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Payments/views/detail" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#query_payment_summary_view(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. This query endpoint provides extra data about the summary of payment information.
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.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
102 103 104 105 106 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 102 def query_payment_summary_view(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Payments/views/summary" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#query_payments(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Payments 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.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
85 86 87 88 89 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 85 def query_payments(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/Payments/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_payment(id:, include_param:) ⇒ Object
Retrieves the Payment specified by this unique identifier, optionally including nested data sets.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
35 36 37 38 39 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 35 def retrieve_payment(id:, include_param:) path = "/api/v1/Payments/#{id}" params = {:include => include_param} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_payment_detail_header ⇒ Object
Retrieves aggregated payment data from your account.
110 111 112 113 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 110 def retrieve_payment_detail_header() path = "/api/v1/Payments/views/detail-header" @lockstepsdk.request(:get, path, nil, nil) end |
#update_payment(id:, body:) ⇒ Object
Updates an existing Payment 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.
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
49 50 51 52 |
# File 'lib/lockstep_sdk/clients/payments.rb', line 49 def update_payment(id:, body:) path = "/api/v1/Payments/#{id}" @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil) end |