transferzero-sdk 1.5.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/Currency.md +0 -2
- data/docs/CurrencyExchange.md +0 -2
- data/docs/CurrencyOpposite.md +3 -3
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +17 -1
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsMobile.md +3 -1
- data/docs/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +1 -1
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +72 -32
- data/docs/Transaction.md +3 -3
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/documents_api.rb +0 -63
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
- data/lib/transferzero-sdk/api_client.rb +5 -3
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +133 -142
- data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
- data/lib/transferzero-sdk/models/debit.rb +151 -150
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +179 -177
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -110
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_details.rb +398 -297
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +272 -0
- data/lib/transferzero-sdk/models/recipient.rb +230 -229
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +587 -348
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -24
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payout_method_details_btc_spec.rb +59 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- metadata +32 -13
- data/transferzero-sdk-1.4.0.gem +0 -0
@@ -13,118 +13,118 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
# Attribute type mapping.
|
35
|
-
def self.openapi_types
|
36
|
-
{
|
37
|
-
:'webhook' => :'String',
|
38
|
-
:'event' => :'String',
|
39
|
-
:'object' => :'Recipient'
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
# List of class defined in allOf (OpenAPI v3)
|
44
|
-
def self.openapi_all_of
|
45
|
-
[
|
46
|
-
:'Webhook'
|
47
|
-
]
|
48
|
-
end
|
49
|
-
|
50
|
-
# Initializes the object
|
51
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
-
def initialize(attributes = {})
|
53
|
-
if (!attributes.is_a?(Hash))
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::RecipientWebhook` initialize method"
|
55
|
-
end
|
56
|
-
|
57
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::RecipientWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
-
end
|
62
|
-
h[k.to_sym] = v
|
63
|
-
}
|
16
|
+
class RecipientWebhook
|
17
|
+
# The ID of the webhook that was used to send out this callback
|
18
|
+
attr_accessor :webhook
|
19
|
+
|
20
|
+
# The event that triggered this webhook
|
21
|
+
attr_accessor :event
|
22
|
+
|
23
|
+
attr_accessor :object
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'webhook' => :'webhook',
|
29
|
+
:'event' => :'event',
|
30
|
+
:'object' => :'object'
|
31
|
+
}
|
32
|
+
end
|
64
33
|
|
65
|
-
|
66
|
-
|
67
|
-
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'webhook' => :'String',
|
38
|
+
:'event' => :'String',
|
39
|
+
:'object' => :'Recipient'
|
40
|
+
}
|
41
|
+
end
|
68
42
|
|
69
|
-
|
70
|
-
|
71
|
-
|
43
|
+
# List of class defined in allOf (OpenAPI v3)
|
44
|
+
def self.openapi_all_of
|
45
|
+
[
|
46
|
+
:'Webhook'
|
47
|
+
]
|
48
|
+
end
|
72
49
|
|
73
|
-
|
74
|
-
|
75
|
-
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::RecipientWebhook` initialize method"
|
76
55
|
end
|
77
56
|
|
78
|
-
#
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
if @webhook.nil?
|
83
|
-
invalid_properties.push('invalid value for "webhook", webhook cannot be nil.')
|
84
|
-
end
|
85
|
-
|
86
|
-
if @event.nil?
|
87
|
-
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::RecipientWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
61
|
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
89
64
|
|
90
|
-
|
91
|
-
|
92
|
-
|
65
|
+
if attributes.key?(:'webhook')
|
66
|
+
self.webhook = attributes[:'webhook']
|
67
|
+
end
|
93
68
|
|
94
|
-
|
69
|
+
if attributes.key?(:'event')
|
70
|
+
self.event = attributes[:'event']
|
95
71
|
end
|
96
72
|
|
97
|
-
|
98
|
-
|
99
|
-
def valid?
|
100
|
-
return false if @webhook.nil?
|
101
|
-
return false if @event.nil?
|
102
|
-
return false if @object.nil?
|
103
|
-
true
|
73
|
+
if attributes.key?(:'object')
|
74
|
+
self.object = attributes[:'object']
|
104
75
|
end
|
76
|
+
end
|
105
77
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
event == o.event &&
|
113
|
-
object == o.object
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @webhook.nil?
|
83
|
+
invalid_properties.push('invalid value for "webhook", webhook cannot be nil.')
|
114
84
|
end
|
115
85
|
|
116
|
-
|
117
|
-
|
118
|
-
def eql?(o)
|
119
|
-
self == o
|
86
|
+
if @event.nil?
|
87
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
120
88
|
end
|
121
89
|
|
122
|
-
|
123
|
-
|
124
|
-
def hash
|
125
|
-
[webhook, event, object].hash
|
90
|
+
if @object.nil?
|
91
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
126
92
|
end
|
127
93
|
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
return false if @webhook.nil?
|
101
|
+
return false if @event.nil?
|
102
|
+
return false if @object.nil?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
webhook == o.webhook &&
|
112
|
+
event == o.event &&
|
113
|
+
object == o.object
|
114
|
+
end
|
115
|
+
|
116
|
+
# @see the `==` method
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
def hash
|
125
|
+
[webhook, event, object].hash
|
126
|
+
end
|
127
|
+
|
128
128
|
require 'active_support/core_ext/hash'
|
129
129
|
require 'active_support/hash_with_indifferent_access.rb'
|
130
130
|
# Builds the object from hash
|
@@ -239,5 +239,6 @@ def _to_hash(value)
|
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
242
|
-
|
242
|
+
end
|
243
|
+
|
243
244
|
end
|
@@ -13,436 +13,674 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
attr_accessor :type
|
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
|
+
class Sender
|
18
|
+
attr_accessor :id
|
20
19
|
|
21
|
-
|
22
|
-
|
20
|
+
# Type of sender to create - either person or business (defaults to person)
|
21
|
+
attr_accessor :type
|
23
22
|
|
24
|
-
|
25
|
-
attr_accessor :phone_country
|
23
|
+
attr_accessor :state
|
26
24
|
|
27
|
-
|
28
|
-
|
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
|
+
attr_accessor :country
|
29
27
|
|
30
|
-
|
31
|
-
|
28
|
+
# Sender's street
|
29
|
+
attr_accessor :street
|
32
30
|
|
33
|
-
|
34
|
-
|
31
|
+
# Zip code of sender
|
32
|
+
attr_accessor :postal_code
|
35
33
|
|
36
|
-
|
37
|
-
|
34
|
+
# Sender's city
|
35
|
+
attr_accessor :city
|
38
36
|
|
39
|
-
|
40
|
-
|
37
|
+
# Phone country of sender in 2-character alpha ISO 3166-2 country format
|
38
|
+
attr_accessor :phone_country
|
41
39
|
|
42
|
-
|
43
|
-
|
40
|
+
# Phone number of sender (without country callcode)
|
41
|
+
attr_accessor :phone_number
|
44
42
|
|
45
|
-
|
46
|
-
|
43
|
+
# Email of sender
|
44
|
+
attr_accessor :email
|
47
45
|
|
48
|
-
|
49
|
-
|
46
|
+
# IP of sender
|
47
|
+
attr_accessor :ip
|
50
48
|
|
51
|
-
|
52
|
-
|
49
|
+
# Description of address
|
50
|
+
attr_accessor :address_description
|
53
51
|
|
54
|
-
|
55
|
-
|
52
|
+
# Identification number of document used
|
53
|
+
attr_accessor :identification_number
|
56
54
|
|
57
|
-
|
58
|
-
|
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
|
56
|
+
attr_accessor :identification_type
|
59
57
|
|
60
|
-
|
61
|
-
|
58
|
+
# Name of sender (used only with a Business sender)
|
59
|
+
attr_accessor :name
|
62
60
|
|
63
|
-
|
64
|
-
|
61
|
+
# First name of sender (used only with a Personal sender)
|
62
|
+
attr_accessor :first_name
|
65
63
|
|
66
|
-
|
67
|
-
|
64
|
+
# Middle name of sender (used only with a Personal sender)
|
65
|
+
attr_accessor :middle_name
|
68
66
|
|
69
|
-
|
70
|
-
|
67
|
+
# Last name of sender (used only with a Personal sender)
|
68
|
+
attr_accessor :last_name
|
71
69
|
|
72
|
-
|
73
|
-
|
70
|
+
# Date of birth of sender (used only with a Personal sender)
|
71
|
+
attr_accessor :birth_date
|
74
72
|
|
75
|
-
|
76
|
-
|
73
|
+
# Occupation of sender (used only with a Personal sender)
|
74
|
+
attr_accessor :occupation
|
77
75
|
|
78
|
-
|
79
|
-
|
76
|
+
# The nationality of the sender (used only with a Personal sender)
|
77
|
+
attr_accessor :nationality
|
80
78
|
|
81
|
-
|
82
|
-
|
79
|
+
# 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
|
+
attr_accessor :legal_entity_type
|
83
81
|
|
84
|
-
|
85
|
-
|
82
|
+
# The registration date (used only with a Business sender)
|
83
|
+
attr_accessor :registration_date
|
86
84
|
|
87
|
-
|
88
|
-
|
85
|
+
# The registration number (used only with a Business sender)
|
86
|
+
attr_accessor :registration_number
|
89
87
|
|
90
|
-
|
88
|
+
# 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
|
+
attr_accessor :nature_of_business
|
91
90
|
|
92
|
-
|
91
|
+
# The source of funds
|
92
|
+
attr_accessor :source_of_funds
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
# Custom source of funds
|
95
|
+
attr_accessor :custom_source_of_funds
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
# The core activity (used only with a Business sender)
|
98
|
+
attr_accessor :core_business_activity
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
attr_reader :allowable_values
|
100
|
+
# The purpose for opening their account (used only with a Business sender)
|
101
|
+
attr_accessor :purpose_of_opening_account
|
103
102
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
103
|
+
# The official phone number (used only with a Business sender)
|
104
|
+
attr_accessor :office_phone
|
105
|
+
|
106
|
+
# The VAT registration number (used only with a Business sender)
|
107
|
+
attr_accessor :vat_registration_number
|
108
|
+
|
109
|
+
# The Financial Regulator (used only with a Business sender)
|
110
|
+
attr_accessor :financial_regulator
|
111
|
+
|
112
|
+
# The Regulatory Licence Number (used only with a Business sender)
|
113
|
+
attr_accessor :regulatory_licence_number
|
114
|
+
|
115
|
+
# The contact's email address (used only with a Business sender)
|
116
|
+
attr_accessor :contact_person_email
|
117
|
+
|
118
|
+
# The Business trading country (used only with a Business sender)
|
119
|
+
attr_accessor :trading_country
|
120
|
+
|
121
|
+
# The Business trading address (used only with a Business sender)
|
122
|
+
attr_accessor :trading_address
|
123
|
+
|
124
|
+
# The estimated number of monthly transactions (used only with a Business sender)
|
125
|
+
attr_accessor :number_monthly_transactions
|
126
|
+
|
127
|
+
# The estimated amount for all transactions each month in USD (used only with a Business sender)
|
128
|
+
attr_accessor :amount_monthly_transactions
|
129
|
+
|
130
|
+
# Needed for KYC checks. Required to approve the sender unless KYC is waived for your account. Please send us an empty list of documents: `\"documents\": [ ]` in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. ```JSON \"documents\": [ { \"id\": \"b6648ba3-1c7b-4f59-8580-684899c84a07\" } ] ```
|
131
|
+
attr_accessor :documents
|
132
|
+
|
133
|
+
# Metadata of sender. You can store any detail specific to your integration here (for example the local ID of the sender on your end). When requesting sender details you will receive the sent metadata back. Also when sending sender related webhooks you will receive the details stored here as well.
|
134
|
+
attr_accessor :metadata
|
135
|
+
|
136
|
+
# The fields that have some problems and don't pass validation
|
137
|
+
attr_accessor :errors
|
138
|
+
|
139
|
+
# The onboarding status of the sender
|
140
|
+
attr_accessor :onboarding_status
|
141
|
+
|
142
|
+
# An optional list of politically exposed people, individuals who are or have been entrusted with prominent public functions by a country, for example heads of state or heads of government, senior politicians, senior government, judicial or military officials, senior executives of state owned corporations, important political party officials. There is a limit of three (3) politically exposed people per Sender. Politically exposed person example: ```json { \"politically_exposed_person\": { \"name\": \"Ronald Reagan\", \"position\": \"President of the United States\", \"started_date\": \"1981-01-20T00:00:00.000Z\", \"ended_date\": \"1989-01-20T00:00:00.000Z\", \"sender_id\": \"344fb668-196d-43db-9d94-b34b7e6c7e0b\" } } ```
|
143
|
+
attr_accessor :politically_exposed_people
|
144
|
+
|
145
|
+
# 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.
|
146
|
+
attr_accessor :external_id
|
147
|
+
|
148
|
+
# City of birth of sender
|
149
|
+
attr_accessor :city_of_birth
|
150
|
+
|
151
|
+
# Country of birth of sender in 2-character alpha ISO 3166-2 country format
|
152
|
+
attr_accessor :country_of_birth
|
153
|
+
|
154
|
+
# The gender of the sender: - `M`: Male - `F`: Female - `O`: Other
|
155
|
+
attr_accessor :gender
|
156
|
+
|
157
|
+
# Date and time of sender was created
|
158
|
+
attr_accessor :created_at
|
159
|
+
|
160
|
+
class EnumAttributeValidator
|
161
|
+
attr_reader :datatype
|
162
|
+
attr_reader :allowable_values
|
163
|
+
|
164
|
+
def initialize(datatype, allowable_values)
|
165
|
+
@allowable_values = allowable_values.map do |value|
|
166
|
+
case datatype.to_s
|
167
|
+
when /Integer/i
|
168
|
+
value.to_i
|
169
|
+
when /Float/i
|
170
|
+
value.to_f
|
171
|
+
else
|
172
|
+
value
|
114
173
|
end
|
115
174
|
end
|
175
|
+
end
|
116
176
|
|
117
|
-
|
118
|
-
|
119
|
-
end
|
177
|
+
def valid?(value)
|
178
|
+
!value || allowable_values.include?(value)
|
120
179
|
end
|
180
|
+
end
|
121
181
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
:'address_description' => :'String',
|
176
|
-
:'postal_code' => :'String',
|
177
|
-
:'birth_date' => :'Date',
|
178
|
-
:'ip' => :'String',
|
179
|
-
:'identification_number' => :'String',
|
180
|
-
:'identification_type' => :'String',
|
181
|
-
:'documents' => :'Array<Document>',
|
182
|
-
:'metadata' => :'Object',
|
183
|
-
:'state' => :'SenderState',
|
184
|
-
:'id' => :'String',
|
185
|
-
:'external_id' => :'String',
|
186
|
-
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
187
|
-
}
|
188
|
-
end
|
189
|
-
|
190
|
-
# Initializes the object
|
191
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
192
|
-
def initialize(attributes = {})
|
193
|
-
if (!attributes.is_a?(Hash))
|
194
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
195
|
-
end
|
182
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
183
|
+
def self.attribute_map
|
184
|
+
{
|
185
|
+
:'id' => :'id',
|
186
|
+
:'type' => :'type',
|
187
|
+
:'state' => :'state',
|
188
|
+
:'country' => :'country',
|
189
|
+
:'street' => :'street',
|
190
|
+
:'postal_code' => :'postal_code',
|
191
|
+
:'city' => :'city',
|
192
|
+
:'phone_country' => :'phone_country',
|
193
|
+
:'phone_number' => :'phone_number',
|
194
|
+
:'email' => :'email',
|
195
|
+
:'ip' => :'ip',
|
196
|
+
:'address_description' => :'address_description',
|
197
|
+
:'identification_number' => :'identification_number',
|
198
|
+
:'identification_type' => :'identification_type',
|
199
|
+
:'name' => :'name',
|
200
|
+
:'first_name' => :'first_name',
|
201
|
+
:'middle_name' => :'middle_name',
|
202
|
+
:'last_name' => :'last_name',
|
203
|
+
:'birth_date' => :'birth_date',
|
204
|
+
:'occupation' => :'occupation',
|
205
|
+
:'nationality' => :'nationality',
|
206
|
+
:'legal_entity_type' => :'legal_entity_type',
|
207
|
+
:'registration_date' => :'registration_date',
|
208
|
+
:'registration_number' => :'registration_number',
|
209
|
+
:'nature_of_business' => :'nature_of_business',
|
210
|
+
:'source_of_funds' => :'source_of_funds',
|
211
|
+
:'custom_source_of_funds' => :'custom_source_of_funds',
|
212
|
+
:'core_business_activity' => :'core_business_activity',
|
213
|
+
:'purpose_of_opening_account' => :'purpose_of_opening_account',
|
214
|
+
:'office_phone' => :'office_phone',
|
215
|
+
:'vat_registration_number' => :'vat_registration_number',
|
216
|
+
:'financial_regulator' => :'financial_regulator',
|
217
|
+
:'regulatory_licence_number' => :'regulatory_licence_number',
|
218
|
+
:'contact_person_email' => :'contact_person_email',
|
219
|
+
:'trading_country' => :'trading_country',
|
220
|
+
:'trading_address' => :'trading_address',
|
221
|
+
:'number_monthly_transactions' => :'number_monthly_transactions',
|
222
|
+
:'amount_monthly_transactions' => :'amount_monthly_transactions',
|
223
|
+
:'documents' => :'documents',
|
224
|
+
:'metadata' => :'metadata',
|
225
|
+
:'errors' => :'errors',
|
226
|
+
:'onboarding_status' => :'onboarding_status',
|
227
|
+
:'politically_exposed_people' => :'politically_exposed_people',
|
228
|
+
:'external_id' => :'external_id',
|
229
|
+
:'city_of_birth' => :'city_of_birth',
|
230
|
+
:'country_of_birth' => :'country_of_birth',
|
231
|
+
:'gender' => :'gender',
|
232
|
+
:'created_at' => :'created_at'
|
233
|
+
}
|
234
|
+
end
|
196
235
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
236
|
+
# Attribute type mapping.
|
237
|
+
def self.openapi_types
|
238
|
+
{
|
239
|
+
:'id' => :'String',
|
240
|
+
:'type' => :'String',
|
241
|
+
:'state' => :'SenderState',
|
242
|
+
:'country' => :'String',
|
243
|
+
:'street' => :'String',
|
244
|
+
:'postal_code' => :'String',
|
245
|
+
:'city' => :'String',
|
246
|
+
:'phone_country' => :'String',
|
247
|
+
:'phone_number' => :'String',
|
248
|
+
:'email' => :'String',
|
249
|
+
:'ip' => :'String',
|
250
|
+
:'address_description' => :'String',
|
251
|
+
:'identification_number' => :'String',
|
252
|
+
:'identification_type' => :'String',
|
253
|
+
:'name' => :'String',
|
254
|
+
:'first_name' => :'String',
|
255
|
+
:'middle_name' => :'String',
|
256
|
+
:'last_name' => :'String',
|
257
|
+
:'birth_date' => :'Date',
|
258
|
+
:'occupation' => :'String',
|
259
|
+
:'nationality' => :'String',
|
260
|
+
:'legal_entity_type' => :'String',
|
261
|
+
:'registration_date' => :'Date',
|
262
|
+
:'registration_number' => :'String',
|
263
|
+
:'nature_of_business' => :'String',
|
264
|
+
:'source_of_funds' => :'String',
|
265
|
+
:'custom_source_of_funds' => :'String',
|
266
|
+
:'core_business_activity' => :'String',
|
267
|
+
:'purpose_of_opening_account' => :'String',
|
268
|
+
:'office_phone' => :'String',
|
269
|
+
:'vat_registration_number' => :'String',
|
270
|
+
:'financial_regulator' => :'String',
|
271
|
+
:'regulatory_licence_number' => :'String',
|
272
|
+
:'contact_person_email' => :'String',
|
273
|
+
:'trading_country' => :'String',
|
274
|
+
:'trading_address' => :'String',
|
275
|
+
:'number_monthly_transactions' => :'String',
|
276
|
+
:'amount_monthly_transactions' => :'String',
|
277
|
+
:'documents' => :'Array<Document>',
|
278
|
+
:'metadata' => :'Object',
|
279
|
+
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
|
280
|
+
:'onboarding_status' => :'String',
|
281
|
+
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
282
|
+
:'external_id' => :'String',
|
283
|
+
:'city_of_birth' => :'String',
|
284
|
+
:'country_of_birth' => :'String',
|
285
|
+
:'gender' => :'String',
|
286
|
+
:'created_at' => :'String'
|
287
|
+
}
|
288
|
+
end
|
204
289
|
|
205
|
-
|
206
|
-
|
207
|
-
|
290
|
+
# Initializes the object
|
291
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
292
|
+
def initialize(attributes = {})
|
293
|
+
if (!attributes.is_a?(Hash))
|
294
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
295
|
+
end
|
208
296
|
|
209
|
-
|
210
|
-
|
297
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
298
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
299
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
300
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Sender`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
211
301
|
end
|
302
|
+
h[k.to_sym] = v
|
303
|
+
}
|
212
304
|
|
213
|
-
|
214
|
-
|
215
|
-
|
305
|
+
if attributes.key?(:'id')
|
306
|
+
self.id = attributes[:'id']
|
307
|
+
end
|
216
308
|
|
217
|
-
|
218
|
-
|
219
|
-
|
309
|
+
if attributes.key?(:'type')
|
310
|
+
self.type = attributes[:'type']
|
311
|
+
end
|
220
312
|
|
221
|
-
|
222
|
-
|
223
|
-
|
313
|
+
if attributes.key?(:'state')
|
314
|
+
self.state = attributes[:'state']
|
315
|
+
end
|
224
316
|
|
225
|
-
|
226
|
-
|
227
|
-
|
317
|
+
if attributes.key?(:'country')
|
318
|
+
self.country = attributes[:'country']
|
319
|
+
end
|
228
320
|
|
229
|
-
|
230
|
-
|
231
|
-
|
321
|
+
if attributes.key?(:'street')
|
322
|
+
self.street = attributes[:'street']
|
323
|
+
end
|
232
324
|
|
233
|
-
|
234
|
-
|
235
|
-
|
325
|
+
if attributes.key?(:'postal_code')
|
326
|
+
self.postal_code = attributes[:'postal_code']
|
327
|
+
end
|
236
328
|
|
237
|
-
|
238
|
-
|
239
|
-
|
329
|
+
if attributes.key?(:'city')
|
330
|
+
self.city = attributes[:'city']
|
331
|
+
end
|
240
332
|
|
241
|
-
|
242
|
-
|
243
|
-
|
333
|
+
if attributes.key?(:'phone_country')
|
334
|
+
self.phone_country = attributes[:'phone_country']
|
335
|
+
end
|
244
336
|
|
245
|
-
|
246
|
-
|
247
|
-
|
337
|
+
if attributes.key?(:'phone_number')
|
338
|
+
self.phone_number = attributes[:'phone_number']
|
339
|
+
end
|
248
340
|
|
249
|
-
|
250
|
-
|
251
|
-
|
341
|
+
if attributes.key?(:'email')
|
342
|
+
self.email = attributes[:'email']
|
343
|
+
end
|
252
344
|
|
253
|
-
|
254
|
-
|
255
|
-
|
345
|
+
if attributes.key?(:'ip')
|
346
|
+
self.ip = attributes[:'ip']
|
347
|
+
end
|
256
348
|
|
257
|
-
|
258
|
-
|
259
|
-
|
349
|
+
if attributes.key?(:'address_description')
|
350
|
+
self.address_description = attributes[:'address_description']
|
351
|
+
end
|
260
352
|
|
261
|
-
|
262
|
-
|
263
|
-
|
353
|
+
if attributes.key?(:'identification_number')
|
354
|
+
self.identification_number = attributes[:'identification_number']
|
355
|
+
end
|
264
356
|
|
265
|
-
|
266
|
-
|
267
|
-
|
357
|
+
if attributes.key?(:'identification_type')
|
358
|
+
self.identification_type = attributes[:'identification_type']
|
359
|
+
end
|
268
360
|
|
269
|
-
|
270
|
-
|
271
|
-
|
361
|
+
if attributes.key?(:'name')
|
362
|
+
self.name = attributes[:'name']
|
363
|
+
end
|
272
364
|
|
273
|
-
|
274
|
-
|
275
|
-
|
365
|
+
if attributes.key?(:'first_name')
|
366
|
+
self.first_name = attributes[:'first_name']
|
367
|
+
end
|
276
368
|
|
277
|
-
|
278
|
-
|
279
|
-
|
369
|
+
if attributes.key?(:'middle_name')
|
370
|
+
self.middle_name = attributes[:'middle_name']
|
371
|
+
end
|
280
372
|
|
281
|
-
|
282
|
-
|
283
|
-
|
373
|
+
if attributes.key?(:'last_name')
|
374
|
+
self.last_name = attributes[:'last_name']
|
375
|
+
end
|
284
376
|
|
285
|
-
|
286
|
-
|
287
|
-
|
377
|
+
if attributes.key?(:'birth_date')
|
378
|
+
self.birth_date = attributes[:'birth_date']
|
379
|
+
end
|
288
380
|
|
289
|
-
|
290
|
-
|
291
|
-
|
381
|
+
if attributes.key?(:'occupation')
|
382
|
+
self.occupation = attributes[:'occupation']
|
383
|
+
end
|
292
384
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
end
|
297
|
-
end
|
385
|
+
if attributes.key?(:'nationality')
|
386
|
+
self.nationality = attributes[:'nationality']
|
387
|
+
end
|
298
388
|
|
299
|
-
|
300
|
-
|
301
|
-
|
389
|
+
if attributes.key?(:'legal_entity_type')
|
390
|
+
self.legal_entity_type = attributes[:'legal_entity_type']
|
391
|
+
end
|
302
392
|
|
303
|
-
|
304
|
-
|
305
|
-
|
393
|
+
if attributes.key?(:'registration_date')
|
394
|
+
self.registration_date = attributes[:'registration_date']
|
395
|
+
end
|
306
396
|
|
307
|
-
|
308
|
-
|
309
|
-
|
397
|
+
if attributes.key?(:'registration_number')
|
398
|
+
self.registration_number = attributes[:'registration_number']
|
399
|
+
end
|
310
400
|
|
311
|
-
|
312
|
-
|
313
|
-
|
401
|
+
if attributes.key?(:'nature_of_business')
|
402
|
+
self.nature_of_business = attributes[:'nature_of_business']
|
403
|
+
end
|
314
404
|
|
315
|
-
|
316
|
-
|
317
|
-
self.errors = value
|
318
|
-
end
|
319
|
-
end
|
405
|
+
if attributes.key?(:'source_of_funds')
|
406
|
+
self.source_of_funds = attributes[:'source_of_funds']
|
320
407
|
end
|
321
408
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
invalid_properties = Array.new
|
326
|
-
if @country.nil?
|
327
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
328
|
-
end
|
409
|
+
if attributes.key?(:'custom_source_of_funds')
|
410
|
+
self.custom_source_of_funds = attributes[:'custom_source_of_funds']
|
411
|
+
end
|
329
412
|
|
330
|
-
|
331
|
-
|
332
|
-
|
413
|
+
if attributes.key?(:'core_business_activity')
|
414
|
+
self.core_business_activity = attributes[:'core_business_activity']
|
415
|
+
end
|
333
416
|
|
334
|
-
|
335
|
-
|
336
|
-
|
417
|
+
if attributes.key?(:'purpose_of_opening_account')
|
418
|
+
self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
|
419
|
+
end
|
337
420
|
|
338
|
-
|
339
|
-
|
340
|
-
|
421
|
+
if attributes.key?(:'office_phone')
|
422
|
+
self.office_phone = attributes[:'office_phone']
|
423
|
+
end
|
341
424
|
|
342
|
-
|
343
|
-
|
344
|
-
|
425
|
+
if attributes.key?(:'vat_registration_number')
|
426
|
+
self.vat_registration_number = attributes[:'vat_registration_number']
|
427
|
+
end
|
345
428
|
|
346
|
-
|
347
|
-
|
348
|
-
|
429
|
+
if attributes.key?(:'financial_regulator')
|
430
|
+
self.financial_regulator = attributes[:'financial_regulator']
|
431
|
+
end
|
349
432
|
|
350
|
-
|
351
|
-
|
352
|
-
|
433
|
+
if attributes.key?(:'regulatory_licence_number')
|
434
|
+
self.regulatory_licence_number = attributes[:'regulatory_licence_number']
|
435
|
+
end
|
436
|
+
|
437
|
+
if attributes.key?(:'contact_person_email')
|
438
|
+
self.contact_person_email = attributes[:'contact_person_email']
|
439
|
+
end
|
440
|
+
|
441
|
+
if attributes.key?(:'trading_country')
|
442
|
+
self.trading_country = attributes[:'trading_country']
|
443
|
+
end
|
444
|
+
|
445
|
+
if attributes.key?(:'trading_address')
|
446
|
+
self.trading_address = attributes[:'trading_address']
|
447
|
+
end
|
448
|
+
|
449
|
+
if attributes.key?(:'number_monthly_transactions')
|
450
|
+
self.number_monthly_transactions = attributes[:'number_monthly_transactions']
|
451
|
+
end
|
353
452
|
|
354
|
-
|
355
|
-
|
453
|
+
if attributes.key?(:'amount_monthly_transactions')
|
454
|
+
self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
|
455
|
+
end
|
456
|
+
|
457
|
+
if attributes.key?(:'documents')
|
458
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
459
|
+
self.documents = value
|
356
460
|
end
|
461
|
+
end
|
357
462
|
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
# Check to see if the all the properties in the model are valid
|
362
|
-
# @return true if the model is valid
|
363
|
-
def valid?
|
364
|
-
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
365
|
-
return false unless type_validator.valid?(@type)
|
366
|
-
return false if @country.nil?
|
367
|
-
return false if @phone_country.nil?
|
368
|
-
return false if @email.nil?
|
369
|
-
return false if @city.nil?
|
370
|
-
return false if @street.nil?
|
371
|
-
return false if @postal_code.nil?
|
372
|
-
return false if @ip.nil?
|
373
|
-
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
374
|
-
return false unless identification_type_validator.valid?(@identification_type)
|
375
|
-
return false if @documents.nil?
|
376
|
-
true
|
463
|
+
if attributes.key?(:'metadata')
|
464
|
+
self.metadata = attributes[:'metadata']
|
377
465
|
end
|
378
466
|
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
383
|
-
unless validator.valid?(type)
|
384
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
467
|
+
if attributes.key?(:'errors')
|
468
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
469
|
+
self.errors = value
|
385
470
|
end
|
386
|
-
@type = type
|
387
471
|
end
|
388
472
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
473
|
+
if attributes.key?(:'onboarding_status')
|
474
|
+
self.onboarding_status = attributes[:'onboarding_status']
|
475
|
+
end
|
476
|
+
|
477
|
+
if attributes.key?(:'politically_exposed_people')
|
478
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
479
|
+
self.politically_exposed_people = value
|
395
480
|
end
|
396
|
-
@identification_type = identification_type
|
397
|
-
end
|
398
|
-
|
399
|
-
# Checks equality by comparing each attribute.
|
400
|
-
# @param [Object] Object to be compared
|
401
|
-
def ==(o)
|
402
|
-
return true if self.equal?(o)
|
403
|
-
self.class == o.class &&
|
404
|
-
type == o.type &&
|
405
|
-
country == o.country &&
|
406
|
-
phone_country == o.phone_country &&
|
407
|
-
phone_number == o.phone_number &&
|
408
|
-
email == o.email &&
|
409
|
-
first_name == o.first_name &&
|
410
|
-
middle_name == o.middle_name &&
|
411
|
-
last_name == o.last_name &&
|
412
|
-
occupation == o.occupation &&
|
413
|
-
nationality == o.nationality &&
|
414
|
-
onboarding_status == o.onboarding_status &&
|
415
|
-
address == o.address &&
|
416
|
-
description == o.description &&
|
417
|
-
name == o.name &&
|
418
|
-
city == o.city &&
|
419
|
-
street == o.street &&
|
420
|
-
address_description == o.address_description &&
|
421
|
-
postal_code == o.postal_code &&
|
422
|
-
birth_date == o.birth_date &&
|
423
|
-
ip == o.ip &&
|
424
|
-
identification_number == o.identification_number &&
|
425
|
-
identification_type == o.identification_type &&
|
426
|
-
documents == o.documents &&
|
427
|
-
metadata == o.metadata &&
|
428
|
-
state == o.state &&
|
429
|
-
id == o.id &&
|
430
|
-
external_id == o.external_id &&
|
431
|
-
errors == o.errors
|
432
|
-
end
|
433
|
-
|
434
|
-
# @see the `==` method
|
435
|
-
# @param [Object] Object to be compared
|
436
|
-
def eql?(o)
|
437
|
-
self == o
|
438
|
-
end
|
439
|
-
|
440
|
-
# Calculates hash code according to all attributes.
|
441
|
-
# @return [Integer] Hash code
|
442
|
-
def hash
|
443
|
-
[type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, metadata, state, id, external_id, errors].hash
|
444
481
|
end
|
445
482
|
|
483
|
+
if attributes.key?(:'external_id')
|
484
|
+
self.external_id = attributes[:'external_id']
|
485
|
+
end
|
486
|
+
|
487
|
+
if attributes.key?(:'city_of_birth')
|
488
|
+
self.city_of_birth = attributes[:'city_of_birth']
|
489
|
+
end
|
490
|
+
|
491
|
+
if attributes.key?(:'country_of_birth')
|
492
|
+
self.country_of_birth = attributes[:'country_of_birth']
|
493
|
+
end
|
494
|
+
|
495
|
+
if attributes.key?(:'gender')
|
496
|
+
self.gender = attributes[:'gender']
|
497
|
+
end
|
498
|
+
|
499
|
+
if attributes.key?(:'created_at')
|
500
|
+
self.created_at = attributes[:'created_at']
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
505
|
+
# @return Array for valid properties with the reasons
|
506
|
+
def list_invalid_properties
|
507
|
+
invalid_properties = Array.new
|
508
|
+
if @country.nil?
|
509
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
510
|
+
end
|
511
|
+
|
512
|
+
if @street.nil?
|
513
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
514
|
+
end
|
515
|
+
|
516
|
+
if @postal_code.nil?
|
517
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
518
|
+
end
|
519
|
+
|
520
|
+
if @city.nil?
|
521
|
+
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
522
|
+
end
|
523
|
+
|
524
|
+
if @phone_country.nil?
|
525
|
+
invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
|
526
|
+
end
|
527
|
+
|
528
|
+
if @email.nil?
|
529
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
530
|
+
end
|
531
|
+
|
532
|
+
if @ip.nil?
|
533
|
+
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
534
|
+
end
|
535
|
+
|
536
|
+
if @documents.nil?
|
537
|
+
invalid_properties.push('invalid value for "documents", documents cannot be nil.')
|
538
|
+
end
|
539
|
+
|
540
|
+
invalid_properties
|
541
|
+
end
|
542
|
+
|
543
|
+
# Check to see if the all the properties in the model are valid
|
544
|
+
# @return true if the model is valid
|
545
|
+
def valid?
|
546
|
+
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
547
|
+
return false unless type_validator.valid?(@type)
|
548
|
+
return false if @country.nil?
|
549
|
+
return false if @street.nil?
|
550
|
+
return false if @postal_code.nil?
|
551
|
+
return false if @city.nil?
|
552
|
+
return false if @phone_country.nil?
|
553
|
+
return false if @email.nil?
|
554
|
+
return false if @ip.nil?
|
555
|
+
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
556
|
+
return false unless identification_type_validator.valid?(@identification_type)
|
557
|
+
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
|
+
return false unless legal_entity_type_validator.valid?(@legal_entity_type)
|
559
|
+
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"])
|
560
|
+
return false unless nature_of_business_validator.valid?(@nature_of_business)
|
561
|
+
return false if @documents.nil?
|
562
|
+
gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
563
|
+
return false unless gender_validator.valid?(@gender)
|
564
|
+
true
|
565
|
+
end
|
566
|
+
|
567
|
+
# Custom attribute writer method checking allowed values (enum).
|
568
|
+
# @param [Object] type Object to be assigned
|
569
|
+
def type=(type)
|
570
|
+
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
571
|
+
unless validator.valid?(type) || type.empty?
|
572
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
573
|
+
end
|
574
|
+
@type = type
|
575
|
+
end
|
576
|
+
|
577
|
+
# Custom attribute writer method checking allowed values (enum).
|
578
|
+
# @param [Object] identification_type Object to be assigned
|
579
|
+
def identification_type=(identification_type)
|
580
|
+
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
581
|
+
unless validator.valid?(identification_type) || identification_type.empty?
|
582
|
+
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
583
|
+
end
|
584
|
+
@identification_type = identification_type
|
585
|
+
end
|
586
|
+
|
587
|
+
# Custom attribute writer method checking allowed values (enum).
|
588
|
+
# @param [Object] legal_entity_type Object to be assigned
|
589
|
+
def legal_entity_type=(legal_entity_type)
|
590
|
+
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"])
|
591
|
+
unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
|
592
|
+
fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
|
593
|
+
end
|
594
|
+
@legal_entity_type = legal_entity_type
|
595
|
+
end
|
596
|
+
|
597
|
+
# Custom attribute writer method checking allowed values (enum).
|
598
|
+
# @param [Object] nature_of_business Object to be assigned
|
599
|
+
def nature_of_business=(nature_of_business)
|
600
|
+
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"])
|
601
|
+
unless validator.valid?(nature_of_business) || nature_of_business.empty?
|
602
|
+
fail ArgumentError, "invalid value for \"nature_of_business\", must be one of #{validator.allowable_values}."
|
603
|
+
end
|
604
|
+
@nature_of_business = nature_of_business
|
605
|
+
end
|
606
|
+
|
607
|
+
# Custom attribute writer method checking allowed values (enum).
|
608
|
+
# @param [Object] gender Object to be assigned
|
609
|
+
def gender=(gender)
|
610
|
+
validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
611
|
+
unless validator.valid?(gender) || gender.empty?
|
612
|
+
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
613
|
+
end
|
614
|
+
@gender = gender
|
615
|
+
end
|
616
|
+
|
617
|
+
# Checks equality by comparing each attribute.
|
618
|
+
# @param [Object] Object to be compared
|
619
|
+
def ==(o)
|
620
|
+
return true if self.equal?(o)
|
621
|
+
self.class == o.class &&
|
622
|
+
id == o.id &&
|
623
|
+
type == o.type &&
|
624
|
+
state == o.state &&
|
625
|
+
country == o.country &&
|
626
|
+
street == o.street &&
|
627
|
+
postal_code == o.postal_code &&
|
628
|
+
city == o.city &&
|
629
|
+
phone_country == o.phone_country &&
|
630
|
+
phone_number == o.phone_number &&
|
631
|
+
email == o.email &&
|
632
|
+
ip == o.ip &&
|
633
|
+
address_description == o.address_description &&
|
634
|
+
identification_number == o.identification_number &&
|
635
|
+
identification_type == o.identification_type &&
|
636
|
+
name == o.name &&
|
637
|
+
first_name == o.first_name &&
|
638
|
+
middle_name == o.middle_name &&
|
639
|
+
last_name == o.last_name &&
|
640
|
+
birth_date == o.birth_date &&
|
641
|
+
occupation == o.occupation &&
|
642
|
+
nationality == o.nationality &&
|
643
|
+
legal_entity_type == o.legal_entity_type &&
|
644
|
+
registration_date == o.registration_date &&
|
645
|
+
registration_number == o.registration_number &&
|
646
|
+
nature_of_business == o.nature_of_business &&
|
647
|
+
source_of_funds == o.source_of_funds &&
|
648
|
+
custom_source_of_funds == o.custom_source_of_funds &&
|
649
|
+
core_business_activity == o.core_business_activity &&
|
650
|
+
purpose_of_opening_account == o.purpose_of_opening_account &&
|
651
|
+
office_phone == o.office_phone &&
|
652
|
+
vat_registration_number == o.vat_registration_number &&
|
653
|
+
financial_regulator == o.financial_regulator &&
|
654
|
+
regulatory_licence_number == o.regulatory_licence_number &&
|
655
|
+
contact_person_email == o.contact_person_email &&
|
656
|
+
trading_country == o.trading_country &&
|
657
|
+
trading_address == o.trading_address &&
|
658
|
+
number_monthly_transactions == o.number_monthly_transactions &&
|
659
|
+
amount_monthly_transactions == o.amount_monthly_transactions &&
|
660
|
+
documents == o.documents &&
|
661
|
+
metadata == o.metadata &&
|
662
|
+
errors == o.errors &&
|
663
|
+
onboarding_status == o.onboarding_status &&
|
664
|
+
politically_exposed_people == o.politically_exposed_people &&
|
665
|
+
external_id == o.external_id &&
|
666
|
+
city_of_birth == o.city_of_birth &&
|
667
|
+
country_of_birth == o.country_of_birth &&
|
668
|
+
gender == o.gender &&
|
669
|
+
created_at == o.created_at
|
670
|
+
end
|
671
|
+
|
672
|
+
# @see the `==` method
|
673
|
+
# @param [Object] Object to be compared
|
674
|
+
def eql?(o)
|
675
|
+
self == o
|
676
|
+
end
|
677
|
+
|
678
|
+
# Calculates hash code according to all attributes.
|
679
|
+
# @return [Integer] Hash code
|
680
|
+
def hash
|
681
|
+
[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
|
682
|
+
end
|
683
|
+
|
446
684
|
require 'active_support/core_ext/hash'
|
447
685
|
require 'active_support/hash_with_indifferent_access.rb'
|
448
686
|
# Builds the object from hash
|
@@ -557,5 +795,6 @@ def _to_hash(value)
|
|
557
795
|
end
|
558
796
|
end
|
559
797
|
|
560
|
-
|
798
|
+
end
|
799
|
+
|
561
800
|
end
|