transferzero-sdk 1.7.0 → 1.8.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 +5 -7
- data/docs/AccountMeta.md +1 -1
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyOpposite.md +1 -1
- data/docs/Document.md +3 -3
- data/docs/DocumentsApi.md +74 -2
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethodDetails.md +1 -3
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethodDetails.md +1 -7
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/Recipient.md +4 -4
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +33 -63
- data/lib/transferzero-sdk.rb +0 -3
- data/lib/transferzero-sdk/api/documents_api.rb +63 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
- data/lib/transferzero-sdk/api_client.rb +3 -5
- data/lib/transferzero-sdk/models/account.rb +69 -70
- data/lib/transferzero-sdk/models/account_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/account_meta.rb +60 -61
- data/lib/transferzero-sdk/models/account_response.rb +65 -66
- data/lib/transferzero-sdk/models/account_validation_error.rb +60 -61
- data/lib/transferzero-sdk/models/account_validation_request.rb +163 -164
- data/lib/transferzero-sdk/models/account_validation_response.rb +65 -66
- data/lib/transferzero-sdk/models/account_validation_result.rb +60 -61
- data/lib/transferzero-sdk/models/api_log.rb +135 -136
- data/lib/transferzero-sdk/models/api_log_list_response.rb +69 -70
- data/lib/transferzero-sdk/models/api_log_response.rb +59 -60
- data/lib/transferzero-sdk/models/currency.rb +141 -142
- data/lib/transferzero-sdk/models/currency_exchange.rb +157 -158
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +61 -62
- data/lib/transferzero-sdk/models/currency_list_response.rb +61 -62
- data/lib/transferzero-sdk/models/currency_opposite.rb +165 -166
- data/lib/transferzero-sdk/models/debit.rb +150 -151
- data/lib/transferzero-sdk/models/debit_list_request.rb +60 -61
- data/lib/transferzero-sdk/models/debit_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/debit_request.rb +59 -60
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +79 -80
- data/lib/transferzero-sdk/models/debit_response.rb +59 -60
- data/lib/transferzero-sdk/models/document.rb +177 -179
- data/lib/transferzero-sdk/models/document_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/document_request.rb +59 -60
- data/lib/transferzero-sdk/models/document_response.rb +59 -60
- data/lib/transferzero-sdk/models/document_webhook.rb +95 -96
- data/lib/transferzero-sdk/models/error_status.rb +65 -66
- data/lib/transferzero-sdk/models/field_description.rb +94 -95
- data/lib/transferzero-sdk/models/field_select_validation.rb +69 -70
- data/lib/transferzero-sdk/models/field_validation.rb +77 -78
- data/lib/transferzero-sdk/models/pagination.rb +96 -97
- data/lib/transferzero-sdk/models/pagination_meta.rb +59 -60
- data/lib/transferzero-sdk/models/payin_method.rb +96 -97
- data/lib/transferzero-sdk/models/payin_method_details.rb +110 -122
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +74 -75
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +70 -71
- data/lib/transferzero-sdk/models/payin_method_request.rb +59 -60
- data/lib/transferzero-sdk/models/payment_method.rb +108 -109
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +60 -61
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +123 -124
- data/lib/transferzero-sdk/models/payout_method.rb +106 -107
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +19 -14
- data/lib/transferzero-sdk/models/payout_method_details.rb +297 -337
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +60 -61
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +96 -97
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +104 -100
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +161 -162
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +85 -86
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +103 -104
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +107 -108
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +96 -97
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +19 -14
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +20 -15
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +19 -14
- data/lib/transferzero-sdk/models/payout_method_request.rb +59 -60
- data/lib/transferzero-sdk/models/payout_method_response.rb +59 -60
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +95 -96
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
- data/lib/transferzero-sdk/models/recipient.rb +229 -230
- data/lib/transferzero-sdk/models/recipient_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/recipient_request.rb +59 -60
- data/lib/transferzero-sdk/models/recipient_response.rb +59 -60
- data/lib/transferzero-sdk/models/recipient_state.rb +27 -22
- data/lib/transferzero-sdk/models/recipient_webhook.rb +95 -96
- data/lib/transferzero-sdk/models/sender.rb +358 -521
- data/lib/transferzero-sdk/models/sender_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/sender_request.rb +59 -60
- data/lib/transferzero-sdk/models/sender_response.rb +65 -66
- data/lib/transferzero-sdk/models/sender_response_existing.rb +59 -60
- data/lib/transferzero-sdk/models/sender_response_meta.rb +59 -60
- data/lib/transferzero-sdk/models/sender_state.rb +24 -19
- data/lib/transferzero-sdk/models/sender_webhook.rb +95 -96
- data/lib/transferzero-sdk/models/transaction.rb +191 -192
- data/lib/transferzero-sdk/models/transaction_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/transaction_request.rb +59 -60
- data/lib/transferzero-sdk/models/transaction_response.rb +65 -66
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +65 -66
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +59 -60
- data/lib/transferzero-sdk/models/transaction_state.rb +28 -23
- data/lib/transferzero-sdk/models/transaction_traits.rb +70 -71
- data/lib/transferzero-sdk/models/transaction_webhook.rb +95 -96
- data/lib/transferzero-sdk/models/validation_error_description.rb +61 -62
- data/lib/transferzero-sdk/models/webhook.rb +91 -92
- data/lib/transferzero-sdk/models/webhook_definition.rb +106 -107
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +60 -61
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +66 -67
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +59 -60
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +59 -60
- data/lib/transferzero-sdk/models/webhook_log.rb +96 -97
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +69 -70
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +128 -129
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +79 -80
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +80 -81
- data/lib/transferzero-sdk/models/webhook_log_response.rb +59 -60
- data/lib/transferzero-sdk/version.rb +1 -1
- metadata +3 -15
- data/docs/PayinMethodDetailsBTC.md +0 -17
- data/docs/PayoutMethodDetailsBTC.md +0 -23
- data/docs/PayoutMethodDetailsGBPBank.md +0 -29
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +0 -204
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +0 -250
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +0 -267
- data/spec/models/payin_method_details_btc_spec.rb +0 -41
- data/spec/models/payout_method_details_btc_spec.rb +0 -59
- data/spec/models/payout_method_details_gbp_bank_spec.rb +0 -77
@@ -13,117 +13,117 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
class RecipientWebhook
|
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
|
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
|
42
33
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'webhook' => :'String',
|
38
|
+
:'event' => :'String',
|
39
|
+
:'object' => :'Recipient'
|
40
|
+
}
|
41
|
+
end
|
49
42
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
43
|
+
# List of class defined in allOf (OpenAPI v3)
|
44
|
+
def self.openapi_all_of
|
45
|
+
[
|
46
|
+
:'Webhook'
|
47
|
+
]
|
55
48
|
end
|
56
49
|
|
57
|
-
#
|
58
|
-
attributes
|
59
|
-
|
60
|
-
|
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"
|
61
55
|
end
|
62
|
-
h[k.to_sym] = v
|
63
|
-
}
|
64
56
|
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
+
}
|
68
64
|
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
if attributes.key?(:'webhook')
|
66
|
+
self.webhook = attributes[:'webhook']
|
67
|
+
end
|
72
68
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
69
|
+
if attributes.key?(:'event')
|
70
|
+
self.event = attributes[:'event']
|
71
|
+
end
|
77
72
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
invalid_properties = Array.new
|
82
|
-
if @webhook.nil?
|
83
|
-
invalid_properties.push('invalid value for "webhook", webhook cannot be nil.')
|
73
|
+
if attributes.key?(:'object')
|
74
|
+
self.object = attributes[:'object']
|
75
|
+
end
|
84
76
|
end
|
85
77
|
|
86
|
-
|
87
|
-
|
88
|
-
|
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.')
|
84
|
+
end
|
89
85
|
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
if @event.nil?
|
87
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
88
|
+
end
|
93
89
|
|
94
|
-
|
95
|
-
|
90
|
+
if @object.nil?
|
91
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
92
|
+
end
|
96
93
|
|
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
|
104
|
-
end
|
94
|
+
invalid_properties
|
95
|
+
end
|
105
96
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
end
|
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
|
115
105
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
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
|
121
115
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
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
127
|
|
128
128
|
require 'active_support/core_ext/hash'
|
129
129
|
require 'active_support/hash_with_indifferent_access.rb'
|
@@ -239,6 +239,5 @@ def _to_hash(value)
|
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
242
|
-
end
|
243
|
-
|
242
|
+
end
|
244
243
|
end
|
@@ -13,609 +13,447 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TransferZero
|
16
|
-
# This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"
|
17
|
-
class Sender
|
18
|
-
|
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\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"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\": [ ], \"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
|
+
# Type of sender to create - either person or business (defaults to person)
|
19
|
+
attr_accessor :type
|
19
20
|
|
20
|
-
|
21
|
-
|
21
|
+
# Country of sender in 2-character alpha ISO 3166-2 country format
|
22
|
+
attr_accessor :country
|
22
23
|
|
23
|
-
|
24
|
+
# Phone country of sender in 2-character alpha ISO 3166-2 country format
|
25
|
+
attr_accessor :phone_country
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
+
# Phone number of sender (without country callcode)
|
28
|
+
attr_accessor :phone_number
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
+
# Email of sender
|
31
|
+
attr_accessor :email
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
+
# First name of sender (used only with a Personal sender)
|
34
|
+
attr_accessor :first_name
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
+
# Middle name of sender (used only with a Personal sender)
|
37
|
+
attr_accessor :middle_name
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
+
# Last name of sender (used only with a Personal sender)
|
40
|
+
attr_accessor :last_name
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
+
# Occupation of sender (used only with a Personal sender)
|
43
|
+
attr_accessor :occupation
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
+
# The nationality of the sender (used only with a Personal sender)
|
46
|
+
attr_accessor :nationality
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
+
# The onboarding status of the sender
|
49
|
+
attr_accessor :onboarding_status
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
+
# The address of the sender
|
52
|
+
attr_accessor :address
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
+
# Description of the sender
|
55
|
+
attr_accessor :description
|
54
56
|
|
55
|
-
|
56
|
-
|
57
|
+
# Name of sender (used only with a Business sender)
|
58
|
+
attr_accessor :name
|
57
59
|
|
58
|
-
|
59
|
-
|
60
|
+
# Sender's city
|
61
|
+
attr_accessor :city
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
+
# Sender's street
|
64
|
+
attr_accessor :street
|
63
65
|
|
64
|
-
|
65
|
-
|
66
|
+
# Description of address
|
67
|
+
attr_accessor :address_description
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
+
# Zip code of sender
|
70
|
+
attr_accessor :postal_code
|
69
71
|
|
70
|
-
|
71
|
-
|
72
|
+
# Date of birth of sender
|
73
|
+
attr_accessor :birth_date
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
+
# IP of sender
|
76
|
+
attr_accessor :ip
|
75
77
|
|
76
|
-
|
77
|
-
|
78
|
+
# Identification number of document used
|
79
|
+
attr_accessor :identification_number
|
78
80
|
|
79
|
-
|
80
|
-
|
81
|
+
# Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other
|
82
|
+
attr_accessor :identification_type
|
81
83
|
|
82
|
-
|
83
|
-
|
84
|
+
# 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\" } ] ```
|
85
|
+
attr_accessor :documents
|
84
86
|
|
85
|
-
|
86
|
-
|
87
|
+
# A 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 { \"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\" } ```
|
88
|
+
attr_accessor :politically_exposed_people
|
87
89
|
|
88
|
-
|
89
|
-
|
90
|
+
# 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.
|
91
|
+
attr_accessor :metadata
|
90
92
|
|
91
|
-
|
92
|
-
attr_accessor :source_of_funds
|
93
|
+
attr_accessor :state
|
93
94
|
|
94
|
-
|
95
|
-
attr_accessor :core_business_activities
|
95
|
+
attr_accessor :id
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
# 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.
|
98
|
+
attr_accessor :external_id
|
99
99
|
|
100
|
-
|
101
|
-
|
100
|
+
# The fields that have some problems and don't pass validation
|
101
|
+
attr_accessor :errors
|
102
102
|
|
103
|
-
|
104
|
-
|
103
|
+
class EnumAttributeValidator
|
104
|
+
attr_reader :datatype
|
105
|
+
attr_reader :allowable_values
|
105
106
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
107
|
+
def initialize(datatype, allowable_values)
|
108
|
+
@allowable_values = allowable_values.map do |value|
|
109
|
+
case datatype.to_s
|
110
|
+
when /Integer/i
|
111
|
+
value.to_i
|
112
|
+
when /Float/i
|
113
|
+
value.to_f
|
114
|
+
else
|
115
|
+
value
|
116
|
+
end
|
161
117
|
end
|
162
118
|
end
|
163
|
-
end
|
164
|
-
|
165
|
-
def valid?(value)
|
166
|
-
!value || allowable_values.include?(value)
|
167
|
-
end
|
168
|
-
end
|
169
119
|
|
170
|
-
|
171
|
-
|
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
|
219
|
-
|
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
|
269
|
-
|
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
|
276
|
-
|
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
|
120
|
+
def valid?(value)
|
121
|
+
!value || allowable_values.include?(value)
|
281
122
|
end
|
282
|
-
h[k.to_sym] = v
|
283
|
-
}
|
284
|
-
|
285
|
-
if attributes.key?(:'id')
|
286
|
-
self.id = attributes[:'id']
|
287
|
-
end
|
288
|
-
|
289
|
-
if attributes.key?(:'type')
|
290
|
-
self.type = attributes[:'type']
|
291
|
-
end
|
292
|
-
|
293
|
-
if attributes.key?(:'state')
|
294
|
-
self.state = attributes[:'state']
|
295
|
-
end
|
296
|
-
|
297
|
-
if attributes.key?(:'country')
|
298
|
-
self.country = attributes[:'country']
|
299
|
-
end
|
300
|
-
|
301
|
-
if attributes.key?(:'street')
|
302
|
-
self.street = attributes[:'street']
|
303
|
-
end
|
304
|
-
|
305
|
-
if attributes.key?(:'postal_code')
|
306
|
-
self.postal_code = attributes[:'postal_code']
|
307
|
-
end
|
308
|
-
|
309
|
-
if attributes.key?(:'city')
|
310
|
-
self.city = attributes[:'city']
|
311
|
-
end
|
312
|
-
|
313
|
-
if attributes.key?(:'phone_country')
|
314
|
-
self.phone_country = attributes[:'phone_country']
|
315
|
-
end
|
316
|
-
|
317
|
-
if attributes.key?(:'phone_number')
|
318
|
-
self.phone_number = attributes[:'phone_number']
|
319
123
|
end
|
320
124
|
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
125
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
126
|
+
def self.attribute_map
|
127
|
+
{
|
128
|
+
:'type' => :'type',
|
129
|
+
:'country' => :'country',
|
130
|
+
:'phone_country' => :'phone_country',
|
131
|
+
:'phone_number' => :'phone_number',
|
132
|
+
:'email' => :'email',
|
133
|
+
:'first_name' => :'first_name',
|
134
|
+
:'middle_name' => :'middle_name',
|
135
|
+
:'last_name' => :'last_name',
|
136
|
+
:'occupation' => :'occupation',
|
137
|
+
:'nationality' => :'nationality',
|
138
|
+
:'onboarding_status' => :'onboarding_status',
|
139
|
+
:'address' => :'address',
|
140
|
+
:'description' => :'description',
|
141
|
+
:'name' => :'name',
|
142
|
+
:'city' => :'city',
|
143
|
+
:'street' => :'street',
|
144
|
+
:'address_description' => :'address_description',
|
145
|
+
:'postal_code' => :'postal_code',
|
146
|
+
:'birth_date' => :'birth_date',
|
147
|
+
:'ip' => :'ip',
|
148
|
+
:'identification_number' => :'identification_number',
|
149
|
+
:'identification_type' => :'identification_type',
|
150
|
+
:'documents' => :'documents',
|
151
|
+
:'politically_exposed_people' => :'politically_exposed_people',
|
152
|
+
:'metadata' => :'metadata',
|
153
|
+
:'state' => :'state',
|
154
|
+
:'id' => :'id',
|
155
|
+
:'external_id' => :'external_id',
|
156
|
+
:'errors' => :'errors'
|
157
|
+
}
|
158
|
+
end
|
159
|
+
|
160
|
+
# Attribute type mapping.
|
161
|
+
def self.openapi_types
|
162
|
+
{
|
163
|
+
:'type' => :'String',
|
164
|
+
:'country' => :'String',
|
165
|
+
:'phone_country' => :'String',
|
166
|
+
:'phone_number' => :'String',
|
167
|
+
:'email' => :'String',
|
168
|
+
:'first_name' => :'String',
|
169
|
+
:'middle_name' => :'String',
|
170
|
+
:'last_name' => :'String',
|
171
|
+
:'occupation' => :'String',
|
172
|
+
:'nationality' => :'String',
|
173
|
+
:'onboarding_status' => :'String',
|
174
|
+
:'address' => :'String',
|
175
|
+
:'description' => :'String',
|
176
|
+
:'name' => :'String',
|
177
|
+
:'city' => :'String',
|
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
|
348
201
|
|
349
|
-
|
350
|
-
|
351
|
-
|
202
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
203
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
204
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
205
|
+
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
|
206
|
+
end
|
207
|
+
h[k.to_sym] = v
|
208
|
+
}
|
352
209
|
|
353
|
-
|
354
|
-
|
355
|
-
|
210
|
+
if attributes.key?(:'type')
|
211
|
+
self.type = attributes[:'type']
|
212
|
+
end
|
356
213
|
|
357
|
-
|
358
|
-
|
359
|
-
|
214
|
+
if attributes.key?(:'country')
|
215
|
+
self.country = attributes[:'country']
|
216
|
+
end
|
360
217
|
|
361
|
-
|
362
|
-
|
363
|
-
|
218
|
+
if attributes.key?(:'phone_country')
|
219
|
+
self.phone_country = attributes[:'phone_country']
|
220
|
+
end
|
364
221
|
|
365
|
-
|
366
|
-
|
367
|
-
|
222
|
+
if attributes.key?(:'phone_number')
|
223
|
+
self.phone_number = attributes[:'phone_number']
|
224
|
+
end
|
368
225
|
|
369
|
-
|
370
|
-
|
371
|
-
|
226
|
+
if attributes.key?(:'email')
|
227
|
+
self.email = attributes[:'email']
|
228
|
+
end
|
372
229
|
|
373
|
-
|
374
|
-
|
375
|
-
|
230
|
+
if attributes.key?(:'first_name')
|
231
|
+
self.first_name = attributes[:'first_name']
|
232
|
+
end
|
376
233
|
|
377
|
-
|
378
|
-
|
379
|
-
|
234
|
+
if attributes.key?(:'middle_name')
|
235
|
+
self.middle_name = attributes[:'middle_name']
|
236
|
+
end
|
380
237
|
|
381
|
-
|
382
|
-
|
383
|
-
|
238
|
+
if attributes.key?(:'last_name')
|
239
|
+
self.last_name = attributes[:'last_name']
|
240
|
+
end
|
384
241
|
|
385
|
-
|
386
|
-
|
387
|
-
|
242
|
+
if attributes.key?(:'occupation')
|
243
|
+
self.occupation = attributes[:'occupation']
|
244
|
+
end
|
388
245
|
|
389
|
-
|
390
|
-
|
391
|
-
|
246
|
+
if attributes.key?(:'nationality')
|
247
|
+
self.nationality = attributes[:'nationality']
|
248
|
+
end
|
392
249
|
|
393
|
-
|
394
|
-
|
395
|
-
|
250
|
+
if attributes.key?(:'onboarding_status')
|
251
|
+
self.onboarding_status = attributes[:'onboarding_status']
|
252
|
+
end
|
396
253
|
|
397
|
-
|
398
|
-
|
399
|
-
|
254
|
+
if attributes.key?(:'address')
|
255
|
+
self.address = attributes[:'address']
|
256
|
+
end
|
400
257
|
|
401
|
-
|
402
|
-
|
403
|
-
|
258
|
+
if attributes.key?(:'description')
|
259
|
+
self.description = attributes[:'description']
|
260
|
+
end
|
404
261
|
|
405
|
-
|
406
|
-
|
407
|
-
|
262
|
+
if attributes.key?(:'name')
|
263
|
+
self.name = attributes[:'name']
|
264
|
+
end
|
408
265
|
|
409
|
-
|
410
|
-
|
411
|
-
|
266
|
+
if attributes.key?(:'city')
|
267
|
+
self.city = attributes[:'city']
|
268
|
+
end
|
412
269
|
|
413
|
-
|
414
|
-
|
415
|
-
|
270
|
+
if attributes.key?(:'street')
|
271
|
+
self.street = attributes[:'street']
|
272
|
+
end
|
416
273
|
|
417
|
-
|
418
|
-
|
419
|
-
|
274
|
+
if attributes.key?(:'address_description')
|
275
|
+
self.address_description = attributes[:'address_description']
|
276
|
+
end
|
420
277
|
|
421
|
-
|
422
|
-
|
423
|
-
|
278
|
+
if attributes.key?(:'postal_code')
|
279
|
+
self.postal_code = attributes[:'postal_code']
|
280
|
+
end
|
424
281
|
|
425
|
-
|
426
|
-
|
427
|
-
|
282
|
+
if attributes.key?(:'birth_date')
|
283
|
+
self.birth_date = attributes[:'birth_date']
|
284
|
+
end
|
428
285
|
|
429
|
-
|
430
|
-
|
431
|
-
|
286
|
+
if attributes.key?(:'ip')
|
287
|
+
self.ip = attributes[:'ip']
|
288
|
+
end
|
432
289
|
|
433
|
-
|
434
|
-
|
435
|
-
self.documents = value
|
290
|
+
if attributes.key?(:'identification_number')
|
291
|
+
self.identification_number = attributes[:'identification_number']
|
436
292
|
end
|
437
|
-
end
|
438
293
|
|
439
|
-
|
440
|
-
|
441
|
-
|
294
|
+
if attributes.key?(:'identification_type')
|
295
|
+
self.identification_type = attributes[:'identification_type']
|
296
|
+
end
|
442
297
|
|
443
|
-
|
444
|
-
|
445
|
-
|
298
|
+
if attributes.key?(:'documents')
|
299
|
+
if (value = attributes[:'documents']).is_a?(Array)
|
300
|
+
self.documents = value
|
301
|
+
end
|
446
302
|
end
|
447
|
-
end
|
448
303
|
|
449
|
-
|
450
|
-
|
451
|
-
|
304
|
+
if attributes.key?(:'politically_exposed_people')
|
305
|
+
if (value = attributes[:'politically_exposed_people']).is_a?(Array)
|
306
|
+
self.politically_exposed_people = value
|
307
|
+
end
|
308
|
+
end
|
452
309
|
|
453
|
-
|
454
|
-
|
455
|
-
self.politically_exposed_people = value
|
310
|
+
if attributes.key?(:'metadata')
|
311
|
+
self.metadata = attributes[:'metadata']
|
456
312
|
end
|
457
|
-
end
|
458
313
|
|
459
|
-
|
460
|
-
|
461
|
-
|
314
|
+
if attributes.key?(:'state')
|
315
|
+
self.state = attributes[:'state']
|
316
|
+
end
|
462
317
|
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
end
|
318
|
+
if attributes.key?(:'id')
|
319
|
+
self.id = attributes[:'id']
|
320
|
+
end
|
467
321
|
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
invalid_properties = Array.new
|
472
|
-
if @country.nil?
|
473
|
-
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
474
|
-
end
|
322
|
+
if attributes.key?(:'external_id')
|
323
|
+
self.external_id = attributes[:'external_id']
|
324
|
+
end
|
475
325
|
|
476
|
-
|
477
|
-
|
326
|
+
if attributes.key?(:'errors')
|
327
|
+
if (value = attributes[:'errors']).is_a?(Hash)
|
328
|
+
self.errors = value
|
329
|
+
end
|
330
|
+
end
|
478
331
|
end
|
479
332
|
|
480
|
-
|
481
|
-
|
482
|
-
|
333
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
334
|
+
# @return Array for valid properties with the reasons
|
335
|
+
def list_invalid_properties
|
336
|
+
invalid_properties = Array.new
|
337
|
+
if @country.nil?
|
338
|
+
invalid_properties.push('invalid value for "country", country cannot be nil.')
|
339
|
+
end
|
483
340
|
|
484
|
-
|
485
|
-
|
486
|
-
|
341
|
+
if @phone_country.nil?
|
342
|
+
invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
|
343
|
+
end
|
487
344
|
|
488
|
-
|
489
|
-
|
490
|
-
|
345
|
+
if @email.nil?
|
346
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
347
|
+
end
|
491
348
|
|
492
|
-
|
493
|
-
|
494
|
-
|
349
|
+
if @city.nil?
|
350
|
+
invalid_properties.push('invalid value for "city", city cannot be nil.')
|
351
|
+
end
|
495
352
|
|
496
|
-
|
497
|
-
|
498
|
-
|
353
|
+
if @street.nil?
|
354
|
+
invalid_properties.push('invalid value for "street", street cannot be nil.')
|
355
|
+
end
|
499
356
|
|
500
|
-
|
501
|
-
|
502
|
-
|
357
|
+
if @postal_code.nil?
|
358
|
+
invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
|
359
|
+
end
|
503
360
|
|
504
|
-
|
505
|
-
|
361
|
+
if @ip.nil?
|
362
|
+
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
363
|
+
end
|
506
364
|
|
507
|
-
|
508
|
-
|
509
|
-
|
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
|
365
|
+
if @documents.nil?
|
366
|
+
invalid_properties.push('invalid value for "documents", documents cannot be nil.')
|
367
|
+
end
|
526
368
|
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
369
|
+
invalid_properties
|
370
|
+
end
|
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
|
533
388
|
end
|
534
|
-
@type = type
|
535
|
-
end
|
536
389
|
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
390
|
+
# Custom attribute writer method checking allowed values (enum).
|
391
|
+
# @param [Object] type Object to be assigned
|
392
|
+
def type=(type)
|
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}."
|
396
|
+
end
|
397
|
+
@type = type
|
543
398
|
end
|
544
|
-
@identification_type = identification_type
|
545
|
-
end
|
546
399
|
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
400
|
+
# Custom attribute writer method checking allowed values (enum).
|
401
|
+
# @param [Object] identification_type Object to be assigned
|
402
|
+
def identification_type=(identification_type)
|
403
|
+
validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
404
|
+
unless validator.valid?(identification_type)
|
405
|
+
fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
|
406
|
+
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
|
553
456
|
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
457
|
|
620
458
|
require 'active_support/core_ext/hash'
|
621
459
|
require 'active_support/hash_with_indifferent_access.rb'
|
@@ -731,6 +569,5 @@ def _to_hash(value)
|
|
731
569
|
end
|
732
570
|
end
|
733
571
|
|
734
|
-
end
|
735
|
-
|
572
|
+
end
|
736
573
|
end
|