Class: TreezorClient::Payin

Inherits:
Object
  • Object
show all
Defined in:
lib/treezor_client/models/payin.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Payin

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
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
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/treezor_client/models/payin.rb', line 251

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'payinId')
    self.payin_id = attributes[:'payinId']
  end

  if attributes.has_key?(:'payinTag')
    self.payin_tag = attributes[:'payinTag']
  end

  if attributes.has_key?(:'payinStatus')
    self.payin_status = attributes[:'payinStatus']
  end

  if attributes.has_key?(:'codeStatus')
    self.code_status = attributes[:'codeStatus']
  end

  if attributes.has_key?(:'informationStatus')
    self.information_status = attributes[:'informationStatus']
  end

  if attributes.has_key?(:'walletId')
    self.wallet_id = attributes[:'walletId']
  end

  if attributes.has_key?(:'userId')
    self.user_id = attributes[:'userId']
  end

  if attributes.has_key?(:'cartId')
    self.cart_id = attributes[:'cartId']
  end

  if attributes.has_key?(:'walletEventName')
    self.wallet_event_name = attributes[:'walletEventName']
  end

  if attributes.has_key?(:'walletAlias')
    self.wallet_alias = attributes[:'walletAlias']
  end

  if attributes.has_key?(:'userFirstname')
    self.user_firstname = attributes[:'userFirstname']
  end

  if attributes.has_key?(:'userLastname')
    self.user_lastname = attributes[:'userLastname']
  end

  if attributes.has_key?(:'messageToUser')
    self.message_to_user = attributes[:'messageToUser']
  end

  if attributes.has_key?(:'paymentMethodId')
    self.payment_method_id = attributes[:'paymentMethodId']
  end

  if attributes.has_key?(:'subtotalItems')
    self.subtotal_items = attributes[:'subtotalItems']
  end

  if attributes.has_key?(:'subtotalServices')
    self.subtotal_services = attributes[:'subtotalServices']
  end

  if attributes.has_key?(:'subtotalTax')
    self.subtotal_tax = attributes[:'subtotalTax']
  end

  if attributes.has_key?(:'amount')
    self.amount = attributes[:'amount']
  end

  if attributes.has_key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.has_key?(:'distributorFee')
    self.distributor_fee = attributes[:'distributorFee']
  end

  if attributes.has_key?(:'createdDate')
    self.created_date = attributes[:'createdDate']
  end

  if attributes.has_key?(:'createdIp')
    self.created_ip = attributes[:'createdIp']
  end

  if attributes.has_key?(:'paymentHtml')
    self.payment_html = attributes[:'paymentHtml']
  end

  if attributes.has_key?(:'paymentLanguage')
    self.payment_language = attributes[:'paymentLanguage']
  end

  if attributes.has_key?(:'paymentPostUrl')
    self.payment_post_url = attributes[:'paymentPostUrl']
  end

  if attributes.has_key?(:'paymentPostDataUrl')
    self.payment_post_data_url = attributes[:'paymentPostDataUrl']
  end

  if attributes.has_key?(:'paymentAcceptedUrl')
    self.payment_accepted_url = attributes[:'paymentAcceptedUrl']
  end

  if attributes.has_key?(:'paymentWaitingUrl')
    self.payment_waiting_url = attributes[:'paymentWaitingUrl']
  end

  if attributes.has_key?(:'paymentRefusedUrl')
    self.payment_refused_url = attributes[:'paymentRefusedUrl']
  end

  if attributes.has_key?(:'paymentCanceledUrl')
    self.payment_canceled_url = attributes[:'paymentCanceledUrl']
  end

  if attributes.has_key?(:'paymentExceptionUrl')
    self.payment_exception_url = attributes[:'paymentExceptionUrl']
  end

  if attributes.has_key?(:'ibanFullname')
    self.iban_fullname = attributes[:'ibanFullname']
  end

  if attributes.has_key?(:'ibanId')
    self.iban_id = attributes[:'ibanId']
  end

  if attributes.has_key?(:'ibanBic')
    self.iban_bic = attributes[:'ibanBic']
  end

  if attributes.has_key?(:'ibanTxEndToEndId')
    self.iban_tx_end_to_end_id = attributes[:'ibanTxEndToEndId']
  end

  if attributes.has_key?(:'ibanTxId')
    self.iban_tx_id = attributes[:'ibanTxId']
  end

  if attributes.has_key?(:'refundAmount')
    self.refund_amount = attributes[:'refundAmount']
  end

  if attributes.has_key?(:'totalRows')
    self.total_rows = attributes[:'totalRows']
  end

  if attributes.has_key?(:'forwardUrl')
    self.forward_url = attributes[:'forwardUrl']
  end

  if attributes.has_key?(:'payinDate')
    self.payin_date = attributes[:'payinDate']
  end

  if attributes.has_key?(:'mandateId')
    self.mandate_id = attributes[:'mandateId']
  end

  if attributes.has_key?(:'creditorName')
    self.creditor_name = attributes[:'creditorName']
  end

  if attributes.has_key?(:'creditorAddressLine')
    self.creditor_address_line = attributes[:'creditorAddressLine']
  end

  if attributes.has_key?(:'creditorCountry')
    self.creditor_country = attributes[:'creditorCountry']
  end

  if attributes.has_key?(:'creditorIban')
    self.creditor_iban = attributes[:'creditorIban']
  end

  if attributes.has_key?(:'creditorBIC')
    self.creditor_bic = attributes[:'creditorBIC']
  end

  if attributes.has_key?(:'virtualIbanId')
    self.virtual_iban_id = attributes[:'virtualIbanId']
  end

  if attributes.has_key?(:'virtualIbanReference')
    self.virtual_iban_reference = attributes[:'virtualIbanReference']
  end

  if attributes.has_key?(:'DbtrIBAN')
    self.dbtr_iban = attributes[:'DbtrIBAN']
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



51
52
53
# File 'lib/treezor_client/models/payin.rb', line 51

def amount
  @amount
end

#cart_idObject

Returns the value of attribute cart_id.



31
32
33
# File 'lib/treezor_client/models/payin.rb', line 31

def cart_id
  @cart_id
end

#code_statusObject

Returns the value of attribute code_status.



23
24
25
# File 'lib/treezor_client/models/payin.rb', line 23

def code_status
  @code_status
end

#created_dateObject

Date YYYY-MM-DD HH:MM:SS



58
59
60
# File 'lib/treezor_client/models/payin.rb', line 58

def created_date
  @created_date
end

#created_ipObject

Returns the value of attribute created_ip.



60
61
62
# File 'lib/treezor_client/models/payin.rb', line 60

def created_ip
  @created_ip
end

#creditor_address_lineObject

Returns the value of attribute creditor_address_line.



103
104
105
# File 'lib/treezor_client/models/payin.rb', line 103

def creditor_address_line
  @creditor_address_line
end

#creditor_bicObject

Returns the value of attribute creditor_bic.



109
110
111
# File 'lib/treezor_client/models/payin.rb', line 109

def creditor_bic
  @creditor_bic
end

#creditor_countryObject

Returns the value of attribute creditor_country.



105
106
107
# File 'lib/treezor_client/models/payin.rb', line 105

def creditor_country
  @creditor_country
end

#creditor_ibanObject

Returns the value of attribute creditor_iban.



107
108
109
# File 'lib/treezor_client/models/payin.rb', line 107

def creditor_iban
  @creditor_iban
end

#creditor_nameObject

Returns the value of attribute creditor_name.



101
102
103
# File 'lib/treezor_client/models/payin.rb', line 101

def creditor_name
  @creditor_name
end

#currencyObject

Returns the value of attribute currency.



53
54
55
# File 'lib/treezor_client/models/payin.rb', line 53

def currency
  @currency
end

#dbtr_ibanObject

Returns the value of attribute dbtr_iban.



115
116
117
# File 'lib/treezor_client/models/payin.rb', line 115

def dbtr_iban
  @dbtr_iban
end

#distributor_feeObject

Returns the value of attribute distributor_fee.



55
56
57
# File 'lib/treezor_client/models/payin.rb', line 55

def distributor_fee
  @distributor_fee
end

#forward_urlObject

Returns the value of attribute forward_url.



94
95
96
# File 'lib/treezor_client/models/payin.rb', line 94

def forward_url
  @forward_url
end

#iban_bicObject

Returns the value of attribute iban_bic.



84
85
86
# File 'lib/treezor_client/models/payin.rb', line 84

def iban_bic
  @iban_bic
end

#iban_fullnameObject

Returns the value of attribute iban_fullname.



80
81
82
# File 'lib/treezor_client/models/payin.rb', line 80

def iban_fullname
  @iban_fullname
end

#iban_idObject

Returns the value of attribute iban_id.



82
83
84
# File 'lib/treezor_client/models/payin.rb', line 82

def iban_id
  @iban_id
end

#iban_tx_end_to_end_idObject

Returns the value of attribute iban_tx_end_to_end_id.



86
87
88
# File 'lib/treezor_client/models/payin.rb', line 86

def iban_tx_end_to_end_id
  @iban_tx_end_to_end_id
end

#iban_tx_idObject

Returns the value of attribute iban_tx_id.



88
89
90
# File 'lib/treezor_client/models/payin.rb', line 88

def iban_tx_id
  @iban_tx_id
end

#information_statusObject

Returns the value of attribute information_status.



25
26
27
# File 'lib/treezor_client/models/payin.rb', line 25

def information_status
  @information_status
end

#mandate_idObject

Returns the value of attribute mandate_id.



99
100
101
# File 'lib/treezor_client/models/payin.rb', line 99

def mandate_id
  @mandate_id
end

#message_to_userObject

Returns the value of attribute message_to_user.



41
42
43
# File 'lib/treezor_client/models/payin.rb', line 41

def message_to_user
  @message_to_user
end

#payin_dateObject

Date YYYY-MM-DD



97
98
99
# File 'lib/treezor_client/models/payin.rb', line 97

def payin_date
  @payin_date
end

#payin_idObject

Returns the value of attribute payin_id.



17
18
19
# File 'lib/treezor_client/models/payin.rb', line 17

def payin_id
  @payin_id
end

#payin_statusObject

Returns the value of attribute payin_status.



21
22
23
# File 'lib/treezor_client/models/payin.rb', line 21

def payin_status
  @payin_status
end

#payin_tagObject

Returns the value of attribute payin_tag.



19
20
21
# File 'lib/treezor_client/models/payin.rb', line 19

def payin_tag
  @payin_tag
end

#payment_accepted_urlObject

Returns the value of attribute payment_accepted_url.



70
71
72
# File 'lib/treezor_client/models/payin.rb', line 70

def payment_accepted_url
  @payment_accepted_url
end

#payment_canceled_urlObject

Returns the value of attribute payment_canceled_url.



76
77
78
# File 'lib/treezor_client/models/payin.rb', line 76

def payment_canceled_url
  @payment_canceled_url
end

#payment_exception_urlObject

Returns the value of attribute payment_exception_url.



78
79
80
# File 'lib/treezor_client/models/payin.rb', line 78

def payment_exception_url
  @payment_exception_url
end

#payment_htmlObject

Returns the value of attribute payment_html.



62
63
64
# File 'lib/treezor_client/models/payin.rb', line 62

def payment_html
  @payment_html
end

#payment_languageObject

Returns the value of attribute payment_language.



64
65
66
# File 'lib/treezor_client/models/payin.rb', line 64

def payment_language
  @payment_language
end

#payment_method_idObject

Returns the value of attribute payment_method_id.



43
44
45
# File 'lib/treezor_client/models/payin.rb', line 43

def payment_method_id
  @payment_method_id
end

#payment_post_data_urlObject

Returns the value of attribute payment_post_data_url.



68
69
70
# File 'lib/treezor_client/models/payin.rb', line 68

def payment_post_data_url
  @payment_post_data_url
end

#payment_post_urlObject

Returns the value of attribute payment_post_url.



66
67
68
# File 'lib/treezor_client/models/payin.rb', line 66

def payment_post_url
  @payment_post_url
end

#payment_refused_urlObject

Returns the value of attribute payment_refused_url.



74
75
76
# File 'lib/treezor_client/models/payin.rb', line 74

def payment_refused_url
  @payment_refused_url
end

#payment_waiting_urlObject

Returns the value of attribute payment_waiting_url.



72
73
74
# File 'lib/treezor_client/models/payin.rb', line 72

def payment_waiting_url
  @payment_waiting_url
end

#refund_amountObject

Returns the value of attribute refund_amount.



90
91
92
# File 'lib/treezor_client/models/payin.rb', line 90

def refund_amount
  @refund_amount
end

#subtotal_itemsObject

Returns the value of attribute subtotal_items.



45
46
47
# File 'lib/treezor_client/models/payin.rb', line 45

def subtotal_items
  @subtotal_items
end

#subtotal_servicesObject

Returns the value of attribute subtotal_services.



47
48
49
# File 'lib/treezor_client/models/payin.rb', line 47

def subtotal_services
  @subtotal_services
end

#subtotal_taxObject

Returns the value of attribute subtotal_tax.



49
50
51
# File 'lib/treezor_client/models/payin.rb', line 49

def subtotal_tax
  @subtotal_tax
end

#total_rowsObject

Returns the value of attribute total_rows.



92
93
94
# File 'lib/treezor_client/models/payin.rb', line 92

def total_rows
  @total_rows
end

#user_firstnameObject

Returns the value of attribute user_firstname.



37
38
39
# File 'lib/treezor_client/models/payin.rb', line 37

def user_firstname
  @user_firstname
end

#user_idObject

Returns the value of attribute user_id.



29
30
31
# File 'lib/treezor_client/models/payin.rb', line 29

def user_id
  @user_id
end

#user_lastnameObject

Returns the value of attribute user_lastname.



39
40
41
# File 'lib/treezor_client/models/payin.rb', line 39

def user_lastname
  @user_lastname
end

#virtual_iban_idObject

Returns the value of attribute virtual_iban_id.



111
112
113
# File 'lib/treezor_client/models/payin.rb', line 111

def virtual_iban_id
  @virtual_iban_id
end

#virtual_iban_referenceObject

Returns the value of attribute virtual_iban_reference.



113
114
115
# File 'lib/treezor_client/models/payin.rb', line 113

def virtual_iban_reference
  @virtual_iban_reference
end

#wallet_aliasObject

Returns the value of attribute wallet_alias.



35
36
37
# File 'lib/treezor_client/models/payin.rb', line 35

def wallet_alias
  @wallet_alias
end

#wallet_event_nameObject

Returns the value of attribute wallet_event_name.



33
34
35
# File 'lib/treezor_client/models/payin.rb', line 33

def wallet_event_name
  @wallet_event_name
end

#wallet_idObject

Returns the value of attribute wallet_id.



27
28
29
# File 'lib/treezor_client/models/payin.rb', line 27

def wallet_id
  @wallet_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



140
141
142
143
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/treezor_client/models/payin.rb', line 140

def self.attribute_map
  {
    :'payin_id' => :'payinId',
    :'payin_tag' => :'payinTag',
    :'payin_status' => :'payinStatus',
    :'code_status' => :'codeStatus',
    :'information_status' => :'informationStatus',
    :'wallet_id' => :'walletId',
    :'user_id' => :'userId',
    :'cart_id' => :'cartId',
    :'wallet_event_name' => :'walletEventName',
    :'wallet_alias' => :'walletAlias',
    :'user_firstname' => :'userFirstname',
    :'user_lastname' => :'userLastname',
    :'message_to_user' => :'messageToUser',
    :'payment_method_id' => :'paymentMethodId',
    :'subtotal_items' => :'subtotalItems',
    :'subtotal_services' => :'subtotalServices',
    :'subtotal_tax' => :'subtotalTax',
    :'amount' => :'amount',
    :'currency' => :'currency',
    :'distributor_fee' => :'distributorFee',
    :'created_date' => :'createdDate',
    :'created_ip' => :'createdIp',
    :'payment_html' => :'paymentHtml',
    :'payment_language' => :'paymentLanguage',
    :'payment_post_url' => :'paymentPostUrl',
    :'payment_post_data_url' => :'paymentPostDataUrl',
    :'payment_accepted_url' => :'paymentAcceptedUrl',
    :'payment_waiting_url' => :'paymentWaitingUrl',
    :'payment_refused_url' => :'paymentRefusedUrl',
    :'payment_canceled_url' => :'paymentCanceledUrl',
    :'payment_exception_url' => :'paymentExceptionUrl',
    :'iban_fullname' => :'ibanFullname',
    :'iban_id' => :'ibanId',
    :'iban_bic' => :'ibanBic',
    :'iban_tx_end_to_end_id' => :'ibanTxEndToEndId',
    :'iban_tx_id' => :'ibanTxId',
    :'refund_amount' => :'refundAmount',
    :'total_rows' => :'totalRows',
    :'forward_url' => :'forwardUrl',
    :'payin_date' => :'payinDate',
    :'mandate_id' => :'mandateId',
    :'creditor_name' => :'creditorName',
    :'creditor_address_line' => :'creditorAddressLine',
    :'creditor_country' => :'creditorCountry',
    :'creditor_iban' => :'creditorIban',
    :'creditor_bic' => :'creditorBIC',
    :'virtual_iban_id' => :'virtualIbanId',
    :'virtual_iban_reference' => :'virtualIbanReference',
    :'dbtr_iban' => :'DbtrIBAN'
  }
end

.swagger_typesObject

Attribute type mapping.



195
196
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
246
247
# File 'lib/treezor_client/models/payin.rb', line 195

def self.swagger_types
  {
    :'payin_id' => :'Integer',
    :'payin_tag' => :'String',
    :'payin_status' => :'String',
    :'code_status' => :'Integer',
    :'information_status' => :'String',
    :'wallet_id' => :'Integer',
    :'user_id' => :'Integer',
    :'cart_id' => :'Integer',
    :'wallet_event_name' => :'String',
    :'wallet_alias' => :'String',
    :'user_firstname' => :'String',
    :'user_lastname' => :'String',
    :'message_to_user' => :'String',
    :'payment_method_id' => :'Integer',
    :'subtotal_items' => :'String',
    :'subtotal_services' => :'String',
    :'subtotal_tax' => :'String',
    :'amount' => :'String',
    :'currency' => :'String',
    :'distributor_fee' => :'String',
    :'created_date' => :'String',
    :'created_ip' => :'String',
    :'payment_html' => :'String',
    :'payment_language' => :'String',
    :'payment_post_url' => :'String',
    :'payment_post_data_url' => :'String',
    :'payment_accepted_url' => :'String',
    :'payment_waiting_url' => :'String',
    :'payment_refused_url' => :'String',
    :'payment_canceled_url' => :'String',
    :'payment_exception_url' => :'String',
    :'iban_fullname' => :'String',
    :'iban_id' => :'String',
    :'iban_bic' => :'String',
    :'iban_tx_end_to_end_id' => :'String',
    :'iban_tx_id' => :'String',
    :'refund_amount' => :'String',
    :'total_rows' => :'Integer',
    :'forward_url' => :'String',
    :'payin_date' => :'String',
    :'mandate_id' => :'Integer',
    :'creditor_name' => :'String',
    :'creditor_address_line' => :'String',
    :'creditor_country' => :'String',
    :'creditor_iban' => :'String',
    :'creditor_bic' => :'String',
    :'virtual_iban_id' => :'Integer',
    :'virtual_iban_reference' => :'String',
    :'dbtr_iban' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/treezor_client/models/payin.rb', line 481

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      payin_id == o.payin_id &&
      payin_tag == o.payin_tag &&
      payin_status == o.payin_status &&
      code_status == o.code_status &&
      information_status == o.information_status &&
      wallet_id == o.wallet_id &&
      user_id == o.user_id &&
      cart_id == o.cart_id &&
      wallet_event_name == o.wallet_event_name &&
      wallet_alias == o.wallet_alias &&
      user_firstname == o.user_firstname &&
      user_lastname == o.user_lastname &&
      message_to_user == o.message_to_user &&
      payment_method_id == o.payment_method_id &&
      subtotal_items == o.subtotal_items &&
      subtotal_services == o.subtotal_services &&
      subtotal_tax == o.subtotal_tax &&
      amount == o.amount &&
      currency == o.currency &&
      distributor_fee == o.distributor_fee &&
      created_date == o.created_date &&
      created_ip == o.created_ip &&
      payment_html == o.payment_html &&
      payment_language == o.payment_language &&
      payment_post_url == o.payment_post_url &&
      payment_post_data_url == o.payment_post_data_url &&
      payment_accepted_url == o.payment_accepted_url &&
      payment_waiting_url == o.payment_waiting_url &&
      payment_refused_url == o.payment_refused_url &&
      payment_canceled_url == o.payment_canceled_url &&
      payment_exception_url == o.payment_exception_url &&
      iban_fullname == o.iban_fullname &&
      iban_id == o.iban_id &&
      iban_bic == o.iban_bic &&
      iban_tx_end_to_end_id == o.iban_tx_end_to_end_id &&
      iban_tx_id == o.iban_tx_id &&
      refund_amount == o.refund_amount &&
      total_rows == o.total_rows &&
      forward_url == o.forward_url &&
      payin_date == o.payin_date &&
      mandate_id == o.mandate_id &&
      creditor_name == o.creditor_name &&
      creditor_address_line == o.creditor_address_line &&
      creditor_country == o.creditor_country &&
      creditor_iban == o.creditor_iban &&
      creditor_bic == o.creditor_bic &&
      virtual_iban_id == o.virtual_iban_id &&
      virtual_iban_reference == o.virtual_iban_reference &&
      dbtr_iban == o.dbtr_iban
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/treezor_client/models/payin.rb', line 571

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = TreezorClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/treezor_client/models/payin.rb', line 637

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/treezor_client/models/payin.rb', line 550

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


537
538
539
# File 'lib/treezor_client/models/payin.rb', line 537

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



543
544
545
# File 'lib/treezor_client/models/payin.rb', line 543

def hash
  [payin_id, payin_tag, payin_status, code_status, information_status, wallet_id, user_id, cart_id, wallet_event_name, wallet_alias, user_firstname, user_lastname, message_to_user, payment_method_id, subtotal_items, subtotal_services, subtotal_tax, amount, currency, distributor_fee, created_date, created_ip, payment_html, payment_language, payment_post_url, payment_post_data_url, payment_accepted_url, payment_waiting_url, payment_refused_url, payment_canceled_url, payment_exception_url, iban_fullname, iban_id, iban_bic, iban_tx_end_to_end_id, iban_tx_id, refund_amount, total_rows, forward_url, payin_date, mandate_id, creditor_name, creditor_address_line, creditor_country, creditor_iban, creditor_bic, virtual_iban_id, virtual_iban_reference, dbtr_iban].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



456
457
458
459
# File 'lib/treezor_client/models/payin.rb', line 456

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



617
618
619
# File 'lib/treezor_client/models/payin.rb', line 617

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



623
624
625
626
627
628
629
630
631
# File 'lib/treezor_client/models/payin.rb', line 623

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



611
612
613
# File 'lib/treezor_client/models/payin.rb', line 611

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



463
464
465
466
467
# File 'lib/treezor_client/models/payin.rb', line 463

def valid?
  payin_status_validator = EnumAttributeValidator.new('String', ['PENDING', 'CANCELED', 'VALIDATED'])
  return false unless payin_status_validator.valid?(@payin_status)
  true
end