transferzero-sdk 1.7.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +93 -0
- data/README.md +11 -4
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +4 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodCashProviderEnum.md +16 -0
- data/docs/PayoutMethodDetails.md +13 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsXOFCash.md +23 -0
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/ProofOfPayment.md +23 -0
- data/docs/ProofOfPaymentListResponse.md +17 -0
- data/docs/Recipient.md +4 -0
- data/docs/RecipientStateReasonDetails.md +23 -0
- data/docs/RecipientsApi.md +62 -0
- data/docs/Sender.md +18 -8
- data/example/client.rb +55 -18
- data/lib/transferzero-sdk.rb +6 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +54 -0
- data/lib/transferzero-sdk/api_client.rb +1 -1
- data/lib/transferzero-sdk/models/currency.rb +1 -11
- data/lib/transferzero-sdk/models/currency_exchange.rb +1 -11
- data/lib/transferzero-sdk/models/currency_opposite.rb +14 -14
- data/lib/transferzero-sdk/models/document.rb +21 -1
- data/lib/transferzero-sdk/models/payout_method.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
- data/lib/transferzero-sdk/models/payout_method_details.rb +76 -5
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +13 -4
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +245 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +1 -1
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +3 -0
- data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
- data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
- data/lib/transferzero-sdk/models/recipient.rb +20 -1
- data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
- data/lib/transferzero-sdk/models/sender.rb +88 -14
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
- data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
- data/spec/models/proof_of_payment_spec.rb +59 -0
- data/spec/models/recipient_state_reason_details_spec.rb +59 -0
- data/transferzero-sdk-1.10.0.gem +0 -0
- metadata +28 -2
@@ -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 { \"
|
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,14 +88,17 @@ 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
|
92
95
|
attr_accessor :source_of_funds
|
93
96
|
|
94
|
-
#
|
95
|
-
attr_accessor :
|
97
|
+
# Custom source of funds
|
98
|
+
attr_accessor :custom_source_of_funds
|
99
|
+
|
100
|
+
# The core activity (used only with a Business sender)
|
101
|
+
attr_accessor :core_business_activity
|
96
102
|
|
97
103
|
# The purpose for opening their account (used only with a Business sender)
|
98
104
|
attr_accessor :purpose_of_opening_account
|
@@ -142,6 +148,15 @@ class Sender
|
|
142
148
|
# Optional ID that is supplied by partner linking it to the partner's own Sender ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not.
|
143
149
|
attr_accessor :external_id
|
144
150
|
|
151
|
+
# City of birth of sender
|
152
|
+
attr_accessor :city_of_birth
|
153
|
+
|
154
|
+
# Country of birth of sender in 2-character alpha ISO 3166-2 country format
|
155
|
+
attr_accessor :country_of_birth
|
156
|
+
|
157
|
+
# The gender of the sender: - `M`: Male - `F`: Female - `O`: Other
|
158
|
+
attr_accessor :gender
|
159
|
+
|
145
160
|
# Date and time of sender was created
|
146
161
|
attr_accessor :created_at
|
147
162
|
|
@@ -184,6 +199,7 @@ class Sender
|
|
184
199
|
:'address_description' => :'address_description',
|
185
200
|
:'identification_number' => :'identification_number',
|
186
201
|
:'identification_type' => :'identification_type',
|
202
|
+
:'lang' => :'lang',
|
187
203
|
:'name' => :'name',
|
188
204
|
:'first_name' => :'first_name',
|
189
205
|
:'middle_name' => :'middle_name',
|
@@ -196,7 +212,8 @@ class Sender
|
|
196
212
|
:'registration_number' => :'registration_number',
|
197
213
|
:'nature_of_business' => :'nature_of_business',
|
198
214
|
:'source_of_funds' => :'source_of_funds',
|
199
|
-
:'
|
215
|
+
:'custom_source_of_funds' => :'custom_source_of_funds',
|
216
|
+
:'core_business_activity' => :'core_business_activity',
|
200
217
|
:'purpose_of_opening_account' => :'purpose_of_opening_account',
|
201
218
|
:'office_phone' => :'office_phone',
|
202
219
|
:'vat_registration_number' => :'vat_registration_number',
|
@@ -213,6 +230,9 @@ class Sender
|
|
213
230
|
:'onboarding_status' => :'onboarding_status',
|
214
231
|
:'politically_exposed_people' => :'politically_exposed_people',
|
215
232
|
:'external_id' => :'external_id',
|
233
|
+
:'city_of_birth' => :'city_of_birth',
|
234
|
+
:'country_of_birth' => :'country_of_birth',
|
235
|
+
:'gender' => :'gender',
|
216
236
|
:'created_at' => :'created_at'
|
217
237
|
}
|
218
238
|
end
|
@@ -234,6 +254,7 @@ class Sender
|
|
234
254
|
:'address_description' => :'String',
|
235
255
|
:'identification_number' => :'String',
|
236
256
|
:'identification_type' => :'String',
|
257
|
+
:'lang' => :'String',
|
237
258
|
:'name' => :'String',
|
238
259
|
:'first_name' => :'String',
|
239
260
|
:'middle_name' => :'String',
|
@@ -242,11 +263,12 @@ class Sender
|
|
242
263
|
:'occupation' => :'String',
|
243
264
|
:'nationality' => :'String',
|
244
265
|
:'legal_entity_type' => :'String',
|
245
|
-
:'registration_date' => :'
|
266
|
+
:'registration_date' => :'Date',
|
246
267
|
:'registration_number' => :'String',
|
247
268
|
:'nature_of_business' => :'String',
|
248
269
|
:'source_of_funds' => :'String',
|
249
|
-
:'
|
270
|
+
:'custom_source_of_funds' => :'String',
|
271
|
+
:'core_business_activity' => :'String',
|
250
272
|
:'purpose_of_opening_account' => :'String',
|
251
273
|
:'office_phone' => :'String',
|
252
274
|
:'vat_registration_number' => :'String',
|
@@ -263,6 +285,9 @@ class Sender
|
|
263
285
|
:'onboarding_status' => :'String',
|
264
286
|
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
265
287
|
:'external_id' => :'String',
|
288
|
+
:'city_of_birth' => :'String',
|
289
|
+
:'country_of_birth' => :'String',
|
290
|
+
:'gender' => :'String',
|
266
291
|
:'created_at' => :'String'
|
267
292
|
}
|
268
293
|
end
|
@@ -338,6 +363,10 @@ class Sender
|
|
338
363
|
self.identification_type = attributes[:'identification_type']
|
339
364
|
end
|
340
365
|
|
366
|
+
if attributes.key?(:'lang')
|
367
|
+
self.lang = attributes[:'lang']
|
368
|
+
end
|
369
|
+
|
341
370
|
if attributes.key?(:'name')
|
342
371
|
self.name = attributes[:'name']
|
343
372
|
end
|
@@ -386,8 +415,12 @@ class Sender
|
|
386
415
|
self.source_of_funds = attributes[:'source_of_funds']
|
387
416
|
end
|
388
417
|
|
389
|
-
if attributes.key?(:'
|
390
|
-
self.
|
418
|
+
if attributes.key?(:'custom_source_of_funds')
|
419
|
+
self.custom_source_of_funds = attributes[:'custom_source_of_funds']
|
420
|
+
end
|
421
|
+
|
422
|
+
if attributes.key?(:'core_business_activity')
|
423
|
+
self.core_business_activity = attributes[:'core_business_activity']
|
391
424
|
end
|
392
425
|
|
393
426
|
if attributes.key?(:'purpose_of_opening_account')
|
@@ -460,6 +493,18 @@ class Sender
|
|
460
493
|
self.external_id = attributes[:'external_id']
|
461
494
|
end
|
462
495
|
|
496
|
+
if attributes.key?(:'city_of_birth')
|
497
|
+
self.city_of_birth = attributes[:'city_of_birth']
|
498
|
+
end
|
499
|
+
|
500
|
+
if attributes.key?(:'country_of_birth')
|
501
|
+
self.country_of_birth = attributes[:'country_of_birth']
|
502
|
+
end
|
503
|
+
|
504
|
+
if attributes.key?(:'gender')
|
505
|
+
self.gender = attributes[:'gender']
|
506
|
+
end
|
507
|
+
|
463
508
|
if attributes.key?(:'created_at')
|
464
509
|
self.created_at = attributes[:'created_at']
|
465
510
|
end
|
@@ -520,7 +565,11 @@ class Sender
|
|
520
565
|
return false unless identification_type_validator.valid?(@identification_type)
|
521
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"])
|
522
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)
|
523
570
|
return false if @documents.nil?
|
571
|
+
gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
572
|
+
return false unless gender_validator.valid?(@gender)
|
524
573
|
true
|
525
574
|
end
|
526
575
|
|
@@ -554,6 +603,26 @@ class Sender
|
|
554
603
|
@legal_entity_type = legal_entity_type
|
555
604
|
end
|
556
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
|
+
|
616
|
+
# Custom attribute writer method checking allowed values (enum).
|
617
|
+
# @param [Object] gender Object to be assigned
|
618
|
+
def gender=(gender)
|
619
|
+
validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
620
|
+
unless validator.valid?(gender) || gender.empty?
|
621
|
+
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
622
|
+
end
|
623
|
+
@gender = gender
|
624
|
+
end
|
625
|
+
|
557
626
|
# Checks equality by comparing each attribute.
|
558
627
|
# @param [Object] Object to be compared
|
559
628
|
def ==(o)
|
@@ -573,6 +642,7 @@ class Sender
|
|
573
642
|
address_description == o.address_description &&
|
574
643
|
identification_number == o.identification_number &&
|
575
644
|
identification_type == o.identification_type &&
|
645
|
+
lang == o.lang &&
|
576
646
|
name == o.name &&
|
577
647
|
first_name == o.first_name &&
|
578
648
|
middle_name == o.middle_name &&
|
@@ -585,7 +655,8 @@ class Sender
|
|
585
655
|
registration_number == o.registration_number &&
|
586
656
|
nature_of_business == o.nature_of_business &&
|
587
657
|
source_of_funds == o.source_of_funds &&
|
588
|
-
|
658
|
+
custom_source_of_funds == o.custom_source_of_funds &&
|
659
|
+
core_business_activity == o.core_business_activity &&
|
589
660
|
purpose_of_opening_account == o.purpose_of_opening_account &&
|
590
661
|
office_phone == o.office_phone &&
|
591
662
|
vat_registration_number == o.vat_registration_number &&
|
@@ -602,6 +673,9 @@ class Sender
|
|
602
673
|
onboarding_status == o.onboarding_status &&
|
603
674
|
politically_exposed_people == o.politically_exposed_people &&
|
604
675
|
external_id == o.external_id &&
|
676
|
+
city_of_birth == o.city_of_birth &&
|
677
|
+
country_of_birth == o.country_of_birth &&
|
678
|
+
gender == o.gender &&
|
605
679
|
created_at == o.created_at
|
606
680
|
end
|
607
681
|
|
@@ -614,7 +688,7 @@ class Sender
|
|
614
688
|
# Calculates hash code according to all attributes.
|
615
689
|
# @return [Integer] Hash code
|
616
690
|
def hash
|
617
|
-
[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,
|
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
|
618
692
|
end
|
619
693
|
|
620
694
|
require 'active_support/core_ext/hash'
|