Class: CreditMemoAppliedClient

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

Instance Method Summary collapse

Constructor Details

#initialize(lockstepsdk) ⇒ CreditMemoAppliedClient

Initialize the CreditMemoAppliedClient class with a lockstepsdk instance.

Parameters:

  • lockstepsdk (LockstepApi)

    The Lockstep API client object for this connection



22
23
24
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 22

def initialize(lockstepsdk)
    @lockstepsdk = lockstepsdk
end

Instance Method Details

#create_credit_memo_applicationsObject

Creates one or more Credit Memo Applications 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 Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.

Parameters:

  • body (CreditMemoAppliedModel)

    The Credit Memo Applications to create



67
68
69
70
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 67

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

#delete_credit_memo_application(id:) ⇒ Object

Deletes the Credit Memo Application 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 Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.

Parameters:

  • id (uuid)

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



56
57
58
59
60
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 56

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

#query_credit_memo_applications(filter:, include_param:, order:, pageSize:, pageNumber:) ⇒ Object

Queries Credit Memo 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. 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 Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.

Parameters:



81
82
83
84
85
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 81

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

#retrieve_credit_memo_application(id:, include_param:) ⇒ Object

Retrieves the Credit Memo Application 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 Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this Credit Memo 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: Attachments, CustomFields, Notes



33
34
35
36
37
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 33

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

#update_credit_memo_application(id:) ⇒ Object

Updates an existing Credit memo 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. 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 Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.

Parameters:

  • id (uuid)

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

  • body (object)

    A list of changes to apply to this Credit Memo Application



45
46
47
48
49
# File 'lib/lockstep_sdk/clients/credit_memo_applied.rb', line 45

def update_credit_memo_application(id:)
    path = "/api/v1/CreditMemoApplied/#{id}"
    params = {}
    @lockstepsdk.request(:patch, path, body, params)
end