Class: LockstepSdk::InvoicePaymentDetailModel

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

Overview

View to return Payment Detail information for a given Invoice record.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ InvoicePaymentDetailModel

Initialize the InvoicePaymentDetailModel using the provided prototype



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 28

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @payment_applied_id = params.dig(:payment_applied_id)
    @invoice_id = params.dig(:invoice_id)
    @payment_id = params.dig(:payment_id)
    @apply_to_invoice_date = params.dig(:apply_to_invoice_date)
    @payment_applied_amount = params.dig(:payment_applied_amount)
    @reference_code = params.dig(:reference_code)
    @company_id = params.dig(:company_id)
    @payment_amount = params.dig(:payment_amount)
    @unapplied_amount = params.dig(:unapplied_amount)
end

Instance Attribute Details

#apply_to_invoice_dateDate

Returns Date Payment applied to Invoice.

Returns:

  • (Date)

    Date Payment applied to Invoice.



59
60
61
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 59

def apply_to_invoice_date
  @apply_to_invoice_date
end

#company_idUuid

Returns The ID number of the Company (CompanyType = “Customer”) that created this Payment.

Returns:

  • (Uuid)

    The ID number of the Company (CompanyType = “Customer”) that created this Payment.



71
72
73
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 71

def company_id
  @company_id
end

#group_keyUuid

Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



43
44
45
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 43

def group_key
  @group_key
end

#invoice_idUuid

Returns The database id of the invoice.

Returns:

  • (Uuid)

    The database id of the invoice



51
52
53
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 51

def invoice_id
  @invoice_id
end

#payment_amountDouble

Returns The total value of this Payment.

Returns:

  • (Double)

    The total value of this Payment.



75
76
77
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 75

def payment_amount
  @payment_amount
end

#payment_applied_amountDouble

Returns Amount applied to Invoice.

Returns:

  • (Double)

    Amount applied to Invoice.



63
64
65
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 63

def payment_applied_amount
  @payment_applied_amount
end

#payment_applied_idUuid

Returns The unique identifier of this PaymentApplied record.

Returns:

  • (Uuid)

    The unique identifier of this PaymentApplied record.



47
48
49
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 47

def payment_applied_id
  @payment_applied_id
end

#payment_idUuid

Returns The database id of the Payment.

Returns:

  • (Uuid)

    The database id of the Payment.



55
56
57
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 55

def payment_id
  @payment_id
end

#reference_codeString

Returns An additional reference code that is sometimes used to identify this Payment. The meaning of this field is specific to the ERP or accounting system used by the user.

Returns:

  • (String)

    An additional reference code that is sometimes used to identify this Payment. The meaning of this field is specific to the ERP or accounting system used by the user.



67
68
69
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 67

def reference_code
  @reference_code
end

#unapplied_amountDouble

Returns The remaining balance value of this Payment.

Returns:

  • (Double)

    The remaining balance value of this Payment.



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

def unapplied_amount
  @unapplied_amount
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



83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 83

def as_json(options={})
    {
        'groupKey' => @group_key,
        'paymentAppliedId' => @payment_applied_id,
        'invoiceId' => @invoice_id,
        'paymentId' => @payment_id,
        'applyToInvoiceDate' => @apply_to_invoice_date,
        'paymentAppliedAmount' => @payment_applied_amount,
        'referenceCode' => @reference_code,
        'companyId' => @company_id,
        'paymentAmount' => @payment_amount,
        'unappliedAmount' => @unapplied_amount,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



100
101
102
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 100

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