Class: PaymentApplicationsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/clients/payment_applications_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(lockstepsdk) ⇒ PaymentApplicationsClient

Initialize the PaymentApplicationsClient class with a lockstepsdk instance.

Parameters:

  • lockstepsdk (LockstepApi)

    The Lockstep API client object for this connection



25
26
27
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 25

def initialize(lockstepsdk)
    @lockstepsdk = lockstepsdk
end

Instance Method Details

#create_payment_applications(body:) ⇒ Object

Creates one or more Payment Applications within this account and returns the records as created.

A Payment Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.

Parameters:

  • body (PaymentAppliedModel)

    The Payment Applications to create



72
73
74
75
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 72

def create_payment_applications(body:)
    path = "/api/v1/PaymentApplications"
    @lockstepsdk.request(:post, path, body, nil)
end

#delete_payment_application(id:) ⇒ Object

Deletes the Payment Application referred to by this unique identifier.

A Payment Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Payment Application to delete; NOT the customer's ERP key



61
62
63
64
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 61

def delete_payment_application(id:)
    path = "/api/v1/PaymentApplications/#{id}"
    @lockstepsdk.request(:delete, path, nil, nil)
end

#query_payment_applications(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object

Queries Payment Applications 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 Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.

Parameters:



87
88
89
90
91
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 87

def query_payment_applications(filter:, include_param:, order:, page_size:, page_number:)
    path = "/api/v1/PaymentApplications/query"
    params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
    @lockstepsdk.request(:get, path, nil, params)
end

#retrieve_payment_application(id:, include_param:) ⇒ Object

Retrieves the Payment Application specified by this unique identifier, optionally including nested data sets.

A Payment Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this Payment Application; NOT the customer's ERP key

  • include_param (string)

    To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Invoice



37
38
39
40
41
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 37

def retrieve_payment_application(id:, include_param:)
    path = "/api/v1/PaymentApplications/#{id}"
    params = {:include => include_param}
    @lockstepsdk.request(:get, path, nil, params)
end

#update_payment_application(id:, body:) ⇒ Object

Updates an existing Payment Application 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 Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of the Payment Application to update; NOT the customer's ERP key

  • body (object)

    A list of changes to apply to this Payment Application



50
51
52
53
# File 'lib/lockstep_sdk/clients/payment_applications_client.rb', line 50

def update_payment_application(id:, body:)
    path = "/api/v1/PaymentApplications/#{id}"
    @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
end