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,258 +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 InlineResponse2005Users
|
17
|
-
# Representative's first name.
|
18
|
-
attr_accessor :firstname
|
19
|
-
|
20
|
-
# Representative's last name.
|
21
|
-
attr_accessor :lastname
|
22
|
-
|
23
|
-
# Representative's full names.
|
24
|
-
attr_accessor :fullnames
|
25
|
-
|
26
|
-
# Representative's birthdate. Format YYYY-MM-DD
|
27
|
-
attr_accessor :birthday
|
28
|
-
|
29
|
-
# Representative's position in company
|
30
|
-
attr_accessor :parent_type
|
31
|
-
|
32
|
-
class EnumAttributeValidator
|
33
|
-
attr_reader :datatype
|
34
|
-
attr_reader :allowable_values
|
35
|
-
|
36
|
-
def initialize(datatype, allowable_values)
|
37
|
-
@allowable_values = allowable_values.map do |value|
|
38
|
-
case datatype.to_s
|
39
|
-
when /Integer/i
|
40
|
-
value.to_i
|
41
|
-
when /Float/i
|
42
|
-
value.to_f
|
43
|
-
else
|
44
|
-
value
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def valid?(value)
|
50
|
-
!value || allowable_values.include?(value)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
-
def self.attribute_map
|
56
|
-
{
|
57
|
-
:'firstname' => :'firstname',
|
58
|
-
:'lastname' => :'lastname',
|
59
|
-
:'fullnames' => :'fullnames',
|
60
|
-
:'birthday' => :'birthday',
|
61
|
-
:'parent_type' => :'parentType'
|
62
|
-
}
|
63
|
-
end
|
64
|
-
|
65
|
-
# Attribute type mapping.
|
66
|
-
def self.swagger_types
|
67
|
-
{
|
68
|
-
:'firstname' => :'String',
|
69
|
-
:'lastname' => :'String',
|
70
|
-
:'fullnames' => :'String',
|
71
|
-
:'birthday' => :'String',
|
72
|
-
:'parent_type' => :'String'
|
73
|
-
}
|
74
|
-
end
|
75
|
-
|
76
|
-
# Initializes the object
|
77
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
-
def initialize(attributes = {})
|
79
|
-
return unless attributes.is_a?(Hash)
|
80
|
-
|
81
|
-
# convert string to symbol for hash key
|
82
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
83
|
-
|
84
|
-
if attributes.has_key?(:'firstname')
|
85
|
-
self.firstname = attributes[:'firstname']
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.has_key?(:'lastname')
|
89
|
-
self.lastname = attributes[:'lastname']
|
90
|
-
end
|
91
|
-
|
92
|
-
if attributes.has_key?(:'fullnames')
|
93
|
-
self.fullnames = attributes[:'fullnames']
|
94
|
-
end
|
95
|
-
|
96
|
-
if attributes.has_key?(:'birthday')
|
97
|
-
self.birthday = attributes[:'birthday']
|
98
|
-
end
|
99
|
-
|
100
|
-
if attributes.has_key?(:'parentType')
|
101
|
-
self.parent_type = attributes[:'parentType']
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
106
|
-
# @return Array for valid properties with the reasons
|
107
|
-
def list_invalid_properties
|
108
|
-
invalid_properties = Array.new
|
109
|
-
invalid_properties
|
110
|
-
end
|
111
|
-
|
112
|
-
# Check to see if the all the properties in the model are valid
|
113
|
-
# @return true if the model is valid
|
114
|
-
def valid?
|
115
|
-
parent_type_validator = EnumAttributeValidator.new('String', ['Honorary president', 'Not associated manager', 'President of the control council', 'Member of the management board', 'Member of the supervisory council', 'Member of the control committee', 'Partner', 'Management advisor ', 'Deputy managing director', 'Vice-president of the management board', 'Vice-president of the supervisory council', 'Developer', 'Other manager', 'Receiver', 'Authorized agent', 'Person in charge abroad', 'Representative in France', 'Member of the management council', 'Member of the control council', 'Treasurer', 'Secretary', 'Member', 'Administrative director', 'Sales director', 'Financial director', 'Chief Technical Officer', 'General secretary', 'Chief accountant', 'Guardian', 'Plan commissioner ', 'Management agent', 'Concordat commissioner', 'Representative of the creditors', 'Judicial representative', 'Substitute judge-commissioner', 'Judge-commissioner', 'Receiver/representative of the creditors', 'Conciliator', 'Auditor', 'Statutory auditor', 'Supervision commissioner', 'Deputy auditor', 'Spouse-associate', 'Accounts controller', 'Censor', 'Chief Executive Officer', 'President', 'Chairman of the Board', 'Governor', 'Deputy governor', 'Person having the power to usually involve the company', 'Manager', 'Co-managing partner', 'Managing director', 'Managing director not administrator', 'Unique managing director', 'Delegated managing director', 'Vice-president', 'Administrator', 'Delegated administrator', 'President of the management board', 'President of the supervisory council', 'Active partner', 'Management controller', 'Liquidator', 'Temporary administrator', 'Representative in France of a foreign company', 'Personal business manager'])
|
116
|
-
return false unless parent_type_validator.valid?(@parent_type)
|
117
|
-
true
|
118
|
-
end
|
119
|
-
|
120
|
-
# Custom attribute writer method checking allowed values (enum).
|
121
|
-
# @param [Object] parent_type Object to be assigned
|
122
|
-
def parent_type=(parent_type)
|
123
|
-
validator = EnumAttributeValidator.new('String', ['Honorary president', 'Not associated manager', 'President of the control council', 'Member of the management board', 'Member of the supervisory council', 'Member of the control committee', 'Partner', 'Management advisor ', 'Deputy managing director', 'Vice-president of the management board', 'Vice-president of the supervisory council', 'Developer', 'Other manager', 'Receiver', 'Authorized agent', 'Person in charge abroad', 'Representative in France', 'Member of the management council', 'Member of the control council', 'Treasurer', 'Secretary', 'Member', 'Administrative director', 'Sales director', 'Financial director', 'Chief Technical Officer', 'General secretary', 'Chief accountant', 'Guardian', 'Plan commissioner ', 'Management agent', 'Concordat commissioner', 'Representative of the creditors', 'Judicial representative', 'Substitute judge-commissioner', 'Judge-commissioner', 'Receiver/representative of the creditors', 'Conciliator', 'Auditor', 'Statutory auditor', 'Supervision commissioner', 'Deputy auditor', 'Spouse-associate', 'Accounts controller', 'Censor', 'Chief Executive Officer', 'President', 'Chairman of the Board', 'Governor', 'Deputy governor', 'Person having the power to usually involve the company', 'Manager', 'Co-managing partner', 'Managing director', 'Managing director not administrator', 'Unique managing director', 'Delegated managing director', 'Vice-president', 'Administrator', 'Delegated administrator', 'President of the management board', 'President of the supervisory council', 'Active partner', 'Management controller', 'Liquidator', 'Temporary administrator', 'Representative in France of a foreign company', 'Personal business manager'])
|
124
|
-
unless validator.valid?(parent_type)
|
125
|
-
fail ArgumentError, 'invalid value for "parent_type", must be one of #{validator.allowable_values}.'
|
126
|
-
end
|
127
|
-
@parent_type = parent_type
|
128
|
-
end
|
129
|
-
|
130
|
-
# Checks equality by comparing each attribute.
|
131
|
-
# @param [Object] Object to be compared
|
132
|
-
def ==(o)
|
133
|
-
return true if self.equal?(o)
|
134
|
-
self.class == o.class &&
|
135
|
-
firstname == o.firstname &&
|
136
|
-
lastname == o.lastname &&
|
137
|
-
fullnames == o.fullnames &&
|
138
|
-
birthday == o.birthday &&
|
139
|
-
parent_type == o.parent_type
|
140
|
-
end
|
141
|
-
|
142
|
-
# @see the `==` method
|
143
|
-
# @param [Object] Object to be compared
|
144
|
-
def eql?(o)
|
145
|
-
self == o
|
146
|
-
end
|
147
|
-
|
148
|
-
# Calculates hash code according to all attributes.
|
149
|
-
# @return [Fixnum] Hash code
|
150
|
-
def hash
|
151
|
-
[firstname, lastname, fullnames, birthday, parent_type].hash
|
152
|
-
end
|
153
|
-
|
154
|
-
# Builds the object from hash
|
155
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
-
# @return [Object] Returns the model itself
|
157
|
-
def build_from_hash(attributes)
|
158
|
-
return nil unless attributes.is_a?(Hash)
|
159
|
-
self.class.swagger_types.each_pair do |key, type|
|
160
|
-
if type =~ /\AArray<(.*)>/i
|
161
|
-
# check to ensure the input is an array given that the the attribute
|
162
|
-
# is documented as an array but the input is not
|
163
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
164
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
165
|
-
end
|
166
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
167
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
168
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
169
|
-
end
|
170
|
-
|
171
|
-
self
|
172
|
-
end
|
173
|
-
|
174
|
-
# Deserializes the data based on type
|
175
|
-
# @param string type Data type
|
176
|
-
# @param string value Value to be deserialized
|
177
|
-
# @return [Object] Deserialized data
|
178
|
-
def _deserialize(type, value)
|
179
|
-
case type.to_sym
|
180
|
-
when :DateTime
|
181
|
-
DateTime.parse(value)
|
182
|
-
when :Date
|
183
|
-
Date.parse(value)
|
184
|
-
when :String
|
185
|
-
value.to_s
|
186
|
-
when :Integer
|
187
|
-
value.to_i
|
188
|
-
when :Float
|
189
|
-
value.to_f
|
190
|
-
when :BOOLEAN
|
191
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
|
-
true
|
193
|
-
else
|
194
|
-
false
|
195
|
-
end
|
196
|
-
when :Object
|
197
|
-
# generic object (usually a Hash), return directly
|
198
|
-
value
|
199
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
200
|
-
inner_type = Regexp.last_match[:inner_type]
|
201
|
-
value.map { |v| _deserialize(inner_type, v) }
|
202
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
203
|
-
k_type = Regexp.last_match[:k_type]
|
204
|
-
v_type = Regexp.last_match[:v_type]
|
205
|
-
{}.tap do |hash|
|
206
|
-
value.each do |k, v|
|
207
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
208
|
-
end
|
209
|
-
end
|
210
|
-
else # model
|
211
|
-
temp_model = TreezorClient.const_get(type).new
|
212
|
-
temp_model.build_from_hash(value)
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
# Returns the string representation of the object
|
217
|
-
# @return [String] String presentation of the object
|
218
|
-
def to_s
|
219
|
-
to_hash.to_s
|
220
|
-
end
|
221
|
-
|
222
|
-
# to_body is an alias to to_hash (backward compatibility)
|
223
|
-
# @return [Hash] Returns the object in the form of hash
|
224
|
-
def to_body
|
225
|
-
to_hash
|
226
|
-
end
|
227
|
-
|
228
|
-
# Returns the object in the form of hash
|
229
|
-
# @return [Hash] Returns the object in the form of hash
|
230
|
-
def to_hash
|
231
|
-
hash = {}
|
232
|
-
self.class.attribute_map.each_pair do |attr, param|
|
233
|
-
value = self.send(attr)
|
234
|
-
next if value.nil?
|
235
|
-
hash[param] = _to_hash(value)
|
236
|
-
end
|
237
|
-
hash
|
238
|
-
end
|
239
|
-
|
240
|
-
# Outputs non-array value in the form of hash
|
241
|
-
# For object, use to_hash. Otherwise, just return the value
|
242
|
-
# @param [Object] value Any valid value
|
243
|
-
# @return [Hash] Returns the value in the form of hash
|
244
|
-
def _to_hash(value)
|
245
|
-
if value.is_a?(Array)
|
246
|
-
value.compact.map { |v| _to_hash(v) }
|
247
|
-
elsif value.is_a?(Hash)
|
248
|
-
{}.tap do |hash|
|
249
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
250
|
-
end
|
251
|
-
elsif value.respond_to? :to_hash
|
252
|
-
value.to_hash
|
253
|
-
else
|
254
|
-
value
|
255
|
-
end
|
256
|
-
end
|
257
|
-
end
|
258
|
-
end
|
@@ -1,209 +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.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module TreezorClient
|
16
|
-
# The certificate chain. Required when tokenRequestor is APPLE
|
17
|
-
class IssuerInitiatedDigitizationDatasAdditionnalDataECCPublicCertificates
|
18
|
-
# The leaf certificate base64 encoded of DER format. Required when tokenRequestor is APPLE
|
19
|
-
attr_accessor :leaf
|
20
|
-
|
21
|
-
# The sub CA certificate base64 encoded of DER format. Required when tokenRequestor is APPLE
|
22
|
-
attr_accessor :sub
|
23
|
-
|
24
|
-
# The root certificate base64 encoded of DER format. Required when tokenRequestor is APPLE
|
25
|
-
attr_accessor :root
|
26
|
-
|
27
|
-
|
28
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
-
def self.attribute_map
|
30
|
-
{
|
31
|
-
:'leaf' => :'leaf',
|
32
|
-
:'sub' => :'sub',
|
33
|
-
:'root' => :'root'
|
34
|
-
}
|
35
|
-
end
|
36
|
-
|
37
|
-
# Attribute type mapping.
|
38
|
-
def self.swagger_types
|
39
|
-
{
|
40
|
-
:'leaf' => :'String',
|
41
|
-
:'sub' => :'String',
|
42
|
-
:'root' => :'String'
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
# Initializes the object
|
47
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
-
def initialize(attributes = {})
|
49
|
-
return unless attributes.is_a?(Hash)
|
50
|
-
|
51
|
-
# convert string to symbol for hash key
|
52
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
53
|
-
|
54
|
-
if attributes.has_key?(:'leaf')
|
55
|
-
self.leaf = attributes[:'leaf']
|
56
|
-
end
|
57
|
-
|
58
|
-
if attributes.has_key?(:'sub')
|
59
|
-
self.sub = attributes[:'sub']
|
60
|
-
end
|
61
|
-
|
62
|
-
if attributes.has_key?(:'root')
|
63
|
-
self.root = attributes[:'root']
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
-
# @return Array for valid properties with the reasons
|
70
|
-
def list_invalid_properties
|
71
|
-
invalid_properties = Array.new
|
72
|
-
return invalid_properties
|
73
|
-
end
|
74
|
-
|
75
|
-
# Check to see if the all the properties in the model are valid
|
76
|
-
# @return true if the model is valid
|
77
|
-
def valid?
|
78
|
-
return true
|
79
|
-
end
|
80
|
-
|
81
|
-
# Checks equality by comparing each attribute.
|
82
|
-
# @param [Object] Object to be compared
|
83
|
-
def ==(o)
|
84
|
-
return true if self.equal?(o)
|
85
|
-
self.class == o.class &&
|
86
|
-
leaf == o.leaf &&
|
87
|
-
sub == o.sub &&
|
88
|
-
root == o.root
|
89
|
-
end
|
90
|
-
|
91
|
-
# @see the `==` method
|
92
|
-
# @param [Object] Object to be compared
|
93
|
-
def eql?(o)
|
94
|
-
self == o
|
95
|
-
end
|
96
|
-
|
97
|
-
# Calculates hash code according to all attributes.
|
98
|
-
# @return [Fixnum] Hash code
|
99
|
-
def hash
|
100
|
-
[leaf, sub, root].hash
|
101
|
-
end
|
102
|
-
|
103
|
-
# Builds the object from hash
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
-
# @return [Object] Returns the model itself
|
106
|
-
def build_from_hash(attributes)
|
107
|
-
return nil unless attributes.is_a?(Hash)
|
108
|
-
self.class.swagger_types.each_pair do |key, type|
|
109
|
-
if type =~ /\AArray<(.*)>/i
|
110
|
-
# check to ensure the input is an array given that the the attribute
|
111
|
-
# is documented as an array but the input is not
|
112
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
113
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
114
|
-
end
|
115
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
116
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
117
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
118
|
-
end
|
119
|
-
|
120
|
-
self
|
121
|
-
end
|
122
|
-
|
123
|
-
# Deserializes the data based on type
|
124
|
-
# @param string type Data type
|
125
|
-
# @param string value Value to be deserialized
|
126
|
-
# @return [Object] Deserialized data
|
127
|
-
def _deserialize(type, value)
|
128
|
-
case type.to_sym
|
129
|
-
when :DateTime
|
130
|
-
DateTime.parse(value)
|
131
|
-
when :Date
|
132
|
-
Date.parse(value)
|
133
|
-
when :String
|
134
|
-
value.to_s
|
135
|
-
when :Integer
|
136
|
-
value.to_i
|
137
|
-
when :Float
|
138
|
-
value.to_f
|
139
|
-
when :BOOLEAN
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
141
|
-
true
|
142
|
-
else
|
143
|
-
false
|
144
|
-
end
|
145
|
-
when :Object
|
146
|
-
# generic object (usually a Hash), return directly
|
147
|
-
value
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
154
|
-
{}.tap do |hash|
|
155
|
-
value.each do |k, v|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
else # model
|
160
|
-
temp_model = TreezorClient.const_get(type).new
|
161
|
-
temp_model.build_from_hash(value)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
# Returns the string representation of the object
|
166
|
-
# @return [String] String presentation of the object
|
167
|
-
def to_s
|
168
|
-
to_hash.to_s
|
169
|
-
end
|
170
|
-
|
171
|
-
# to_body is an alias to to_hash (backward compatibility)
|
172
|
-
# @return [Hash] Returns the object in the form of hash
|
173
|
-
def to_body
|
174
|
-
to_hash
|
175
|
-
end
|
176
|
-
|
177
|
-
# Returns the object in the form of hash
|
178
|
-
# @return [Hash] Returns the object in the form of hash
|
179
|
-
def to_hash
|
180
|
-
hash = {}
|
181
|
-
self.class.attribute_map.each_pair do |attr, param|
|
182
|
-
value = self.send(attr)
|
183
|
-
next if value.nil?
|
184
|
-
hash[param] = _to_hash(value)
|
185
|
-
end
|
186
|
-
hash
|
187
|
-
end
|
188
|
-
|
189
|
-
# Outputs non-array value in the form of hash
|
190
|
-
# For object, use to_hash. Otherwise, just return the value
|
191
|
-
# @param [Object] value Any valid value
|
192
|
-
# @return [Hash] Returns the value in the form of hash
|
193
|
-
def _to_hash(value)
|
194
|
-
if value.is_a?(Array)
|
195
|
-
value.compact.map{ |v| _to_hash(v) }
|
196
|
-
elsif value.is_a?(Hash)
|
197
|
-
{}.tap do |hash|
|
198
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
-
end
|
200
|
-
elsif value.respond_to? :to_hash
|
201
|
-
value.to_hash
|
202
|
-
else
|
203
|
-
value
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
|
-
end
|
208
|
-
|
209
|
-
end
|
@@ -1,241 +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 Tav
|
17
|
-
# Tav request Id
|
18
|
-
attr_accessor :id
|
19
|
-
|
20
|
-
# The id of the card
|
21
|
-
attr_accessor :card_id
|
22
|
-
|
23
|
-
# The token requestor also named wallet provider.
|
24
|
-
attr_accessor :token_requestor
|
25
|
-
|
26
|
-
# The status ID of the TAV request; \"1\" means the \"issuerInitiatedDigitizationData have been requested\", \"2\" means that the data object can be retrieved.
|
27
|
-
attr_accessor :status_id
|
28
|
-
|
29
|
-
attr_accessor :credential
|
30
|
-
|
31
|
-
attr_accessor :created_date
|
32
|
-
|
33
|
-
attr_accessor :modified_date
|
34
|
-
|
35
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
-
def self.attribute_map
|
37
|
-
{
|
38
|
-
:'id' => :'id',
|
39
|
-
:'card_id' => :'cardId',
|
40
|
-
:'token_requestor' => :'tokenRequestor',
|
41
|
-
:'status_id' => :'statusId',
|
42
|
-
:'credential' => :'credential',
|
43
|
-
:'created_date' => :'createdDate',
|
44
|
-
:'modified_date' => :'modifiedDate'
|
45
|
-
}
|
46
|
-
end
|
47
|
-
|
48
|
-
# Attribute type mapping.
|
49
|
-
def self.swagger_types
|
50
|
-
{
|
51
|
-
:'id' => :'Integer',
|
52
|
-
:'card_id' => :'Integer',
|
53
|
-
:'token_requestor' => :'String',
|
54
|
-
:'status_id' => :'Integer',
|
55
|
-
:'credential' => :'String',
|
56
|
-
:'created_date' => :'String',
|
57
|
-
:'modified_date' => :'String'
|
58
|
-
}
|
59
|
-
end
|
60
|
-
|
61
|
-
# Initializes the object
|
62
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
-
def initialize(attributes = {})
|
64
|
-
return unless attributes.is_a?(Hash)
|
65
|
-
|
66
|
-
# convert string to symbol for hash key
|
67
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
68
|
-
|
69
|
-
if attributes.has_key?(:'id')
|
70
|
-
self.id = attributes[:'id']
|
71
|
-
end
|
72
|
-
|
73
|
-
if attributes.has_key?(:'cardId')
|
74
|
-
self.card_id = attributes[:'cardId']
|
75
|
-
end
|
76
|
-
|
77
|
-
if attributes.has_key?(:'tokenRequestor')
|
78
|
-
self.token_requestor = attributes[:'tokenRequestor']
|
79
|
-
end
|
80
|
-
|
81
|
-
if attributes.has_key?(:'statusId')
|
82
|
-
self.status_id = attributes[:'statusId']
|
83
|
-
end
|
84
|
-
|
85
|
-
if attributes.has_key?(:'credential')
|
86
|
-
self.credential = attributes[:'credential']
|
87
|
-
end
|
88
|
-
|
89
|
-
if attributes.has_key?(:'createdDate')
|
90
|
-
self.created_date = attributes[:'createdDate']
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.has_key?(:'modifiedDate')
|
94
|
-
self.modified_date = attributes[:'modifiedDate']
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
-
# @return Array for valid properties with the reasons
|
100
|
-
def list_invalid_properties
|
101
|
-
invalid_properties = Array.new
|
102
|
-
invalid_properties
|
103
|
-
end
|
104
|
-
|
105
|
-
# Check to see if the all the properties in the model are valid
|
106
|
-
# @return true if the model is valid
|
107
|
-
def valid?
|
108
|
-
true
|
109
|
-
end
|
110
|
-
|
111
|
-
# Checks equality by comparing each attribute.
|
112
|
-
# @param [Object] Object to be compared
|
113
|
-
def ==(o)
|
114
|
-
return true if self.equal?(o)
|
115
|
-
self.class == o.class &&
|
116
|
-
id == o.id &&
|
117
|
-
card_id == o.card_id &&
|
118
|
-
token_requestor == o.token_requestor &&
|
119
|
-
status_id == o.status_id &&
|
120
|
-
credential == o.credential &&
|
121
|
-
created_date == o.created_date &&
|
122
|
-
modified_date == o.modified_date
|
123
|
-
end
|
124
|
-
|
125
|
-
# @see the `==` method
|
126
|
-
# @param [Object] Object to be compared
|
127
|
-
def eql?(o)
|
128
|
-
self == o
|
129
|
-
end
|
130
|
-
|
131
|
-
# Calculates hash code according to all attributes.
|
132
|
-
# @return [Fixnum] Hash code
|
133
|
-
def hash
|
134
|
-
[id, card_id, token_requestor, status_id, credential, created_date, modified_date].hash
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
|
-
return nil unless attributes.is_a?(Hash)
|
142
|
-
self.class.swagger_types.each_pair do |key, type|
|
143
|
-
if type =~ /\AArray<(.*)>/i
|
144
|
-
# check to ensure the input is an array given that the the attribute
|
145
|
-
# is documented as an array but the input is not
|
146
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
-
end
|
149
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
152
|
-
end
|
153
|
-
|
154
|
-
self
|
155
|
-
end
|
156
|
-
|
157
|
-
# Deserializes the data based on type
|
158
|
-
# @param string type Data type
|
159
|
-
# @param string value Value to be deserialized
|
160
|
-
# @return [Object] Deserialized data
|
161
|
-
def _deserialize(type, value)
|
162
|
-
case type.to_sym
|
163
|
-
when :DateTime
|
164
|
-
DateTime.parse(value)
|
165
|
-
when :Date
|
166
|
-
Date.parse(value)
|
167
|
-
when :String
|
168
|
-
value.to_s
|
169
|
-
when :Integer
|
170
|
-
value.to_i
|
171
|
-
when :Float
|
172
|
-
value.to_f
|
173
|
-
when :BOOLEAN
|
174
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
-
true
|
176
|
-
else
|
177
|
-
false
|
178
|
-
end
|
179
|
-
when :Object
|
180
|
-
# generic object (usually a Hash), return directly
|
181
|
-
value
|
182
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
-
inner_type = Regexp.last_match[:inner_type]
|
184
|
-
value.map { |v| _deserialize(inner_type, v) }
|
185
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
-
k_type = Regexp.last_match[:k_type]
|
187
|
-
v_type = Regexp.last_match[:v_type]
|
188
|
-
{}.tap do |hash|
|
189
|
-
value.each do |k, v|
|
190
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
-
end
|
192
|
-
end
|
193
|
-
else # model
|
194
|
-
temp_model = TreezorClient.const_get(type).new
|
195
|
-
temp_model.build_from_hash(value)
|
196
|
-
end
|
197
|
-
end
|
198
|
-
|
199
|
-
# Returns the string representation of the object
|
200
|
-
# @return [String] String presentation of the object
|
201
|
-
def to_s
|
202
|
-
to_hash.to_s
|
203
|
-
end
|
204
|
-
|
205
|
-
# to_body is an alias to to_hash (backward compatibility)
|
206
|
-
# @return [Hash] Returns the object in the form of hash
|
207
|
-
def to_body
|
208
|
-
to_hash
|
209
|
-
end
|
210
|
-
|
211
|
-
# Returns the object in the form of hash
|
212
|
-
# @return [Hash] Returns the object in the form of hash
|
213
|
-
def to_hash
|
214
|
-
hash = {}
|
215
|
-
self.class.attribute_map.each_pair do |attr, param|
|
216
|
-
value = self.send(attr)
|
217
|
-
next if value.nil?
|
218
|
-
hash[param] = _to_hash(value)
|
219
|
-
end
|
220
|
-
hash
|
221
|
-
end
|
222
|
-
|
223
|
-
# Outputs non-array value in the form of hash
|
224
|
-
# For object, use to_hash. Otherwise, just return the value
|
225
|
-
# @param [Object] value Any valid value
|
226
|
-
# @return [Hash] Returns the value in the form of hash
|
227
|
-
def _to_hash(value)
|
228
|
-
if value.is_a?(Array)
|
229
|
-
value.compact.map { |v| _to_hash(v) }
|
230
|
-
elsif value.is_a?(Hash)
|
231
|
-
{}.tap do |hash|
|
232
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
233
|
-
end
|
234
|
-
elsif value.respond_to? :to_hash
|
235
|
-
value.to_hash
|
236
|
-
else
|
237
|
-
value
|
238
|
-
end
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|