treezor_client 1.10.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +25 -24
- data/README.md +3 -1
- data/docs/Body11.md +9 -0
- data/docs/BusinessApi.md +2 -2
- data/docs/CardApi.md +0 -53
- data/docs/CardDigitalization.md +1 -1
- data/docs/CardReserveApi.md +4 -10
- data/docs/CardtransactionApi.md +1 -1
- data/docs/Document.md +1 -0
- data/docs/InlineResponse20010Cardtransactions.md +1 -0
- data/docs/InlineResponse20016.md +1 -1
- data/docs/InlineResponse2009Cardtransactions.md +1 -0
- data/docs/MerchantIdRestrictionGroupsApi.md +67 -0
- data/docs/Payin.md +1 -1
- data/docs/PayinApi.md +2 -2
- data/docs/Payinrefund.md +1 -1
- data/docs/PayinrefundApi.md +4 -4
- data/docs/SepaSctrInst.md +26 -0
- data/docs/UserApi.md +6 -6
- data/docs/WalletApi.md +1 -5
- data/generate.sh +10 -0
- data/lib/treezor_client/api/balance_api.rb +1 -1
- data/lib/treezor_client/api/bankaccount_api.rb +1 -1
- data/lib/treezor_client/api/beneficiaries_api.rb +1 -1
- data/lib/treezor_client/api/business_api.rb +4 -4
- data/lib/treezor_client/api/card_api.rb +1 -49
- data/lib/treezor_client/api/card_digitalizations_api.rb +1 -1
- data/lib/treezor_client/api/card_reserve_api.rb +7 -21
- data/lib/treezor_client/api/cardtransaction_api.rb +3 -3
- data/lib/treezor_client/api/country_restriction_groups_api.rb +1 -1
- data/lib/treezor_client/api/document_api.rb +1 -1
- data/lib/treezor_client/api/heartbeat_api.rb +1 -1
- data/lib/treezor_client/api/issuer_initiated_digitization_data_api.rb +1 -1
- data/lib/treezor_client/api/mandate_api.rb +1 -1
- data/lib/treezor_client/api/mcc_restriction_groups_api.rb +1 -1
- data/lib/treezor_client/api/merchant_id_restriction_groups_api.rb +69 -1
- data/lib/treezor_client/api/payin_api.rb +3 -3
- data/lib/treezor_client/api/payinrefund_api.rb +3 -3
- data/lib/treezor_client/api/payout_api.rb +1 -1
- data/lib/treezor_client/api/payout_refunds_api.rb +1 -1
- data/lib/treezor_client/api/tax_residence_api.rb +1 -1
- data/lib/treezor_client/api/transaction_api.rb +1 -1
- data/lib/treezor_client/api/transfer_api.rb +1 -1
- data/lib/treezor_client/api/transferrefund_api.rb +1 -1
- data/lib/treezor_client/api/user_api.rb +7 -7
- data/lib/treezor_client/api/virtualibans_api.rb +1 -1
- data/lib/treezor_client/api/wallet_api.rb +3 -9
- data/lib/treezor_client/api_client.rb +6 -4
- data/lib/treezor_client/api_error.rb +1 -1
- data/lib/treezor_client/configuration.rb +3 -3
- data/lib/treezor_client/models/balance.rb +3 -2
- data/lib/treezor_client/models/bankaccount.rb +3 -2
- data/lib/treezor_client/models/beneficiaries_sdd_b2b_whitelist.rb +3 -2
- data/lib/treezor_client/models/beneficiary.rb +3 -2
- data/lib/treezor_client/models/body.rb +3 -2
- data/lib/treezor_client/models/body_1.rb +3 -2
- data/lib/treezor_client/models/body_10.rb +3 -2
- data/lib/treezor_client/models/{inline_response_200_7_cardimages.rb → body_11.rb} +52 -40
- data/lib/treezor_client/models/body_2.rb +3 -2
- data/lib/treezor_client/models/body_3.rb +3 -2
- data/lib/treezor_client/models/body_4.rb +3 -2
- data/lib/treezor_client/models/body_5.rb +3 -2
- data/lib/treezor_client/models/body_6.rb +3 -2
- data/lib/treezor_client/models/body_7.rb +3 -2
- data/lib/treezor_client/models/body_8.rb +3 -2
- data/lib/treezor_client/models/body_9.rb +3 -2
- data/lib/treezor_client/models/businesssearchs_businessinformations.rb +3 -2
- data/lib/treezor_client/models/card.rb +3 -2
- data/lib/treezor_client/models/card_digitalization.rb +4 -3
- data/lib/treezor_client/models/country_restriction_group.rb +3 -2
- data/lib/treezor_client/models/document.rb +13 -3
- data/lib/treezor_client/models/error.rb +3 -2
- data/lib/treezor_client/models/inline_response_200.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_1.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_10.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_10_cardtransactions.rb +13 -3
- data/lib/treezor_client/models/inline_response_200_11.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_12.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_13.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_14.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_15.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_16.rb +11 -10
- data/lib/treezor_client/models/inline_response_200_17.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_18.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_19.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_2.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_20.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_21.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_22.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_23.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_24.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_25.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_26.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_27.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_28.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_3.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_4.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_4_businessinformations.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_4_users.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_5.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_6.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_6_cardimages.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_7.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_8.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_9.rb +3 -2
- data/lib/treezor_client/models/inline_response_200_9_cardtransactions.rb +13 -3
- data/lib/treezor_client/models/inline_response_default.rb +3 -2
- data/lib/treezor_client/models/issuer_initiated_digitization_data.rb +3 -2
- data/lib/treezor_client/models/issuer_initiated_digitization_datas_additionnal_data.rb +3 -2
- data/lib/treezor_client/models/mandate.rb +3 -2
- data/lib/treezor_client/models/mcc_restriction_group.rb +3 -2
- data/lib/treezor_client/models/merchant_id_restriction_group.rb +3 -2
- data/lib/treezor_client/models/payin.rb +6 -5
- data/lib/treezor_client/models/payinrefund.rb +4 -3
- data/lib/treezor_client/models/payout.rb +3 -2
- data/lib/treezor_client/models/payout_refund.rb +3 -2
- data/lib/treezor_client/models/sepa_sctr_inst.rb +347 -0
- data/lib/treezor_client/models/tax_residence.rb +3 -2
- data/lib/treezor_client/models/transaction.rb +3 -2
- data/lib/treezor_client/models/transfer.rb +3 -2
- data/lib/treezor_client/models/transferrefund.rb +3 -2
- data/lib/treezor_client/models/user.rb +3 -2
- data/lib/treezor_client/models/virtualiban.rb +3 -2
- data/lib/treezor_client/models/wallet.rb +3 -2
- data/lib/treezor_client/version.rb +2 -2
- data/lib/treezor_client.rb +3 -1
- data/original_treezor_api_spec.yaml +111 -78
- data/spec/models/body_11_spec.rb +51 -0
- data/spec/models/sepa_sctr_inst_spec.rb +149 -0
- data/treezor_api_spec.yaml +151 -78
- data/treezor_client.gemspec +2 -1
- metadata +34 -152
- data/doc/TreezorClient/ApiClient.html +0 -2600
- data/doc/TreezorClient/ApiError.html +0 -464
- data/doc/TreezorClient/Balance.html +0 -2042
- data/doc/TreezorClient/BalanceApi.html +0 -760
- data/doc/TreezorClient/Bankaccount/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Bankaccount.html +0 -2560
- data/doc/TreezorClient/BankaccountApi.html +0 -2450
- data/doc/TreezorClient/BeneficiariesApi.html +0 -2387
- data/doc/TreezorClient/BeneficiariesSddB2bWhitelist.html +0 -1816
- data/doc/TreezorClient/Beneficiary.html +0 -2574
- data/doc/TreezorClient/Body/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body.html +0 -1826
- data/doc/TreezorClient/Body1.html +0 -2596
- data/doc/TreezorClient/Body10/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body10.html +0 -2069
- data/doc/TreezorClient/Body2.html +0 -2492
- data/doc/TreezorClient/Body3.html +0 -1726
- data/doc/TreezorClient/Body4.html +0 -1726
- data/doc/TreezorClient/Body5/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body5.html +0 -2001
- data/doc/TreezorClient/Body6/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body6.html +0 -2069
- data/doc/TreezorClient/Body7/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body7.html +0 -2002
- data/doc/TreezorClient/Body8/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body8.html +0 -1981
- data/doc/TreezorClient/Body9/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Body9.html +0 -2001
- data/doc/TreezorClient/BusinessApi.html +0 -1548
- data/doc/TreezorClient/BusinesssearchsBusinessinformations/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/BusinesssearchsBusinessinformations.html +0 -2822
- data/doc/TreezorClient/Card/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Card.html +0 -6928
- data/doc/TreezorClient/CardApi.html +0 -9907
- data/doc/TreezorClient/CardDigitalization.html +0 -2126
- data/doc/TreezorClient/CardDigitalizationDetailsFromGPS.html +0 -4343
- data/doc/TreezorClient/CardDigitalizationsApi.html +0 -1542
- data/doc/TreezorClient/CardReserveApi.html +0 -1622
- data/doc/TreezorClient/CardtransactionApi.html +0 -1243
- data/doc/TreezorClient/Configuration.html +0 -2459
- data/doc/TreezorClient/CountryRestrictionGroupsApi.html +0 -2602
- data/doc/TreezorClient/Document/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Document.html +0 -2812
- data/doc/TreezorClient/DocumentApi.html +0 -2878
- data/doc/TreezorClient/Error.html +0 -1794
- data/doc/TreezorClient/HeartbeatApi.html +0 -702
- data/doc/TreezorClient/InlineResponse200.html +0 -1626
- data/doc/TreezorClient/InlineResponse2001.html +0 -1626
- data/doc/TreezorClient/InlineResponse20010.html +0 -1626
- data/doc/TreezorClient/InlineResponse20010Cardtransactions.html +0 -5844
- data/doc/TreezorClient/InlineResponse20011.html +0 -1626
- data/doc/TreezorClient/InlineResponse20012.html +0 -1626
- data/doc/TreezorClient/InlineResponse20013.html +0 -1626
- data/doc/TreezorClient/InlineResponse20014.html +0 -1626
- data/doc/TreezorClient/InlineResponse20015.html +0 -1626
- data/doc/TreezorClient/InlineResponse20016.html +0 -1626
- data/doc/TreezorClient/InlineResponse20017.html +0 -1626
- data/doc/TreezorClient/InlineResponse20018.html +0 -1626
- data/doc/TreezorClient/InlineResponse20019.html +0 -1626
- data/doc/TreezorClient/InlineResponse2002.html +0 -1626
- data/doc/TreezorClient/InlineResponse20020.html +0 -1626
- data/doc/TreezorClient/InlineResponse20021.html +0 -1626
- data/doc/TreezorClient/InlineResponse20022.html +0 -1626
- data/doc/TreezorClient/InlineResponse20023.html +0 -1626
- data/doc/TreezorClient/InlineResponse20024.html +0 -1626
- data/doc/TreezorClient/InlineResponse20025.html +0 -1626
- data/doc/TreezorClient/InlineResponse2003.html +0 -1626
- data/doc/TreezorClient/InlineResponse2004.html +0 -1626
- data/doc/TreezorClient/InlineResponse2005.html +0 -1626
- data/doc/TreezorClient/InlineResponse2005Businessinformations/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/InlineResponse2005Businessinformations.html +0 -3561
- data/doc/TreezorClient/InlineResponse2005Users/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/InlineResponse2005Users.html +0 -1972
- data/doc/TreezorClient/InlineResponse2006.html +0 -1626
- data/doc/TreezorClient/InlineResponse2007.html +0 -1626
- data/doc/TreezorClient/InlineResponse2007Cardimages.html +0 -1800
- data/doc/TreezorClient/InlineResponse2008.html +0 -1626
- data/doc/TreezorClient/InlineResponse2009.html +0 -1790
- data/doc/TreezorClient/InlineResponseDefault.html +0 -1626
- data/doc/TreezorClient/IssuerInitiatedDigitizationDataApi.html +0 -1371
- data/doc/TreezorClient/IssuerInitiatedDigitizationDatasAdditionnalData.html +0 -1803
- data/doc/TreezorClient/IssuerInitiatedDigitizationDatasAdditionnalDataECCPublicCertificates.html +0 -1804
- data/doc/TreezorClient/Mandate/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Mandate.html +0 -4584
- data/doc/TreezorClient/MandateApi.html +0 -3787
- data/doc/TreezorClient/MccRestrictionGroup/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/MccRestrictionGroup.html +0 -2144
- data/doc/TreezorClient/MccRestrictionGroupsApi.html +0 -2598
- data/doc/TreezorClient/MerchantIdRestrictionGroup/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/MerchantIdRestrictionGroup.html +0 -2144
- data/doc/TreezorClient/MerchantIdRestrictionGroupsApi.html +0 -2638
- data/doc/TreezorClient/Payin/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Payin.html +0 -5584
- data/doc/TreezorClient/PayinApi.html +0 -2963
- data/doc/TreezorClient/Payinrefund/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Payinrefund.html +0 -2476
- data/doc/TreezorClient/PayinrefundApi.html +0 -2449
- data/doc/TreezorClient/Payout/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Payout.html +0 -3488
- data/doc/TreezorClient/PayoutApi.html +0 -2737
- data/doc/TreezorClient/Tav.html +0 -2130
- data/doc/TreezorClient/Transaction.html +0 -2798
- data/doc/TreezorClient/TransactionApi.html +0 -1491
- data/doc/TreezorClient/Transfer/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Transfer.html +0 -3158
- data/doc/TreezorClient/TransferApi.html +0 -2725
- data/doc/TreezorClient/Transferrefund/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Transferrefund.html +0 -2644
- data/doc/TreezorClient/TransferrefundApi.html +0 -2450
- data/doc/TreezorClient/User/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/User.html +0 -5844
- data/doc/TreezorClient/UserApi.html +0 -6647
- data/doc/TreezorClient/Virtualiban.html +0 -2462
- data/doc/TreezorClient/VirtualibansApi.html +0 -2845
- data/doc/TreezorClient/Wallet/EnumAttributeValidator.html +0 -455
- data/doc/TreezorClient/Wallet.html +0 -4076
- data/doc/TreezorClient/WalletApi.html +0 -3944
- data/doc/TreezorClient.html +0 -251
- data/doc/_index.html +0 -1025
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -496
- data/doc/file.README.html +0 -636
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -636
- data/doc/js/app.js +0 -292
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -15699
- data/doc/top-level-namespace.html +0 -110
- data/docs/CardDigitalizationDetailsFromGPS.md +0 -40
- data/docs/InlineResponse20011Cardtransactions.md +0 -58
- data/docs/InlineResponse2005Businessinformations.md +0 -26
- data/docs/InlineResponse2005Users.md +0 -12
- data/docs/InlineResponse2007Cardimages.md +0 -10
- data/docs/IssuerInitiatedDigitizationDatasAdditionnalDataECCPublicCertificates.md +0 -10
- data/docs/Tav.md +0 -14
- data/lib/treezor_client/models/card_digitalization_details_from_gps.rb +0 -509
- data/lib/treezor_client/models/inline_response_200_11_cardtransactions.rb +0 -637
- data/lib/treezor_client/models/inline_response_200_5_businessinformations.rb +0 -447
- data/lib/treezor_client/models/inline_response_200_5_users.rb +0 -258
- data/lib/treezor_client/models/issuer_initiated_digitization_datas_additionnal_data_ecc_public_certificates.rb +0 -209
- data/lib/treezor_client/models/tav.rb +0 -241
- data/pkg/treezor_client-1.10.0.gem +0 -0
@@ -1,637 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Treezor
|
3
|
-
|
4
|
-
#Treezor API. more info [here](https://www.treezor.com).
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module TreezorClient
|
16
|
-
class InlineResponse20011Cardtransactions
|
17
|
-
attr_accessor :cardtransaction_id
|
18
|
-
|
19
|
-
attr_accessor :card_id
|
20
|
-
|
21
|
-
attr_accessor :wallet_id
|
22
|
-
|
23
|
-
attr_accessor :wallet_currency
|
24
|
-
|
25
|
-
attr_accessor :merchant_id
|
26
|
-
|
27
|
-
attr_accessor :merchant_name
|
28
|
-
|
29
|
-
attr_accessor :merchant_city
|
30
|
-
|
31
|
-
attr_accessor :merchant_country
|
32
|
-
|
33
|
-
attr_accessor :mcc_code
|
34
|
-
|
35
|
-
attr_accessor :payment_local_time
|
36
|
-
|
37
|
-
attr_accessor :public_token
|
38
|
-
|
39
|
-
attr_accessor :payment_amount
|
40
|
-
|
41
|
-
# payment currency. Format: [ISO 4217](https://fr.wikipedia.org/wiki/ISO_4217).
|
42
|
-
attr_accessor :payment_currency
|
43
|
-
|
44
|
-
attr_accessor :fees
|
45
|
-
|
46
|
-
attr_accessor :payment_country
|
47
|
-
|
48
|
-
attr_accessor :payment_id
|
49
|
-
|
50
|
-
# Payment status. | Status | Description | | ------ | ------- | | A | Accepted | | C | Cleared | | I | Declined | | S | Settled | | V | Reversed |
|
51
|
-
attr_accessor :payment_status
|
52
|
-
|
53
|
-
attr_accessor :payment_local_amount
|
54
|
-
|
55
|
-
attr_accessor :pos_cardholder_presence
|
56
|
-
|
57
|
-
attr_accessor :pos_postcode
|
58
|
-
|
59
|
-
attr_accessor :pos_country
|
60
|
-
|
61
|
-
attr_accessor :pos_terminal_id
|
62
|
-
|
63
|
-
attr_accessor :pos_card_presence
|
64
|
-
|
65
|
-
attr_accessor :pan_entry_method
|
66
|
-
|
67
|
-
attr_accessor :authorization_note
|
68
|
-
|
69
|
-
# Authorization response code. | Code | Description | | ---- | ----------- | | 00 | All Good | | 01 | Refer to card issuer Refer | | 03 | Invalid merchant Decline | | 05 | Do not honour Decline | | 10 | Partial Approval Approve | | 13 | Invalid amount Decline | | 14 | Invalid card number (no such number) Decline | | 17 | Customer Cancellation Decline | | 33 | Expired card (Capture) Decline & Pickup | | 41 | Lost card (Capture) Decline & Pickup | | 43 | Stolen card (Capture) Decline & Pickup | | 51 | Insufficient funds Decline | | 54 | Expired card Decline | | 55 | Incorrect PIN Decline | | 57 | Transaction not permitted to cardholder Decline | | 58 | Transaction not permitted to terminal Decline | | 61 | Exceeds withdrawal amount limit Decline | | 62 | Restricted card Decline | | 63 | Security Violation Decline | | 65 | Exceeds withdrawal frequency limit Decline | | 68 | Response received too late Decline | | 70 | Cardholder to contact issuer Decline | | 75 | Allowable number of PIN tries exceeded Decline | | 82 | Timeout at IEM Decline | | 85 | PIN Unblock request Approve | | 91 | Issuer or switch is inoperative Decline | | N7 | Decline for CVV2 failure Decline |
|
70
|
-
attr_accessor :authorization_response_code
|
71
|
-
|
72
|
-
attr_accessor :authorization_issuer_id
|
73
|
-
|
74
|
-
attr_accessor :authorization_issuer_time
|
75
|
-
|
76
|
-
# Authorization Message Type Identifier | MTI | Description | | --- | ----| | 01xx | Authorization message | | 04xx | reversal message | | 12xx | Financial message |
|
77
|
-
attr_accessor :authorization_mti
|
78
|
-
|
79
|
-
attr_accessor :authorized_balance
|
80
|
-
|
81
|
-
attr_accessor :limit_atm_year
|
82
|
-
|
83
|
-
attr_accessor :limit_atm_month
|
84
|
-
|
85
|
-
attr_accessor :limit_atm_week
|
86
|
-
|
87
|
-
attr_accessor :limit_atm_day
|
88
|
-
|
89
|
-
attr_accessor :limit_atm_all
|
90
|
-
|
91
|
-
attr_accessor :limit_payment_year
|
92
|
-
|
93
|
-
attr_accessor :limit_payment_month
|
94
|
-
|
95
|
-
attr_accessor :limit_payment_week
|
96
|
-
|
97
|
-
attr_accessor :limit_payment_day
|
98
|
-
|
99
|
-
attr_accessor :limit_payment_all
|
100
|
-
|
101
|
-
attr_accessor :total_limit_atm_year
|
102
|
-
|
103
|
-
attr_accessor :total_limit_atm_month
|
104
|
-
|
105
|
-
attr_accessor :total_limit_atm_week
|
106
|
-
|
107
|
-
attr_accessor :total_limit_atm_day
|
108
|
-
|
109
|
-
attr_accessor :total_limit_atm_all
|
110
|
-
|
111
|
-
attr_accessor :total_limit_payment_year
|
112
|
-
|
113
|
-
attr_accessor :total_limit_payment_month
|
114
|
-
|
115
|
-
attr_accessor :total_limit_payment_week
|
116
|
-
|
117
|
-
attr_accessor :total_limit_payment_day
|
118
|
-
|
119
|
-
attr_accessor :total_limit_payment_all
|
120
|
-
|
121
|
-
attr_accessor :total_rows
|
122
|
-
|
123
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
124
|
-
def self.attribute_map
|
125
|
-
{
|
126
|
-
:'cardtransaction_id' => :'cardtransactionId',
|
127
|
-
:'card_id' => :'cardId',
|
128
|
-
:'wallet_id' => :'walletId',
|
129
|
-
:'wallet_currency' => :'walletCurrency',
|
130
|
-
:'merchant_id' => :'merchantId',
|
131
|
-
:'merchant_name' => :'merchantName',
|
132
|
-
:'merchant_city' => :'merchantCity',
|
133
|
-
:'merchant_country' => :'merchantCountry',
|
134
|
-
:'mcc_code' => :'mccCode',
|
135
|
-
:'payment_local_time' => :'paymentLocalTime',
|
136
|
-
:'public_token' => :'publicToken',
|
137
|
-
:'payment_amount' => :'paymentAmount',
|
138
|
-
:'payment_currency' => :'paymentCurrency',
|
139
|
-
:'fees' => :'fees',
|
140
|
-
:'payment_country' => :'paymentCountry',
|
141
|
-
:'payment_id' => :'paymentId',
|
142
|
-
:'payment_status' => :'paymentStatus',
|
143
|
-
:'payment_local_amount' => :'paymentLocalAmount',
|
144
|
-
:'pos_cardholder_presence' => :'posCardholderPresence',
|
145
|
-
:'pos_postcode' => :'posPostcode',
|
146
|
-
:'pos_country' => :'posCountry',
|
147
|
-
:'pos_terminal_id' => :'posTerminalId',
|
148
|
-
:'pos_card_presence' => :'posCardPresence',
|
149
|
-
:'pan_entry_method' => :'panEntryMethod',
|
150
|
-
:'authorization_note' => :'authorizationNote',
|
151
|
-
:'authorization_response_code' => :'authorizationResponseCode',
|
152
|
-
:'authorization_issuer_id' => :'authorizationIssuerId',
|
153
|
-
:'authorization_issuer_time' => :'authorizationIssuerTime',
|
154
|
-
:'authorization_mti' => :'authorizationMti',
|
155
|
-
:'authorized_balance' => :'authorizedBalance',
|
156
|
-
:'limit_atm_year' => :'limitAtmYear',
|
157
|
-
:'limit_atm_month' => :'limitAtmMonth',
|
158
|
-
:'limit_atm_week' => :'limitAtmWeek',
|
159
|
-
:'limit_atm_day' => :'limitAtmDay',
|
160
|
-
:'limit_atm_all' => :'limitAtmAll',
|
161
|
-
:'limit_payment_year' => :'limitPaymentYear',
|
162
|
-
:'limit_payment_month' => :'limitPaymentMonth',
|
163
|
-
:'limit_payment_week' => :'limitPaymentWeek',
|
164
|
-
:'limit_payment_day' => :'limitPaymentDay',
|
165
|
-
:'limit_payment_all' => :'limitPaymentAll',
|
166
|
-
:'total_limit_atm_year' => :'totalLimitAtmYear',
|
167
|
-
:'total_limit_atm_month' => :'totalLimitAtmMonth',
|
168
|
-
:'total_limit_atm_week' => :'totalLimitAtmWeek',
|
169
|
-
:'total_limit_atm_day' => :'totalLimitAtmDay',
|
170
|
-
:'total_limit_atm_all' => :'totalLimitAtmAll',
|
171
|
-
:'total_limit_payment_year' => :'totalLimitPaymentYear',
|
172
|
-
:'total_limit_payment_month' => :'totalLimitPaymentMonth',
|
173
|
-
:'total_limit_payment_week' => :'totalLimitPaymentWeek',
|
174
|
-
:'total_limit_payment_day' => :'totalLimitPaymentDay',
|
175
|
-
:'total_limit_payment_all' => :'totalLimitPaymentAll',
|
176
|
-
:'total_rows' => :'totalRows'
|
177
|
-
}
|
178
|
-
end
|
179
|
-
|
180
|
-
# Attribute type mapping.
|
181
|
-
def self.swagger_types
|
182
|
-
{
|
183
|
-
:'cardtransaction_id' => :'String',
|
184
|
-
:'card_id' => :'String',
|
185
|
-
:'wallet_id' => :'String',
|
186
|
-
:'wallet_currency' => :'String',
|
187
|
-
:'merchant_id' => :'String',
|
188
|
-
:'merchant_name' => :'String',
|
189
|
-
:'merchant_city' => :'String',
|
190
|
-
:'merchant_country' => :'String',
|
191
|
-
:'mcc_code' => :'String',
|
192
|
-
:'payment_local_time' => :'String',
|
193
|
-
:'public_token' => :'String',
|
194
|
-
:'payment_amount' => :'String',
|
195
|
-
:'payment_currency' => :'String',
|
196
|
-
:'fees' => :'String',
|
197
|
-
:'payment_country' => :'String',
|
198
|
-
:'payment_id' => :'String',
|
199
|
-
:'payment_status' => :'String',
|
200
|
-
:'payment_local_amount' => :'String',
|
201
|
-
:'pos_cardholder_presence' => :'String',
|
202
|
-
:'pos_postcode' => :'String',
|
203
|
-
:'pos_country' => :'String',
|
204
|
-
:'pos_terminal_id' => :'String',
|
205
|
-
:'pos_card_presence' => :'String',
|
206
|
-
:'pan_entry_method' => :'String',
|
207
|
-
:'authorization_note' => :'String',
|
208
|
-
:'authorization_response_code' => :'String',
|
209
|
-
:'authorization_issuer_id' => :'String',
|
210
|
-
:'authorization_issuer_time' => :'String',
|
211
|
-
:'authorization_mti' => :'String',
|
212
|
-
:'authorized_balance' => :'String',
|
213
|
-
:'limit_atm_year' => :'String',
|
214
|
-
:'limit_atm_month' => :'String',
|
215
|
-
:'limit_atm_week' => :'String',
|
216
|
-
:'limit_atm_day' => :'String',
|
217
|
-
:'limit_atm_all' => :'String',
|
218
|
-
:'limit_payment_year' => :'String',
|
219
|
-
:'limit_payment_month' => :'String',
|
220
|
-
:'limit_payment_week' => :'String',
|
221
|
-
:'limit_payment_day' => :'String',
|
222
|
-
:'limit_payment_all' => :'String',
|
223
|
-
:'total_limit_atm_year' => :'String',
|
224
|
-
:'total_limit_atm_month' => :'String',
|
225
|
-
:'total_limit_atm_week' => :'String',
|
226
|
-
:'total_limit_atm_day' => :'String',
|
227
|
-
:'total_limit_atm_all' => :'String',
|
228
|
-
:'total_limit_payment_year' => :'String',
|
229
|
-
:'total_limit_payment_month' => :'String',
|
230
|
-
:'total_limit_payment_week' => :'String',
|
231
|
-
:'total_limit_payment_day' => :'String',
|
232
|
-
:'total_limit_payment_all' => :'String',
|
233
|
-
:'total_rows' => :'Integer'
|
234
|
-
}
|
235
|
-
end
|
236
|
-
|
237
|
-
# Initializes the object
|
238
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
239
|
-
def initialize(attributes = {})
|
240
|
-
return unless attributes.is_a?(Hash)
|
241
|
-
|
242
|
-
# convert string to symbol for hash key
|
243
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
244
|
-
|
245
|
-
if attributes.has_key?(:'cardtransactionId')
|
246
|
-
self.cardtransaction_id = attributes[:'cardtransactionId']
|
247
|
-
end
|
248
|
-
|
249
|
-
if attributes.has_key?(:'cardId')
|
250
|
-
self.card_id = attributes[:'cardId']
|
251
|
-
end
|
252
|
-
|
253
|
-
if attributes.has_key?(:'walletId')
|
254
|
-
self.wallet_id = attributes[:'walletId']
|
255
|
-
end
|
256
|
-
|
257
|
-
if attributes.has_key?(:'walletCurrency')
|
258
|
-
self.wallet_currency = attributes[:'walletCurrency']
|
259
|
-
end
|
260
|
-
|
261
|
-
if attributes.has_key?(:'merchantId')
|
262
|
-
self.merchant_id = attributes[:'merchantId']
|
263
|
-
end
|
264
|
-
|
265
|
-
if attributes.has_key?(:'merchantName')
|
266
|
-
self.merchant_name = attributes[:'merchantName']
|
267
|
-
end
|
268
|
-
|
269
|
-
if attributes.has_key?(:'merchantCity')
|
270
|
-
self.merchant_city = attributes[:'merchantCity']
|
271
|
-
end
|
272
|
-
|
273
|
-
if attributes.has_key?(:'merchantCountry')
|
274
|
-
self.merchant_country = attributes[:'merchantCountry']
|
275
|
-
end
|
276
|
-
|
277
|
-
if attributes.has_key?(:'mccCode')
|
278
|
-
self.mcc_code = attributes[:'mccCode']
|
279
|
-
end
|
280
|
-
|
281
|
-
if attributes.has_key?(:'paymentLocalTime')
|
282
|
-
self.payment_local_time = attributes[:'paymentLocalTime']
|
283
|
-
end
|
284
|
-
|
285
|
-
if attributes.has_key?(:'publicToken')
|
286
|
-
self.public_token = attributes[:'publicToken']
|
287
|
-
end
|
288
|
-
|
289
|
-
if attributes.has_key?(:'paymentAmount')
|
290
|
-
self.payment_amount = attributes[:'paymentAmount']
|
291
|
-
end
|
292
|
-
|
293
|
-
if attributes.has_key?(:'paymentCurrency')
|
294
|
-
self.payment_currency = attributes[:'paymentCurrency']
|
295
|
-
end
|
296
|
-
|
297
|
-
if attributes.has_key?(:'fees')
|
298
|
-
self.fees = attributes[:'fees']
|
299
|
-
end
|
300
|
-
|
301
|
-
if attributes.has_key?(:'paymentCountry')
|
302
|
-
self.payment_country = attributes[:'paymentCountry']
|
303
|
-
end
|
304
|
-
|
305
|
-
if attributes.has_key?(:'paymentId')
|
306
|
-
self.payment_id = attributes[:'paymentId']
|
307
|
-
end
|
308
|
-
|
309
|
-
if attributes.has_key?(:'paymentStatus')
|
310
|
-
self.payment_status = attributes[:'paymentStatus']
|
311
|
-
end
|
312
|
-
|
313
|
-
if attributes.has_key?(:'paymentLocalAmount')
|
314
|
-
self.payment_local_amount = attributes[:'paymentLocalAmount']
|
315
|
-
end
|
316
|
-
|
317
|
-
if attributes.has_key?(:'posCardholderPresence')
|
318
|
-
self.pos_cardholder_presence = attributes[:'posCardholderPresence']
|
319
|
-
end
|
320
|
-
|
321
|
-
if attributes.has_key?(:'posPostcode')
|
322
|
-
self.pos_postcode = attributes[:'posPostcode']
|
323
|
-
end
|
324
|
-
|
325
|
-
if attributes.has_key?(:'posCountry')
|
326
|
-
self.pos_country = attributes[:'posCountry']
|
327
|
-
end
|
328
|
-
|
329
|
-
if attributes.has_key?(:'posTerminalId')
|
330
|
-
self.pos_terminal_id = attributes[:'posTerminalId']
|
331
|
-
end
|
332
|
-
|
333
|
-
if attributes.has_key?(:'posCardPresence')
|
334
|
-
self.pos_card_presence = attributes[:'posCardPresence']
|
335
|
-
end
|
336
|
-
|
337
|
-
if attributes.has_key?(:'panEntryMethod')
|
338
|
-
self.pan_entry_method = attributes[:'panEntryMethod']
|
339
|
-
end
|
340
|
-
|
341
|
-
if attributes.has_key?(:'authorizationNote')
|
342
|
-
self.authorization_note = attributes[:'authorizationNote']
|
343
|
-
end
|
344
|
-
|
345
|
-
if attributes.has_key?(:'authorizationResponseCode')
|
346
|
-
self.authorization_response_code = attributes[:'authorizationResponseCode']
|
347
|
-
end
|
348
|
-
|
349
|
-
if attributes.has_key?(:'authorizationIssuerId')
|
350
|
-
self.authorization_issuer_id = attributes[:'authorizationIssuerId']
|
351
|
-
end
|
352
|
-
|
353
|
-
if attributes.has_key?(:'authorizationIssuerTime')
|
354
|
-
self.authorization_issuer_time = attributes[:'authorizationIssuerTime']
|
355
|
-
end
|
356
|
-
|
357
|
-
if attributes.has_key?(:'authorizationMti')
|
358
|
-
self.authorization_mti = attributes[:'authorizationMti']
|
359
|
-
end
|
360
|
-
|
361
|
-
if attributes.has_key?(:'authorizedBalance')
|
362
|
-
self.authorized_balance = attributes[:'authorizedBalance']
|
363
|
-
end
|
364
|
-
|
365
|
-
if attributes.has_key?(:'limitAtmYear')
|
366
|
-
self.limit_atm_year = attributes[:'limitAtmYear']
|
367
|
-
end
|
368
|
-
|
369
|
-
if attributes.has_key?(:'limitAtmMonth')
|
370
|
-
self.limit_atm_month = attributes[:'limitAtmMonth']
|
371
|
-
end
|
372
|
-
|
373
|
-
if attributes.has_key?(:'limitAtmWeek')
|
374
|
-
self.limit_atm_week = attributes[:'limitAtmWeek']
|
375
|
-
end
|
376
|
-
|
377
|
-
if attributes.has_key?(:'limitAtmDay')
|
378
|
-
self.limit_atm_day = attributes[:'limitAtmDay']
|
379
|
-
end
|
380
|
-
|
381
|
-
if attributes.has_key?(:'limitAtmAll')
|
382
|
-
self.limit_atm_all = attributes[:'limitAtmAll']
|
383
|
-
end
|
384
|
-
|
385
|
-
if attributes.has_key?(:'limitPaymentYear')
|
386
|
-
self.limit_payment_year = attributes[:'limitPaymentYear']
|
387
|
-
end
|
388
|
-
|
389
|
-
if attributes.has_key?(:'limitPaymentMonth')
|
390
|
-
self.limit_payment_month = attributes[:'limitPaymentMonth']
|
391
|
-
end
|
392
|
-
|
393
|
-
if attributes.has_key?(:'limitPaymentWeek')
|
394
|
-
self.limit_payment_week = attributes[:'limitPaymentWeek']
|
395
|
-
end
|
396
|
-
|
397
|
-
if attributes.has_key?(:'limitPaymentDay')
|
398
|
-
self.limit_payment_day = attributes[:'limitPaymentDay']
|
399
|
-
end
|
400
|
-
|
401
|
-
if attributes.has_key?(:'limitPaymentAll')
|
402
|
-
self.limit_payment_all = attributes[:'limitPaymentAll']
|
403
|
-
end
|
404
|
-
|
405
|
-
if attributes.has_key?(:'totalLimitAtmYear')
|
406
|
-
self.total_limit_atm_year = attributes[:'totalLimitAtmYear']
|
407
|
-
end
|
408
|
-
|
409
|
-
if attributes.has_key?(:'totalLimitAtmMonth')
|
410
|
-
self.total_limit_atm_month = attributes[:'totalLimitAtmMonth']
|
411
|
-
end
|
412
|
-
|
413
|
-
if attributes.has_key?(:'totalLimitAtmWeek')
|
414
|
-
self.total_limit_atm_week = attributes[:'totalLimitAtmWeek']
|
415
|
-
end
|
416
|
-
|
417
|
-
if attributes.has_key?(:'totalLimitAtmDay')
|
418
|
-
self.total_limit_atm_day = attributes[:'totalLimitAtmDay']
|
419
|
-
end
|
420
|
-
|
421
|
-
if attributes.has_key?(:'totalLimitAtmAll')
|
422
|
-
self.total_limit_atm_all = attributes[:'totalLimitAtmAll']
|
423
|
-
end
|
424
|
-
|
425
|
-
if attributes.has_key?(:'totalLimitPaymentYear')
|
426
|
-
self.total_limit_payment_year = attributes[:'totalLimitPaymentYear']
|
427
|
-
end
|
428
|
-
|
429
|
-
if attributes.has_key?(:'totalLimitPaymentMonth')
|
430
|
-
self.total_limit_payment_month = attributes[:'totalLimitPaymentMonth']
|
431
|
-
end
|
432
|
-
|
433
|
-
if attributes.has_key?(:'totalLimitPaymentWeek')
|
434
|
-
self.total_limit_payment_week = attributes[:'totalLimitPaymentWeek']
|
435
|
-
end
|
436
|
-
|
437
|
-
if attributes.has_key?(:'totalLimitPaymentDay')
|
438
|
-
self.total_limit_payment_day = attributes[:'totalLimitPaymentDay']
|
439
|
-
end
|
440
|
-
|
441
|
-
if attributes.has_key?(:'totalLimitPaymentAll')
|
442
|
-
self.total_limit_payment_all = attributes[:'totalLimitPaymentAll']
|
443
|
-
end
|
444
|
-
|
445
|
-
if attributes.has_key?(:'totalRows')
|
446
|
-
self.total_rows = attributes[:'totalRows']
|
447
|
-
end
|
448
|
-
end
|
449
|
-
|
450
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
451
|
-
# @return Array for valid properties with the reasons
|
452
|
-
def list_invalid_properties
|
453
|
-
invalid_properties = Array.new
|
454
|
-
invalid_properties
|
455
|
-
end
|
456
|
-
|
457
|
-
# Check to see if the all the properties in the model are valid
|
458
|
-
# @return true if the model is valid
|
459
|
-
def valid?
|
460
|
-
true
|
461
|
-
end
|
462
|
-
|
463
|
-
# Checks equality by comparing each attribute.
|
464
|
-
# @param [Object] Object to be compared
|
465
|
-
def ==(o)
|
466
|
-
return true if self.equal?(o)
|
467
|
-
self.class == o.class &&
|
468
|
-
cardtransaction_id == o.cardtransaction_id &&
|
469
|
-
card_id == o.card_id &&
|
470
|
-
wallet_id == o.wallet_id &&
|
471
|
-
wallet_currency == o.wallet_currency &&
|
472
|
-
merchant_id == o.merchant_id &&
|
473
|
-
merchant_name == o.merchant_name &&
|
474
|
-
merchant_city == o.merchant_city &&
|
475
|
-
merchant_country == o.merchant_country &&
|
476
|
-
mcc_code == o.mcc_code &&
|
477
|
-
payment_local_time == o.payment_local_time &&
|
478
|
-
public_token == o.public_token &&
|
479
|
-
payment_amount == o.payment_amount &&
|
480
|
-
payment_currency == o.payment_currency &&
|
481
|
-
fees == o.fees &&
|
482
|
-
payment_country == o.payment_country &&
|
483
|
-
payment_id == o.payment_id &&
|
484
|
-
payment_status == o.payment_status &&
|
485
|
-
payment_local_amount == o.payment_local_amount &&
|
486
|
-
pos_cardholder_presence == o.pos_cardholder_presence &&
|
487
|
-
pos_postcode == o.pos_postcode &&
|
488
|
-
pos_country == o.pos_country &&
|
489
|
-
pos_terminal_id == o.pos_terminal_id &&
|
490
|
-
pos_card_presence == o.pos_card_presence &&
|
491
|
-
pan_entry_method == o.pan_entry_method &&
|
492
|
-
authorization_note == o.authorization_note &&
|
493
|
-
authorization_response_code == o.authorization_response_code &&
|
494
|
-
authorization_issuer_id == o.authorization_issuer_id &&
|
495
|
-
authorization_issuer_time == o.authorization_issuer_time &&
|
496
|
-
authorization_mti == o.authorization_mti &&
|
497
|
-
authorized_balance == o.authorized_balance &&
|
498
|
-
limit_atm_year == o.limit_atm_year &&
|
499
|
-
limit_atm_month == o.limit_atm_month &&
|
500
|
-
limit_atm_week == o.limit_atm_week &&
|
501
|
-
limit_atm_day == o.limit_atm_day &&
|
502
|
-
limit_atm_all == o.limit_atm_all &&
|
503
|
-
limit_payment_year == o.limit_payment_year &&
|
504
|
-
limit_payment_month == o.limit_payment_month &&
|
505
|
-
limit_payment_week == o.limit_payment_week &&
|
506
|
-
limit_payment_day == o.limit_payment_day &&
|
507
|
-
limit_payment_all == o.limit_payment_all &&
|
508
|
-
total_limit_atm_year == o.total_limit_atm_year &&
|
509
|
-
total_limit_atm_month == o.total_limit_atm_month &&
|
510
|
-
total_limit_atm_week == o.total_limit_atm_week &&
|
511
|
-
total_limit_atm_day == o.total_limit_atm_day &&
|
512
|
-
total_limit_atm_all == o.total_limit_atm_all &&
|
513
|
-
total_limit_payment_year == o.total_limit_payment_year &&
|
514
|
-
total_limit_payment_month == o.total_limit_payment_month &&
|
515
|
-
total_limit_payment_week == o.total_limit_payment_week &&
|
516
|
-
total_limit_payment_day == o.total_limit_payment_day &&
|
517
|
-
total_limit_payment_all == o.total_limit_payment_all &&
|
518
|
-
total_rows == o.total_rows
|
519
|
-
end
|
520
|
-
|
521
|
-
# @see the `==` method
|
522
|
-
# @param [Object] Object to be compared
|
523
|
-
def eql?(o)
|
524
|
-
self == o
|
525
|
-
end
|
526
|
-
|
527
|
-
# Calculates hash code according to all attributes.
|
528
|
-
# @return [Fixnum] Hash code
|
529
|
-
def hash
|
530
|
-
[cardtransaction_id, card_id, wallet_id, wallet_currency, merchant_id, merchant_name, merchant_city, merchant_country, mcc_code, payment_local_time, public_token, payment_amount, payment_currency, fees, payment_country, payment_id, payment_status, payment_local_amount, pos_cardholder_presence, pos_postcode, pos_country, pos_terminal_id, pos_card_presence, pan_entry_method, authorization_note, authorization_response_code, authorization_issuer_id, authorization_issuer_time, authorization_mti, authorized_balance, limit_atm_year, limit_atm_month, limit_atm_week, limit_atm_day, limit_atm_all, limit_payment_year, limit_payment_month, limit_payment_week, limit_payment_day, limit_payment_all, total_limit_atm_year, total_limit_atm_month, total_limit_atm_week, total_limit_atm_day, total_limit_atm_all, total_limit_payment_year, total_limit_payment_month, total_limit_payment_week, total_limit_payment_day, total_limit_payment_all, total_rows].hash
|
531
|
-
end
|
532
|
-
|
533
|
-
# Builds the object from hash
|
534
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
535
|
-
# @return [Object] Returns the model itself
|
536
|
-
def build_from_hash(attributes)
|
537
|
-
return nil unless attributes.is_a?(Hash)
|
538
|
-
self.class.swagger_types.each_pair do |key, type|
|
539
|
-
if type =~ /\AArray<(.*)>/i
|
540
|
-
# check to ensure the input is an array given that the the attribute
|
541
|
-
# is documented as an array but the input is not
|
542
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
543
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
544
|
-
end
|
545
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
546
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
547
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
548
|
-
end
|
549
|
-
|
550
|
-
self
|
551
|
-
end
|
552
|
-
|
553
|
-
# Deserializes the data based on type
|
554
|
-
# @param string type Data type
|
555
|
-
# @param string value Value to be deserialized
|
556
|
-
# @return [Object] Deserialized data
|
557
|
-
def _deserialize(type, value)
|
558
|
-
case type.to_sym
|
559
|
-
when :DateTime
|
560
|
-
DateTime.parse(value)
|
561
|
-
when :Date
|
562
|
-
Date.parse(value)
|
563
|
-
when :String
|
564
|
-
value.to_s
|
565
|
-
when :Integer
|
566
|
-
value.to_i
|
567
|
-
when :Float
|
568
|
-
value.to_f
|
569
|
-
when :BOOLEAN
|
570
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
571
|
-
true
|
572
|
-
else
|
573
|
-
false
|
574
|
-
end
|
575
|
-
when :Object
|
576
|
-
# generic object (usually a Hash), return directly
|
577
|
-
value
|
578
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
579
|
-
inner_type = Regexp.last_match[:inner_type]
|
580
|
-
value.map { |v| _deserialize(inner_type, v) }
|
581
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
582
|
-
k_type = Regexp.last_match[:k_type]
|
583
|
-
v_type = Regexp.last_match[:v_type]
|
584
|
-
{}.tap do |hash|
|
585
|
-
value.each do |k, v|
|
586
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
587
|
-
end
|
588
|
-
end
|
589
|
-
else # model
|
590
|
-
temp_model = TreezorClient.const_get(type).new
|
591
|
-
temp_model.build_from_hash(value)
|
592
|
-
end
|
593
|
-
end
|
594
|
-
|
595
|
-
# Returns the string representation of the object
|
596
|
-
# @return [String] String presentation of the object
|
597
|
-
def to_s
|
598
|
-
to_hash.to_s
|
599
|
-
end
|
600
|
-
|
601
|
-
# to_body is an alias to to_hash (backward compatibility)
|
602
|
-
# @return [Hash] Returns the object in the form of hash
|
603
|
-
def to_body
|
604
|
-
to_hash
|
605
|
-
end
|
606
|
-
|
607
|
-
# Returns the object in the form of hash
|
608
|
-
# @return [Hash] Returns the object in the form of hash
|
609
|
-
def to_hash
|
610
|
-
hash = {}
|
611
|
-
self.class.attribute_map.each_pair do |attr, param|
|
612
|
-
value = self.send(attr)
|
613
|
-
next if value.nil?
|
614
|
-
hash[param] = _to_hash(value)
|
615
|
-
end
|
616
|
-
hash
|
617
|
-
end
|
618
|
-
|
619
|
-
# Outputs non-array value in the form of hash
|
620
|
-
# For object, use to_hash. Otherwise, just return the value
|
621
|
-
# @param [Object] value Any valid value
|
622
|
-
# @return [Hash] Returns the value in the form of hash
|
623
|
-
def _to_hash(value)
|
624
|
-
if value.is_a?(Array)
|
625
|
-
value.compact.map { |v| _to_hash(v) }
|
626
|
-
elsif value.is_a?(Hash)
|
627
|
-
{}.tap do |hash|
|
628
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
629
|
-
end
|
630
|
-
elsif value.respond_to? :to_hash
|
631
|
-
value.to_hash
|
632
|
-
else
|
633
|
-
value
|
634
|
-
end
|
635
|
-
end
|
636
|
-
end
|
637
|
-
end
|