Class: LockstepSdk::PaymentSummaryModel

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

Overview

Contains summary information for a Payment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PaymentSummaryModel

Initialize the PaymentSummaryModel using the provided prototype



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 26

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @payment_id = params.dig(:payment_id)
    @memo_text = params.dig(:memo_text)
    @reference_code = params.dig(:reference_code)
    @payment_type = params.dig(:payment_type)
    @payment_date = params.dig(:payment_date)
    @payment_amount = params.dig(:payment_amount)
    @unapplied_amount = params.dig(:unapplied_amount)
    @invoice_count = params.dig(:invoice_count)
    @total_payments_applied = params.dig(:total_payments_applied)
    @invoice_list = params.dig(:invoice_list)
    @invoice_id_list = params.dig(:invoice_id_list)
    @customer_name = params.dig(:customer_name)
    @customer_id = params.dig(:customer_id)
end

Instance Attribute Details

#customer_idUuid

Returns The id of the customer for this payment.

Returns:

  • (Uuid)

    The id of the customer for this payment.



70
71
72
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 70

def customer_id
  @customer_id
end

#customer_nameString

Returns The name of the customer for this payment.

Returns:

  • (String)

    The name of the customer for this payment.



68
69
70
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 68

def customer_name
  @customer_name
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).



44
45
46
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 44

def group_key
  @group_key
end

#invoice_countInt32

Returns The number of invoices associated to this payment.

Returns:

  • (Int32)

    The number of invoices associated to this payment.



60
61
62
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 60

def invoice_count
  @invoice_count
end

#invoice_id_listUuid

Returns The ids of the invoices associated to this payment.

Returns:

  • (Uuid)

    The ids of the invoices associated to this payment.



66
67
68
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 66

def invoice_id_list
  @invoice_id_list
end

#invoice_listString

Returns The reference codes of the invoices associated to this payment.

Returns:

  • (String)

    The reference codes of the invoices associated to this payment.



64
65
66
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 64

def invoice_list
  @invoice_list
end

#memo_textString

Returns Memo or reference text (ex. memo field on a check).

Returns:

  • (String)

    Memo or reference text (ex. memo field on a check).



48
49
50
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 48

def memo_text
  @memo_text
end

#payment_amountDouble

Returns Total amount of this payment.

Returns:

  • (Double)

    Total amount of this payment.



56
57
58
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 56

def payment_amount
  @payment_amount
end

#payment_dateDate

Returns The date of this payment.

Returns:

  • (Date)

    The date of this payment.



54
55
56
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 54

def payment_date
  @payment_date
end

#payment_idUuid

Returns The id of the payment.

Returns:

  • (Uuid)

    The id of the payment



46
47
48
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 46

def payment_id
  @payment_id
end

#payment_typeString

Returns The type of payment, Payment or AP Payment.

Returns:

  • (String)

    The type of payment, Payment or AP Payment.



52
53
54
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 52

def payment_type
  @payment_type
end

#reference_codeString

Returns Reference code for the payment for the given Erp system.

Returns:

  • (String)

    Reference code for the payment for the given Erp system.



50
51
52
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 50

def reference_code
  @reference_code
end

#total_payments_appliedDouble

Returns The number of payments applied to this payment.

Returns:

  • (Double)

    The number of payments applied to this payment.



62
63
64
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 62

def total_payments_applied
  @total_payments_applied
end

#unapplied_amountDouble

Returns Unapplied balance of this payment.

Returns:

  • (Double)

    Unapplied balance of this payment.



58
59
60
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 58

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



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 73

def as_json(options={})
    {
        'groupKey' => @group_key,
        'paymentId' => @payment_id,
        'memoText' => @memo_text,
        'referenceCode' => @reference_code,
        'paymentType' => @payment_type,
        'paymentDate' => @payment_date,
        'paymentAmount' => @payment_amount,
        'unappliedAmount' => @unapplied_amount,
        'invoiceCount' => @invoice_count,
        'totalPaymentsApplied' => @total_payments_applied,
        'invoiceList' => @invoice_list,
        'invoiceIdList' => @invoice_id_list,
        'customerName' => @customer_name,
        'customerId' => @customer_id,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



93
94
95
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 93

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