Class: LockstepSdk::InsertPaymentAppliedRequestModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/insert_payment_applied_request_model.rb

Overview

A request to insert a payment application

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ InsertPaymentAppliedRequestModel

Initialize the InsertPaymentAppliedRequestModel using the provided prototype



25
26
27
28
29
30
31
32
33
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 25

def initialize(params = {})
    @payment_applied_id = params.dig(:payment_applied_id)
    @invoice_id = params.dig(:invoice_id)
    @payment_id = params.dig(:payment_id)
    @erp_key = params.dig(:erp_key)
    @invoice_erp_key = params.dig(:invoice_erp_key)
    @apply_to_invoice_date = params.dig(:apply_to_invoice_date)
    @payment_applied_amount = params.dig(:payment_applied_amount)
end

Instance Attribute Details

#apply_to_invoice_dateDate-time

Returns The date this payment was applied to this invoice.

Returns:

  • (Date-time)

    The date this payment was applied to this invoice.



57
58
59
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 57

def apply_to_invoice_date
  @apply_to_invoice_date
end

#erp_keyString

Returns The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value ‘ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).

Returns:

  • (String)

    The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value ‘ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).



49
50
51
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 49

def erp_key
  @erp_key
end

#invoice_erp_keyString

Returns The ERP key of the Invoice this payment is applied to.

Returns:

  • (String)

    The ERP key of the Invoice this payment is applied to.



53
54
55
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 53

def invoice_erp_key
  @invoice_erp_key
end

#invoice_idUuid

Returns The Invoice this payment is applied to.

Returns:

  • (Uuid)

    The Invoice this payment is applied to.



41
42
43
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 41

def invoice_id
  @invoice_id
end

#payment_applied_amountDouble

Returns The total amount that was applied to this Invoice from the Payment.

Returns:

  • (Double)

    The total amount that was applied to this Invoice from the Payment.



61
62
63
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 61

def payment_applied_amount
  @payment_applied_amount
end

#payment_applied_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see ‘ErpKey`.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see ‘ErpKey`.



37
38
39
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 37

def payment_applied_id
  @payment_applied_id
end

#payment_idUuid

Returns The Payment this application applies from.

Returns:

  • (Uuid)

    The Payment this application applies from.



45
46
47
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 45

def payment_id
  @payment_id
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 65

def as_json(options={})
    {
        'paymentAppliedId' => @payment_applied_id,
        'invoiceId' => @invoice_id,
        'paymentId' => @payment_id,
        'erpKey' => @erp_key,
        'invoiceErpKey' => @invoice_erp_key,
        'applyToInvoiceDate' => @apply_to_invoice_date,
        'paymentAppliedAmount' => @payment_applied_amount,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



79
80
81
# File 'lib/lockstep_sdk/models/insert_payment_applied_request_model.rb', line 79

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end