transferzero-sdk 1.8.1 → 1.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/docs/AccountValidationRequest.md +2 -0
  4. data/docs/Document.md +4 -0
  5. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  6. data/docs/PayoutMethodCountryEnum.md +16 -0
  7. data/docs/PayoutMethodDetails.md +4 -0
  8. data/docs/PayoutMethodDetailsMobile.md +3 -1
  9. data/docs/PayoutMethodDetailsXOFCash.md +25 -0
  10. data/docs/ProofOfPayment.md +23 -0
  11. data/docs/ProofOfPaymentListResponse.md +17 -0
  12. data/docs/Recipient.md +4 -0
  13. data/docs/RecipientStateReasonDetails.md +23 -0
  14. data/docs/RecipientsApi.md +62 -0
  15. data/docs/Sender.md +8 -6
  16. data/lib/transferzero-sdk.rb +6 -0
  17. data/lib/transferzero-sdk/api/recipients_api.rb +54 -0
  18. data/lib/transferzero-sdk/api_client.rb +1 -1
  19. data/lib/transferzero-sdk/models/account_validation_request.rb +10 -1
  20. data/lib/transferzero-sdk/models/document.rb +21 -1
  21. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  22. data/lib/transferzero-sdk/models/payout_method_country_enum.rb +43 -0
  23. data/lib/transferzero-sdk/models/payout_method_details.rb +20 -1
  24. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +1 -1
  25. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +13 -4
  26. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +1 -1
  27. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +254 -0
  28. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +1 -1
  29. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +1 -1
  30. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +3 -0
  31. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  32. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  33. data/lib/transferzero-sdk/models/recipient.rb +20 -1
  34. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  35. data/lib/transferzero-sdk/models/sender.rb +29 -7
  36. data/lib/transferzero-sdk/version.rb +1 -1
  37. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  38. data/spec/models/payout_method_country_enum_spec.rb +35 -0
  39. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  40. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  41. data/spec/models/proof_of_payment_spec.rb +59 -0
  42. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  43. data/transferzero-sdk-1.9.0.gem +0 -0
  44. metadata +27 -2
@@ -44,11 +44,16 @@ class Recipient
44
44
  # In case the payment is unsuccessful it holds the error message associated with the last unsuccessful payout.
45
45
  attr_accessor :state_reason
46
46
 
47
+ attr_accessor :state_reason_details
48
+
47
49
  attr_accessor :state
48
50
 
49
51
  # The ID of the transaction that is related to this recipient
50
52
  attr_accessor :transaction_id
51
53
 
54
+ # Optional ID that is supplied by partner linking it to the partner's own Transaction ID.
55
+ attr_accessor :transaction_external_id
56
+
52
57
  attr_accessor :transaction_state
53
58
 
54
59
  # The exchange rate used in this payment
@@ -87,8 +92,10 @@ class Recipient
87
92
  :'input_usd_amount' => :'input_usd_amount',
88
93
  :'may_cancel' => :'may_cancel',
89
94
  :'state_reason' => :'state_reason',
95
+ :'state_reason_details' => :'state_reason_details',
90
96
  :'state' => :'state',
91
97
  :'transaction_id' => :'transaction_id',
98
+ :'transaction_external_id' => :'transaction_external_id',
92
99
  :'transaction_state' => :'transaction_state',
93
100
  :'exchange_rate' => :'exchange_rate',
94
101
  :'fee_fractional' => :'fee_fractional',
@@ -114,8 +121,10 @@ class Recipient
114
121
  :'input_usd_amount' => :'Float',
115
122
  :'may_cancel' => :'Boolean',
116
123
  :'state_reason' => :'String',
124
+ :'state_reason_details' => :'RecipientStateReasonDetails',
117
125
  :'state' => :'RecipientState',
118
126
  :'transaction_id' => :'String',
127
+ :'transaction_external_id' => :'String',
119
128
  :'transaction_state' => :'TransactionState',
120
129
  :'exchange_rate' => :'Float',
121
130
  :'fee_fractional' => :'Float',
@@ -183,6 +192,10 @@ class Recipient
183
192
  self.state_reason = attributes[:'state_reason']
184
193
  end
185
194
 
195
+ if attributes.key?(:'state_reason_details')
196
+ self.state_reason_details = attributes[:'state_reason_details']
197
+ end
198
+
186
199
  if attributes.key?(:'state')
187
200
  self.state = attributes[:'state']
188
201
  end
@@ -191,6 +204,10 @@ class Recipient
191
204
  self.transaction_id = attributes[:'transaction_id']
192
205
  end
193
206
 
207
+ if attributes.key?(:'transaction_external_id')
208
+ self.transaction_external_id = attributes[:'transaction_external_id']
209
+ end
210
+
194
211
  if attributes.key?(:'transaction_state')
195
212
  self.transaction_state = attributes[:'transaction_state']
196
213
  end
@@ -273,8 +290,10 @@ class Recipient
273
290
  input_usd_amount == o.input_usd_amount &&
274
291
  may_cancel == o.may_cancel &&
275
292
  state_reason == o.state_reason &&
293
+ state_reason_details == o.state_reason_details &&
276
294
  state == o.state &&
277
295
  transaction_id == o.transaction_id &&
296
+ transaction_external_id == o.transaction_external_id &&
278
297
  transaction_state == o.transaction_state &&
279
298
  exchange_rate == o.exchange_rate &&
280
299
  fee_fractional == o.fee_fractional &&
@@ -295,7 +314,7 @@ class Recipient
295
314
  # Calculates hash code according to all attributes.
296
315
  # @return [Integer] Hash code
297
316
  def hash
298
- [requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state, transaction_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
317
+ [requested_amount, requested_currency, payout_method, metadata, created_at, editable, retriable, input_usd_amount, may_cancel, state_reason, state_reason_details, state, transaction_id, transaction_external_id, transaction_state, exchange_rate, fee_fractional, input_amount, input_currency, output_amount, output_currency, id, errors].hash
299
318
  end
300
319
 
301
320
  require 'active_support/core_ext/hash'
@@ -0,0 +1,235 @@
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 RecipientStateReasonDetails
17
+ # Status code of failed transaction
18
+ attr_accessor :code
19
+
20
+ # Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error
21
+ attr_accessor :category
22
+
23
+ # Tiered messages
24
+ attr_accessor :messages
25
+
26
+ # Public, human readable, detailed error message
27
+ attr_accessor :description
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'code' => :'code',
33
+ :'category' => :'category',
34
+ :'messages' => :'messages',
35
+ :'description' => :'description'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'code' => :'String',
43
+ :'category' => :'String',
44
+ :'messages' => :'Array<String>',
45
+ :'description' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::RecipientStateReasonDetails` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::RecipientStateReasonDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'code')
65
+ self.code = attributes[:'code']
66
+ end
67
+
68
+ if attributes.key?(:'category')
69
+ self.category = attributes[:'category']
70
+ end
71
+
72
+ if attributes.key?(:'messages')
73
+ if (value = attributes[:'messages']).is_a?(Array)
74
+ self.messages = value
75
+ end
76
+ end
77
+
78
+ if attributes.key?(:'description')
79
+ self.description = attributes[:'description']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ code == o.code &&
102
+ category == o.category &&
103
+ messages == o.messages &&
104
+ description == o.description
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [code, category, messages, description].hash
117
+ end
118
+
119
+ require 'active_support/core_ext/hash'
120
+ require 'active_support/hash_with_indifferent_access.rb'
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.openapi_types.each_pair do |key, type|
127
+ if type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ temp_model = TransferZero.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ ::ActiveSupport::HashWithIndifferentAccess.new(hash)
205
+ end
206
+
207
+ def [](key)
208
+ to_hash[key]
209
+ end
210
+
211
+ def dig(*args)
212
+ to_hash.dig(*args)
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"city_of_birth\": \"London\", \"country_of_birth\": \"GB\", \"gender\": \"M\", \"documents\": [ ], \"politically_exposed_people\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"created_at\": \"2018-06-09 15:13:40 UTC\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"politically_exposed_people\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
16
+ # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { // name \"first_name\": \"Jane\", \"last_name\": \"Doe\", // address \"country\": \"US\", \"city\": \"New York\", \"street\": \"20 W 34th St\", \"postal_code\": \"10001\", \"address_description\": \"\", // DOB \"birth_date\": \"1974-12-24\", // Contact Details; You can usually use your company's contact details here \"phone_country\": \"US\", \"phone_number\": \"5555551234\", \"email\": \"info@transferzero.com\", // ID of the sender in your system \"external_id\": \"Sender:US:234523\", // these fields are mandatory, but you can usually leave them with the following default values: \"documents\": [ ], \"ip\": \"127.0.0.1\", \"metadata\": {} } ``` Business Sender Example: ```json { \"type\": \"business\", \"name\": \"Company name\", // Country of Incorporation \"country\": \"US\", // Trading address of the company \"trading_country\": \"US\", \"city\": \"New York\", \"street\": \"20 W 34th St\", \"postal_code\": \"10001\", \"address_description\": \"\", // Company Details \"legal_entity_type\": \"privately_owned_company\", \"registration_date\": \"2012-01-25\", \"registration_number\": \"VAT1234567\", \"nature_of_business\": \"retail_trade\", // Contact Details \"phone_country\": \"US\", \"phone_number\": \"5555551234\", \"email\": \"example@home.org\", // ID of the sender in your system \"external_id\": \"Sender:Business:US:234523\", // these fields are mandatory, but you can usually leave them with the following default values: \"documents\": [ ], \"ip\": \"127.0.0.1\", \"metadata\": {} } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
17
17
  class Sender
18
18
  attr_accessor :id
19
19
 
@@ -22,7 +22,7 @@ class Sender
22
22
 
23
23
  attr_accessor :state
24
24
 
25
- # Country of sender in 2-character alpha ISO 3166-2 country format
25
+ # Country of sender in 2-character alpha ISO 3166-2 country format. This is the residential country for personal senders and the country of incorporation for business senders.
26
26
  attr_accessor :country
27
27
 
28
28
  # Sender's street
@@ -52,9 +52,12 @@ class Sender
52
52
  # Identification number of document used
53
53
  attr_accessor :identification_number
54
54
 
55
- # Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
55
+ # Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport
56
56
  attr_accessor :identification_type
57
57
 
58
+ # Determines language of the served content. Defaults to English
59
+ attr_accessor :lang
60
+
58
61
  # Name of sender (used only with a Business sender)
59
62
  attr_accessor :name
60
63
 
@@ -76,7 +79,7 @@ class Sender
76
79
  # The nationality of the sender (used only with a Personal sender)
77
80
  attr_accessor :nationality
78
81
 
79
- # Legal entity type (used only with a Business sender)
82
+ # Legal entity type (used only with a Business sender) Available values: - sole_proprietorship: Sole Proprietorship - partnership: Partnership - privately_owned_company: Privately Owned Company (Limited Company) - publicly_owned_company: Publicly Listed Company (PLC) - government_owned_entity: Government Owned Entity Trusts - trust: Foundations & Similar Entities - ngo: Non-Government Organisations / Charities inc Religious bodies and place of worship - club_and_society: Clubs and Societies - go: GO (Majority Owned Subsidiary of State-Owned Company) - financial_institution: Financial Institution Please note not all values are acceptable for some our corridors. Please reach out to our sales teams for more information. Note that if you select `financial_institution` then the fields `vat_registration_number`, `financial_regulator` and `regulatory_licence_number` will be mandatory as well.
80
83
  attr_accessor :legal_entity_type
81
84
 
82
85
  # The registration date (used only with a Business sender)
@@ -85,7 +88,7 @@ class Sender
85
88
  # The registration number (used only with a Business sender)
86
89
  attr_accessor :registration_number
87
90
 
88
- # Nature of business options (used only with a Business sender)
91
+ # Nature of business options (used only with a Business sender) Available values: - personal: Personal - agriculture_and_hunting: Agriculture and Hunting - forestry: Forestry - fishing: Fishing - agricultural_by_products: Agricultural By-Products - coal_mining: Coal Mining - oil_mining: Oil Mining - iron_ore_mining: Iron Ore Mining - other_metal_and_diamond_mining: Other Metal and Diamond Mining - other_mineral_mining: Other Mineral Mining - manufacturing_of_food_drink_tobacco: Manufacture of Food/Drink/Tobacco - manufacturing_of_textiles_leather_fur_furniture: Manufacture of Textiles/Leather/Fur/Furniture - manufacture_of_wooden_products_furniture: Manufacture of Wooden Products/Furniture - manufacture_of_paper_pulp_allied_products: Manufacture of Paper/Pulp/Allied Products - manufacture_of_chemicals_medical_petroleum_rubber_plastic_products: Manufacture Of Chemicals Medical Petroleum Rubber Plastic Products - manufacture_of_pottery_china_glass_stone: Manufacture Of Pottery China Glass Stone - manufacture_of_iron_steel_non_ferrous_metals_basic_industries: Manufacture Of Iron Steel Non-Ferrous Metals Basic Industries - manufacture_of_metal_products_electrical_and_scientific_engineering: Manufacture Of Metal Products Electrical And Scientific Engineering - manufacture_of_jewelry_musical_instruments_toys: Manufacture Of Jewelry Musical Instruments Toys - electricity_gas_and_water: Electricity, Gas And Water - construction: Construction - wholesale_trade: Wholesale Trade - retail_trade: Retail Trade - catering_incl_hotels: Catering Incl. Hotels - transport_storage: Transport Storage - communications: Communications - finance_and_holding_companies: Finance And Holding Companies - insurance: Insurance - business_services: Business Services - real_estate_development_investment: Real Estate Development Investment - central_state_governments: Central State Governments - community_services_defence_police_prisons_etc: Community Services Defence Police Prisons Etc - social_services_education_health_care: Social Services Education Health Care - personal_services_leisure_services: Personal Services - Leisure Services - personal_services_domestic_laundry_repairs: Personal Services - Domestic Laundry Repairs - personal_services_embassies_international_organisations: Personal Services - Embassies
89
92
  attr_accessor :nature_of_business
90
93
 
91
94
  # The source of funds
@@ -196,6 +199,7 @@ class Sender
196
199
  :'address_description' => :'address_description',
197
200
  :'identification_number' => :'identification_number',
198
201
  :'identification_type' => :'identification_type',
202
+ :'lang' => :'lang',
199
203
  :'name' => :'name',
200
204
  :'first_name' => :'first_name',
201
205
  :'middle_name' => :'middle_name',
@@ -250,6 +254,7 @@ class Sender
250
254
  :'address_description' => :'String',
251
255
  :'identification_number' => :'String',
252
256
  :'identification_type' => :'String',
257
+ :'lang' => :'String',
253
258
  :'name' => :'String',
254
259
  :'first_name' => :'String',
255
260
  :'middle_name' => :'String',
@@ -258,7 +263,7 @@ class Sender
258
263
  :'occupation' => :'String',
259
264
  :'nationality' => :'String',
260
265
  :'legal_entity_type' => :'String',
261
- :'registration_date' => :'String',
266
+ :'registration_date' => :'Date',
262
267
  :'registration_number' => :'String',
263
268
  :'nature_of_business' => :'String',
264
269
  :'source_of_funds' => :'String',
@@ -358,6 +363,10 @@ class Sender
358
363
  self.identification_type = attributes[:'identification_type']
359
364
  end
360
365
 
366
+ if attributes.key?(:'lang')
367
+ self.lang = attributes[:'lang']
368
+ end
369
+
361
370
  if attributes.key?(:'name')
362
371
  self.name = attributes[:'name']
363
372
  end
@@ -556,6 +565,8 @@ class Sender
556
565
  return false unless identification_type_validator.valid?(@identification_type)
557
566
  legal_entity_type_validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
558
567
  return false unless legal_entity_type_validator.valid?(@legal_entity_type)
568
+ nature_of_business_validator = EnumAttributeValidator.new('String', ["personal", "agriculture_and_hunting", "forestry", "fishing", "agricultural_by_products", "coal_mining", "oil_mining", "iron_ore_mining", "other_metal_and_diamond_mining", "other_mineral_mining", "manufacturing_of_food_drink_tobacco", "manufacturing_of_textiles_leather_fur_furniture", "manufacture_of_wooden_products_furniture", "manufacture_of_paper_pulp_allied_products", "manufacture_of_chemicals_medical_petroleum_rubber_plastic_products", "manufacture_of_pottery_china_glass_stone", "manufacture_of_iron_steel_non_ferrous_metals_basic_industries", "manufacture_of_metal_products_electrical_and_scientific_engineering", "manufacture_of_jewelry_musical_instruments_toys", "electricity_gas_and_water", "construction", "wholesale_trade", "retail_trade", "catering_incl_hotels", "transport_storage", "communications", "finance_and_holding_companies", "insurance", "business_services", "real_estate_development_investment", "central_state_governments", "community_services_defence_police_prisons_etc", "social_services_education_health_care", "personal_services_leisure_services", "personal_services_domestic_laundry_repairs", "personal_services_embassies_international_organisations"])
569
+ return false unless nature_of_business_validator.valid?(@nature_of_business)
559
570
  return false if @documents.nil?
560
571
  gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
561
572
  return false unless gender_validator.valid?(@gender)
@@ -592,6 +603,16 @@ class Sender
592
603
  @legal_entity_type = legal_entity_type
593
604
  end
594
605
 
606
+ # Custom attribute writer method checking allowed values (enum).
607
+ # @param [Object] nature_of_business Object to be assigned
608
+ def nature_of_business=(nature_of_business)
609
+ validator = EnumAttributeValidator.new('String', ["personal", "agriculture_and_hunting", "forestry", "fishing", "agricultural_by_products", "coal_mining", "oil_mining", "iron_ore_mining", "other_metal_and_diamond_mining", "other_mineral_mining", "manufacturing_of_food_drink_tobacco", "manufacturing_of_textiles_leather_fur_furniture", "manufacture_of_wooden_products_furniture", "manufacture_of_paper_pulp_allied_products", "manufacture_of_chemicals_medical_petroleum_rubber_plastic_products", "manufacture_of_pottery_china_glass_stone", "manufacture_of_iron_steel_non_ferrous_metals_basic_industries", "manufacture_of_metal_products_electrical_and_scientific_engineering", "manufacture_of_jewelry_musical_instruments_toys", "electricity_gas_and_water", "construction", "wholesale_trade", "retail_trade", "catering_incl_hotels", "transport_storage", "communications", "finance_and_holding_companies", "insurance", "business_services", "real_estate_development_investment", "central_state_governments", "community_services_defence_police_prisons_etc", "social_services_education_health_care", "personal_services_leisure_services", "personal_services_domestic_laundry_repairs", "personal_services_embassies_international_organisations"])
610
+ unless validator.valid?(nature_of_business) || nature_of_business.empty?
611
+ fail ArgumentError, "invalid value for \"nature_of_business\", must be one of #{validator.allowable_values}."
612
+ end
613
+ @nature_of_business = nature_of_business
614
+ end
615
+
595
616
  # Custom attribute writer method checking allowed values (enum).
596
617
  # @param [Object] gender Object to be assigned
597
618
  def gender=(gender)
@@ -621,6 +642,7 @@ class Sender
621
642
  address_description == o.address_description &&
622
643
  identification_number == o.identification_number &&
623
644
  identification_type == o.identification_type &&
645
+ lang == o.lang &&
624
646
  name == o.name &&
625
647
  first_name == o.first_name &&
626
648
  middle_name == o.middle_name &&
@@ -666,7 +688,7 @@ class Sender
666
688
  # Calculates hash code according to all attributes.
667
689
  # @return [Integer] Hash code
668
690
  def hash
669
- [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash
691
+ [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, lang, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash
670
692
  end
671
693
 
672
694
  require 'active_support/core_ext/hash'
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.8.1'
14
+ VERSION = '1.12.2'
15
15
  end
@@ -0,0 +1,35 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TransferZero::PayoutMethodCashProviderEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'PayoutMethodCashProviderEnum' do
21
+ before do
22
+ # run before each test
23
+ @instance = TransferZero::PayoutMethodCashProviderEnum.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PayoutMethodCashProviderEnum' do
31
+ it 'should create an instance of PayoutMethodCashProviderEnum' do
32
+ expect(@instance).to be_instance_of(TransferZero::PayoutMethodCashProviderEnum)
33
+ end
34
+ end
35
+ end