Class: ShellDataReportingApIs::LastStatementOfAccount

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb

Overview

Latest statement of the account generated for the given Payer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(amount_due = SKIP, amount_not_overdue = SKIP, amount_overdue = SKIP, credit_limit = SKIP, credit_limit_currency_code = SKIP, credit_limit_currency_symbol = SKIP, credit_limit_in_customer_currency = SKIP, currency_code = SKIP, currency_symbol = SKIP, last_payment_currency_code = SKIP, last_payment_currency_symbol = SKIP, last_payment_date = SKIP, last_payment_value = SKIP, outstanding_balance = SKIP, payer_id = SKIP, payer_number = SKIP, payment_due_date = SKIP, payment_method = SKIP, payment_method_id = SKIP, payment_terms = SKIP, payment_terms_id = SKIP, so_a_reference_number = SKIP, statement_date = SKIP, statement_of_account_id = SKIP, total_billing_documents = SKIP, total_summary_billing_documents = SKIP, unallocated_payment = SKIP) ⇒ LastStatementOfAccount

Returns a new instance of LastStatementOfAccount.



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 266

def initialize(amount_due = SKIP, amount_not_overdue = SKIP,
               amount_overdue = SKIP, credit_limit = SKIP,
               credit_limit_currency_code = SKIP,
               credit_limit_currency_symbol = SKIP,
               credit_limit_in_customer_currency = SKIP,
               currency_code = SKIP, currency_symbol = SKIP,
               last_payment_currency_code = SKIP,
               last_payment_currency_symbol = SKIP,
               last_payment_date = SKIP, last_payment_value = SKIP,
               outstanding_balance = SKIP, payer_id = SKIP,
               payer_number = SKIP, payment_due_date = SKIP,
               payment_method = SKIP, payment_method_id = SKIP,
               payment_terms = SKIP, payment_terms_id = SKIP,
               so_a_reference_number = SKIP, statement_date = SKIP,
                = SKIP,
               total_billing_documents = SKIP,
               total_summary_billing_documents = SKIP,
               unallocated_payment = SKIP)
  @amount_due = amount_due unless amount_due == SKIP
  @amount_not_overdue = amount_not_overdue unless amount_not_overdue == SKIP
  @amount_overdue = amount_overdue unless amount_overdue == SKIP
  @credit_limit = credit_limit unless credit_limit == SKIP
  unless credit_limit_currency_code == SKIP
    @credit_limit_currency_code =
      credit_limit_currency_code
  end
  unless credit_limit_currency_symbol == SKIP
    @credit_limit_currency_symbol =
      credit_limit_currency_symbol
  end
  unless credit_limit_in_customer_currency == SKIP
    @credit_limit_in_customer_currency =
      credit_limit_in_customer_currency
  end
  @currency_code = currency_code unless currency_code == SKIP
  @currency_symbol = currency_symbol unless currency_symbol == SKIP
  unless last_payment_currency_code == SKIP
    @last_payment_currency_code =
      last_payment_currency_code
  end
  unless last_payment_currency_symbol == SKIP
    @last_payment_currency_symbol =
      last_payment_currency_symbol
  end
  @last_payment_date = last_payment_date unless last_payment_date == SKIP
  @last_payment_value = last_payment_value unless last_payment_value == SKIP
  @outstanding_balance = outstanding_balance unless outstanding_balance == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @payment_due_date = payment_due_date unless payment_due_date == SKIP
  @payment_method = payment_method unless payment_method == SKIP
  @payment_method_id = payment_method_id unless payment_method_id == SKIP
  @payment_terms = payment_terms unless payment_terms == SKIP
  @payment_terms_id = payment_terms_id unless payment_terms_id == SKIP
  @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP
  @statement_date = statement_date unless statement_date == SKIP
  @statement_of_account_id =  unless  == SKIP
  @total_billing_documents = total_billing_documents unless total_billing_documents == SKIP
  unless total_summary_billing_documents == SKIP
    @total_summary_billing_documents =
      total_summary_billing_documents
  end
  @unallocated_payment = unallocated_payment unless unallocated_payment == SKIP
end

Instance Attribute Details

#amount_dueFloat

Invoiced amount and due for payment.

Returns:

  • (Float)


14
15
16
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 14

def amount_due
  @amount_due
end

#amount_not_overdueFloat

Invoiced amount and not overdue for payment.

Returns:

  • (Float)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 18

def amount_not_overdue
  @amount_not_overdue
end

#amount_overdueFloat

Invoiced amount and overdue for payment.

Returns:

  • (Float)


22
23
24
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 22

def amount_overdue
  @amount_overdue
end

#credit_limitInteger

Credit limit.

Returns:

  • (Integer)


26
27
28
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 26

def credit_limit
  @credit_limit
end

#credit_limit_currency_codeString

ISO code of the credit limit’s currency. Example: EUR

Returns:

  • (String)


31
32
33
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 31

def credit_limit_currency_code
  @credit_limit_currency_code
end

#credit_limit_currency_symbolString

Symbol of the credit limit’s currency. Example: €

Returns:

  • (String)


36
37
38
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 36

def credit_limit_currency_symbol
  @credit_limit_currency_symbol
end

#credit_limit_in_customer_currencyFloat

Credit limit in Customer currency. Note: For currency details refer the parameters CurrencyCode & CurrencySymbol in the StatementOfAccount response.

Returns:

  • (Float)


42
43
44
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 42

def credit_limit_in_customer_currency
  @credit_limit_in_customer_currency
end

#currency_codeString

ISO code of SOA currency. Example: EUR

Returns:

  • (String)


47
48
49
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 47

def currency_code
  @currency_code
end

#currency_symbolString

Symbol of SOA currency. Example: €

Returns:

  • (String)


52
53
54
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 52

def currency_symbol
  @currency_symbol
end

#last_payment_currency_codeString

ISO code of Last Payment currency. Example: EUR

Returns:

  • (String)


57
58
59
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 57

def last_payment_currency_code
  @last_payment_currency_code
end

#last_payment_currency_symbolString

Symbol of Last Payment currency. Example: €

Returns:

  • (String)


62
63
64
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 62

def last_payment_currency_symbol
  @last_payment_currency_symbol
end

#last_payment_dateString

Last payment date. Format: yyyyMMdd

Returns:

  • (String)


66
67
68
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 66

def last_payment_date
  @last_payment_date
end

#last_payment_valueFloat

Last payment value.

Returns:

  • (Float)


70
71
72
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 70

def last_payment_value
  @last_payment_value
end

#outstanding_balanceFloat

Current outstanding balance amount.

Returns:

  • (Float)


74
75
76
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 74

def outstanding_balance
  @outstanding_balance
end

#payer_idInteger

Payment customer id of the customer.

Returns:

  • (Integer)


78
79
80
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 78

def payer_id
  @payer_id
end

#payer_numberString

Payment customer number.

Returns:

  • (String)


82
83
84
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 82

def payer_number
  @payer_number
end

#payment_due_dateString

Due date for payment. Format: yyyyMMdd

Returns:

  • (String)


86
87
88
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 86

def payment_due_date
  @payment_due_date
end

#payment_methodString

Payment method description of the Payer. Example: Id & Description • Incoming - Direct Debit • Incoming - Cheque • Incoming - Direct Debit A • Incoming - Bank Transfer • Incoming - Cash

Returns:

  • (String)


96
97
98
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 96

def payment_method
  @payment_method
end

#payment_method_idInteger

Payment method Id of the Payer. Example: Id & Description • Incoming - Direct Debit • Incoming - Cheque • Incoming - Direct Debit A • Incoming - Bank Transfer • Incoming - Cash

Returns:

  • (Integer)


106
107
108
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 106

def payment_method_id
  @payment_method_id
end

#payment_termsString

Payment terms description of the Payer. Example: Id & Description • 14 days after Invoice • 15 days after Invoice • 21 days after Invoice • 30 days after Invoice • 45 days after Invoice • 0 days after invoice • days after invoice • days after invoice • 7 days after invoice • 10th of the following month

Returns:

  • (String)


121
122
123
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 121

def payment_terms
  @payment_terms
end

#payment_terms_idInteger

Payment terms Id of the Payer. Example: Id & Description • 14 days after Invoice • 15 days after Invoice • 21 days after Invoice • 30 days after Invoice • 45 days after Invoice • 0 days after invoice • days after invoice • days after invoice • 7 days after invoice • 10th of the following month

Returns:

  • (Integer)


136
137
138
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 136

def payment_terms_id
  @payment_terms_id
end

#so_a_reference_numberString

Statement of account reference number

Returns:

  • (String)


140
141
142
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 140

def so_a_reference_number
  @so_a_reference_number
end

#statement_dateString

Date on which the SOA was generated. Format: yyyyMMdd

Returns:

  • (String)


145
146
147
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 145

def statement_date
  @statement_date
end

#statement_of_account_idInteger

Statement of account identifier, Example: 1

Returns:

  • (Integer)


150
151
152
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 150

def 
  @statement_of_account_id
end

#total_billing_documentsInteger

Total number of billing documents for this Statement of Account

Returns:

  • (Integer)


154
155
156
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 154

def total_billing_documents
  @total_billing_documents
end

#total_summary_billing_documentsInteger

Total number of summary billing documents for this Statement of Account

Returns:

  • (Integer)


158
159
160
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 158

def total_summary_billing_documents
  @total_summary_billing_documents
end

#unallocated_paymentInteger

Unallocated payment. When negative, indicates overdue amount.

Returns:

  • (Integer)


163
164
165
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 163

def unallocated_payment
  @unallocated_payment
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 332

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP
  amount_not_overdue =
    hash.key?('AmountNotOverdue') ? hash['AmountNotOverdue'] : SKIP
  amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP
  credit_limit = hash.key?('CreditLimit') ? hash['CreditLimit'] : SKIP
  credit_limit_currency_code =
    hash.key?('CreditLimitCurrencyCode') ? hash['CreditLimitCurrencyCode'] : SKIP
  credit_limit_currency_symbol =
    hash.key?('CreditLimitCurrencySymbol') ? hash['CreditLimitCurrencySymbol'] : SKIP
  credit_limit_in_customer_currency =
    hash.key?('CreditLimitInCustomerCurrency') ? hash['CreditLimitInCustomerCurrency'] : SKIP
  currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
  currency_symbol =
    hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP
  last_payment_currency_code =
    hash.key?('LastPaymentCurrencyCode') ? hash['LastPaymentCurrencyCode'] : SKIP
  last_payment_currency_symbol =
    hash.key?('LastPaymentCurrencySymbol') ? hash['LastPaymentCurrencySymbol'] : SKIP
  last_payment_date =
    hash.key?('LastPaymentDate') ? hash['LastPaymentDate'] : SKIP
  last_payment_value =
    hash.key?('LastPaymentValue') ? hash['LastPaymentValue'] : SKIP
  outstanding_balance =
    hash.key?('OutstandingBalance') ? hash['OutstandingBalance'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  payment_due_date =
    hash.key?('PaymentDueDate') ? hash['PaymentDueDate'] : SKIP
  payment_method = hash.key?('PaymentMethod') ? hash['PaymentMethod'] : SKIP
  payment_method_id =
    hash.key?('PaymentMethodId') ? hash['PaymentMethodId'] : SKIP
  payment_terms = hash.key?('PaymentTerms') ? hash['PaymentTerms'] : SKIP
  payment_terms_id =
    hash.key?('PaymentTermsId') ? hash['PaymentTermsId'] : SKIP
  so_a_reference_number =
    hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP
  statement_date = hash.key?('StatementDate') ? hash['StatementDate'] : SKIP
   =
    hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP
  total_billing_documents =
    hash.key?('TotalBillingDocuments') ? hash['TotalBillingDocuments'] : SKIP
  total_summary_billing_documents =
    hash.key?('TotalSummaryBillingDocuments') ? hash['TotalSummaryBillingDocuments'] : SKIP
  unallocated_payment =
    hash.key?('UnallocatedPayment') ? hash['UnallocatedPayment'] : SKIP

  # Create object from extracted values.
  LastStatementOfAccount.new(amount_due,
                             amount_not_overdue,
                             amount_overdue,
                             credit_limit,
                             credit_limit_currency_code,
                             credit_limit_currency_symbol,
                             credit_limit_in_customer_currency,
                             currency_code,
                             currency_symbol,
                             last_payment_currency_code,
                             last_payment_currency_symbol,
                             last_payment_date,
                             last_payment_value,
                             outstanding_balance,
                             payer_id,
                             payer_number,
                             payment_due_date,
                             payment_method,
                             payment_method_id,
                             payment_terms,
                             payment_terms_id,
                             so_a_reference_number,
                             statement_date,
                             ,
                             total_billing_documents,
                             total_summary_billing_documents,
                             unallocated_payment)
end

.namesObject

A mapping from model property names to API property names.



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 166

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['amount_due'] = 'AmountDue'
  @_hash['amount_not_overdue'] = 'AmountNotOverdue'
  @_hash['amount_overdue'] = 'AmountOverdue'
  @_hash['credit_limit'] = 'CreditLimit'
  @_hash['credit_limit_currency_code'] = 'CreditLimitCurrencyCode'
  @_hash['credit_limit_currency_symbol'] = 'CreditLimitCurrencySymbol'
  @_hash['credit_limit_in_customer_currency'] =
    'CreditLimitInCustomerCurrency'
  @_hash['currency_code'] = 'CurrencyCode'
  @_hash['currency_symbol'] = 'CurrencySymbol'
  @_hash['last_payment_currency_code'] = 'LastPaymentCurrencyCode'
  @_hash['last_payment_currency_symbol'] = 'LastPaymentCurrencySymbol'
  @_hash['last_payment_date'] = 'LastPaymentDate'
  @_hash['last_payment_value'] = 'LastPaymentValue'
  @_hash['outstanding_balance'] = 'OutstandingBalance'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['payment_due_date'] = 'PaymentDueDate'
  @_hash['payment_method'] = 'PaymentMethod'
  @_hash['payment_method_id'] = 'PaymentMethodId'
  @_hash['payment_terms'] = 'PaymentTerms'
  @_hash['payment_terms_id'] = 'PaymentTermsId'
  @_hash['so_a_reference_number'] = 'SoAReferenceNumber'
  @_hash['statement_date'] = 'StatementDate'
  @_hash['statement_of_account_id'] = 'StatementOfAccountId'
  @_hash['total_billing_documents'] = 'TotalBillingDocuments'
  @_hash['total_summary_billing_documents'] =
    'TotalSummaryBillingDocuments'
  @_hash['unallocated_payment'] = 'UnallocatedPayment'
  @_hash
end

.nullablesObject

An array for nullable fields



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 234

def self.nullables
  %w[
    amount_due
    amount_not_overdue
    amount_overdue
    credit_limit
    credit_limit_currency_code
    credit_limit_currency_symbol
    credit_limit_in_customer_currency
    currency_code
    currency_symbol
    last_payment_currency_code
    last_payment_currency_symbol
    last_payment_date
    last_payment_value
    outstanding_balance
    payer_id
    payer_number
    payment_due_date
    payment_method
    payment_method_id
    payment_terms
    payment_terms_id
    so_a_reference_number
    statement_date
    statement_of_account_id
    total_billing_documents
    total_summary_billing_documents
    unallocated_payment
  ]
end

.optionalsObject

An array for optional fields



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb', line 201

def self.optionals
  %w[
    amount_due
    amount_not_overdue
    amount_overdue
    credit_limit
    credit_limit_currency_code
    credit_limit_currency_symbol
    credit_limit_in_customer_currency
    currency_code
    currency_symbol
    last_payment_currency_code
    last_payment_currency_symbol
    last_payment_date
    last_payment_value
    outstanding_balance
    payer_id
    payer_number
    payment_due_date
    payment_method
    payment_method_id
    payment_terms
    payment_terms_id
    so_a_reference_number
    statement_date
    statement_of_account_id
    total_billing_documents
    total_summary_billing_documents
    unallocated_payment
  ]
end