Class: ShellDataReportingApIs::PaymentsSinceLastSOA

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

Overview

List of payments made by the customer after the latest Statement of Account. Note: All the payments made by the customer will be returned when there is no Statement of Account available for customer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_id = SKIP, account_number = SKIP, account_short_name = SKIP, summary_document_id = SKIP, summary_document_number = SKIP, summary_document_date = SKIP, summary_document_payment_due_date = SKIP, summary_document_total_value = SKIP, summary_document_total_vat = SKIP, summary_document_dd_amount = SKIP, payment_date = SKIP, payment_reference = SKIP, payment_currency_code = SKIP, payment_currency_symbol = SKIP, amount_paid = SKIP, balance = SKIP, true_payment = SKIP, prepaid_balance = SKIP, local_currency_code = SKIP, local_currency_symbol = SKIP, local_currency_exchange_rate = SKIP) ⇒ PaymentsSinceLastSOA

Returns a new instance of PaymentsSinceLastSOA.



197
198
199
200
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 197

def initialize( = SKIP,  = SKIP,
                = SKIP, summary_document_id = SKIP,
               summary_document_number = SKIP, summary_document_date = SKIP,
               summary_document_payment_due_date = SKIP,
               summary_document_total_value = SKIP,
               summary_document_total_vat = SKIP,
               summary_document_dd_amount = SKIP, payment_date = SKIP,
               payment_reference = SKIP, payment_currency_code = SKIP,
               payment_currency_symbol = SKIP, amount_paid = SKIP,
               balance = SKIP, true_payment = SKIP, prepaid_balance = SKIP,
               local_currency_code = SKIP, local_currency_symbol = SKIP,
               local_currency_exchange_rate = SKIP)
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @account_short_name =  unless  == SKIP
  @summary_document_id = summary_document_id unless summary_document_id == SKIP
  @summary_document_number = summary_document_number unless summary_document_number == SKIP
  @summary_document_date = summary_document_date unless summary_document_date == SKIP
  unless summary_document_payment_due_date == SKIP
    @summary_document_payment_due_date =
      summary_document_payment_due_date
  end
  unless summary_document_total_value == SKIP
    @summary_document_total_value =
      summary_document_total_value
  end
  unless summary_document_total_vat == SKIP
    @summary_document_total_vat =
      summary_document_total_vat
  end
  unless summary_document_dd_amount == SKIP
    @summary_document_dd_amount =
      summary_document_dd_amount
  end
  @payment_date = payment_date unless payment_date == SKIP
  @payment_reference = payment_reference unless payment_reference == SKIP
  @payment_currency_code = payment_currency_code unless payment_currency_code == SKIP
  @payment_currency_symbol = payment_currency_symbol unless payment_currency_symbol == SKIP
  @amount_paid = amount_paid unless amount_paid == SKIP
  @balance = balance unless balance == SKIP
  @true_payment = true_payment unless true_payment == SKIP
  @prepaid_balance = prepaid_balance unless prepaid_balance == SKIP
  @local_currency_code = local_currency_code unless local_currency_code == SKIP
  @local_currency_symbol = local_currency_symbol unless local_currency_symbol == SKIP
  unless local_currency_exchange_rate == SKIP
    @local_currency_exchange_rate =
      local_currency_exchange_rate
  end
end

Instance Attribute Details

#account_idInteger

Account Identifier for which payment is made. Example: 12345

Returns:

  • (Integer)


17
18
19
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 17

def 
  @account_id
end

#account_numberString

Account number for which payment is made. Example: GB000000123

Returns:

  • (String)


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

def 
  @account_number
end

#account_short_nameString

Account Short Name Example: GB Earth Movers-SN

Returns:

  • (String)


27
28
29
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 27

def 
  @account_short_name
end

#amount_paidFloat

Amount paid.

Returns:

  • (Float)


81
82
83
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 81

def amount_paid
  @amount_paid
end

#balanceFloat

Balance amount to be settled for the Summary document.

Returns:

  • (Float)


85
86
87
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 85

def balance
  @balance
end

#local_currency_codeString

Currency ISO code of the local country. It is derived based on CountryCode from microservice configuration. This field is expected to have different value than the previously mentioned field CurrencyCode, only in the case of serviced OUs. Example: EUR

Returns:

  • (String)


101
102
103
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 101

def local_currency_code
  @local_currency_code
end

#local_currency_exchange_rateString

Exchange rate from Payment currency to local currency.

Returns:

  • (String)


113
114
115
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 113

def local_currency_exchange_rate
  @local_currency_exchange_rate
end

#local_currency_symbolString

Currency Symbol of the local country. It is derived based on CountryCode from microservice configuration. This field is expected to have different value than the previously mentioned field CurrencySymbol, only in the case of serviced OUs. Example: €

Returns:

  • (String)


109
110
111
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 109

def local_currency_symbol
  @local_currency_symbol
end

#payment_currency_codeString

ISO code of payment currency. Example: EUR

Returns:

  • (String)


72
73
74
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 72

def payment_currency_code
  @payment_currency_code
end

#payment_currency_symbolString

Symbol of payment currency. Example: €

Returns:

  • (String)


77
78
79
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 77

def payment_currency_symbol
  @payment_currency_symbol
end

#payment_dateString

Date of payment. Format: YYYYMMDD

Returns:

  • (String)


63
64
65
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 63

def payment_date
  @payment_date
end

#payment_referenceString

Reference text of the payment.

Returns:

  • (String)


67
68
69
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 67

def payment_reference
  @payment_reference
end

#prepaid_balanceFloat

Balance in the pre-paid amount.

Returns:

  • (Float)


93
94
95
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 93

def prepaid_balance
  @prepaid_balance
end

#summary_document_dateString

Summary billing document date. Format: YYYYMMDD

Returns:

  • (String)


41
42
43
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 41

def summary_document_date
  @summary_document_date
end

#summary_document_dd_amountFloat

Total DD amount in the Summary billing document.

Returns:

  • (Float)


58
59
60
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 58

def summary_document_dd_amount
  @summary_document_dd_amount
end

#summary_document_idInteger

Summary billing document reference id. Example: 2

Returns:

  • (Integer)


32
33
34
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 32

def summary_document_id
  @summary_document_id
end

#summary_document_numberString

Summary billing document reference number.

Returns:

  • (String)


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

def summary_document_number
  @summary_document_number
end

#summary_document_payment_due_dateString

Payment due date of the Summary billing document. Format: YYYYMMDD

Returns:

  • (String)


46
47
48
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 46

def summary_document_payment_due_date
  @summary_document_payment_due_date
end

#summary_document_total_valueFloat

Total value in the Summary billing document.

Returns:

  • (Float)


50
51
52
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 50

def summary_document_total_value
  @summary_document_total_value
end

#summary_document_total_vatFloat

Total VAT in the Summary billing document.

Returns:

  • (Float)


54
55
56
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 54

def summary_document_total_vat
  @summary_document_total_vat
end

#true_paymentString

True Payment.

Returns:

  • (String)


89
90
91
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 89

def true_payment
  @true_payment
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
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
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 248

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
   =
    hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP
  summary_document_id =
    hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP
  summary_document_number =
    hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP
  summary_document_date =
    hash.key?('SummaryDocumentDate') ? hash['SummaryDocumentDate'] : SKIP
  summary_document_payment_due_date =
    hash.key?('SummaryDocumentPaymentDueDate') ? hash['SummaryDocumentPaymentDueDate'] : SKIP
  summary_document_total_value =
    hash.key?('SummaryDocumentTotalValue') ? hash['SummaryDocumentTotalValue'] : SKIP
  summary_document_total_vat =
    hash.key?('SummaryDocumentTotalVAT') ? hash['SummaryDocumentTotalVAT'] : SKIP
  summary_document_dd_amount =
    hash.key?('SummaryDocumentDDAmount') ? hash['SummaryDocumentDDAmount'] : SKIP
  payment_date = hash.key?('PaymentDate') ? hash['PaymentDate'] : SKIP
  payment_reference =
    hash.key?('PaymentReference') ? hash['PaymentReference'] : SKIP
  payment_currency_code =
    hash.key?('PaymentCurrencyCode') ? hash['PaymentCurrencyCode'] : SKIP
  payment_currency_symbol =
    hash.key?('PaymentCurrencySymbol') ? hash['PaymentCurrencySymbol'] : SKIP
  amount_paid = hash.key?('AmountPaid') ? hash['AmountPaid'] : SKIP
  balance = hash.key?('Balance') ? hash['Balance'] : SKIP
  true_payment = hash.key?('TruePayment') ? hash['TruePayment'] : SKIP
  prepaid_balance =
    hash.key?('PrepaidBalance') ? hash['PrepaidBalance'] : SKIP
  local_currency_code =
    hash.key?('LocalCurrencyCode') ? hash['LocalCurrencyCode'] : SKIP
  local_currency_symbol =
    hash.key?('LocalCurrencySymbol') ? hash['LocalCurrencySymbol'] : SKIP
  local_currency_exchange_rate =
    hash.key?('LocalCurrencyExchangeRate') ? hash['LocalCurrencyExchangeRate'] : SKIP

  # Create object from extracted values.
  PaymentsSinceLastSOA.new(,
                           ,
                           ,
                           summary_document_id,
                           summary_document_number,
                           summary_document_date,
                           summary_document_payment_due_date,
                           summary_document_total_value,
                           summary_document_total_vat,
                           summary_document_dd_amount,
                           payment_date,
                           payment_reference,
                           payment_currency_code,
                           payment_currency_symbol,
                           amount_paid,
                           balance,
                           true_payment,
                           prepaid_balance,
                           local_currency_code,
                           local_currency_symbol,
                           local_currency_exchange_rate)
end

.namesObject

A mapping from model property names to API property names.



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 116

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['account_short_name'] = 'AccountShortName'
  @_hash['summary_document_id'] = 'SummaryDocumentId'
  @_hash['summary_document_number'] = 'SummaryDocumentNumber'
  @_hash['summary_document_date'] = 'SummaryDocumentDate'
  @_hash['summary_document_payment_due_date'] =
    'SummaryDocumentPaymentDueDate'
  @_hash['summary_document_total_value'] = 'SummaryDocumentTotalValue'
  @_hash['summary_document_total_vat'] = 'SummaryDocumentTotalVAT'
  @_hash['summary_document_dd_amount'] = 'SummaryDocumentDDAmount'
  @_hash['payment_date'] = 'PaymentDate'
  @_hash['payment_reference'] = 'PaymentReference'
  @_hash['payment_currency_code'] = 'PaymentCurrencyCode'
  @_hash['payment_currency_symbol'] = 'PaymentCurrencySymbol'
  @_hash['amount_paid'] = 'AmountPaid'
  @_hash['balance'] = 'Balance'
  @_hash['true_payment'] = 'TruePayment'
  @_hash['prepaid_balance'] = 'PrepaidBalance'
  @_hash['local_currency_code'] = 'LocalCurrencyCode'
  @_hash['local_currency_symbol'] = 'LocalCurrencySymbol'
  @_hash['local_currency_exchange_rate'] = 'LocalCurrencyExchangeRate'
  @_hash
end

.nullablesObject

An array for nullable fields



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
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 171

def self.nullables
  %w[
    account_id
    account_number
    account_short_name
    summary_document_id
    summary_document_number
    summary_document_date
    summary_document_payment_due_date
    summary_document_total_value
    summary_document_total_vat
    summary_document_dd_amount
    payment_date
    payment_reference
    payment_currency_code
    payment_currency_symbol
    amount_paid
    balance
    true_payment
    prepaid_balance
    local_currency_code
    local_currency_symbol
    local_currency_exchange_rate
  ]
end

.optionalsObject

An array for optional fields



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb', line 144

def self.optionals
  %w[
    account_id
    account_number
    account_short_name
    summary_document_id
    summary_document_number
    summary_document_date
    summary_document_payment_due_date
    summary_document_total_value
    summary_document_total_vat
    summary_document_dd_amount
    payment_date
    payment_reference
    payment_currency_code
    payment_currency_symbol
    amount_paid
    balance
    true_payment
    prepaid_balance
    local_currency_code
    local_currency_symbol
    local_currency_exchange_rate
  ]
end