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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -7
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/Currency.md +1 -1
  5. data/docs/CurrencyExchange.md +1 -1
  6. data/docs/CurrencyOpposite.md +1 -1
  7. data/docs/Document.md +3 -3
  8. data/docs/DocumentsApi.md +74 -2
  9. data/docs/FieldSelectValidation.md +1 -1
  10. data/docs/FieldValidation.md +1 -1
  11. data/docs/PayinMethodDetails.md +1 -3
  12. data/docs/PayinMethodDetailsMobile.md +1 -1
  13. data/docs/PaymentMethod.md +2 -2
  14. data/docs/PaymentMethodOpposite.md +2 -2
  15. data/docs/PayoutMethodDetails.md +1 -7
  16. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  17. data/docs/Recipient.md +4 -4
  18. data/docs/RecipientsApi.md +1 -1
  19. data/docs/Sender.md +33 -63
  20. data/lib/transferzero-sdk.rb +0 -3
  21. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  22. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  23. data/lib/transferzero-sdk/api_client.rb +3 -5
  24. data/lib/transferzero-sdk/models/account.rb +69 -70
  25. data/lib/transferzero-sdk/models/account_list_response.rb +66 -67
  26. data/lib/transferzero-sdk/models/account_meta.rb +60 -61
  27. data/lib/transferzero-sdk/models/account_response.rb +65 -66
  28. data/lib/transferzero-sdk/models/account_validation_error.rb +60 -61
  29. data/lib/transferzero-sdk/models/account_validation_request.rb +163 -164
  30. data/lib/transferzero-sdk/models/account_validation_response.rb +65 -66
  31. data/lib/transferzero-sdk/models/account_validation_result.rb +60 -61
  32. data/lib/transferzero-sdk/models/api_log.rb +135 -136
  33. data/lib/transferzero-sdk/models/api_log_list_response.rb +69 -70
  34. data/lib/transferzero-sdk/models/api_log_response.rb +59 -60
  35. data/lib/transferzero-sdk/models/currency.rb +141 -142
  36. data/lib/transferzero-sdk/models/currency_exchange.rb +157 -158
  37. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +61 -62
  38. data/lib/transferzero-sdk/models/currency_list_response.rb +61 -62
  39. data/lib/transferzero-sdk/models/currency_opposite.rb +165 -166
  40. data/lib/transferzero-sdk/models/debit.rb +150 -151
  41. data/lib/transferzero-sdk/models/debit_list_request.rb +60 -61
  42. data/lib/transferzero-sdk/models/debit_list_response.rb +66 -67
  43. data/lib/transferzero-sdk/models/debit_request.rb +59 -60
  44. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +79 -80
  45. data/lib/transferzero-sdk/models/debit_response.rb +59 -60
  46. data/lib/transferzero-sdk/models/document.rb +177 -179
  47. data/lib/transferzero-sdk/models/document_list_response.rb +66 -67
  48. data/lib/transferzero-sdk/models/document_request.rb +59 -60
  49. data/lib/transferzero-sdk/models/document_response.rb +59 -60
  50. data/lib/transferzero-sdk/models/document_webhook.rb +95 -96
  51. data/lib/transferzero-sdk/models/error_status.rb +65 -66
  52. data/lib/transferzero-sdk/models/field_description.rb +94 -95
  53. data/lib/transferzero-sdk/models/field_select_validation.rb +69 -70
  54. data/lib/transferzero-sdk/models/field_validation.rb +77 -78
  55. data/lib/transferzero-sdk/models/pagination.rb +96 -97
  56. data/lib/transferzero-sdk/models/pagination_meta.rb +59 -60
  57. data/lib/transferzero-sdk/models/payin_method.rb +96 -97
  58. data/lib/transferzero-sdk/models/payin_method_details.rb +110 -122
  59. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +74 -75
  60. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +70 -71
  61. data/lib/transferzero-sdk/models/payin_method_request.rb +59 -60
  62. data/lib/transferzero-sdk/models/payment_method.rb +108 -109
  63. data/lib/transferzero-sdk/models/payment_method_list_response.rb +60 -61
  64. data/lib/transferzero-sdk/models/payment_method_opposite.rb +123 -124
  65. data/lib/transferzero-sdk/models/payout_method.rb +106 -107
  66. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +19 -14
  67. data/lib/transferzero-sdk/models/payout_method_details.rb +297 -337
  68. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +60 -61
  69. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +96 -97
  70. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +104 -100
  71. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +161 -162
  72. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +85 -86
  73. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +103 -104
  74. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +107 -108
  75. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +96 -97
  76. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +19 -14
  77. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +20 -15
  78. data/lib/transferzero-sdk/models/payout_method_list_response.rb +66 -67
  79. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +19 -14
  80. data/lib/transferzero-sdk/models/payout_method_request.rb +59 -60
  81. data/lib/transferzero-sdk/models/payout_method_response.rb +59 -60
  82. data/lib/transferzero-sdk/models/payout_method_webhook.rb +95 -96
  83. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
  84. data/lib/transferzero-sdk/models/recipient.rb +229 -230
  85. data/lib/transferzero-sdk/models/recipient_list_response.rb +66 -67
  86. data/lib/transferzero-sdk/models/recipient_request.rb +59 -60
  87. data/lib/transferzero-sdk/models/recipient_response.rb +59 -60
  88. data/lib/transferzero-sdk/models/recipient_state.rb +27 -22
  89. data/lib/transferzero-sdk/models/recipient_webhook.rb +95 -96
  90. data/lib/transferzero-sdk/models/sender.rb +358 -521
  91. data/lib/transferzero-sdk/models/sender_list_response.rb +66 -67
  92. data/lib/transferzero-sdk/models/sender_request.rb +59 -60
  93. data/lib/transferzero-sdk/models/sender_response.rb +65 -66
  94. data/lib/transferzero-sdk/models/sender_response_existing.rb +59 -60
  95. data/lib/transferzero-sdk/models/sender_response_meta.rb +59 -60
  96. data/lib/transferzero-sdk/models/sender_state.rb +24 -19
  97. data/lib/transferzero-sdk/models/sender_webhook.rb +95 -96
  98. data/lib/transferzero-sdk/models/transaction.rb +191 -192
  99. data/lib/transferzero-sdk/models/transaction_list_response.rb +66 -67
  100. data/lib/transferzero-sdk/models/transaction_request.rb +59 -60
  101. data/lib/transferzero-sdk/models/transaction_response.rb +65 -66
  102. data/lib/transferzero-sdk/models/transaction_response_existing.rb +65 -66
  103. data/lib/transferzero-sdk/models/transaction_response_meta.rb +59 -60
  104. data/lib/transferzero-sdk/models/transaction_state.rb +28 -23
  105. data/lib/transferzero-sdk/models/transaction_traits.rb +70 -71
  106. data/lib/transferzero-sdk/models/transaction_webhook.rb +95 -96
  107. data/lib/transferzero-sdk/models/validation_error_description.rb +61 -62
  108. data/lib/transferzero-sdk/models/webhook.rb +91 -92
  109. data/lib/transferzero-sdk/models/webhook_definition.rb +106 -107
  110. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +60 -61
  111. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +66 -67
  112. data/lib/transferzero-sdk/models/webhook_definition_request.rb +59 -60
  113. data/lib/transferzero-sdk/models/webhook_definition_response.rb +59 -60
  114. data/lib/transferzero-sdk/models/webhook_log.rb +96 -97
  115. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +69 -70
  116. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +128 -129
  117. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +79 -80
  118. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +80 -81
  119. data/lib/transferzero-sdk/models/webhook_log_response.rb +59 -60
  120. data/lib/transferzero-sdk/version.rb +1 -1
  121. metadata +3 -15
  122. data/docs/PayinMethodDetailsBTC.md +0 -17
  123. data/docs/PayoutMethodDetailsBTC.md +0 -23
  124. data/docs/PayoutMethodDetailsGBPBank.md +0 -29
  125. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +0 -204
  126. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +0 -250
  127. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +0 -267
  128. data/spec/models/payin_method_details_btc_spec.rb +0 -41
  129. data/spec/models/payout_method_details_btc_spec.rb +0 -59
  130. 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
- # 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
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
- # List of class defined in allOf (OpenAPI v3)
44
- def self.openapi_all_of
45
- [
46
- :'Webhook'
47
- ]
48
- end
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
- # 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"
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
- # 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
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
- if attributes.key?(:'webhook')
66
- self.webhook = attributes[:'webhook']
67
- end
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
- if attributes.key?(:'event')
70
- self.event = attributes[:'event']
71
- end
65
+ if attributes.key?(:'webhook')
66
+ self.webhook = attributes[:'webhook']
67
+ end
72
68
 
73
- if attributes.key?(:'object')
74
- self.object = attributes[:'object']
75
- end
76
- end
69
+ if attributes.key?(:'event')
70
+ self.event = attributes[:'event']
71
+ end
77
72
 
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.')
73
+ if attributes.key?(:'object')
74
+ self.object = attributes[:'object']
75
+ end
84
76
  end
85
77
 
86
- if @event.nil?
87
- invalid_properties.push('invalid value for "event", event cannot be nil.')
88
- end
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
- if @object.nil?
91
- invalid_properties.push('invalid value for "object", object cannot be nil.')
92
- end
86
+ if @event.nil?
87
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
88
+ end
93
89
 
94
- invalid_properties
95
- end
90
+ if @object.nil?
91
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
92
+ end
96
93
 
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
94
+ invalid_properties
95
+ end
105
96
 
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
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
- # @see the `==` method
117
- # @param [Object] Object to be compared
118
- def eql?(o)
119
- self == o
120
- end
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
- # Calculates hash code according to all attributes.
123
- # @return [Integer] Hash code
124
- def hash
125
- [webhook, event, object].hash
126
- end
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\": [ ], \"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
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
- # Type of sender to create - either person or business (defaults to person)
21
- attr_accessor :type
21
+ # Country of sender in 2-character alpha ISO 3166-2 country format
22
+ attr_accessor :country
22
23
 
23
- attr_accessor :state
24
+ # Phone country of sender in 2-character alpha ISO 3166-2 country format
25
+ attr_accessor :phone_country
24
26
 
25
- # Country of sender in 2-character alpha ISO 3166-2 country format
26
- attr_accessor :country
27
+ # Phone number of sender (without country callcode)
28
+ attr_accessor :phone_number
27
29
 
28
- # Sender's street
29
- attr_accessor :street
30
+ # Email of sender
31
+ attr_accessor :email
30
32
 
31
- # Zip code of sender
32
- attr_accessor :postal_code
33
+ # First name of sender (used only with a Personal sender)
34
+ attr_accessor :first_name
33
35
 
34
- # Sender's city
35
- attr_accessor :city
36
+ # Middle name of sender (used only with a Personal sender)
37
+ attr_accessor :middle_name
36
38
 
37
- # Phone country of sender in 2-character alpha ISO 3166-2 country format
38
- attr_accessor :phone_country
39
+ # Last name of sender (used only with a Personal sender)
40
+ attr_accessor :last_name
39
41
 
40
- # Phone number of sender (without country callcode)
41
- attr_accessor :phone_number
42
+ # Occupation of sender (used only with a Personal sender)
43
+ attr_accessor :occupation
42
44
 
43
- # Email of sender
44
- attr_accessor :email
45
+ # The nationality of the sender (used only with a Personal sender)
46
+ attr_accessor :nationality
45
47
 
46
- # IP of sender
47
- attr_accessor :ip
48
+ # The onboarding status of the sender
49
+ attr_accessor :onboarding_status
48
50
 
49
- # Description of address
50
- attr_accessor :address_description
51
+ # The address of the sender
52
+ attr_accessor :address
51
53
 
52
- # Identification number of document used
53
- attr_accessor :identification_number
54
+ # Description of the sender
55
+ attr_accessor :description
54
56
 
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
57
+ # Name of sender (used only with a Business sender)
58
+ attr_accessor :name
57
59
 
58
- # Name of sender (used only with a Business sender)
59
- attr_accessor :name
60
+ # Sender's city
61
+ attr_accessor :city
60
62
 
61
- # First name of sender (used only with a Personal sender)
62
- attr_accessor :first_name
63
+ # Sender's street
64
+ attr_accessor :street
63
65
 
64
- # Middle name of sender (used only with a Personal sender)
65
- attr_accessor :middle_name
66
+ # Description of address
67
+ attr_accessor :address_description
66
68
 
67
- # Last name of sender (used only with a Personal sender)
68
- attr_accessor :last_name
69
+ # Zip code of sender
70
+ attr_accessor :postal_code
69
71
 
70
- # Date of birth of sender (used only with a Personal sender)
71
- attr_accessor :birth_date
72
+ # Date of birth of sender
73
+ attr_accessor :birth_date
72
74
 
73
- # Occupation of sender (used only with a Personal sender)
74
- attr_accessor :occupation
75
+ # IP of sender
76
+ attr_accessor :ip
75
77
 
76
- # The nationality of the sender (used only with a Personal sender)
77
- attr_accessor :nationality
78
+ # Identification number of document used
79
+ attr_accessor :identification_number
78
80
 
79
- # Legal entity type (used only with a Business sender)
80
- attr_accessor :legal_entity_type
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
- # The registration date (used only with a Business sender)
83
- attr_accessor :registration_date
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
- # The registration number (used only with a Business sender)
86
- attr_accessor :registration_number
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
- # Nature of business options (used only with a Business sender)
89
- attr_accessor :nature_of_business
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
- # The source of funds
92
- attr_accessor :source_of_funds
93
+ attr_accessor :state
93
94
 
94
- # The core activities (used only with a Business sender)
95
- attr_accessor :core_business_activities
95
+ attr_accessor :id
96
96
 
97
- # The purpose for opening their account (used only with a Business sender)
98
- attr_accessor :purpose_of_opening_account
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
- # The official phone number (used only with a Business sender)
101
- attr_accessor :office_phone
100
+ # The fields that have some problems and don't pass validation
101
+ attr_accessor :errors
102
102
 
103
- # The VAT registration number (used only with a Business sender)
104
- attr_accessor :vat_registration_number
103
+ class EnumAttributeValidator
104
+ attr_reader :datatype
105
+ attr_reader :allowable_values
105
106
 
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
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
- # 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
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
- if attributes.key?(:'email')
322
- self.email = attributes[:'email']
323
- end
324
-
325
- if attributes.key?(:'ip')
326
- self.ip = attributes[:'ip']
327
- end
328
-
329
- if attributes.key?(:'address_description')
330
- self.address_description = attributes[:'address_description']
331
- end
332
-
333
- if attributes.key?(:'identification_number')
334
- self.identification_number = attributes[:'identification_number']
335
- end
336
-
337
- if attributes.key?(:'identification_type')
338
- self.identification_type = attributes[:'identification_type']
339
- end
340
-
341
- if attributes.key?(:'name')
342
- self.name = attributes[:'name']
343
- end
344
-
345
- if attributes.key?(:'first_name')
346
- self.first_name = attributes[:'first_name']
347
- end
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
- if attributes.key?(:'middle_name')
350
- self.middle_name = attributes[:'middle_name']
351
- end
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
- if attributes.key?(:'last_name')
354
- self.last_name = attributes[:'last_name']
355
- end
210
+ if attributes.key?(:'type')
211
+ self.type = attributes[:'type']
212
+ end
356
213
 
357
- if attributes.key?(:'birth_date')
358
- self.birth_date = attributes[:'birth_date']
359
- end
214
+ if attributes.key?(:'country')
215
+ self.country = attributes[:'country']
216
+ end
360
217
 
361
- if attributes.key?(:'occupation')
362
- self.occupation = attributes[:'occupation']
363
- end
218
+ if attributes.key?(:'phone_country')
219
+ self.phone_country = attributes[:'phone_country']
220
+ end
364
221
 
365
- if attributes.key?(:'nationality')
366
- self.nationality = attributes[:'nationality']
367
- end
222
+ if attributes.key?(:'phone_number')
223
+ self.phone_number = attributes[:'phone_number']
224
+ end
368
225
 
369
- if attributes.key?(:'legal_entity_type')
370
- self.legal_entity_type = attributes[:'legal_entity_type']
371
- end
226
+ if attributes.key?(:'email')
227
+ self.email = attributes[:'email']
228
+ end
372
229
 
373
- if attributes.key?(:'registration_date')
374
- self.registration_date = attributes[:'registration_date']
375
- end
230
+ if attributes.key?(:'first_name')
231
+ self.first_name = attributes[:'first_name']
232
+ end
376
233
 
377
- if attributes.key?(:'registration_number')
378
- self.registration_number = attributes[:'registration_number']
379
- end
234
+ if attributes.key?(:'middle_name')
235
+ self.middle_name = attributes[:'middle_name']
236
+ end
380
237
 
381
- if attributes.key?(:'nature_of_business')
382
- self.nature_of_business = attributes[:'nature_of_business']
383
- end
238
+ if attributes.key?(:'last_name')
239
+ self.last_name = attributes[:'last_name']
240
+ end
384
241
 
385
- if attributes.key?(:'source_of_funds')
386
- self.source_of_funds = attributes[:'source_of_funds']
387
- end
242
+ if attributes.key?(:'occupation')
243
+ self.occupation = attributes[:'occupation']
244
+ end
388
245
 
389
- if attributes.key?(:'core_business_activities')
390
- self.core_business_activities = attributes[:'core_business_activities']
391
- end
246
+ if attributes.key?(:'nationality')
247
+ self.nationality = attributes[:'nationality']
248
+ end
392
249
 
393
- if attributes.key?(:'purpose_of_opening_account')
394
- self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
395
- end
250
+ if attributes.key?(:'onboarding_status')
251
+ self.onboarding_status = attributes[:'onboarding_status']
252
+ end
396
253
 
397
- if attributes.key?(:'office_phone')
398
- self.office_phone = attributes[:'office_phone']
399
- end
254
+ if attributes.key?(:'address')
255
+ self.address = attributes[:'address']
256
+ end
400
257
 
401
- if attributes.key?(:'vat_registration_number')
402
- self.vat_registration_number = attributes[:'vat_registration_number']
403
- end
258
+ if attributes.key?(:'description')
259
+ self.description = attributes[:'description']
260
+ end
404
261
 
405
- if attributes.key?(:'financial_regulator')
406
- self.financial_regulator = attributes[:'financial_regulator']
407
- end
262
+ if attributes.key?(:'name')
263
+ self.name = attributes[:'name']
264
+ end
408
265
 
409
- if attributes.key?(:'regulatory_licence_number')
410
- self.regulatory_licence_number = attributes[:'regulatory_licence_number']
411
- end
266
+ if attributes.key?(:'city')
267
+ self.city = attributes[:'city']
268
+ end
412
269
 
413
- if attributes.key?(:'contact_person_email')
414
- self.contact_person_email = attributes[:'contact_person_email']
415
- end
270
+ if attributes.key?(:'street')
271
+ self.street = attributes[:'street']
272
+ end
416
273
 
417
- if attributes.key?(:'trading_country')
418
- self.trading_country = attributes[:'trading_country']
419
- end
274
+ if attributes.key?(:'address_description')
275
+ self.address_description = attributes[:'address_description']
276
+ end
420
277
 
421
- if attributes.key?(:'trading_address')
422
- self.trading_address = attributes[:'trading_address']
423
- end
278
+ if attributes.key?(:'postal_code')
279
+ self.postal_code = attributes[:'postal_code']
280
+ end
424
281
 
425
- if attributes.key?(:'number_monthly_transactions')
426
- self.number_monthly_transactions = attributes[:'number_monthly_transactions']
427
- end
282
+ if attributes.key?(:'birth_date')
283
+ self.birth_date = attributes[:'birth_date']
284
+ end
428
285
 
429
- if attributes.key?(:'amount_monthly_transactions')
430
- self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
431
- end
286
+ if attributes.key?(:'ip')
287
+ self.ip = attributes[:'ip']
288
+ end
432
289
 
433
- if attributes.key?(:'documents')
434
- if (value = attributes[:'documents']).is_a?(Array)
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
- if attributes.key?(:'metadata')
440
- self.metadata = attributes[:'metadata']
441
- end
294
+ if attributes.key?(:'identification_type')
295
+ self.identification_type = attributes[:'identification_type']
296
+ end
442
297
 
443
- if attributes.key?(:'errors')
444
- if (value = attributes[:'errors']).is_a?(Hash)
445
- self.errors = value
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
- if attributes.key?(:'onboarding_status')
450
- self.onboarding_status = attributes[:'onboarding_status']
451
- end
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
- if attributes.key?(:'politically_exposed_people')
454
- if (value = attributes[:'politically_exposed_people']).is_a?(Array)
455
- self.politically_exposed_people = value
310
+ if attributes.key?(:'metadata')
311
+ self.metadata = attributes[:'metadata']
456
312
  end
457
- end
458
313
 
459
- if attributes.key?(:'external_id')
460
- self.external_id = attributes[:'external_id']
461
- end
314
+ if attributes.key?(:'state')
315
+ self.state = attributes[:'state']
316
+ end
462
317
 
463
- if attributes.key?(:'created_at')
464
- self.created_at = attributes[:'created_at']
465
- end
466
- end
318
+ if attributes.key?(:'id')
319
+ self.id = attributes[:'id']
320
+ end
467
321
 
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
322
+ if attributes.key?(:'external_id')
323
+ self.external_id = attributes[:'external_id']
324
+ end
475
325
 
476
- if @street.nil?
477
- invalid_properties.push('invalid value for "street", street cannot be nil.')
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
- if @postal_code.nil?
481
- invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
482
- end
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
- if @city.nil?
485
- invalid_properties.push('invalid value for "city", city cannot be nil.')
486
- end
341
+ if @phone_country.nil?
342
+ invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
343
+ end
487
344
 
488
- if @phone_country.nil?
489
- invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
490
- end
345
+ if @email.nil?
346
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
347
+ end
491
348
 
492
- if @email.nil?
493
- invalid_properties.push('invalid value for "email", email cannot be nil.')
494
- end
349
+ if @city.nil?
350
+ invalid_properties.push('invalid value for "city", city cannot be nil.')
351
+ end
495
352
 
496
- if @ip.nil?
497
- invalid_properties.push('invalid value for "ip", ip cannot be nil.')
498
- end
353
+ if @street.nil?
354
+ invalid_properties.push('invalid value for "street", street cannot be nil.')
355
+ end
499
356
 
500
- if @documents.nil?
501
- invalid_properties.push('invalid value for "documents", documents cannot be nil.')
502
- end
357
+ if @postal_code.nil?
358
+ invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
359
+ end
503
360
 
504
- invalid_properties
505
- end
361
+ if @ip.nil?
362
+ invalid_properties.push('invalid value for "ip", ip cannot be nil.')
363
+ end
506
364
 
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
365
+ if @documents.nil?
366
+ invalid_properties.push('invalid value for "documents", documents cannot be nil.')
367
+ end
526
368
 
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}."
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
- # 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}."
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
- # 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}."
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