transferzero-sdk 1.0.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -11
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationApi.md +4 -4
- data/docs/AccountValidationRequest.md +6 -4
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyInfoApi.md +20 -6
- data/docs/CurrencyOpposite.md +4 -2
- data/docs/Debit.md +2 -2
- data/docs/Document.md +4 -0
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethod.md +4 -4
- data/docs/PayinMethodDetails.md +7 -3
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PayinMethodDetailsNGNBank.md +4 -2
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +12 -4
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsNGNBank.md +1 -1
- data/docs/PayoutMethodDetailsXOFBank.md +25 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +5 -3
- data/docs/RecipientsApi.md +3 -3
- data/docs/Sender.md +63 -27
- data/docs/Transaction.md +5 -5
- data/docs/TransactionTraits.md +2 -2
- data/docs/TransactionsApi.md +64 -0
- data/example/client.rb +14 -14
- data/git_push.sh +1 -1
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
- data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
- data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
- data/lib/transferzero-sdk/api_client.rb +5 -5
- 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 +142 -141
- data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
- 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 -155
- data/lib/transferzero-sdk/models/debit.rb +151 -155
- 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 +181 -160
- 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 -105
- 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 -65
- 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 +338 -288
- 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 -108
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- 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 +272 -0
- data/lib/transferzero-sdk/models/recipient.rb +230 -219
- 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 +529 -322
- 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 -23
- 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 -27
- 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/api/account_validation_api_spec.rb +2 -2
- data/spec/api/currency_info_api_spec.rb +2 -0
- data/spec/api/documents_api_spec.rb +15 -0
- data/spec/api/recipients_api_spec.rb +1 -1
- data/spec/api/transactions_api_spec.rb +13 -0
- data/spec/models/account_validation_request_spec.rb +7 -1
- data/spec/models/currency_opposite_spec.rb +6 -0
- data/spec/models/document_spec.rb +12 -0
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
- data/spec/models/payin_method_details_spec.rb +6 -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_spec.rb +7 -1
- data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- data/spec/models/recipient_spec.rb +6 -0
- data/spec/models/sender_spec.rb +16 -0
- data/transferzero-sdk.gemspec +2 -2
- metadata +35 -24
- data/spec/api_client_spec.rb +0 -189
|
@@ -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,404 +13,610 @@ 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\", \"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
|
-
|
|
82
|
+
# The registration date (used only with a Business sender)
|
|
83
|
+
attr_accessor :registration_date
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
# The registration number (used only with a Business sender)
|
|
86
|
+
attr_accessor :registration_number
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
# Nature of business options (used only with a Business sender)
|
|
89
|
+
attr_accessor :nature_of_business
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
# The source of funds
|
|
92
|
+
attr_accessor :source_of_funds
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
attr_reader :allowable_values
|
|
94
|
+
# The core activities (used only with a Business sender)
|
|
95
|
+
attr_accessor :core_business_activities
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
# The purpose for opening their account (used only with a Business sender)
|
|
98
|
+
attr_accessor :purpose_of_opening_account
|
|
99
|
+
|
|
100
|
+
# The official phone number (used only with a Business sender)
|
|
101
|
+
attr_accessor :office_phone
|
|
102
|
+
|
|
103
|
+
# The VAT registration number (used only with a Business sender)
|
|
104
|
+
attr_accessor :vat_registration_number
|
|
105
|
+
|
|
106
|
+
# The Financial Regulator (used only with a Business sender)
|
|
107
|
+
attr_accessor :financial_regulator
|
|
108
|
+
|
|
109
|
+
# The Regulatory Licence Number (used only with a Business sender)
|
|
110
|
+
attr_accessor :regulatory_licence_number
|
|
111
|
+
|
|
112
|
+
# The contact's email address (used only with a Business sender)
|
|
113
|
+
attr_accessor :contact_person_email
|
|
114
|
+
|
|
115
|
+
# The Business trading country (used only with a Business sender)
|
|
116
|
+
attr_accessor :trading_country
|
|
117
|
+
|
|
118
|
+
# The Business trading address (used only with a Business sender)
|
|
119
|
+
attr_accessor :trading_address
|
|
120
|
+
|
|
121
|
+
# The estimated number of monthly transactions (used only with a Business sender)
|
|
122
|
+
attr_accessor :number_monthly_transactions
|
|
123
|
+
|
|
124
|
+
# The estimated amount for all transactions each month in USD (used only with a Business sender)
|
|
125
|
+
attr_accessor :amount_monthly_transactions
|
|
126
|
+
|
|
127
|
+
# 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\" } ] ```
|
|
128
|
+
attr_accessor :documents
|
|
129
|
+
|
|
130
|
+
# 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.
|
|
131
|
+
attr_accessor :metadata
|
|
132
|
+
|
|
133
|
+
# The fields that have some problems and don't pass validation
|
|
134
|
+
attr_accessor :errors
|
|
135
|
+
|
|
136
|
+
# The onboarding status of the sender
|
|
137
|
+
attr_accessor :onboarding_status
|
|
138
|
+
|
|
139
|
+
# 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\" } } ```
|
|
140
|
+
attr_accessor :politically_exposed_people
|
|
141
|
+
|
|
142
|
+
# Optional ID that is supplied by partner linking it to the partner's own Sender ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not.
|
|
143
|
+
attr_accessor :external_id
|
|
144
|
+
|
|
145
|
+
# Date and time of sender was created
|
|
146
|
+
attr_accessor :created_at
|
|
147
|
+
|
|
148
|
+
class EnumAttributeValidator
|
|
149
|
+
attr_reader :datatype
|
|
150
|
+
attr_reader :allowable_values
|
|
151
|
+
|
|
152
|
+
def initialize(datatype, allowable_values)
|
|
153
|
+
@allowable_values = allowable_values.map do |value|
|
|
154
|
+
case datatype.to_s
|
|
155
|
+
when /Integer/i
|
|
156
|
+
value.to_i
|
|
157
|
+
when /Float/i
|
|
158
|
+
value.to_f
|
|
159
|
+
else
|
|
160
|
+
value
|
|
108
161
|
end
|
|
109
162
|
end
|
|
163
|
+
end
|
|
110
164
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
end
|
|
165
|
+
def valid?(value)
|
|
166
|
+
!value || allowable_values.include?(value)
|
|
114
167
|
end
|
|
168
|
+
end
|
|
115
169
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
:'city' => :'String',
|
|
166
|
-
:'street' => :'String',
|
|
167
|
-
:'address_description' => :'String',
|
|
168
|
-
:'postal_code' => :'String',
|
|
169
|
-
:'birth_date' => :'Date',
|
|
170
|
-
:'ip' => :'String',
|
|
171
|
-
:'documents' => :'Array<Document>',
|
|
172
|
-
:'metadata' => :'Object',
|
|
173
|
-
:'state' => :'SenderState',
|
|
174
|
-
:'id' => :'String',
|
|
175
|
-
:'external_id' => :'String',
|
|
176
|
-
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
|
|
177
|
-
}
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
# Initializes the object
|
|
181
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
-
def initialize(attributes = {})
|
|
183
|
-
if (!attributes.is_a?(Hash))
|
|
184
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
|
185
|
-
end
|
|
170
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
171
|
+
def self.attribute_map
|
|
172
|
+
{
|
|
173
|
+
:'id' => :'id',
|
|
174
|
+
:'type' => :'type',
|
|
175
|
+
:'state' => :'state',
|
|
176
|
+
:'country' => :'country',
|
|
177
|
+
:'street' => :'street',
|
|
178
|
+
:'postal_code' => :'postal_code',
|
|
179
|
+
:'city' => :'city',
|
|
180
|
+
:'phone_country' => :'phone_country',
|
|
181
|
+
:'phone_number' => :'phone_number',
|
|
182
|
+
:'email' => :'email',
|
|
183
|
+
:'ip' => :'ip',
|
|
184
|
+
:'address_description' => :'address_description',
|
|
185
|
+
:'identification_number' => :'identification_number',
|
|
186
|
+
:'identification_type' => :'identification_type',
|
|
187
|
+
:'name' => :'name',
|
|
188
|
+
:'first_name' => :'first_name',
|
|
189
|
+
:'middle_name' => :'middle_name',
|
|
190
|
+
:'last_name' => :'last_name',
|
|
191
|
+
:'birth_date' => :'birth_date',
|
|
192
|
+
:'occupation' => :'occupation',
|
|
193
|
+
:'nationality' => :'nationality',
|
|
194
|
+
:'legal_entity_type' => :'legal_entity_type',
|
|
195
|
+
:'registration_date' => :'registration_date',
|
|
196
|
+
:'registration_number' => :'registration_number',
|
|
197
|
+
:'nature_of_business' => :'nature_of_business',
|
|
198
|
+
:'source_of_funds' => :'source_of_funds',
|
|
199
|
+
:'core_business_activities' => :'core_business_activities',
|
|
200
|
+
:'purpose_of_opening_account' => :'purpose_of_opening_account',
|
|
201
|
+
:'office_phone' => :'office_phone',
|
|
202
|
+
:'vat_registration_number' => :'vat_registration_number',
|
|
203
|
+
:'financial_regulator' => :'financial_regulator',
|
|
204
|
+
:'regulatory_licence_number' => :'regulatory_licence_number',
|
|
205
|
+
:'contact_person_email' => :'contact_person_email',
|
|
206
|
+
:'trading_country' => :'trading_country',
|
|
207
|
+
:'trading_address' => :'trading_address',
|
|
208
|
+
:'number_monthly_transactions' => :'number_monthly_transactions',
|
|
209
|
+
:'amount_monthly_transactions' => :'amount_monthly_transactions',
|
|
210
|
+
:'documents' => :'documents',
|
|
211
|
+
:'metadata' => :'metadata',
|
|
212
|
+
:'errors' => :'errors',
|
|
213
|
+
:'onboarding_status' => :'onboarding_status',
|
|
214
|
+
:'politically_exposed_people' => :'politically_exposed_people',
|
|
215
|
+
:'external_id' => :'external_id',
|
|
216
|
+
:'created_at' => :'created_at'
|
|
217
|
+
}
|
|
218
|
+
end
|
|
186
219
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
220
|
+
# Attribute type mapping.
|
|
221
|
+
def self.openapi_types
|
|
222
|
+
{
|
|
223
|
+
:'id' => :'String',
|
|
224
|
+
:'type' => :'String',
|
|
225
|
+
:'state' => :'SenderState',
|
|
226
|
+
:'country' => :'String',
|
|
227
|
+
:'street' => :'String',
|
|
228
|
+
:'postal_code' => :'String',
|
|
229
|
+
:'city' => :'String',
|
|
230
|
+
:'phone_country' => :'String',
|
|
231
|
+
:'phone_number' => :'String',
|
|
232
|
+
:'email' => :'String',
|
|
233
|
+
:'ip' => :'String',
|
|
234
|
+
:'address_description' => :'String',
|
|
235
|
+
:'identification_number' => :'String',
|
|
236
|
+
:'identification_type' => :'String',
|
|
237
|
+
:'name' => :'String',
|
|
238
|
+
:'first_name' => :'String',
|
|
239
|
+
:'middle_name' => :'String',
|
|
240
|
+
:'last_name' => :'String',
|
|
241
|
+
:'birth_date' => :'Date',
|
|
242
|
+
:'occupation' => :'String',
|
|
243
|
+
:'nationality' => :'String',
|
|
244
|
+
:'legal_entity_type' => :'String',
|
|
245
|
+
:'registration_date' => :'String',
|
|
246
|
+
:'registration_number' => :'String',
|
|
247
|
+
:'nature_of_business' => :'String',
|
|
248
|
+
:'source_of_funds' => :'String',
|
|
249
|
+
:'core_business_activities' => :'String',
|
|
250
|
+
:'purpose_of_opening_account' => :'String',
|
|
251
|
+
:'office_phone' => :'String',
|
|
252
|
+
:'vat_registration_number' => :'String',
|
|
253
|
+
:'financial_regulator' => :'String',
|
|
254
|
+
:'regulatory_licence_number' => :'String',
|
|
255
|
+
:'contact_person_email' => :'String',
|
|
256
|
+
:'trading_country' => :'String',
|
|
257
|
+
:'trading_address' => :'String',
|
|
258
|
+
:'number_monthly_transactions' => :'String',
|
|
259
|
+
:'amount_monthly_transactions' => :'String',
|
|
260
|
+
:'documents' => :'Array<Document>',
|
|
261
|
+
:'metadata' => :'Object',
|
|
262
|
+
:'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
|
|
263
|
+
:'onboarding_status' => :'String',
|
|
264
|
+
:'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
|
|
265
|
+
:'external_id' => :'String',
|
|
266
|
+
:'created_at' => :'String'
|
|
267
|
+
}
|
|
268
|
+
end
|
|
194
269
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
270
|
+
# Initializes the object
|
|
271
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
272
|
+
def initialize(attributes = {})
|
|
273
|
+
if (!attributes.is_a?(Hash))
|
|
274
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
|
|
275
|
+
end
|
|
198
276
|
|
|
199
|
-
|
|
200
|
-
|
|
277
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
278
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
279
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
280
|
+
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
|
|
201
281
|
end
|
|
282
|
+
h[k.to_sym] = v
|
|
283
|
+
}
|
|
202
284
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
285
|
+
if attributes.key?(:'id')
|
|
286
|
+
self.id = attributes[:'id']
|
|
287
|
+
end
|
|
206
288
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
289
|
+
if attributes.key?(:'type')
|
|
290
|
+
self.type = attributes[:'type']
|
|
291
|
+
end
|
|
210
292
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
293
|
+
if attributes.key?(:'state')
|
|
294
|
+
self.state = attributes[:'state']
|
|
295
|
+
end
|
|
214
296
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
297
|
+
if attributes.key?(:'country')
|
|
298
|
+
self.country = attributes[:'country']
|
|
299
|
+
end
|
|
218
300
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
301
|
+
if attributes.key?(:'street')
|
|
302
|
+
self.street = attributes[:'street']
|
|
303
|
+
end
|
|
222
304
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
305
|
+
if attributes.key?(:'postal_code')
|
|
306
|
+
self.postal_code = attributes[:'postal_code']
|
|
307
|
+
end
|
|
226
308
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
309
|
+
if attributes.key?(:'city')
|
|
310
|
+
self.city = attributes[:'city']
|
|
311
|
+
end
|
|
230
312
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
313
|
+
if attributes.key?(:'phone_country')
|
|
314
|
+
self.phone_country = attributes[:'phone_country']
|
|
315
|
+
end
|
|
234
316
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
317
|
+
if attributes.key?(:'phone_number')
|
|
318
|
+
self.phone_number = attributes[:'phone_number']
|
|
319
|
+
end
|
|
238
320
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
321
|
+
if attributes.key?(:'email')
|
|
322
|
+
self.email = attributes[:'email']
|
|
323
|
+
end
|
|
242
324
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
325
|
+
if attributes.key?(:'ip')
|
|
326
|
+
self.ip = attributes[:'ip']
|
|
327
|
+
end
|
|
246
328
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
329
|
+
if attributes.key?(:'address_description')
|
|
330
|
+
self.address_description = attributes[:'address_description']
|
|
331
|
+
end
|
|
250
332
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
333
|
+
if attributes.key?(:'identification_number')
|
|
334
|
+
self.identification_number = attributes[:'identification_number']
|
|
335
|
+
end
|
|
254
336
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
337
|
+
if attributes.key?(:'identification_type')
|
|
338
|
+
self.identification_type = attributes[:'identification_type']
|
|
339
|
+
end
|
|
258
340
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
341
|
+
if attributes.key?(:'name')
|
|
342
|
+
self.name = attributes[:'name']
|
|
343
|
+
end
|
|
262
344
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
345
|
+
if attributes.key?(:'first_name')
|
|
346
|
+
self.first_name = attributes[:'first_name']
|
|
347
|
+
end
|
|
266
348
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
349
|
+
if attributes.key?(:'middle_name')
|
|
350
|
+
self.middle_name = attributes[:'middle_name']
|
|
351
|
+
end
|
|
270
352
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
353
|
+
if attributes.key?(:'last_name')
|
|
354
|
+
self.last_name = attributes[:'last_name']
|
|
355
|
+
end
|
|
274
356
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
end
|
|
279
|
-
end
|
|
357
|
+
if attributes.key?(:'birth_date')
|
|
358
|
+
self.birth_date = attributes[:'birth_date']
|
|
359
|
+
end
|
|
280
360
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
361
|
+
if attributes.key?(:'occupation')
|
|
362
|
+
self.occupation = attributes[:'occupation']
|
|
363
|
+
end
|
|
284
364
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
365
|
+
if attributes.key?(:'nationality')
|
|
366
|
+
self.nationality = attributes[:'nationality']
|
|
367
|
+
end
|
|
288
368
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
369
|
+
if attributes.key?(:'legal_entity_type')
|
|
370
|
+
self.legal_entity_type = attributes[:'legal_entity_type']
|
|
371
|
+
end
|
|
292
372
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
373
|
+
if attributes.key?(:'registration_date')
|
|
374
|
+
self.registration_date = attributes[:'registration_date']
|
|
375
|
+
end
|
|
296
376
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
self.errors = value
|
|
300
|
-
end
|
|
301
|
-
end
|
|
377
|
+
if attributes.key?(:'registration_number')
|
|
378
|
+
self.registration_number = attributes[:'registration_number']
|
|
302
379
|
end
|
|
303
380
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
invalid_properties = Array.new
|
|
308
|
-
if @country.nil?
|
|
309
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
310
|
-
end
|
|
381
|
+
if attributes.key?(:'nature_of_business')
|
|
382
|
+
self.nature_of_business = attributes[:'nature_of_business']
|
|
383
|
+
end
|
|
311
384
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
385
|
+
if attributes.key?(:'source_of_funds')
|
|
386
|
+
self.source_of_funds = attributes[:'source_of_funds']
|
|
387
|
+
end
|
|
315
388
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
389
|
+
if attributes.key?(:'core_business_activities')
|
|
390
|
+
self.core_business_activities = attributes[:'core_business_activities']
|
|
391
|
+
end
|
|
319
392
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
393
|
+
if attributes.key?(:'purpose_of_opening_account')
|
|
394
|
+
self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
|
|
395
|
+
end
|
|
323
396
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
397
|
+
if attributes.key?(:'office_phone')
|
|
398
|
+
self.office_phone = attributes[:'office_phone']
|
|
399
|
+
end
|
|
327
400
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
401
|
+
if attributes.key?(:'vat_registration_number')
|
|
402
|
+
self.vat_registration_number = attributes[:'vat_registration_number']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'financial_regulator')
|
|
406
|
+
self.financial_regulator = attributes[:'financial_regulator']
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if attributes.key?(:'regulatory_licence_number')
|
|
410
|
+
self.regulatory_licence_number = attributes[:'regulatory_licence_number']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'contact_person_email')
|
|
414
|
+
self.contact_person_email = attributes[:'contact_person_email']
|
|
415
|
+
end
|
|
331
416
|
|
|
332
|
-
|
|
333
|
-
|
|
417
|
+
if attributes.key?(:'trading_country')
|
|
418
|
+
self.trading_country = attributes[:'trading_country']
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if attributes.key?(:'trading_address')
|
|
422
|
+
self.trading_address = attributes[:'trading_address']
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'number_monthly_transactions')
|
|
426
|
+
self.number_monthly_transactions = attributes[:'number_monthly_transactions']
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
if attributes.key?(:'amount_monthly_transactions')
|
|
430
|
+
self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
if attributes.key?(:'documents')
|
|
434
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
|
435
|
+
self.documents = value
|
|
334
436
|
end
|
|
437
|
+
end
|
|
335
438
|
|
|
336
|
-
|
|
337
|
-
|
|
439
|
+
if attributes.key?(:'metadata')
|
|
440
|
+
self.metadata = attributes[:'metadata']
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
if attributes.key?(:'errors')
|
|
444
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
|
445
|
+
self.errors = value
|
|
338
446
|
end
|
|
447
|
+
end
|
|
339
448
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
# Check to see if the all the properties in the model are valid
|
|
344
|
-
# @return true if the model is valid
|
|
345
|
-
def valid?
|
|
346
|
-
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
347
|
-
return false unless type_validator.valid?(@type)
|
|
348
|
-
return false if @country.nil?
|
|
349
|
-
return false if @phone_country.nil?
|
|
350
|
-
return false if @email.nil?
|
|
351
|
-
return false if @city.nil?
|
|
352
|
-
return false if @street.nil?
|
|
353
|
-
return false if @postal_code.nil?
|
|
354
|
-
return false if @ip.nil?
|
|
355
|
-
return false if @documents.nil?
|
|
356
|
-
true
|
|
449
|
+
if attributes.key?(:'onboarding_status')
|
|
450
|
+
self.onboarding_status = attributes[:'onboarding_status']
|
|
357
451
|
end
|
|
358
452
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
363
|
-
unless validator.valid?(type)
|
|
364
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
453
|
+
if attributes.key?(:'politically_exposed_people')
|
|
454
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
|
455
|
+
self.politically_exposed_people = value
|
|
365
456
|
end
|
|
366
|
-
@type = type
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
# Checks equality by comparing each attribute.
|
|
370
|
-
# @param [Object] Object to be compared
|
|
371
|
-
def ==(o)
|
|
372
|
-
return true if self.equal?(o)
|
|
373
|
-
self.class == o.class &&
|
|
374
|
-
type == o.type &&
|
|
375
|
-
country == o.country &&
|
|
376
|
-
phone_country == o.phone_country &&
|
|
377
|
-
phone_number == o.phone_number &&
|
|
378
|
-
email == o.email &&
|
|
379
|
-
first_name == o.first_name &&
|
|
380
|
-
middle_name == o.middle_name &&
|
|
381
|
-
last_name == o.last_name &&
|
|
382
|
-
occupation == o.occupation &&
|
|
383
|
-
nationality == o.nationality &&
|
|
384
|
-
onboarding_status == o.onboarding_status &&
|
|
385
|
-
address == o.address &&
|
|
386
|
-
description == o.description &&
|
|
387
|
-
name == o.name &&
|
|
388
|
-
city == o.city &&
|
|
389
|
-
street == o.street &&
|
|
390
|
-
address_description == o.address_description &&
|
|
391
|
-
postal_code == o.postal_code &&
|
|
392
|
-
birth_date == o.birth_date &&
|
|
393
|
-
ip == o.ip &&
|
|
394
|
-
documents == o.documents &&
|
|
395
|
-
metadata == o.metadata &&
|
|
396
|
-
state == o.state &&
|
|
397
|
-
id == o.id &&
|
|
398
|
-
external_id == o.external_id &&
|
|
399
|
-
errors == o.errors
|
|
400
|
-
end
|
|
401
|
-
|
|
402
|
-
# @see the `==` method
|
|
403
|
-
# @param [Object] Object to be compared
|
|
404
|
-
def eql?(o)
|
|
405
|
-
self == o
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
# Calculates hash code according to all attributes.
|
|
409
|
-
# @return [Integer] Hash code
|
|
410
|
-
def hash
|
|
411
|
-
[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, documents, metadata, state, id, external_id, errors].hash
|
|
412
457
|
end
|
|
413
458
|
|
|
459
|
+
if attributes.key?(:'external_id')
|
|
460
|
+
self.external_id = attributes[:'external_id']
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
if attributes.key?(:'created_at')
|
|
464
|
+
self.created_at = attributes[:'created_at']
|
|
465
|
+
end
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
469
|
+
# @return Array for valid properties with the reasons
|
|
470
|
+
def list_invalid_properties
|
|
471
|
+
invalid_properties = Array.new
|
|
472
|
+
if @country.nil?
|
|
473
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
if @street.nil?
|
|
477
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
if @postal_code.nil?
|
|
481
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if @city.nil?
|
|
485
|
+
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
if @phone_country.nil?
|
|
489
|
+
invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
if @email.nil?
|
|
493
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
if @ip.nil?
|
|
497
|
+
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
if @documents.nil?
|
|
501
|
+
invalid_properties.push('invalid value for "documents", documents cannot be nil.')
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
invalid_properties
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Check to see if the all the properties in the model are valid
|
|
508
|
+
# @return true if the model is valid
|
|
509
|
+
def valid?
|
|
510
|
+
type_validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
511
|
+
return false unless type_validator.valid?(@type)
|
|
512
|
+
return false if @country.nil?
|
|
513
|
+
return false if @street.nil?
|
|
514
|
+
return false if @postal_code.nil?
|
|
515
|
+
return false if @city.nil?
|
|
516
|
+
return false if @phone_country.nil?
|
|
517
|
+
return false if @email.nil?
|
|
518
|
+
return false if @ip.nil?
|
|
519
|
+
identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
520
|
+
return false unless identification_type_validator.valid?(@identification_type)
|
|
521
|
+
legal_entity_type_validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
|
|
522
|
+
return false unless legal_entity_type_validator.valid?(@legal_entity_type)
|
|
523
|
+
return false if @documents.nil?
|
|
524
|
+
true
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
528
|
+
# @param [Object] type Object to be assigned
|
|
529
|
+
def type=(type)
|
|
530
|
+
validator = EnumAttributeValidator.new('String', ["person", "business"])
|
|
531
|
+
unless validator.valid?(type) || type.empty?
|
|
532
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
533
|
+
end
|
|
534
|
+
@type = type
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
538
|
+
# @param [Object] identification_type Object to be assigned
|
|
539
|
+
def identification_type=(identification_type)
|
|
540
|
+
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
|
541
|
+
unless validator.valid?(identification_type) || identification_type.empty?
|
|
542
|
+
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
|
543
|
+
end
|
|
544
|
+
@identification_type = identification_type
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
548
|
+
# @param [Object] legal_entity_type Object to be assigned
|
|
549
|
+
def legal_entity_type=(legal_entity_type)
|
|
550
|
+
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"])
|
|
551
|
+
unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
|
|
552
|
+
fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
|
|
553
|
+
end
|
|
554
|
+
@legal_entity_type = legal_entity_type
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Checks equality by comparing each attribute.
|
|
558
|
+
# @param [Object] Object to be compared
|
|
559
|
+
def ==(o)
|
|
560
|
+
return true if self.equal?(o)
|
|
561
|
+
self.class == o.class &&
|
|
562
|
+
id == o.id &&
|
|
563
|
+
type == o.type &&
|
|
564
|
+
state == o.state &&
|
|
565
|
+
country == o.country &&
|
|
566
|
+
street == o.street &&
|
|
567
|
+
postal_code == o.postal_code &&
|
|
568
|
+
city == o.city &&
|
|
569
|
+
phone_country == o.phone_country &&
|
|
570
|
+
phone_number == o.phone_number &&
|
|
571
|
+
email == o.email &&
|
|
572
|
+
ip == o.ip &&
|
|
573
|
+
address_description == o.address_description &&
|
|
574
|
+
identification_number == o.identification_number &&
|
|
575
|
+
identification_type == o.identification_type &&
|
|
576
|
+
name == o.name &&
|
|
577
|
+
first_name == o.first_name &&
|
|
578
|
+
middle_name == o.middle_name &&
|
|
579
|
+
last_name == o.last_name &&
|
|
580
|
+
birth_date == o.birth_date &&
|
|
581
|
+
occupation == o.occupation &&
|
|
582
|
+
nationality == o.nationality &&
|
|
583
|
+
legal_entity_type == o.legal_entity_type &&
|
|
584
|
+
registration_date == o.registration_date &&
|
|
585
|
+
registration_number == o.registration_number &&
|
|
586
|
+
nature_of_business == o.nature_of_business &&
|
|
587
|
+
source_of_funds == o.source_of_funds &&
|
|
588
|
+
core_business_activities == o.core_business_activities &&
|
|
589
|
+
purpose_of_opening_account == o.purpose_of_opening_account &&
|
|
590
|
+
office_phone == o.office_phone &&
|
|
591
|
+
vat_registration_number == o.vat_registration_number &&
|
|
592
|
+
financial_regulator == o.financial_regulator &&
|
|
593
|
+
regulatory_licence_number == o.regulatory_licence_number &&
|
|
594
|
+
contact_person_email == o.contact_person_email &&
|
|
595
|
+
trading_country == o.trading_country &&
|
|
596
|
+
trading_address == o.trading_address &&
|
|
597
|
+
number_monthly_transactions == o.number_monthly_transactions &&
|
|
598
|
+
amount_monthly_transactions == o.amount_monthly_transactions &&
|
|
599
|
+
documents == o.documents &&
|
|
600
|
+
metadata == o.metadata &&
|
|
601
|
+
errors == o.errors &&
|
|
602
|
+
onboarding_status == o.onboarding_status &&
|
|
603
|
+
politically_exposed_people == o.politically_exposed_people &&
|
|
604
|
+
external_id == o.external_id &&
|
|
605
|
+
created_at == o.created_at
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
# @see the `==` method
|
|
609
|
+
# @param [Object] Object to be compared
|
|
610
|
+
def eql?(o)
|
|
611
|
+
self == o
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Calculates hash code according to all attributes.
|
|
615
|
+
# @return [Integer] Hash code
|
|
616
|
+
def hash
|
|
617
|
+
[id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, core_business_activities, 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, created_at].hash
|
|
618
|
+
end
|
|
619
|
+
|
|
414
620
|
require 'active_support/core_ext/hash'
|
|
415
621
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
416
622
|
# Builds the object from hash
|
|
@@ -525,5 +731,6 @@ def _to_hash(value)
|
|
|
525
731
|
end
|
|
526
732
|
end
|
|
527
733
|
|
|
528
|
-
|
|
734
|
+
end
|
|
735
|
+
|
|
529
736
|
end
|