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



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 25

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)
    @tender_type = params.dig(:tender_type)
    @payment_type = params.dig(:payment_type)
    @payment_date = params.dig(:payment_date)
    @currency_code = params.dig(:currency_code)
    @payment_amount = params.dig(:payment_amount)
    @unapplied_amount = params.dig(:unapplied_amount)
    @base_currency_code = params.dig(:base_currency_code)
    @base_currency_payment_amount = params.dig(:base_currency_payment_amount)
    @base_currency_unapplied_amount = params.dig(:base_currency_unapplied_amount)
    @is_open = params.dig(:is_open)
    @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)
    @payment_company_id = params.dig(:payment_company_id)
    @payment_company_name = params.dig(:payment_company_name)
    @supports_erp_pdf_retrieval = params.dig(:supports_erp_pdf_retrieval)
    @customer_ids = params.dig(:customer_ids)
    @customer_names = params.dig(:customer_names)
    @company_ids = params.dig(:company_ids)
    @company_names = params.dig(:company_names)
    @modified = params.dig(:modified)
end

Instance Attribute Details

#base_currency_codeString



96
97
98
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 96

def base_currency_code
  @base_currency_code
end

#base_currency_payment_amountDouble



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

def base_currency_payment_amount
  @base_currency_payment_amount
end

#base_currency_unapplied_amountDouble



104
105
106
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 104

def base_currency_unapplied_amount
  @base_currency_unapplied_amount
end

#company_idsUuid



148
149
150
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 148

def company_ids
  @company_ids
end

#company_namesString



152
153
154
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 152

def company_names
  @company_names
end

#currency_codeString



84
85
86
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 84

def currency_code
  @currency_code
end

#customer_idsUuid



140
141
142
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 140

def customer_ids
  @customer_ids
end

#customer_namesString



144
145
146
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 144

def customer_names
  @customer_names
end

#group_keyUuid



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

def group_key
  @group_key
end

#invoice_countInt32



112
113
114
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 112

def invoice_count
  @invoice_count
end

#invoice_id_listUuid



124
125
126
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 124

def invoice_id_list
  @invoice_id_list
end

#invoice_listString



120
121
122
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 120

def invoice_list
  @invoice_list
end

#is_openBoolean



108
109
110
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 108

def is_open
  @is_open
end

#memo_textString



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

def memo_text
  @memo_text
end

#modifiedDate-time



156
157
158
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 156

def modified
  @modified
end

#payment_amountDouble



88
89
90
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 88

def payment_amount
  @payment_amount
end

#payment_company_idUuid



128
129
130
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 128

def payment_company_id
  @payment_company_id
end

#payment_company_nameString



132
133
134
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 132

def payment_company_name
  @payment_company_name
end

#payment_dateDate



80
81
82
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 80

def payment_date
  @payment_date
end

#payment_idUuid



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

def payment_id
  @payment_id
end

#payment_typeString



76
77
78
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 76

def payment_type
  @payment_type
end

#reference_codeString



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

def reference_code
  @reference_code
end

#supports_erp_pdf_retrievalBoolean



136
137
138
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 136

def supports_erp_pdf_retrieval
  @supports_erp_pdf_retrieval
end

#tender_typeString



72
73
74
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 72

def tender_type
  @tender_type
end

#total_payments_appliedDouble



116
117
118
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 116

def total_payments_applied
  @total_payments_applied
end

#unapplied_amountDouble



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

def unapplied_amount
  @unapplied_amount
end

Instance Method Details

#as_json(options = {}) ⇒ object



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 160

def as_json(options={})
    {
        'groupKey' => @group_key,
        'paymentId' => @payment_id,
        'memoText' => @memo_text,
        'referenceCode' => @reference_code,
        'tenderType' => @tender_type,
        'paymentType' => @payment_type,
        'paymentDate' => @payment_date,
        'currencyCode' => @currency_code,
        'paymentAmount' => @payment_amount,
        'unappliedAmount' => @unapplied_amount,
        'baseCurrencyCode' => @base_currency_code,
        'baseCurrencyPaymentAmount' => @base_currency_payment_amount,
        'baseCurrencyUnappliedAmount' => @base_currency_unapplied_amount,
        'isOpen' => @is_open,
        'invoiceCount' => @invoice_count,
        'totalPaymentsApplied' => @total_payments_applied,
        'invoiceList' => @invoice_list,
        'invoiceIdList' => @invoice_id_list,
        'paymentCompanyId' => @payment_company_id,
        'paymentCompanyName' => @payment_company_name,
        'supportsErpPdfRetrieval' => @supports_erp_pdf_retrieval,
        'customerIds' => @customer_ids,
        'customerNames' => @customer_names,
        'companyIds' => @company_ids,
        'companyNames' => @company_names,
        'modified' => @modified,
    }
end

#to_json(*options) ⇒ String



193
194
195
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 193

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