transferzero-sdk 1.3.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -18
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/AccountValidationApi.md +4 -4
  5. data/docs/AccountValidationRequest.md +6 -4
  6. data/docs/Currency.md +1 -1
  7. data/docs/CurrencyExchange.md +1 -1
  8. data/docs/CurrencyOpposite.md +1 -1
  9. data/docs/Document.md +5 -1
  10. data/docs/DocumentsApi.md +74 -2
  11. data/docs/FieldSelectValidation.md +1 -1
  12. data/docs/FieldValidation.md +1 -1
  13. data/docs/PayinMethod.md +4 -4
  14. data/docs/PayinMethodDetails.md +5 -3
  15. data/docs/PayinMethodDetailsMobile.md +1 -1
  16. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  17. data/docs/PaymentMethod.md +2 -2
  18. data/docs/PaymentMethodOpposite.md +2 -2
  19. data/docs/PayoutMethod.md +1 -1
  20. data/docs/PayoutMethodDetails.md +5 -3
  21. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  22. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  23. data/docs/PoliticallyExposedPerson.md +31 -0
  24. data/docs/Recipient.md +3 -3
  25. data/docs/RecipientsApi.md +2 -2
  26. data/docs/Sender.md +2 -0
  27. data/docs/Transaction.md +5 -5
  28. data/docs/TransactionTraits.md +2 -2
  29. data/docs/TransactionsApi.md +64 -0
  30. data/example/client.rb +14 -14
  31. data/git_push.sh +1 -1
  32. data/lib/transferzero-sdk.rb +2 -7
  33. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  34. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  35. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  36. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  37. data/lib/transferzero-sdk/api_client.rb +1 -1
  38. data/lib/transferzero-sdk/models/account_validation_request.rb +15 -15
  39. data/lib/transferzero-sdk/models/currency_exchange.rb +1 -2
  40. data/lib/transferzero-sdk/models/currency_opposite.rb +1 -2
  41. data/lib/transferzero-sdk/models/document.rb +20 -1
  42. data/lib/transferzero-sdk/models/document_webhook.rb +0 -1
  43. data/lib/transferzero-sdk/models/payin_method.rb +4 -4
  44. data/lib/transferzero-sdk/models/payin_method_details.rb +12 -7
  45. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +11 -6
  46. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  47. data/lib/transferzero-sdk/models/payout_method_details.rb +25 -15
  48. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +0 -5
  49. data/lib/transferzero-sdk/models/{currency_opposite_all_of.rb → payout_method_details_xof_bank.rb} +69 -18
  50. data/lib/transferzero-sdk/models/payout_method_webhook.rb +0 -1
  51. data/lib/transferzero-sdk/models/{payout_method_webhook_all_of.rb → politically_exposed_person.rb} +81 -10
  52. data/lib/transferzero-sdk/models/recipient_webhook.rb +0 -1
  53. data/lib/transferzero-sdk/models/sender.rb +14 -2
  54. data/lib/transferzero-sdk/models/sender_state.rb +1 -0
  55. data/lib/transferzero-sdk/models/sender_webhook.rb +0 -1
  56. data/lib/transferzero-sdk/models/transaction.rb +2 -2
  57. data/lib/transferzero-sdk/models/transaction_state.rb +1 -0
  58. data/lib/transferzero-sdk/models/transaction_traits.rb +3 -3
  59. data/lib/transferzero-sdk/models/transaction_webhook.rb +0 -1
  60. data/lib/transferzero-sdk/models/webhook.rb +1 -1
  61. data/lib/transferzero-sdk/version.rb +1 -1
  62. data/spec/api/account_validation_api_spec.rb +2 -2
  63. data/spec/api/currency_info_api_spec.rb +2 -0
  64. data/spec/api/documents_api_spec.rb +15 -0
  65. data/spec/api/recipients_api_spec.rb +1 -1
  66. data/spec/api/transactions_api_spec.rb +13 -0
  67. data/spec/models/account_validation_request_spec.rb +7 -1
  68. data/spec/models/currency_opposite_spec.rb +6 -0
  69. data/spec/models/document_spec.rb +12 -0
  70. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  71. data/spec/models/payin_method_details_spec.rb +6 -0
  72. data/spec/models/payout_method_details_spec.rb +7 -1
  73. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  74. data/spec/models/politically_exposed_person_spec.rb +83 -0
  75. data/spec/models/recipient_spec.rb +6 -0
  76. data/spec/models/sender_spec.rb +16 -0
  77. data/transferzero-sdk.gemspec +2 -2
  78. metadata +17 -46
  79. data/Gemfile.lock +0 -93
  80. data/docs/CurrencyExchangeAllOf.md +0 -17
  81. data/docs/CurrencyOppositeAllOf.md +0 -19
  82. data/docs/DocumentWebhookAllOf.md +0 -17
  83. data/docs/PayoutMethodWebhookAllOf.md +0 -17
  84. data/docs/RecipientWebhookAllOf.md +0 -17
  85. data/docs/SenderWebhookAllOf.md +0 -17
  86. data/docs/TransactionWebhookAllOf.md +0 -17
  87. data/lib/transferzero-sdk/models/currency_exchange_all_of.rb +0 -204
  88. data/lib/transferzero-sdk/models/document_webhook_all_of.rb +0 -201
  89. data/lib/transferzero-sdk/models/recipient_webhook_all_of.rb +0 -201
  90. data/lib/transferzero-sdk/models/sender_webhook_all_of.rb +0 -201
  91. data/lib/transferzero-sdk/models/transaction_webhook_all_of.rb +0 -201
  92. data/spec/api_client_spec.rb +0 -189
  93. data/spec/models/currency_exchange_all_of_spec.rb +0 -41
  94. data/spec/models/currency_opposite_all_of_spec.rb +0 -41
  95. data/spec/models/document_webhook_all_of_spec.rb +0 -41
  96. data/spec/models/payout_method_webhook_all_of_spec.rb +0 -41
  97. data/spec/models/recipient_webhook_all_of_spec.rb +0 -41
  98. data/spec/models/sender_webhook_all_of_spec.rb +0 -41
  99. data/spec/models/transaction_webhook_all_of_spec.rb +0 -41
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'DocumentWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -15,18 +15,18 @@ require 'date'
15
15
  module TransferZero
16
16
  # This describes the specific details on how the funds should be collected from the sender.
17
17
  class PayinMethod
18
- # Describes how the payment should be requested from the user. Possible values: - `NGN::Bank`: NGN card collection requests - `GHS::Mobile`: GHS mobile collections - `TZS::Mobile`: TZS mobile collections - `UGX::Mobile`: UGX mobile collections
18
+ # Describes how the payment should be requested from the user. Possible values: - `NGN::Bank`: NGN bank and card collection requests - `NGN::Mobile`: NGN mobile collections - `GHS::Mobile`: GHS mobile collections - `TZS::Mobile`: TZS mobile collections - `UGX::Mobile`: UGX mobile collections - `EUR::Bank`: EUR IBAN collections - `GBP::Bank`: GBP IBAN collections
19
19
  attr_accessor :type
20
20
 
21
21
  attr_accessor :in_details
22
22
 
23
- # This will contain the description on where to pay the funds. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on what to expect here.
23
+ # This will contain the description on where to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
24
24
  attr_accessor :out_details
25
25
 
26
- # This will contain the instructions on how to pay the funds. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on what to expect here.
26
+ # This will contain the instructions on how to pay the funds. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on what to expect here.
27
27
  attr_accessor :instructions
28
28
 
29
- # Describes which provider to use for collection. Please see the [Collections from Senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation on the valid values
29
+ # Describes which provider to use for collection. Please see the [Collections Details](https://docs.transferzero.com/docs/collection-details) in the API documentation on the valid values
30
30
  attr_accessor :provider
31
31
 
32
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -13,8 +13,11 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # Fields needed by the payment processor. Depends on the chose payin type. See the appropriate model details for more info: - `NGN::Bank`: see [`PayinMethodDetailsNGNBank`](#model-PayinMethodDetailsNGNBank) - `GHS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `UGX::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `TZS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile)
16
+ # Fields needed by the payment processor. Depends on the chose payin type. See the appropriate model details for more info: - `NGN::Bank`: see [`PayinMethodDetailsNGNBank`](#model-PayinMethodDetailsNGNBank) - `GHS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `UGX::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) - `TZS::Mobile`: see [`PayinMethodDetailsMobile`](#model-PayinMethodDetailsMobile) Note that some payin processors don't require additional input, these include `paga` through `NGN::Mobile`, `lhv` through `EUR::Bank` and `GBP::Bank`. Some providers like `providus` also have all of their fields set as optional, so you might not want to set any values. To use these providers please set this value to `{}` (an empty hash)
17
17
  class PayinMethodDetails
18
+ # The payment method which the user will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
19
+ attr_accessor :payment_method
20
+
18
21
  # This is where the user should be redirected back when the payment has been finished
19
22
  attr_accessor :redirect_url
20
23
 
@@ -27,6 +30,7 @@ module TransferZero
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
33
+ :'payment_method' => :'payment_method',
30
34
  :'redirect_url' => :'redirect_url',
31
35
  :'phone_number' => :'phone_number',
32
36
  :'send_instructions' => :'send_instructions'
@@ -36,6 +40,7 @@ module TransferZero
36
40
  # Attribute type mapping.
37
41
  def self.openapi_types
38
42
  {
43
+ :'payment_method' => :'String',
39
44
  :'redirect_url' => :'String',
40
45
  :'phone_number' => :'String',
41
46
  :'send_instructions' => :'Boolean'
@@ -65,6 +70,10 @@ module TransferZero
65
70
  h[k.to_sym] = v
66
71
  }
67
72
 
73
+ if attributes.key?(:'payment_method')
74
+ self.payment_method = attributes[:'payment_method']
75
+ end
76
+
68
77
  if attributes.key?(:'redirect_url')
69
78
  self.redirect_url = attributes[:'redirect_url']
70
79
  end
@@ -82,10 +91,6 @@ module TransferZero
82
91
  # @return Array for valid properties with the reasons
83
92
  def list_invalid_properties
84
93
  invalid_properties = Array.new
85
- if @redirect_url.nil?
86
- invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
87
- end
88
-
89
94
  if @phone_number.nil?
90
95
  invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
91
96
  end
@@ -96,7 +101,6 @@ module TransferZero
96
101
  # Check to see if the all the properties in the model are valid
97
102
  # @return true if the model is valid
98
103
  def valid?
99
- return false if @redirect_url.nil?
100
104
  return false if @phone_number.nil?
101
105
  _one_of_found = false
102
106
  openapi_one_of.each do |_class|
@@ -122,6 +126,7 @@ module TransferZero
122
126
  def ==(o)
123
127
  return true if self.equal?(o)
124
128
  self.class == o.class &&
129
+ payment_method == o.payment_method &&
125
130
  redirect_url == o.redirect_url &&
126
131
  phone_number == o.phone_number &&
127
132
  send_instructions == o.send_instructions
@@ -136,7 +141,7 @@ module TransferZero
136
141
  # Calculates hash code according to all attributes.
137
142
  # @return [Integer] Hash code
138
143
  def hash
139
- [redirect_url, phone_number, send_instructions].hash
144
+ [payment_method, redirect_url, phone_number, send_instructions].hash
140
145
  end
141
146
 
142
147
  require 'active_support/core_ext/hash'
@@ -15,12 +15,16 @@ require 'date'
15
15
  module TransferZero
16
16
  # ```JSON \"details\": { \"redirect_url\": \"http://redirect.back.to\" } ```
17
17
  class PayinMethodDetailsNGNBank
18
+ # The payment method which the user will use to make the payments. Options are `bank`, `card` or you can leave empty to support both.
19
+ attr_accessor :payment_method
20
+
18
21
  # This is where the user should be redirected back when the payment has been finished
19
22
  attr_accessor :redirect_url
20
23
 
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
27
+ :'payment_method' => :'payment_method',
24
28
  :'redirect_url' => :'redirect_url'
25
29
  }
26
30
  end
@@ -28,6 +32,7 @@ module TransferZero
28
32
  # Attribute type mapping.
29
33
  def self.openapi_types
30
34
  {
35
+ :'payment_method' => :'String',
31
36
  :'redirect_url' => :'String'
32
37
  }
33
38
  end
@@ -47,6 +52,10 @@ module TransferZero
47
52
  h[k.to_sym] = v
48
53
  }
49
54
 
55
+ if attributes.key?(:'payment_method')
56
+ self.payment_method = attributes[:'payment_method']
57
+ end
58
+
50
59
  if attributes.key?(:'redirect_url')
51
60
  self.redirect_url = attributes[:'redirect_url']
52
61
  end
@@ -56,17 +65,12 @@ module TransferZero
56
65
  # @return Array for valid properties with the reasons
57
66
  def list_invalid_properties
58
67
  invalid_properties = Array.new
59
- if @redirect_url.nil?
60
- invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
61
- end
62
-
63
68
  invalid_properties
64
69
  end
65
70
 
66
71
  # Check to see if the all the properties in the model are valid
67
72
  # @return true if the model is valid
68
73
  def valid?
69
- return false if @redirect_url.nil?
70
74
  true
71
75
  end
72
76
 
@@ -75,6 +79,7 @@ module TransferZero
75
79
  def ==(o)
76
80
  return true if self.equal?(o)
77
81
  self.class == o.class &&
82
+ payment_method == o.payment_method &&
78
83
  redirect_url == o.redirect_url
79
84
  end
80
85
 
@@ -87,7 +92,7 @@ module TransferZero
87
92
  # Calculates hash code according to all attributes.
88
93
  # @return [Integer] Hash code
89
94
  def hash
90
- [redirect_url].hash
95
+ [payment_method, redirect_url].hash
91
96
  end
92
97
 
93
98
  require 'active_support/core_ext/hash'
@@ -15,7 +15,7 @@ require 'date'
15
15
  module TransferZero
16
16
  # This describes the specific details on how the payment has to be routed to the recipient.
17
17
  class PayoutMethod
18
- # Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) for more info on how to collect money into internal balance
18
+ # Contains the currency to send the money to, and the type of the money movement Commonly used payout types are: - `NGN::Bank` - for Nigerian bank account payments. - `NGN::Mobile` - for Nigerian mobile money payments. - `GHS::Bank` - for Ghanaian bank account payments. - `GHS::Mobile` - for Ghanaian mobile money payments. - `UGX::Mobile` - for Ugandan mobile money payments. - `TZS::Mobile` - for Tanzanian mobile money payments. - `XOF::Mobile` - for Senegalese mobile money payments. - `XOF::Bank` - for Senegalese bank account payments. *** Currently in Beta phase *** - `XOF::Cash` - for Senegalese cash remittance payments. - `MAD::Cash` - for Moroccan cash remittance payments. - `EUR::Bank` - for IBAN bank transfers in EUR. - `GBP::Bank` - for IBAN bank transfers in GBP. You can also send funds to the internal balance using `CCY::Balance`, where `CCY` is the appropriate currency. See [Collection from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) for more info on how to collect money into internal balance
19
19
  attr_accessor :type
20
20
 
21
21
  attr_accessor :details
@@ -28,9 +28,11 @@ module TransferZero
28
28
 
29
29
  attr_accessor :mobile_provider
30
30
 
31
+ attr_accessor :iban
32
+
31
33
  attr_accessor :bank_name
32
34
 
33
- attr_accessor :iban
35
+ attr_accessor :bank_country
34
36
 
35
37
  attr_accessor :bic
36
38
 
@@ -62,8 +64,9 @@ module TransferZero
62
64
  :'bank_account_type' => :'bank_account_type',
63
65
  :'phone_number' => :'phone_number',
64
66
  :'mobile_provider' => :'mobile_provider',
65
- :'bank_name' => :'bank_name',
66
67
  :'iban' => :'iban',
68
+ :'bank_name' => :'bank_name',
69
+ :'bank_country' => :'bank_country',
67
70
  :'bic' => :'bic',
68
71
  :'sender_identity_card_type' => :'sender_identity_card_type',
69
72
  :'sender_identity_card_id' => :'sender_identity_card_id',
@@ -87,8 +90,9 @@ module TransferZero
87
90
  :'bank_account_type' => :'PayoutMethodBankAccountTypeEnum',
88
91
  :'phone_number' => :'String',
89
92
  :'mobile_provider' => :'PayoutMethodMobileProviderEnum',
90
- :'bank_name' => :'String',
91
93
  :'iban' => :'String',
94
+ :'bank_name' => :'String',
95
+ :'bank_country' => :'String',
92
96
  :'bic' => :'String',
93
97
  :'sender_identity_card_type' => :'PayoutMethodIdentityCardTypeEnum',
94
98
  :'sender_identity_card_id' => :'String',
@@ -111,6 +115,7 @@ module TransferZero
111
115
  :'PayoutMethodDetailsMADCash',
112
116
  :'PayoutMethodDetailsMobile',
113
117
  :'PayoutMethodDetailsNGNBank',
118
+ :'PayoutMethodDetailsXOFBank',
114
119
  :'PayoutMethodDetailsXOFMobile'
115
120
  ]
116
121
  end
@@ -158,12 +163,16 @@ module TransferZero
158
163
  self.mobile_provider = attributes[:'mobile_provider']
159
164
  end
160
165
 
166
+ if attributes.key?(:'iban')
167
+ self.iban = attributes[:'iban']
168
+ end
169
+
161
170
  if attributes.key?(:'bank_name')
162
171
  self.bank_name = attributes[:'bank_name']
163
172
  end
164
173
 
165
- if attributes.key?(:'iban')
166
- self.iban = attributes[:'iban']
174
+ if attributes.key?(:'bank_country')
175
+ self.bank_country = attributes[:'bank_country']
167
176
  end
168
177
 
169
178
  if attributes.key?(:'bic')
@@ -227,10 +236,6 @@ module TransferZero
227
236
  invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
228
237
  end
229
238
 
230
- if @bank_account_type.nil?
231
- invalid_properties.push('invalid value for "bank_account_type", bank_account_type cannot be nil.')
232
- end
233
-
234
239
  if @phone_number.nil?
235
240
  invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
236
241
  end
@@ -239,12 +244,16 @@ module TransferZero
239
244
  invalid_properties.push('invalid value for "mobile_provider", mobile_provider cannot be nil.')
240
245
  end
241
246
 
247
+ if @iban.nil?
248
+ invalid_properties.push('invalid value for "iban", iban cannot be nil.')
249
+ end
250
+
242
251
  if @bank_name.nil?
243
252
  invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
244
253
  end
245
254
 
246
- if @iban.nil?
247
- invalid_properties.push('invalid value for "iban", iban cannot be nil.')
255
+ if @bank_country.nil?
256
+ invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
248
257
  end
249
258
 
250
259
  if @sender_identity_card_type.nil?
@@ -277,11 +286,11 @@ module TransferZero
277
286
  return false if @last_name.nil?
278
287
  return false if @bank_code.nil?
279
288
  return false if @bank_account.nil?
280
- return false if @bank_account_type.nil?
281
289
  return false if @phone_number.nil?
282
290
  return false if @mobile_provider.nil?
283
- return false if @bank_name.nil?
284
291
  return false if @iban.nil?
292
+ return false if @bank_name.nil?
293
+ return false if @bank_country.nil?
285
294
  return false if @sender_identity_card_type.nil?
286
295
  return false if @sender_identity_card_id.nil?
287
296
  return false if @sender_city_of_birth.nil?
@@ -318,8 +327,9 @@ module TransferZero
318
327
  bank_account_type == o.bank_account_type &&
319
328
  phone_number == o.phone_number &&
320
329
  mobile_provider == o.mobile_provider &&
321
- bank_name == o.bank_name &&
322
330
  iban == o.iban &&
331
+ bank_name == o.bank_name &&
332
+ bank_country == o.bank_country &&
323
333
  bic == o.bic &&
324
334
  sender_identity_card_type == o.sender_identity_card_type &&
325
335
  sender_identity_card_id == o.sender_identity_card_id &&
@@ -341,7 +351,7 @@ module TransferZero
341
351
  # Calculates hash code according to all attributes.
342
352
  # @return [Integer] Hash code
343
353
  def hash
344
- [first_name, last_name, bank_code, bank_account, bank_account_type, phone_number, mobile_provider, bank_name, iban, 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
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
345
355
  end
346
356
 
347
357
  require 'active_support/core_ext/hash'
@@ -103,10 +103,6 @@ module TransferZero
103
103
  invalid_properties.push('invalid value for "bank_account", bank_account cannot be nil.')
104
104
  end
105
105
 
106
- if @bank_account_type.nil?
107
- invalid_properties.push('invalid value for "bank_account_type", bank_account_type cannot be nil.')
108
- end
109
-
110
106
  invalid_properties
111
107
  end
112
108
 
@@ -117,7 +113,6 @@ module TransferZero
117
113
  return false if @last_name.nil?
118
114
  return false if @bank_code.nil?
119
115
  return false if @bank_account.nil?
120
- return false if @bank_account_type.nil?
121
116
  true
122
117
  end
123
118
 
@@ -13,26 +13,37 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class CurrencyOppositeAllOf
17
- # The rate of this particular currency with the base one
18
- attr_accessor :rate
16
+ # ```JSON \"details\": { \"first_name\": \"First\", \"last_name\": \"Last\", \"iban\": \"SN08SN0000000000000000000000\", \"bank_name\": \"BRM\", \"bank_country\": \"SN\" # ISO country code for Senegal } ``` *** Currently in Beta phase ***
17
+ class PayoutMethodDetailsXOFBank
18
+ attr_accessor :first_name
19
19
 
20
- # Mark to market rate of this particular currency against the base one with the margin factored in
21
- attr_accessor :mtm_rate
20
+ attr_accessor :last_name
21
+
22
+ attr_accessor :iban
23
+
24
+ attr_accessor :bank_name
25
+
26
+ attr_accessor :bank_country
22
27
 
23
28
  # Attribute mapping from ruby-style variable name to JSON key.
24
29
  def self.attribute_map
25
30
  {
26
- :'rate' => :'rate',
27
- :'mtm_rate' => :'mtm_rate'
31
+ :'first_name' => :'first_name',
32
+ :'last_name' => :'last_name',
33
+ :'iban' => :'iban',
34
+ :'bank_name' => :'bank_name',
35
+ :'bank_country' => :'bank_country'
28
36
  }
29
37
  end
30
38
 
31
39
  # Attribute type mapping.
32
40
  def self.openapi_types
33
41
  {
34
- :'rate' => :'Float',
35
- :'mtm_rate' => :'Float'
42
+ :'first_name' => :'String',
43
+ :'last_name' => :'String',
44
+ :'iban' => :'String',
45
+ :'bank_name' => :'String',
46
+ :'bank_country' => :'String'
36
47
  }
37
48
  end
38
49
 
@@ -40,23 +51,35 @@ module TransferZero
40
51
  # @param [Hash] attributes Model attributes in the form of hash
41
52
  def initialize(attributes = {})
42
53
  if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::CurrencyOppositeAllOf` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodDetailsXOFBank` initialize method"
44
55
  end
45
56
 
46
57
  # check to see if the attribute exists and convert string to symbol for hash key
47
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
48
59
  if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::CurrencyOppositeAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodDetailsXOFBank`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
61
  end
51
62
  h[k.to_sym] = v
52
63
  }
53
64
 
54
- if attributes.key?(:'rate')
55
- self.rate = attributes[:'rate']
65
+ if attributes.key?(:'first_name')
66
+ self.first_name = attributes[:'first_name']
67
+ end
68
+
69
+ if attributes.key?(:'last_name')
70
+ self.last_name = attributes[:'last_name']
56
71
  end
57
72
 
58
- if attributes.key?(:'mtm_rate')
59
- self.mtm_rate = attributes[:'mtm_rate']
73
+ if attributes.key?(:'iban')
74
+ self.iban = attributes[:'iban']
75
+ end
76
+
77
+ if attributes.key?(:'bank_name')
78
+ self.bank_name = attributes[:'bank_name']
79
+ end
80
+
81
+ if attributes.key?(:'bank_country')
82
+ self.bank_country = attributes[:'bank_country']
60
83
  end
61
84
  end
62
85
 
@@ -64,12 +87,37 @@ module TransferZero
64
87
  # @return Array for valid properties with the reasons
65
88
  def list_invalid_properties
66
89
  invalid_properties = Array.new
90
+ if @first_name.nil?
91
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
92
+ end
93
+
94
+ if @last_name.nil?
95
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
96
+ end
97
+
98
+ if @iban.nil?
99
+ invalid_properties.push('invalid value for "iban", iban cannot be nil.')
100
+ end
101
+
102
+ if @bank_name.nil?
103
+ invalid_properties.push('invalid value for "bank_name", bank_name cannot be nil.')
104
+ end
105
+
106
+ if @bank_country.nil?
107
+ invalid_properties.push('invalid value for "bank_country", bank_country cannot be nil.')
108
+ end
109
+
67
110
  invalid_properties
68
111
  end
69
112
 
70
113
  # Check to see if the all the properties in the model are valid
71
114
  # @return true if the model is valid
72
115
  def valid?
116
+ return false if @first_name.nil?
117
+ return false if @last_name.nil?
118
+ return false if @iban.nil?
119
+ return false if @bank_name.nil?
120
+ return false if @bank_country.nil?
73
121
  true
74
122
  end
75
123
 
@@ -78,8 +126,11 @@ module TransferZero
78
126
  def ==(o)
79
127
  return true if self.equal?(o)
80
128
  self.class == o.class &&
81
- rate == o.rate &&
82
- mtm_rate == o.mtm_rate
129
+ first_name == o.first_name &&
130
+ last_name == o.last_name &&
131
+ iban == o.iban &&
132
+ bank_name == o.bank_name &&
133
+ bank_country == o.bank_country
83
134
  end
84
135
 
85
136
  # @see the `==` method
@@ -91,7 +142,7 @@ module TransferZero
91
142
  # Calculates hash code according to all attributes.
92
143
  # @return [Integer] Hash code
93
144
  def hash
94
- [rate, mtm_rate].hash
145
+ [first_name, last_name, iban, bank_name, bank_country].hash
95
146
  end
96
147
 
97
148
  require 'active_support/core_ext/hash'