transferzero-sdk 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/docs/AccountMeta.md +1 -1
- data/docs/Currency.md +1 -3
- data/docs/CurrencyExchange.md +1 -3
- data/docs/CurrencyOpposite.md +4 -4
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +2 -74
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethodDetails.md +3 -1
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- 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/PayoutMethodDetailsZARBank.md +35 -0
- data/docs/Recipient.md +4 -4
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +71 -33
- data/lib/transferzero-sdk.rb +4 -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 +86 -85
- 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 +14 -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 +123 -123
- 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 +573 -358
- 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
- metadata +28 -12
@@ -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,448 +13,662 @@ 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 { \"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)
|
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
|
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)
|
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
|
-
|
91
|
-
|
88
|
+
# Nature of business options (used only with a Business sender)
|
89
|
+
attr_accessor :nature_of_business
|
92
90
|
|
93
|
-
|
91
|
+
# The source of funds
|
92
|
+
attr_accessor :source_of_funds
|
94
93
|
|
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
|
-
|
100
|
+
# The purpose for opening their account (used only with a Business sender)
|
101
|
+
attr_accessor :purpose_of_opening_account
|
102
102
|
|
103
|
-
|
104
|
-
|
105
|
-
attr_reader :allowable_values
|
103
|
+
# The official phone number (used only with a Business sender)
|
104
|
+
attr_accessor :office_phone
|
106
105
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
117
173
|
end
|
118
174
|
end
|
175
|
+
end
|
119
176
|
|
120
|
-
|
121
|
-
|
122
|
-
end
|
177
|
+
def valid?(value)
|
178
|
+
!value || allowable_values.include?(value)
|
123
179
|
end
|
180
|
+
end
|
124
181
|
|
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
|
-
|
176
|
-
|
177
|
-
|
178
|
-
:'street' => :'String',
|
179
|
-
:'address_description' => :'String',
|
180
|
-
:'postal_code' => :'String',
|
181
|
-
:'birth_date' => :'Date',
|
182
|
-
:'ip' => :'String',
|
183
|
-
:'identification_number' => :'String',
|
184
|
-
:'identification_type' => :'String',
|
185
|
-
:'documents' => :'Array<Document>',
|
186
|
-
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
187
|
-
:'metadata' => :'Object',
|
188
|
-
:'state' => :'SenderState',
|
189
|
-
:'id' => :'String',
|
190
|
-
:'external_id' => :'String',
|
191
|
-
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
192
|
-
}
|
193
|
-
end
|
194
|
-
|
195
|
-
# Initializes the object
|
196
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
-
def initialize(attributes = {})
|
198
|
-
if (!attributes.is_a?(Hash))
|
199
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
200
|
-
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
|
201
235
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
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' => :'String',
|
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
|
209
289
|
|
210
|
-
|
211
|
-
|
212
|
-
|
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
|
213
296
|
|
214
|
-
|
215
|
-
|
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
|
216
301
|
end
|
302
|
+
h[k.to_sym] = v
|
303
|
+
}
|
217
304
|
|
218
|
-
|
219
|
-
|
220
|
-
|
305
|
+
if attributes.key?(:'id')
|
306
|
+
self.id = attributes[:'id']
|
307
|
+
end
|
221
308
|
|
222
|
-
|
223
|
-
|
224
|
-
|
309
|
+
if attributes.key?(:'type')
|
310
|
+
self.type = attributes[:'type']
|
311
|
+
end
|
225
312
|
|
226
|
-
|
227
|
-
|
228
|
-
|
313
|
+
if attributes.key?(:'state')
|
314
|
+
self.state = attributes[:'state']
|
315
|
+
end
|
229
316
|
|
230
|
-
|
231
|
-
|
232
|
-
|
317
|
+
if attributes.key?(:'country')
|
318
|
+
self.country = attributes[:'country']
|
319
|
+
end
|
233
320
|
|
234
|
-
|
235
|
-
|
236
|
-
|
321
|
+
if attributes.key?(:'street')
|
322
|
+
self.street = attributes[:'street']
|
323
|
+
end
|
237
324
|
|
238
|
-
|
239
|
-
|
240
|
-
|
325
|
+
if attributes.key?(:'postal_code')
|
326
|
+
self.postal_code = attributes[:'postal_code']
|
327
|
+
end
|
241
328
|
|
242
|
-
|
243
|
-
|
244
|
-
|
329
|
+
if attributes.key?(:'city')
|
330
|
+
self.city = attributes[:'city']
|
331
|
+
end
|
245
332
|
|
246
|
-
|
247
|
-
|
248
|
-
|
333
|
+
if attributes.key?(:'phone_country')
|
334
|
+
self.phone_country = attributes[:'phone_country']
|
335
|
+
end
|
249
336
|
|
250
|
-
|
251
|
-
|
252
|
-
|
337
|
+
if attributes.key?(:'phone_number')
|
338
|
+
self.phone_number = attributes[:'phone_number']
|
339
|
+
end
|
253
340
|
|
254
|
-
|
255
|
-
|
256
|
-
|
341
|
+
if attributes.key?(:'email')
|
342
|
+
self.email = attributes[:'email']
|
343
|
+
end
|
257
344
|
|
258
|
-
|
259
|
-
|
260
|
-
|
345
|
+
if attributes.key?(:'ip')
|
346
|
+
self.ip = attributes[:'ip']
|
347
|
+
end
|
261
348
|
|
262
|
-
|
263
|
-
|
264
|
-
|
349
|
+
if attributes.key?(:'address_description')
|
350
|
+
self.address_description = attributes[:'address_description']
|
351
|
+
end
|
265
352
|
|
266
|
-
|
267
|
-
|
268
|
-
|
353
|
+
if attributes.key?(:'identification_number')
|
354
|
+
self.identification_number = attributes[:'identification_number']
|
355
|
+
end
|
269
356
|
|
270
|
-
|
271
|
-
|
272
|
-
|
357
|
+
if attributes.key?(:'identification_type')
|
358
|
+
self.identification_type = attributes[:'identification_type']
|
359
|
+
end
|
273
360
|
|
274
|
-
|
275
|
-
|
276
|
-
|
361
|
+
if attributes.key?(:'name')
|
362
|
+
self.name = attributes[:'name']
|
363
|
+
end
|
277
364
|
|
278
|
-
|
279
|
-
|
280
|
-
|
365
|
+
if attributes.key?(:'first_name')
|
366
|
+
self.first_name = attributes[:'first_name']
|
367
|
+
end
|
281
368
|
|
282
|
-
|
283
|
-
|
284
|
-
|
369
|
+
if attributes.key?(:'middle_name')
|
370
|
+
self.middle_name = attributes[:'middle_name']
|
371
|
+
end
|
285
372
|
|
286
|
-
|
287
|
-
|
288
|
-
|
373
|
+
if attributes.key?(:'last_name')
|
374
|
+
self.last_name = attributes[:'last_name']
|
375
|
+
end
|
289
376
|
|
290
|
-
|
291
|
-
|
292
|
-
|
377
|
+
if attributes.key?(:'birth_date')
|
378
|
+
self.birth_date = attributes[:'birth_date']
|
379
|
+
end
|
293
380
|
|
294
|
-
|
295
|
-
|
296
|
-
|
381
|
+
if attributes.key?(:'occupation')
|
382
|
+
self.occupation = attributes[:'occupation']
|
383
|
+
end
|
297
384
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
end
|
302
|
-
end
|
385
|
+
if attributes.key?(:'nationality')
|
386
|
+
self.nationality = attributes[:'nationality']
|
387
|
+
end
|
303
388
|
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
end
|
308
|
-
end
|
389
|
+
if attributes.key?(:'legal_entity_type')
|
390
|
+
self.legal_entity_type = attributes[:'legal_entity_type']
|
391
|
+
end
|
309
392
|
|
310
|
-
|
311
|
-
|
312
|
-
|
393
|
+
if attributes.key?(:'registration_date')
|
394
|
+
self.registration_date = attributes[:'registration_date']
|
395
|
+
end
|
313
396
|
|
314
|
-
|
315
|
-
|
316
|
-
|
397
|
+
if attributes.key?(:'registration_number')
|
398
|
+
self.registration_number = attributes[:'registration_number']
|
399
|
+
end
|
317
400
|
|
318
|
-
|
319
|
-
|
320
|
-
|
401
|
+
if attributes.key?(:'nature_of_business')
|
402
|
+
self.nature_of_business = attributes[:'nature_of_business']
|
403
|
+
end
|
321
404
|
|
322
|
-
|
323
|
-
|
324
|
-
|
405
|
+
if attributes.key?(:'source_of_funds')
|
406
|
+
self.source_of_funds = attributes[:'source_of_funds']
|
407
|
+
end
|
325
408
|
|
326
|
-
|
327
|
-
|
328
|
-
self.errors = value
|
329
|
-
end
|
330
|
-
end
|
409
|
+
if attributes.key?(:'custom_source_of_funds')
|
410
|
+
self.custom_source_of_funds = attributes[:'custom_source_of_funds']
|
331
411
|
end
|
332
412
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
invalid_properties = Array.new
|
337
|
-
if @country.nil?
|
338
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
339
|
-
end
|
413
|
+
if attributes.key?(:'core_business_activity')
|
414
|
+
self.core_business_activity = attributes[:'core_business_activity']
|
415
|
+
end
|
340
416
|
|
341
|
-
|
342
|
-
|
343
|
-
|
417
|
+
if attributes.key?(:'purpose_of_opening_account')
|
418
|
+
self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
|
419
|
+
end
|
344
420
|
|
345
|
-
|
346
|
-
|
347
|
-
|
421
|
+
if attributes.key?(:'office_phone')
|
422
|
+
self.office_phone = attributes[:'office_phone']
|
423
|
+
end
|
348
424
|
|
349
|
-
|
350
|
-
|
351
|
-
|
425
|
+
if attributes.key?(:'vat_registration_number')
|
426
|
+
self.vat_registration_number = attributes[:'vat_registration_number']
|
427
|
+
end
|
352
428
|
|
353
|
-
|
354
|
-
|
355
|
-
|
429
|
+
if attributes.key?(:'financial_regulator')
|
430
|
+
self.financial_regulator = attributes[:'financial_regulator']
|
431
|
+
end
|
356
432
|
|
357
|
-
|
358
|
-
|
359
|
-
|
433
|
+
if attributes.key?(:'regulatory_licence_number')
|
434
|
+
self.regulatory_licence_number = attributes[:'regulatory_licence_number']
|
435
|
+
end
|
360
436
|
|
361
|
-
|
362
|
-
|
363
|
-
|
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
|
364
448
|
|
365
|
-
|
366
|
-
|
449
|
+
if attributes.key?(:'number_monthly_transactions')
|
450
|
+
self.number_monthly_transactions = attributes[:'number_monthly_transactions']
|
451
|
+
end
|
452
|
+
|
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
|
367
460
|
end
|
461
|
+
end
|
368
462
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
# Check to see if the all the properties in the model are valid
|
373
|
-
# @return true if the model is valid
|
374
|
-
def valid?
|
375
|
-
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
376
|
-
return false unless type_validator.valid?(@type)
|
377
|
-
return false if @country.nil?
|
378
|
-
return false if @phone_country.nil?
|
379
|
-
return false if @email.nil?
|
380
|
-
return false if @city.nil?
|
381
|
-
return false if @street.nil?
|
382
|
-
return false if @postal_code.nil?
|
383
|
-
return false if @ip.nil?
|
384
|
-
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
385
|
-
return false unless identification_type_validator.valid?(@identification_type)
|
386
|
-
return false if @documents.nil?
|
387
|
-
true
|
463
|
+
if attributes.key?(:'metadata')
|
464
|
+
self.metadata = attributes[:'metadata']
|
388
465
|
end
|
389
466
|
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
394
|
-
unless validator.valid?(type)
|
395
|
-
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
|
396
470
|
end
|
397
|
-
@type = type
|
398
471
|
end
|
399
472
|
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
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
|
406
480
|
end
|
407
|
-
@identification_type = identification_type
|
408
|
-
end
|
409
|
-
|
410
|
-
# Checks equality by comparing each attribute.
|
411
|
-
# @param [Object] Object to be compared
|
412
|
-
def ==(o)
|
413
|
-
return true if self.equal?(o)
|
414
|
-
self.class == o.class &&
|
415
|
-
type == o.type &&
|
416
|
-
country == o.country &&
|
417
|
-
phone_country == o.phone_country &&
|
418
|
-
phone_number == o.phone_number &&
|
419
|
-
email == o.email &&
|
420
|
-
first_name == o.first_name &&
|
421
|
-
middle_name == o.middle_name &&
|
422
|
-
last_name == o.last_name &&
|
423
|
-
occupation == o.occupation &&
|
424
|
-
nationality == o.nationality &&
|
425
|
-
onboarding_status == o.onboarding_status &&
|
426
|
-
address == o.address &&
|
427
|
-
description == o.description &&
|
428
|
-
name == o.name &&
|
429
|
-
city == o.city &&
|
430
|
-
street == o.street &&
|
431
|
-
address_description == o.address_description &&
|
432
|
-
postal_code == o.postal_code &&
|
433
|
-
birth_date == o.birth_date &&
|
434
|
-
ip == o.ip &&
|
435
|
-
identification_number == o.identification_number &&
|
436
|
-
identification_type == o.identification_type &&
|
437
|
-
documents == o.documents &&
|
438
|
-
politically_exposed_people == o.politically_exposed_people &&
|
439
|
-
metadata == o.metadata &&
|
440
|
-
state == o.state &&
|
441
|
-
id == o.id &&
|
442
|
-
external_id == o.external_id &&
|
443
|
-
errors == o.errors
|
444
|
-
end
|
445
|
-
|
446
|
-
# @see the `==` method
|
447
|
-
# @param [Object] Object to be compared
|
448
|
-
def eql?(o)
|
449
|
-
self == o
|
450
|
-
end
|
451
|
-
|
452
|
-
# Calculates hash code according to all attributes.
|
453
|
-
# @return [Integer] Hash code
|
454
|
-
def hash
|
455
|
-
[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, politically_exposed_people, metadata, state, id, external_id, errors].hash
|
456
481
|
end
|
457
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
|
+
return false if @documents.nil?
|
560
|
+
gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
561
|
+
return false unless gender_validator.valid?(@gender)
|
562
|
+
true
|
563
|
+
end
|
564
|
+
|
565
|
+
# Custom attribute writer method checking allowed values (enum).
|
566
|
+
# @param [Object] type Object to be assigned
|
567
|
+
def type=(type)
|
568
|
+
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
569
|
+
unless validator.valid?(type) || type.empty?
|
570
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
571
|
+
end
|
572
|
+
@type = type
|
573
|
+
end
|
574
|
+
|
575
|
+
# Custom attribute writer method checking allowed values (enum).
|
576
|
+
# @param [Object] identification_type Object to be assigned
|
577
|
+
def identification_type=(identification_type)
|
578
|
+
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
579
|
+
unless validator.valid?(identification_type) || identification_type.empty?
|
580
|
+
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
581
|
+
end
|
582
|
+
@identification_type = identification_type
|
583
|
+
end
|
584
|
+
|
585
|
+
# Custom attribute writer method checking allowed values (enum).
|
586
|
+
# @param [Object] legal_entity_type Object to be assigned
|
587
|
+
def legal_entity_type=(legal_entity_type)
|
588
|
+
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"])
|
589
|
+
unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
|
590
|
+
fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
|
591
|
+
end
|
592
|
+
@legal_entity_type = legal_entity_type
|
593
|
+
end
|
594
|
+
|
595
|
+
# Custom attribute writer method checking allowed values (enum).
|
596
|
+
# @param [Object] gender Object to be assigned
|
597
|
+
def gender=(gender)
|
598
|
+
validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
|
599
|
+
unless validator.valid?(gender) || gender.empty?
|
600
|
+
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
601
|
+
end
|
602
|
+
@gender = gender
|
603
|
+
end
|
604
|
+
|
605
|
+
# Checks equality by comparing each attribute.
|
606
|
+
# @param [Object] Object to be compared
|
607
|
+
def ==(o)
|
608
|
+
return true if self.equal?(o)
|
609
|
+
self.class == o.class &&
|
610
|
+
id == o.id &&
|
611
|
+
type == o.type &&
|
612
|
+
state == o.state &&
|
613
|
+
country == o.country &&
|
614
|
+
street == o.street &&
|
615
|
+
postal_code == o.postal_code &&
|
616
|
+
city == o.city &&
|
617
|
+
phone_country == o.phone_country &&
|
618
|
+
phone_number == o.phone_number &&
|
619
|
+
email == o.email &&
|
620
|
+
ip == o.ip &&
|
621
|
+
address_description == o.address_description &&
|
622
|
+
identification_number == o.identification_number &&
|
623
|
+
identification_type == o.identification_type &&
|
624
|
+
name == o.name &&
|
625
|
+
first_name == o.first_name &&
|
626
|
+
middle_name == o.middle_name &&
|
627
|
+
last_name == o.last_name &&
|
628
|
+
birth_date == o.birth_date &&
|
629
|
+
occupation == o.occupation &&
|
630
|
+
nationality == o.nationality &&
|
631
|
+
legal_entity_type == o.legal_entity_type &&
|
632
|
+
registration_date == o.registration_date &&
|
633
|
+
registration_number == o.registration_number &&
|
634
|
+
nature_of_business == o.nature_of_business &&
|
635
|
+
source_of_funds == o.source_of_funds &&
|
636
|
+
custom_source_of_funds == o.custom_source_of_funds &&
|
637
|
+
core_business_activity == o.core_business_activity &&
|
638
|
+
purpose_of_opening_account == o.purpose_of_opening_account &&
|
639
|
+
office_phone == o.office_phone &&
|
640
|
+
vat_registration_number == o.vat_registration_number &&
|
641
|
+
financial_regulator == o.financial_regulator &&
|
642
|
+
regulatory_licence_number == o.regulatory_licence_number &&
|
643
|
+
contact_person_email == o.contact_person_email &&
|
644
|
+
trading_country == o.trading_country &&
|
645
|
+
trading_address == o.trading_address &&
|
646
|
+
number_monthly_transactions == o.number_monthly_transactions &&
|
647
|
+
amount_monthly_transactions == o.amount_monthly_transactions &&
|
648
|
+
documents == o.documents &&
|
649
|
+
metadata == o.metadata &&
|
650
|
+
errors == o.errors &&
|
651
|
+
onboarding_status == o.onboarding_status &&
|
652
|
+
politically_exposed_people == o.politically_exposed_people &&
|
653
|
+
external_id == o.external_id &&
|
654
|
+
city_of_birth == o.city_of_birth &&
|
655
|
+
country_of_birth == o.country_of_birth &&
|
656
|
+
gender == o.gender &&
|
657
|
+
created_at == o.created_at
|
658
|
+
end
|
659
|
+
|
660
|
+
# @see the `==` method
|
661
|
+
# @param [Object] Object to be compared
|
662
|
+
def eql?(o)
|
663
|
+
self == o
|
664
|
+
end
|
665
|
+
|
666
|
+
# Calculates hash code according to all attributes.
|
667
|
+
# @return [Integer] Hash code
|
668
|
+
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
|
670
|
+
end
|
671
|
+
|
458
672
|
require 'active_support/core_ext/hash'
|
459
673
|
require 'active_support/hash_with_indifferent_access.rb'
|
460
674
|
# Builds the object from hash
|
@@ -569,5 +783,6 @@ def _to_hash(value)
|
|
569
783
|
end
|
570
784
|
end
|
571
785
|
|
572
|
-
|
786
|
+
end
|
787
|
+
|
573
788
|
end
|