transferzero-sdk 1.8.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -0
  3. data/README.md +15 -5
  4. data/docs/AccountMeta.md +1 -1
  5. data/docs/AccountValidationRequest.md +2 -0
  6. data/docs/Currency.md +1 -3
  7. data/docs/CurrencyExchange.md +1 -3
  8. data/docs/CurrencyOpposite.md +4 -4
  9. data/docs/Document.md +7 -3
  10. data/docs/DocumentsApi.md +2 -74
  11. data/docs/FieldSelectValidation.md +1 -1
  12. data/docs/FieldValidation.md +1 -1
  13. data/docs/PayinMethodDetails.md +3 -1
  14. data/docs/PayinMethodDetailsBTC.md +17 -0
  15. data/docs/PayinMethodDetailsMobile.md +1 -1
  16. data/docs/PaymentMethod.md +2 -2
  17. data/docs/PaymentMethodOpposite.md +2 -2
  18. data/docs/PayoutMethod.md +1 -1
  19. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  20. data/docs/PayoutMethodCountryEnum.md +16 -0
  21. data/docs/PayoutMethodDetails.md +21 -1
  22. data/docs/PayoutMethodDetailsBTC.md +23 -0
  23. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  24. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  25. data/docs/PayoutMethodDetailsMobile.md +3 -1
  26. data/docs/PayoutMethodDetailsXOFCash.md +25 -0
  27. data/docs/PayoutMethodDetailsZARBank.md +35 -0
  28. data/docs/ProofOfPayment.md +23 -0
  29. data/docs/ProofOfPaymentListResponse.md +17 -0
  30. data/docs/Recipient.md +8 -4
  31. data/docs/RecipientStateReasonDetails.md +23 -0
  32. data/docs/RecipientsApi.md +63 -1
  33. data/docs/Sender.md +74 -34
  34. data/lib/transferzero-sdk.rb +10 -0
  35. data/lib/transferzero-sdk/api/documents_api.rb +0 -63
  36. data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
  37. data/lib/transferzero-sdk/api_client.rb +5 -3
  38. data/lib/transferzero-sdk/models/account.rb +70 -69
  39. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  40. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  41. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  42. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  43. data/lib/transferzero-sdk/models/account_validation_request.rb +171 -161
  44. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  45. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  46. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  47. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  48. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  49. data/lib/transferzero-sdk/models/currency.rb +133 -142
  50. data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
  51. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  52. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  53. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
  54. data/lib/transferzero-sdk/models/debit.rb +151 -150
  55. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  56. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  57. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  58. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  59. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  60. data/lib/transferzero-sdk/models/document.rb +197 -175
  61. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  62. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  63. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  64. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  65. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  66. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  67. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  68. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  69. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  70. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  71. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  72. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -110
  73. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
  74. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  75. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
  76. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  77. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  78. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  79. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  80. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  81. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  82. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  83. data/lib/transferzero-sdk/models/payout_method_country_enum.rb +32 -0
  84. data/lib/transferzero-sdk/models/payout_method_details.rb +417 -297
  85. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  86. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
  87. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  88. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  89. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  90. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  91. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
  92. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
  93. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
  94. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +254 -0
  95. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  96. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
  97. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  98. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  99. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  100. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
  101. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  102. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  103. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  104. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
  105. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  106. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  107. data/lib/transferzero-sdk/models/recipient.rb +246 -226
  108. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  109. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  110. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  111. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  112. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  113. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  114. data/lib/transferzero-sdk/models/sender.rb +595 -358
  115. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  116. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  117. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  118. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  119. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  120. data/lib/transferzero-sdk/models/sender_state.rb +19 -24
  121. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  122. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  123. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  124. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  125. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  126. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  127. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  128. data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
  129. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  130. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  131. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  132. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  133. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  134. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  135. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  136. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  137. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  138. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  139. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  140. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  141. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  142. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  143. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  144. data/lib/transferzero-sdk/version.rb +1 -1
  145. data/spec/models/payin_method_details_btc_spec.rb +41 -0
  146. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  147. data/spec/models/payout_method_country_enum_spec.rb +35 -0
  148. data/spec/models/payout_method_details_btc_spec.rb +59 -0
  149. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  150. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  151. data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
  152. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  153. data/spec/models/proof_of_payment_spec.rb +59 -0
  154. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  155. data/transferzero-sdk-1.10.0.gem +0 -0
  156. data/transferzero-sdk-1.11.0.gem +0 -0
  157. metadata +46 -3
@@ -13,24 +13,19 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PayoutMethodBankAccountTypeEnum
17
- N10 = "10".freeze
18
- N20 = "20".freeze
19
-
20
- # Builds the enum from string
21
- # @param [String] The enum value in the form of the string
22
- # @return [String] The enum value
23
- def self.build_from_hash(value)
24
- new.build_from_hash(value)
25
- end
26
-
27
- # Builds the enum from string
28
- # @param [String] The enum value in the form of the string
29
- # @return [String] The enum value
30
- def build_from_hash(value)
31
- constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
32
- raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty?
33
- value
34
- end
16
+ class PayoutMethodBankAccountTypeEnum
17
+
18
+ N10 = "10".freeze
19
+ N20 = "20".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def build_from_hash(value)
25
+ constantValues = PayoutMethodBankAccountTypeEnum.constants.select { |c| PayoutMethodBankAccountTypeEnum::const_get(c) == value }
26
+ raise "Invalid ENUM value #{value} for class #PayoutMethodBankAccountTypeEnum" if constantValues.empty? && !value.empty?
27
+ value
35
28
  end
36
29
  end
30
+
31
+ end
@@ -0,0 +1,31 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TransferZero
16
+ class PayoutMethodCashProviderEnum
17
+
18
+ WARI = "wari".freeze
19
+ WIZALL = "wizall".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def build_from_hash(value)
25
+ constantValues = PayoutMethodCashProviderEnum.constants.select { |c| PayoutMethodCashProviderEnum::const_get(c) == value }
26
+ raise "Invalid ENUM value #{value} for class #PayoutMethodCashProviderEnum" if constantValues.empty? && !value.empty?
27
+ value
28
+ end
29
+ end
30
+
31
+ end
@@ -0,0 +1,32 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TransferZero
16
+ class PayoutMethodCountryEnum
17
+
18
+ CI = "CI".freeze
19
+ ML = "ML".freeze
20
+ SN = "SN".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def build_from_hash(value)
26
+ constantValues = PayoutMethodCountryEnum.constants.select { |c| PayoutMethodCountryEnum::const_get(c) == value }
27
+ raise "Invalid ENUM value #{value} for class #PayoutMethodCountryEnum" if constantValues.empty? && !value.empty?
28
+ value
29
+ end
30
+ end
31
+
32
+ end
@@ -13,347 +13,466 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PayoutMethodDetails
17
- attr_accessor :first_name
18
-
19
- attr_accessor :last_name
20
-
21
- attr_accessor :bank_code
16
+ class PayoutMethodDetails
17
+ attr_accessor :first_name
22
18
 
23
- attr_accessor :bank_account
24
-
25
- attr_accessor :bank_account_type
26
-
27
- attr_accessor :phone_number
28
-
29
- attr_accessor :mobile_provider
30
-
31
- attr_accessor :iban
32
-
33
- attr_accessor :bank_name
34
-
35
- attr_accessor :bank_country
36
-
37
- attr_accessor :bic
38
-
39
- attr_accessor :sender_identity_card_type
40
-
41
- attr_accessor :sender_identity_card_id
42
-
43
- attr_accessor :sender_city_of_birth
44
-
45
- attr_accessor :sender_country_of_birth
46
-
47
- attr_accessor :sender_gender
48
-
49
- attr_accessor :reason
50
-
51
- attr_accessor :identity_card_type
52
-
53
- attr_accessor :identity_card_id
54
-
55
- attr_accessor :reference
56
-
57
- # Attribute mapping from ruby-style variable name to JSON key.
58
- def self.attribute_map
59
- {
60
- :'first_name' => :'first_name',
61
- :'last_name' => :'last_name',
62
- :'bank_code' => :'bank_code',
63
- :'bank_account' => :'bank_account',
64
- :'bank_account_type' => :'bank_account_type',
65
- :'phone_number' => :'phone_number',
66
- :'mobile_provider' => :'mobile_provider',
67
- :'iban' => :'iban',
68
- :'bank_name' => :'bank_name',
69
- :'bank_country' => :'bank_country',
70
- :'bic' => :'bic',
71
- :'sender_identity_card_type' => :'sender_identity_card_type',
72
- :'sender_identity_card_id' => :'sender_identity_card_id',
73
- :'sender_city_of_birth' => :'sender_city_of_birth',
74
- :'sender_country_of_birth' => :'sender_country_of_birth',
75
- :'sender_gender' => :'sender_gender',
76
- :'reason' => :'reason',
77
- :'identity_card_type' => :'identity_card_type',
78
- :'identity_card_id' => :'identity_card_id',
79
- :'reference' => :'reference'
80
- }
81
- end
82
-
83
- # Attribute type mapping.
84
- def self.openapi_types
85
- {
86
- :'first_name' => :'String',
87
- :'last_name' => :'String',
88
- :'bank_code' => :'String',
89
- :'bank_account' => :'String',
90
- :'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
91
- :'phone_number' => :'String',
92
- :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
93
- :'iban' => :'String',
94
- :'bank_name' => :'String',
95
- :'bank_country' => :'String',
96
- :'bic' => :'String',
97
- :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
98
- :'sender_identity_card_id' => :'String',
99
- :'sender_city_of_birth' => :'String',
100
- :'sender_country_of_birth' => :'String',
101
- :'sender_gender' => :'PayoutMethodGenderEnum',
102
- :'reason' => :'String',
103
- :'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
104
- :'identity_card_id' => :'String',
105
- :'reference' => :'String'
106
- }
107
- end
108
-
109
- # List of class defined in oneOf (OpenAPI v3)
110
- def self.openapi_one_of
111
- [
112
- :'PayoutMethodDetailsBalance',
113
- :'PayoutMethodDetailsGHSBank',
114
- :'PayoutMethodDetailsIBAN',
115
- :'PayoutMethodDetailsMADCash',
116
- :'PayoutMethodDetailsMobile',
117
- :'PayoutMethodDetailsNGNBank',
118
- :'PayoutMethodDetailsXOFBank',
119
- :'PayoutMethodDetailsXOFMobile'
120
- ]
121
- end
122
-
123
- # Initializes the object
124
- # @param [Hash] attributes Model attributes in the form of hash
125
- def initialize(attributes = {})
126
- if (!attributes.is_a?(Hash))
127
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
128
- end
19
+ attr_accessor :last_name
129
20
 
130
- # check to see if the attribute exists and convert string to symbol for hash key
131
- attributes = attributes.each_with_object({}) { |(k, v), h|
132
- if (!self.class.attribute_map.key?(k.to_sym))
133
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
134
- end
135
- h[k.to_sym] = v
136
- }
21
+ attr_accessor :bank_code
137
22
 
138
- if attributes.key?(:'first_name')
139
- self.first_name = attributes[:'first_name']
140
- end
23
+ attr_accessor :bank_account
141
24
 
142
- if attributes.key?(:'last_name')
143
- self.last_name = attributes[:'last_name']
144
- end
25
+ attr_accessor :bank_account_type
145
26
 
146
- if attributes.key?(:'bank_code')
147
- self.bank_code = attributes[:'bank_code']
148
- end
27
+ attr_accessor :phone_number
149
28
 
150
- if attributes.key?(:'bank_account')
151
- self.bank_account = attributes[:'bank_account']
152
- end
29
+ attr_accessor :mobile_provider
153
30
 
154
- if attributes.key?(:'bank_account_type')
155
- self.bank_account_type = attributes[:'bank_account_type']
156
- end
31
+ attr_accessor :iban
157
32
 
158
- if attributes.key?(:'phone_number')
159
- self.phone_number = attributes[:'phone_number']
160
- end
33
+ attr_accessor :bank_name
161
34
 
162
- if attributes.key?(:'mobile_provider')
163
- self.mobile_provider = attributes[:'mobile_provider']
164
- end
35
+ attr_accessor :bank_country
165
36
 
166
- if attributes.key?(:'iban')
167
- self.iban = attributes[:'iban']
168
- end
37
+ attr_accessor :cash_provider
169
38
 
170
- if attributes.key?(:'bank_name')
171
- self.bank_name = attributes[:'bank_name']
172
- end
39
+ attr_accessor :country
173
40
 
174
- if attributes.key?(:'bank_country')
175
- self.bank_country = attributes[:'bank_country']
176
- end
41
+ attr_accessor :sort_code
177
42
 
178
- if attributes.key?(:'bic')
179
- self.bic = attributes[:'bic']
180
- end
43
+ attr_accessor :bic
181
44
 
182
- if attributes.key?(:'sender_identity_card_type')
183
- self.sender_identity_card_type = attributes[:'sender_identity_card_type']
184
- end
45
+ attr_accessor :sender_identity_card_type
185
46
 
186
- if attributes.key?(:'sender_identity_card_id')
187
- self.sender_identity_card_id = attributes[:'sender_identity_card_id']
188
- end
47
+ attr_accessor :sender_identity_card_id
189
48
 
190
- if attributes.key?(:'sender_city_of_birth')
191
- self.sender_city_of_birth = attributes[:'sender_city_of_birth']
192
- end
49
+ attr_accessor :sender_city_of_birth
193
50
 
194
- if attributes.key?(:'sender_country_of_birth')
195
- self.sender_country_of_birth = attributes[:'sender_country_of_birth']
196
- end
51
+ attr_accessor :sender_country_of_birth
197
52
 
198
- if attributes.key?(:'sender_gender')
199
- self.sender_gender = attributes[:'sender_gender']
200
- end
53
+ attr_accessor :sender_gender
201
54
 
202
- if attributes.key?(:'reason')
203
- self.reason = attributes[:'reason']
204
- end
55
+ attr_accessor :reason
205
56
 
206
- if attributes.key?(:'identity_card_type')
207
- self.identity_card_type = attributes[:'identity_card_type']
208
- end
57
+ attr_accessor :identity_card_type
209
58
 
210
- if attributes.key?(:'identity_card_id')
211
- self.identity_card_id = attributes[:'identity_card_id']
212
- end
59
+ attr_accessor :identity_card_id
213
60
 
214
- if attributes.key?(:'reference')
215
- self.reference = attributes[:'reference']
216
- end
61
+ attr_accessor :reference
62
+
63
+ attr_accessor :name
64
+
65
+ attr_accessor :address
66
+
67
+ attr_accessor :street
68
+
69
+ attr_accessor :postal_code
70
+
71
+ attr_accessor :city
72
+
73
+ attr_accessor :email
74
+
75
+ attr_accessor :transfer_reason_code
76
+
77
+ # Attribute mapping from ruby-style variable name to JSON key.
78
+ def self.attribute_map
79
+ {
80
+ :'first_name' => :'first_name',
81
+ :'last_name' => :'last_name',
82
+ :'bank_code' => :'bank_code',
83
+ :'bank_account' => :'bank_account',
84
+ :'bank_account_type' => :'bank_account_type',
85
+ :'phone_number' => :'phone_number',
86
+ :'mobile_provider' => :'mobile_provider',
87
+ :'iban' => :'iban',
88
+ :'bank_name' => :'bank_name',
89
+ :'bank_country' => :'bank_country',
90
+ :'cash_provider' => :'cash_provider',
91
+ :'country' => :'country',
92
+ :'sort_code' => :'sort_code',
93
+ :'bic' => :'bic',
94
+ :'sender_identity_card_type' => :'sender_identity_card_type',
95
+ :'sender_identity_card_id' => :'sender_identity_card_id',
96
+ :'sender_city_of_birth' => :'sender_city_of_birth',
97
+ :'sender_country_of_birth' => :'sender_country_of_birth',
98
+ :'sender_gender' => :'sender_gender',
99
+ :'reason' => :'reason',
100
+ :'identity_card_type' => :'identity_card_type',
101
+ :'identity_card_id' => :'identity_card_id',
102
+ :'reference' => :'reference',
103
+ :'name' => :'name',
104
+ :'address' => :'address',
105
+ :'street' => :'street',
106
+ :'postal_code' => :'postal_code',
107
+ :'city' => :'city',
108
+ :'email' => :'email',
109
+ :'transfer_reason_code' => :'transfer_reason_code'
110
+ }
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.openapi_types
115
+ {
116
+ :'first_name' => :'String',
117
+ :'last_name' => :'String',
118
+ :'bank_code' => :'String',
119
+ :'bank_account' => :'String',
120
+ :'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
121
+ :'phone_number' => :'String',
122
+ :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
123
+ :'iban' => :'String',
124
+ :'bank_name' => :'String',
125
+ :'bank_country' => :'String',
126
+ :'cash_provider' => :'PayoutMethodCashProviderEnum',
127
+ :'country' => :'PayoutMethodCountryEnum',
128
+ :'sort_code' => :'String',
129
+ :'bic' => :'String',
130
+ :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
131
+ :'sender_identity_card_id' => :'String',
132
+ :'sender_city_of_birth' => :'String',
133
+ :'sender_country_of_birth' => :'String',
134
+ :'sender_gender' => :'PayoutMethodGenderEnum',
135
+ :'reason' => :'String',
136
+ :'identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
137
+ :'identity_card_id' => :'String',
138
+ :'reference' => :'String',
139
+ :'name' => :'String',
140
+ :'address' => :'String',
141
+ :'street' => :'String',
142
+ :'postal_code' => :'String',
143
+ :'city' => :'String',
144
+ :'email' => :'String',
145
+ :'transfer_reason_code' => :'String'
146
+ }
147
+ end
148
+
149
+ # List of class defined in oneOf (OpenAPI v3)
150
+ def self.openapi_one_of
151
+ [
152
+ :'PayoutMethodDetailsBTC',
153
+ :'PayoutMethodDetailsBalance',
154
+ :'PayoutMethodDetailsGBPBank',
155
+ :'PayoutMethodDetailsGHSBank',
156
+ :'PayoutMethodDetailsIBAN',
157
+ :'PayoutMethodDetailsMADCash',
158
+ :'PayoutMethodDetailsMobile',
159
+ :'PayoutMethodDetailsNGNBank',
160
+ :'PayoutMethodDetailsXOFBank',
161
+ :'PayoutMethodDetailsXOFCash',
162
+ :'PayoutMethodDetailsXOFMobile',
163
+ :'PayoutMethodDetailsZARBank'
164
+ ]
165
+ end
166
+
167
+ # Initializes the object
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ def initialize(attributes = {})
170
+ if (!attributes.is_a?(Hash))
171
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetails` initialize method"
217
172
  end
218
173
 
219
- # Show invalid properties with the reasons. Usually used together with valid?
220
- # @return Array for valid properties with the reasons
221
- def list_invalid_properties
222
- invalid_properties = Array.new
223
- if @first_name.nil?
224
- invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
174
+ # check to see if the attribute exists and convert string to symbol for hash key
175
+ attributes = attributes.each_with_object({}) { |(k, v), h|
176
+ if (!self.class.attribute_map.key?(k.to_sym))
177
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
225
178
  end
179
+ h[k.to_sym] = v
180
+ }
226
181
 
227
- if @last_name.nil?
228
- invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
229
- end
182
+ if attributes.key?(:'first_name')
183
+ self.first_name = attributes[:'first_name']
184
+ end
230
185
 
231
- if @bank_code.nil?
232
- invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
233
- end
186
+ if attributes.key?(:'last_name')
187
+ self.last_name = attributes[:'last_name']
188
+ end
234
189
 
235
- if @bank_account.nil?
236
- invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
237
- end
190
+ if attributes.key?(:'bank_code')
191
+ self.bank_code = attributes[:'bank_code']
192
+ end
238
193
 
239
- if @phone_number.nil?
240
- invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
241
- end
194
+ if attributes.key?(:'bank_account')
195
+ self.bank_account = attributes[:'bank_account']
196
+ end
242
197
 
243
- if @mobile_provider.nil?
244
- invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
245
- end
198
+ if attributes.key?(:'bank_account_type')
199
+ self.bank_account_type = attributes[:'bank_account_type']
200
+ end
246
201
 
247
- if @iban.nil?
248
- invalid_properties.push('invalid value for "iban", iban cannot be nil.')
249
- end
202
+ if attributes.key?(:'phone_number')
203
+ self.phone_number = attributes[:'phone_number']
204
+ end
250
205
 
251
- if @bank_name.nil?
252
- invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
253
- end
206
+ if attributes.key?(:'mobile_provider')
207
+ self.mobile_provider = attributes[:'mobile_provider']
208
+ end
254
209
 
255
- if @bank_country.nil?
256
- invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
257
- end
210
+ if attributes.key?(:'iban')
211
+ self.iban = attributes[:'iban']
212
+ end
258
213
 
259
- if @sender_identity_card_type.nil?
260
- invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
261
- end
214
+ if attributes.key?(:'bank_name')
215
+ self.bank_name = attributes[:'bank_name']
216
+ end
262
217
 
263
- if @sender_identity_card_id.nil?
264
- invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
265
- end
218
+ if attributes.key?(:'bank_country')
219
+ self.bank_country = attributes[:'bank_country']
220
+ end
266
221
 
267
- if @sender_city_of_birth.nil?
268
- invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
269
- end
222
+ if attributes.key?(:'cash_provider')
223
+ self.cash_provider = attributes[:'cash_provider']
224
+ end
270
225
 
271
- if @sender_country_of_birth.nil?
272
- invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
273
- end
226
+ if attributes.key?(:'country')
227
+ self.country = attributes[:'country']
228
+ end
274
229
 
275
- if @sender_gender.nil?
276
- invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
277
- end
230
+ if attributes.key?(:'sort_code')
231
+ self.sort_code = attributes[:'sort_code']
232
+ end
278
233
 
279
- invalid_properties
280
- end
281
-
282
- # Check to see if the all the properties in the model are valid
283
- # @return true if the model is valid
284
- def valid?
285
- return false if @first_name.nil?
286
- return false if @last_name.nil?
287
- return false if @bank_code.nil?
288
- return false if @bank_account.nil?
289
- return false if @phone_number.nil?
290
- return false if @mobile_provider.nil?
291
- return false if @iban.nil?
292
- return false if @bank_name.nil?
293
- return false if @bank_country.nil?
294
- return false if @sender_identity_card_type.nil?
295
- return false if @sender_identity_card_id.nil?
296
- return false if @sender_city_of_birth.nil?
297
- return false if @sender_country_of_birth.nil?
298
- return false if @sender_gender.nil?
299
- _one_of_found = false
300
- openapi_one_of.each do |_class|
301
- _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
302
- if _one_of.valid?
303
- if _one_of_found?
304
- return false
305
- else
306
- _one_of_found = true
307
- end
308
- end
309
- end
234
+ if attributes.key?(:'bic')
235
+ self.bic = attributes[:'bic']
236
+ end
310
237
 
311
- if !_one_of_found?
312
- return false
313
- end
238
+ if attributes.key?(:'sender_identity_card_type')
239
+ self.sender_identity_card_type = attributes[:'sender_identity_card_type']
240
+ end
314
241
 
315
- true
242
+ if attributes.key?(:'sender_identity_card_id')
243
+ self.sender_identity_card_id = attributes[:'sender_identity_card_id']
244
+ end
245
+
246
+ if attributes.key?(:'sender_city_of_birth')
247
+ self.sender_city_of_birth = attributes[:'sender_city_of_birth']
248
+ end
249
+
250
+ if attributes.key?(:'sender_country_of_birth')
251
+ self.sender_country_of_birth = attributes[:'sender_country_of_birth']
252
+ end
253
+
254
+ if attributes.key?(:'sender_gender')
255
+ self.sender_gender = attributes[:'sender_gender']
256
+ end
257
+
258
+ if attributes.key?(:'reason')
259
+ self.reason = attributes[:'reason']
316
260
  end
317
261
 
318
- # Checks equality by comparing each attribute.
319
- # @param [Object] Object to be compared
320
- def ==(o)
321
- return true if self.equal?(o)
322
- self.class == o.class &&
323
- first_name == o.first_name &&
324
- last_name == o.last_name &&
325
- bank_code == o.bank_code &&
326
- bank_account == o.bank_account &&
327
- bank_account_type == o.bank_account_type &&
328
- phone_number == o.phone_number &&
329
- mobile_provider == o.mobile_provider &&
330
- iban == o.iban &&
331
- bank_name == o.bank_name &&
332
- bank_country == o.bank_country &&
333
- bic == o.bic &&
334
- sender_identity_card_type == o.sender_identity_card_type &&
335
- sender_identity_card_id == o.sender_identity_card_id &&
336
- sender_city_of_birth == o.sender_city_of_birth &&
337
- sender_country_of_birth == o.sender_country_of_birth &&
338
- sender_gender == o.sender_gender &&
339
- reason == o.reason &&
340
- identity_card_type == o.identity_card_type &&
341
- identity_card_id == o.identity_card_id &&
342
- reference == o.reference
343
- end
344
-
345
- # @see the `==` method
346
- # @param [Object] Object to be compared
347
- def eql?(o)
348
- self == o
349
- end
350
-
351
- # Calculates hash code according to all attributes.
352
- # @return [Integer] Hash code
353
- def hash
354
- [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, bic, sender_identity_card_type, sender_identity_card_id, sender_city_of_birth, sender_country_of_birth, sender_gender, reason, identity_card_type, identity_card_id, reference].hash
262
+ if attributes.key?(:'identity_card_type')
263
+ self.identity_card_type = attributes[:'identity_card_type']
355
264
  end
356
265
 
266
+ if attributes.key?(:'identity_card_id')
267
+ self.identity_card_id = attributes[:'identity_card_id']
268
+ end
269
+
270
+ if attributes.key?(:'reference')
271
+ self.reference = attributes[:'reference']
272
+ end
273
+
274
+ if attributes.key?(:'name')
275
+ self.name = attributes[:'name']
276
+ end
277
+
278
+ if attributes.key?(:'address')
279
+ self.address = attributes[:'address']
280
+ end
281
+
282
+ if attributes.key?(:'street')
283
+ self.street = attributes[:'street']
284
+ end
285
+
286
+ if attributes.key?(:'postal_code')
287
+ self.postal_code = attributes[:'postal_code']
288
+ end
289
+
290
+ if attributes.key?(:'city')
291
+ self.city = attributes[:'city']
292
+ end
293
+
294
+ if attributes.key?(:'email')
295
+ self.email = attributes[:'email']
296
+ end
297
+
298
+ if attributes.key?(:'transfer_reason_code')
299
+ self.transfer_reason_code = attributes[:'transfer_reason_code']
300
+ end
301
+ end
302
+
303
+ # Show invalid properties with the reasons. Usually used together with valid?
304
+ # @return Array for valid properties with the reasons
305
+ def list_invalid_properties
306
+ invalid_properties = Array.new
307
+ if @first_name.nil?
308
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
309
+ end
310
+
311
+ if @last_name.nil?
312
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
313
+ end
314
+
315
+ if @bank_code.nil?
316
+ invalid_properties.push('invalid value for "bank_code", bank_code cannot be nil.')
317
+ end
318
+
319
+ if @bank_account.nil?
320
+ invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
321
+ end
322
+
323
+ if @phone_number.nil?
324
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
325
+ end
326
+
327
+ if @mobile_provider.nil?
328
+ invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
329
+ end
330
+
331
+ if @iban.nil?
332
+ invalid_properties.push('invalid value for "iban", iban cannot be nil.')
333
+ end
334
+
335
+ if @bank_name.nil?
336
+ invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
337
+ end
338
+
339
+ if @bank_country.nil?
340
+ invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
341
+ end
342
+
343
+ if @sender_identity_card_type.nil?
344
+ invalid_properties.push('invalid value for "sender_identity_card_type", sender_identity_card_type cannot be nil.')
345
+ end
346
+
347
+ if @sender_identity_card_id.nil?
348
+ invalid_properties.push('invalid value for "sender_identity_card_id", sender_identity_card_id cannot be nil.')
349
+ end
350
+
351
+ if @sender_city_of_birth.nil?
352
+ invalid_properties.push('invalid value for "sender_city_of_birth", sender_city_of_birth cannot be nil.')
353
+ end
354
+
355
+ if @sender_country_of_birth.nil?
356
+ invalid_properties.push('invalid value for "sender_country_of_birth", sender_country_of_birth cannot be nil.')
357
+ end
358
+
359
+ if @sender_gender.nil?
360
+ invalid_properties.push('invalid value for "sender_gender", sender_gender cannot be nil.')
361
+ end
362
+
363
+ if @name.nil?
364
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
365
+ end
366
+
367
+ if @address.nil?
368
+ invalid_properties.push('invalid value for "address", address cannot be nil.')
369
+ end
370
+
371
+ if @street.nil?
372
+ invalid_properties.push('invalid value for "street", street cannot be nil.')
373
+ end
374
+
375
+ if @postal_code.nil?
376
+ invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
377
+ end
378
+
379
+ if @city.nil?
380
+ invalid_properties.push('invalid value for "city", city cannot be nil.')
381
+ end
382
+
383
+ invalid_properties
384
+ end
385
+
386
+ # Check to see if the all the properties in the model are valid
387
+ # @return true if the model is valid
388
+ def valid?
389
+ return false if @first_name.nil?
390
+ return false if @last_name.nil?
391
+ return false if @bank_code.nil?
392
+ return false if @bank_account.nil?
393
+ return false if @phone_number.nil?
394
+ return false if @mobile_provider.nil?
395
+ return false if @iban.nil?
396
+ return false if @bank_name.nil?
397
+ return false if @bank_country.nil?
398
+ return false if @sender_identity_card_type.nil?
399
+ return false if @sender_identity_card_id.nil?
400
+ return false if @sender_city_of_birth.nil?
401
+ return false if @sender_country_of_birth.nil?
402
+ return false if @sender_gender.nil?
403
+ return false if @name.nil?
404
+ return false if @address.nil?
405
+ return false if @street.nil?
406
+ return false if @postal_code.nil?
407
+ return false if @city.nil?
408
+ _one_of_found = false
409
+ openapi_one_of.each do |_class|
410
+ _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
411
+ if _one_of.valid?
412
+ if _one_of_found?
413
+ return false
414
+ else
415
+ _one_of_found = true
416
+ end
417
+ end
418
+ end
419
+
420
+ if !_one_of_found?
421
+ return false
422
+ end
423
+
424
+ true
425
+ end
426
+
427
+ # Checks equality by comparing each attribute.
428
+ # @param [Object] Object to be compared
429
+ def ==(o)
430
+ return true if self.equal?(o)
431
+ self.class == o.class &&
432
+ first_name == o.first_name &&
433
+ last_name == o.last_name &&
434
+ bank_code == o.bank_code &&
435
+ bank_account == o.bank_account &&
436
+ bank_account_type == o.bank_account_type &&
437
+ phone_number == o.phone_number &&
438
+ mobile_provider == o.mobile_provider &&
439
+ iban == o.iban &&
440
+ bank_name == o.bank_name &&
441
+ bank_country == o.bank_country &&
442
+ cash_provider == o.cash_provider &&
443
+ country == o.country &&
444
+ sort_code == o.sort_code &&
445
+ bic == o.bic &&
446
+ sender_identity_card_type == o.sender_identity_card_type &&
447
+ sender_identity_card_id == o.sender_identity_card_id &&
448
+ sender_city_of_birth == o.sender_city_of_birth &&
449
+ sender_country_of_birth == o.sender_country_of_birth &&
450
+ sender_gender == o.sender_gender &&
451
+ reason == o.reason &&
452
+ identity_card_type == o.identity_card_type &&
453
+ identity_card_id == o.identity_card_id &&
454
+ reference == o.reference &&
455
+ name == o.name &&
456
+ address == o.address &&
457
+ street == o.street &&
458
+ postal_code == o.postal_code &&
459
+ city == o.city &&
460
+ email == o.email &&
461
+ transfer_reason_code == o.transfer_reason_code
462
+ end
463
+
464
+ # @see the `==` method
465
+ # @param [Object] Object to be compared
466
+ def eql?(o)
467
+ self == o
468
+ end
469
+
470
+ # Calculates hash code according to all attributes.
471
+ # @return [Integer] Hash code
472
+ def hash
473
+ [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, iban, bank_name, bank_country, cash_provider, country, sort_code, bic, sender_identity_card_type, sender_identity_card_id, sender_city_of_birth, sender_country_of_birth, sender_gender, reason, identity_card_type, identity_card_id, reference, name, address, street, postal_code, city, email, transfer_reason_code].hash
474
+ end
475
+
357
476
  require 'active_support/core_ext/hash'
358
477
  require 'active_support/hash_with_indifferent_access.rb'
359
478
  # Builds the object from hash
@@ -468,5 +587,6 @@ def _to_hash(value)
468
587
  end
469
588
  end
470
589
 
471
- end
590
+ end
591
+
472
592
  end