transferzero-sdk 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/docs/Document.md +2 -0
  4. data/docs/PayoutMethodDetails.md +2 -0
  5. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  6. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  7. data/docs/Recipient.md +1 -1
  8. data/docs/RecipientsApi.md +1 -1
  9. data/docs/Sender.md +3 -1
  10. data/lib/transferzero-sdk.rb +1 -0
  11. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  12. data/lib/transferzero-sdk/api_client.rb +5 -3
  13. data/lib/transferzero-sdk/models/account.rb +70 -69
  14. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  15. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  16. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  17. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  18. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  19. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  20. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  21. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  22. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  23. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  24. data/lib/transferzero-sdk/models/currency.rb +142 -141
  25. data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
  26. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  27. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  28. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
  29. data/lib/transferzero-sdk/models/debit.rb +151 -150
  30. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  31. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  32. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  33. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  34. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  35. data/lib/transferzero-sdk/models/document.rb +180 -169
  36. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  37. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  38. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  39. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  40. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  41. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  42. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  43. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  44. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  45. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  46. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  47. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -121
  48. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
  49. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  50. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
  51. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  52. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  53. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  54. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  55. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  56. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  57. data/lib/transferzero-sdk/models/payout_method_details.rb +331 -320
  58. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  59. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
  60. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  61. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  62. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  63. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  64. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
  65. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
  66. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
  67. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  68. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  69. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  70. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  71. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
  72. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  73. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  74. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  75. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -122
  76. data/lib/transferzero-sdk/models/recipient.rb +230 -229
  77. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  78. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  79. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  80. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  81. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  82. data/lib/transferzero-sdk/models/sender.rb +491 -480
  83. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  84. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  85. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  86. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  87. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  88. data/lib/transferzero-sdk/models/sender_state.rb +19 -24
  89. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  90. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  91. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  92. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  93. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  94. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  95. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  96. data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
  97. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  98. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  99. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  100. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  101. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  102. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  103. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  104. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  105. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  106. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  107. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  108. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  109. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  110. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  111. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  112. data/lib/transferzero-sdk/version.rb +1 -1
  113. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  114. metadata +7 -3
@@ -13,118 +13,118 @@ 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
42
-
43
- # List of class defined in allOf (OpenAPI v3)
44
- def self.openapi_all_of
45
- [
46
- :'Webhook'
47
- ]
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::RecipientWebhook` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::RecipientWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
- end
62
- h[k.to_sym] = v
63
- }
16
+ class RecipientWebhook
17
+ # The ID of the webhook that was used to send out this callback
18
+ attr_accessor :webhook
19
+
20
+ # The event that triggered this webhook
21
+ attr_accessor :event
22
+
23
+ attr_accessor :object
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'webhook' => :'webhook',
29
+ :'event' => :'event',
30
+ :'object' => :'object'
31
+ }
32
+ end
64
33
 
65
- if attributes.key?(:'webhook')
66
- self.webhook = attributes[:'webhook']
67
- end
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'webhook' => :'String',
38
+ :'event' => :'String',
39
+ :'object' => :'Recipient'
40
+ }
41
+ end
68
42
 
69
- if attributes.key?(:'event')
70
- self.event = attributes[:'event']
71
- end
43
+ # List of class defined in allOf (OpenAPI v3)
44
+ def self.openapi_all_of
45
+ [
46
+ :'Webhook'
47
+ ]
48
+ end
72
49
 
73
- if attributes.key?(:'object')
74
- self.object = attributes[:'object']
75
- end
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::RecipientWebhook` initialize method"
76
55
  end
77
56
 
78
- # 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
85
-
86
- if @event.nil?
87
- invalid_properties.push('invalid value for "event", event cannot be nil.')
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::RecipientWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
61
  end
62
+ h[k.to_sym] = v
63
+ }
89
64
 
90
- if @object.nil?
91
- invalid_properties.push('invalid value for "object", object cannot be nil.')
92
- end
65
+ if attributes.key?(:'webhook')
66
+ self.webhook = attributes[:'webhook']
67
+ end
93
68
 
94
- invalid_properties
69
+ if attributes.key?(:'event')
70
+ self.event = attributes[:'event']
95
71
  end
96
72
 
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
73
+ if attributes.key?(:'object')
74
+ self.object = attributes[:'object']
104
75
  end
76
+ end
105
77
 
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
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @webhook.nil?
83
+ invalid_properties.push('invalid value for "webhook", webhook cannot be nil.')
114
84
  end
115
85
 
116
- # @see the `==` method
117
- # @param [Object] Object to be compared
118
- def eql?(o)
119
- self == o
86
+ if @event.nil?
87
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
120
88
  end
121
89
 
122
- # Calculates hash code according to all attributes.
123
- # @return [Integer] Hash code
124
- def hash
125
- [webhook, event, object].hash
90
+ if @object.nil?
91
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
126
92
  end
127
93
 
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @webhook.nil?
101
+ return false if @event.nil?
102
+ return false if @object.nil?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ webhook == o.webhook &&
112
+ event == o.event &&
113
+ object == o.object
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [webhook, event, object].hash
126
+ end
127
+
128
128
  require 'active_support/core_ext/hash'
129
129
  require 'active_support/hash_with_indifferent_access.rb'
130
130
  # Builds the object from hash
@@ -239,5 +239,6 @@ def _to_hash(value)
239
239
  end
240
240
  end
241
241
 
242
- end
242
+ end
243
+
243
244
  end
@@ -13,599 +13,609 @@ 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\", \"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\": [ ], \"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
19
19
 
20
- # Type of sender to create - either person or business (defaults to person)
21
- attr_accessor :type
20
+ # Type of sender to create - either person or business (defaults to person)
21
+ attr_accessor :type
22
22
 
23
- attr_accessor :state
23
+ attr_accessor :state
24
24
 
25
- # Country of sender in 2-character alpha ISO 3166-2 country format
26
- attr_accessor :country
25
+ # Country of sender in 2-character alpha ISO 3166-2 country format
26
+ attr_accessor :country
27
27
 
28
- # Sender's street
29
- attr_accessor :street
28
+ # Sender's street
29
+ attr_accessor :street
30
30
 
31
- # Zip code of sender
32
- attr_accessor :postal_code
31
+ # Zip code of sender
32
+ attr_accessor :postal_code
33
33
 
34
- # Sender's city
35
- attr_accessor :city
34
+ # Sender's city
35
+ attr_accessor :city
36
36
 
37
- # Phone country of sender in 2-character alpha ISO 3166-2 country format
38
- attr_accessor :phone_country
37
+ # Phone country of sender in 2-character alpha ISO 3166-2 country format
38
+ attr_accessor :phone_country
39
39
 
40
- # Phone number of sender (without country callcode)
41
- attr_accessor :phone_number
40
+ # Phone number of sender (without country callcode)
41
+ attr_accessor :phone_number
42
42
 
43
- # Email of sender
44
- attr_accessor :email
43
+ # Email of sender
44
+ attr_accessor :email
45
45
 
46
- # IP of sender
47
- attr_accessor :ip
46
+ # IP of sender
47
+ attr_accessor :ip
48
48
 
49
- # Description of address
50
- attr_accessor :address_description
49
+ # Description of address
50
+ attr_accessor :address_description
51
51
 
52
- # Identification number of document used
53
- attr_accessor :identification_number
52
+ # Identification number of document used
53
+ attr_accessor :identification_number
54
54
 
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
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
57
 
58
- # Name of sender (used only with a Business sender)
59
- attr_accessor :name
58
+ # Name of sender (used only with a Business sender)
59
+ attr_accessor :name
60
60
 
61
- # First name of sender (used only with a Personal sender)
62
- attr_accessor :first_name
61
+ # First name of sender (used only with a Personal sender)
62
+ attr_accessor :first_name
63
63
 
64
- # Middle name of sender (used only with a Personal sender)
65
- attr_accessor :middle_name
64
+ # Middle name of sender (used only with a Personal sender)
65
+ attr_accessor :middle_name
66
66
 
67
- # Last name of sender (used only with a Personal sender)
68
- attr_accessor :last_name
67
+ # Last name of sender (used only with a Personal sender)
68
+ attr_accessor :last_name
69
69
 
70
- # Date of birth of sender (used only with a Personal sender)
71
- attr_accessor :birth_date
70
+ # Date of birth of sender (used only with a Personal sender)
71
+ attr_accessor :birth_date
72
72
 
73
- # Occupation of sender (used only with a Personal sender)
74
- attr_accessor :occupation
73
+ # Occupation of sender (used only with a Personal sender)
74
+ attr_accessor :occupation
75
75
 
76
- # The nationality of the sender (used only with a Personal sender)
77
- attr_accessor :nationality
76
+ # The nationality of the sender (used only with a Personal sender)
77
+ attr_accessor :nationality
78
78
 
79
- # Legal entity type (used only with a Business sender)
80
- attr_accessor :legal_entity_type
79
+ # Legal entity type (used only with a Business sender)
80
+ attr_accessor :legal_entity_type
81
81
 
82
- # The registration date (used only with a Business sender)
83
- attr_accessor :registration_date
82
+ # The registration date (used only with a Business sender)
83
+ attr_accessor :registration_date
84
84
 
85
- # The registration number (used only with a Business sender)
86
- attr_accessor :registration_number
85
+ # The registration number (used only with a Business sender)
86
+ attr_accessor :registration_number
87
87
 
88
- # Nature of business options (used only with a Business sender)
89
- attr_accessor :nature_of_business
88
+ # Nature of business options (used only with a Business sender)
89
+ attr_accessor :nature_of_business
90
90
 
91
- # The source of funds
92
- attr_accessor :source_of_funds
91
+ # The source of funds
92
+ attr_accessor :source_of_funds
93
93
 
94
- # The core activities (used only with a Business sender)
95
- attr_accessor :core_business_activities
94
+ # The core activities (used only with a Business sender)
95
+ attr_accessor :core_business_activities
96
96
 
97
- # The purpose for opening their account (used only with a Business sender)
98
- attr_accessor :purpose_of_opening_account
97
+ # The purpose for opening their account (used only with a Business sender)
98
+ attr_accessor :purpose_of_opening_account
99
99
 
100
- # The official phone number (used only with a Business sender)
101
- attr_accessor :office_phone
100
+ # The official phone number (used only with a Business sender)
101
+ attr_accessor :office_phone
102
102
 
103
- # The VAT registration number (used only with a Business sender)
104
- attr_accessor :vat_registration_number
103
+ # The VAT registration number (used only with a Business sender)
104
+ attr_accessor :vat_registration_number
105
105
 
106
- # The Financial Regulator (used only with a Business sender)
107
- attr_accessor :financial_regulator
106
+ # The Financial Regulator (used only with a Business sender)
107
+ attr_accessor :financial_regulator
108
108
 
109
- # The Regulatory Licence Number (used only with a Business sender)
110
- attr_accessor :regulatory_licence_number
109
+ # The Regulatory Licence Number (used only with a Business sender)
110
+ attr_accessor :regulatory_licence_number
111
111
 
112
- # The contact's email address (used only with a Business sender)
113
- attr_accessor :contact_person_email
112
+ # The contact's email address (used only with a Business sender)
113
+ attr_accessor :contact_person_email
114
114
 
115
- # The Business trading country (used only with a Business sender)
116
- attr_accessor :trading_country
115
+ # The Business trading country (used only with a Business sender)
116
+ attr_accessor :trading_country
117
117
 
118
- # The Business trading address (used only with a Business sender)
119
- attr_accessor :trading_address
118
+ # The Business trading address (used only with a Business sender)
119
+ attr_accessor :trading_address
120
120
 
121
- # The estimated number of monthly transactions (used only with a Business sender)
122
- attr_accessor :number_monthly_transactions
121
+ # The estimated number of monthly transactions (used only with a Business sender)
122
+ attr_accessor :number_monthly_transactions
123
123
 
124
- # The estimated amount for all transactions each month in USD (used only with a Business sender)
125
- attr_accessor :amount_monthly_transactions
124
+ # The estimated amount for all transactions each month in USD (used only with a Business sender)
125
+ attr_accessor :amount_monthly_transactions
126
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
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
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
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
132
 
133
- # The fields that have some problems and don't pass validation
134
- attr_accessor :errors
133
+ # The fields that have some problems and don't pass validation
134
+ attr_accessor :errors
135
135
 
136
- # The onboarding status of the sender
137
- attr_accessor :onboarding_status
136
+ # The onboarding status of the sender
137
+ attr_accessor :onboarding_status
138
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
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
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
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
144
 
145
- class EnumAttributeValidator
146
- attr_reader :datatype
147
- attr_reader :allowable_values
145
+ # Date and time of sender was created
146
+ attr_accessor :created_at
148
147
 
149
- def initialize(datatype, allowable_values)
150
- @allowable_values = allowable_values.map do |value|
151
- case datatype.to_s
152
- when /Integer/i
153
- value.to_i
154
- when /Float/i
155
- value.to_f
156
- else
157
- value
158
- end
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
159
161
  end
160
162
  end
163
+ end
161
164
 
162
- def valid?(value)
163
- !value || allowable_values.include?(value)
164
- end
165
+ def valid?(value)
166
+ !value || allowable_values.include?(value)
165
167
  end
168
+ end
166
169
 
167
- # Attribute mapping from ruby-style variable name to JSON key.
168
- def self.attribute_map
169
- {
170
- :'id' => :'id',
171
- :'type' => :'type',
172
- :'state' => :'state',
173
- :'country' => :'country',
174
- :'street' => :'street',
175
- :'postal_code' => :'postal_code',
176
- :'city' => :'city',
177
- :'phone_country' => :'phone_country',
178
- :'phone_number' => :'phone_number',
179
- :'email' => :'email',
180
- :'ip' => :'ip',
181
- :'address_description' => :'address_description',
182
- :'identification_number' => :'identification_number',
183
- :'identification_type' => :'identification_type',
184
- :'name' => :'name',
185
- :'first_name' => :'first_name',
186
- :'middle_name' => :'middle_name',
187
- :'last_name' => :'last_name',
188
- :'birth_date' => :'birth_date',
189
- :'occupation' => :'occupation',
190
- :'nationality' => :'nationality',
191
- :'legal_entity_type' => :'legal_entity_type',
192
- :'registration_date' => :'registration_date',
193
- :'registration_number' => :'registration_number',
194
- :'nature_of_business' => :'nature_of_business',
195
- :'source_of_funds' => :'source_of_funds',
196
- :'core_business_activities' => :'core_business_activities',
197
- :'purpose_of_opening_account' => :'purpose_of_opening_account',
198
- :'office_phone' => :'office_phone',
199
- :'vat_registration_number' => :'vat_registration_number',
200
- :'financial_regulator' => :'financial_regulator',
201
- :'regulatory_licence_number' => :'regulatory_licence_number',
202
- :'contact_person_email' => :'contact_person_email',
203
- :'trading_country' => :'trading_country',
204
- :'trading_address' => :'trading_address',
205
- :'number_monthly_transactions' => :'number_monthly_transactions',
206
- :'amount_monthly_transactions' => :'amount_monthly_transactions',
207
- :'documents' => :'documents',
208
- :'metadata' => :'metadata',
209
- :'errors' => :'errors',
210
- :'onboarding_status' => :'onboarding_status',
211
- :'politically_exposed_people' => :'politically_exposed_people',
212
- :'external_id' => :'external_id'
213
- }
214
- end
215
-
216
- # Attribute type mapping.
217
- def self.openapi_types
218
- {
219
- :'id' => :'String',
220
- :'type' => :'String',
221
- :'state' => :'SenderState',
222
- :'country' => :'String',
223
- :'street' => :'String',
224
- :'postal_code' => :'String',
225
- :'city' => :'String',
226
- :'phone_country' => :'String',
227
- :'phone_number' => :'String',
228
- :'email' => :'String',
229
- :'ip' => :'String',
230
- :'address_description' => :'String',
231
- :'identification_number' => :'String',
232
- :'identification_type' => :'String',
233
- :'name' => :'String',
234
- :'first_name' => :'String',
235
- :'middle_name' => :'String',
236
- :'last_name' => :'String',
237
- :'birth_date' => :'Date',
238
- :'occupation' => :'String',
239
- :'nationality' => :'String',
240
- :'legal_entity_type' => :'String',
241
- :'registration_date' => :'String',
242
- :'registration_number' => :'String',
243
- :'nature_of_business' => :'String',
244
- :'source_of_funds' => :'String',
245
- :'core_business_activities' => :'String',
246
- :'purpose_of_opening_account' => :'String',
247
- :'office_phone' => :'String',
248
- :'vat_registration_number' => :'String',
249
- :'financial_regulator' => :'String',
250
- :'regulatory_licence_number' => :'String',
251
- :'contact_person_email' => :'String',
252
- :'trading_country' => :'String',
253
- :'trading_address' => :'String',
254
- :'number_monthly_transactions' => :'String',
255
- :'amount_monthly_transactions' => :'String',
256
- :'documents' => :'Array<Document>',
257
- :'metadata' => :'Object',
258
- :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
259
- :'onboarding_status' => :'String',
260
- :'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
261
- :'external_id' => :'String'
262
- }
263
- end
264
-
265
- # Initializes the object
266
- # @param [Hash] attributes Model attributes in the form of hash
267
- def initialize(attributes = {})
268
- if (!attributes.is_a?(Hash))
269
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
270
- end
170
+ # Attribute mapping from ruby-style variable name to JSON key.
171
+ def self.attribute_map
172
+ {
173
+ :'id' => :'id',
174
+ :'type' => :'type',
175
+ :'state' => :'state',
176
+ :'country' => :'country',
177
+ :'street' => :'street',
178
+ :'postal_code' => :'postal_code',
179
+ :'city' => :'city',
180
+ :'phone_country' => :'phone_country',
181
+ :'phone_number' => :'phone_number',
182
+ :'email' => :'email',
183
+ :'ip' => :'ip',
184
+ :'address_description' => :'address_description',
185
+ :'identification_number' => :'identification_number',
186
+ :'identification_type' => :'identification_type',
187
+ :'name' => :'name',
188
+ :'first_name' => :'first_name',
189
+ :'middle_name' => :'middle_name',
190
+ :'last_name' => :'last_name',
191
+ :'birth_date' => :'birth_date',
192
+ :'occupation' => :'occupation',
193
+ :'nationality' => :'nationality',
194
+ :'legal_entity_type' => :'legal_entity_type',
195
+ :'registration_date' => :'registration_date',
196
+ :'registration_number' => :'registration_number',
197
+ :'nature_of_business' => :'nature_of_business',
198
+ :'source_of_funds' => :'source_of_funds',
199
+ :'core_business_activities' => :'core_business_activities',
200
+ :'purpose_of_opening_account' => :'purpose_of_opening_account',
201
+ :'office_phone' => :'office_phone',
202
+ :'vat_registration_number' => :'vat_registration_number',
203
+ :'financial_regulator' => :'financial_regulator',
204
+ :'regulatory_licence_number' => :'regulatory_licence_number',
205
+ :'contact_person_email' => :'contact_person_email',
206
+ :'trading_country' => :'trading_country',
207
+ :'trading_address' => :'trading_address',
208
+ :'number_monthly_transactions' => :'number_monthly_transactions',
209
+ :'amount_monthly_transactions' => :'amount_monthly_transactions',
210
+ :'documents' => :'documents',
211
+ :'metadata' => :'metadata',
212
+ :'errors' => :'errors',
213
+ :'onboarding_status' => :'onboarding_status',
214
+ :'politically_exposed_people' => :'politically_exposed_people',
215
+ :'external_id' => :'external_id',
216
+ :'created_at' => :'created_at'
217
+ }
218
+ end
271
219
 
272
- # check to see if the attribute exists and convert string to symbol for hash key
273
- attributes = attributes.each_with_object({}) { |(k, v), h|
274
- if (!self.class.attribute_map.key?(k.to_sym))
275
- 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
276
- end
277
- h[k.to_sym] = v
278
- }
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
279
269
 
280
- if attributes.key?(:'id')
281
- self.id = attributes[:'id']
282
- end
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
283
276
 
284
- if attributes.key?(:'type')
285
- self.type = attributes[:'type']
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
286
281
  end
282
+ h[k.to_sym] = v
283
+ }
287
284
 
288
- if attributes.key?(:'state')
289
- self.state = attributes[:'state']
290
- end
285
+ if attributes.key?(:'id')
286
+ self.id = attributes[:'id']
287
+ end
291
288
 
292
- if attributes.key?(:'country')
293
- self.country = attributes[:'country']
294
- end
289
+ if attributes.key?(:'type')
290
+ self.type = attributes[:'type']
291
+ end
295
292
 
296
- if attributes.key?(:'street')
297
- self.street = attributes[:'street']
298
- end
293
+ if attributes.key?(:'state')
294
+ self.state = attributes[:'state']
295
+ end
299
296
 
300
- if attributes.key?(:'postal_code')
301
- self.postal_code = attributes[:'postal_code']
302
- end
297
+ if attributes.key?(:'country')
298
+ self.country = attributes[:'country']
299
+ end
303
300
 
304
- if attributes.key?(:'city')
305
- self.city = attributes[:'city']
306
- end
301
+ if attributes.key?(:'street')
302
+ self.street = attributes[:'street']
303
+ end
307
304
 
308
- if attributes.key?(:'phone_country')
309
- self.phone_country = attributes[:'phone_country']
310
- end
305
+ if attributes.key?(:'postal_code')
306
+ self.postal_code = attributes[:'postal_code']
307
+ end
311
308
 
312
- if attributes.key?(:'phone_number')
313
- self.phone_number = attributes[:'phone_number']
314
- end
309
+ if attributes.key?(:'city')
310
+ self.city = attributes[:'city']
311
+ end
315
312
 
316
- if attributes.key?(:'email')
317
- self.email = attributes[:'email']
318
- end
313
+ if attributes.key?(:'phone_country')
314
+ self.phone_country = attributes[:'phone_country']
315
+ end
319
316
 
320
- if attributes.key?(:'ip')
321
- self.ip = attributes[:'ip']
322
- end
317
+ if attributes.key?(:'phone_number')
318
+ self.phone_number = attributes[:'phone_number']
319
+ end
323
320
 
324
- if attributes.key?(:'address_description')
325
- self.address_description = attributes[:'address_description']
326
- end
321
+ if attributes.key?(:'email')
322
+ self.email = attributes[:'email']
323
+ end
327
324
 
328
- if attributes.key?(:'identification_number')
329
- self.identification_number = attributes[:'identification_number']
330
- end
325
+ if attributes.key?(:'ip')
326
+ self.ip = attributes[:'ip']
327
+ end
331
328
 
332
- if attributes.key?(:'identification_type')
333
- self.identification_type = attributes[:'identification_type']
334
- end
329
+ if attributes.key?(:'address_description')
330
+ self.address_description = attributes[:'address_description']
331
+ end
335
332
 
336
- if attributes.key?(:'name')
337
- self.name = attributes[:'name']
338
- end
333
+ if attributes.key?(:'identification_number')
334
+ self.identification_number = attributes[:'identification_number']
335
+ end
339
336
 
340
- if attributes.key?(:'first_name')
341
- self.first_name = attributes[:'first_name']
342
- end
337
+ if attributes.key?(:'identification_type')
338
+ self.identification_type = attributes[:'identification_type']
339
+ end
343
340
 
344
- if attributes.key?(:'middle_name')
345
- self.middle_name = attributes[:'middle_name']
346
- end
341
+ if attributes.key?(:'name')
342
+ self.name = attributes[:'name']
343
+ end
347
344
 
348
- if attributes.key?(:'last_name')
349
- self.last_name = attributes[:'last_name']
350
- end
345
+ if attributes.key?(:'first_name')
346
+ self.first_name = attributes[:'first_name']
347
+ end
351
348
 
352
- if attributes.key?(:'birth_date')
353
- self.birth_date = attributes[:'birth_date']
354
- end
349
+ if attributes.key?(:'middle_name')
350
+ self.middle_name = attributes[:'middle_name']
351
+ end
355
352
 
356
- if attributes.key?(:'occupation')
357
- self.occupation = attributes[:'occupation']
358
- end
353
+ if attributes.key?(:'last_name')
354
+ self.last_name = attributes[:'last_name']
355
+ end
359
356
 
360
- if attributes.key?(:'nationality')
361
- self.nationality = attributes[:'nationality']
362
- end
357
+ if attributes.key?(:'birth_date')
358
+ self.birth_date = attributes[:'birth_date']
359
+ end
363
360
 
364
- if attributes.key?(:'legal_entity_type')
365
- self.legal_entity_type = attributes[:'legal_entity_type']
366
- end
361
+ if attributes.key?(:'occupation')
362
+ self.occupation = attributes[:'occupation']
363
+ end
367
364
 
368
- if attributes.key?(:'registration_date')
369
- self.registration_date = attributes[:'registration_date']
370
- end
365
+ if attributes.key?(:'nationality')
366
+ self.nationality = attributes[:'nationality']
367
+ end
371
368
 
372
- if attributes.key?(:'registration_number')
373
- self.registration_number = attributes[:'registration_number']
374
- end
369
+ if attributes.key?(:'legal_entity_type')
370
+ self.legal_entity_type = attributes[:'legal_entity_type']
371
+ end
375
372
 
376
- if attributes.key?(:'nature_of_business')
377
- self.nature_of_business = attributes[:'nature_of_business']
378
- end
373
+ if attributes.key?(:'registration_date')
374
+ self.registration_date = attributes[:'registration_date']
375
+ end
379
376
 
380
- if attributes.key?(:'source_of_funds')
381
- self.source_of_funds = attributes[:'source_of_funds']
382
- end
377
+ if attributes.key?(:'registration_number')
378
+ self.registration_number = attributes[:'registration_number']
379
+ end
383
380
 
384
- if attributes.key?(:'core_business_activities')
385
- self.core_business_activities = attributes[:'core_business_activities']
386
- end
381
+ if attributes.key?(:'nature_of_business')
382
+ self.nature_of_business = attributes[:'nature_of_business']
383
+ end
387
384
 
388
- if attributes.key?(:'purpose_of_opening_account')
389
- self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
390
- end
385
+ if attributes.key?(:'source_of_funds')
386
+ self.source_of_funds = attributes[:'source_of_funds']
387
+ end
391
388
 
392
- if attributes.key?(:'office_phone')
393
- self.office_phone = attributes[:'office_phone']
394
- end
389
+ if attributes.key?(:'core_business_activities')
390
+ self.core_business_activities = attributes[:'core_business_activities']
391
+ end
395
392
 
396
- if attributes.key?(:'vat_registration_number')
397
- self.vat_registration_number = attributes[:'vat_registration_number']
398
- end
393
+ if attributes.key?(:'purpose_of_opening_account')
394
+ self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
395
+ end
399
396
 
400
- if attributes.key?(:'financial_regulator')
401
- self.financial_regulator = attributes[:'financial_regulator']
402
- end
397
+ if attributes.key?(:'office_phone')
398
+ self.office_phone = attributes[:'office_phone']
399
+ end
403
400
 
404
- if attributes.key?(:'regulatory_licence_number')
405
- self.regulatory_licence_number = attributes[:'regulatory_licence_number']
406
- end
401
+ if attributes.key?(:'vat_registration_number')
402
+ self.vat_registration_number = attributes[:'vat_registration_number']
403
+ end
407
404
 
408
- if attributes.key?(:'contact_person_email')
409
- self.contact_person_email = attributes[:'contact_person_email']
410
- end
405
+ if attributes.key?(:'financial_regulator')
406
+ self.financial_regulator = attributes[:'financial_regulator']
407
+ end
411
408
 
412
- if attributes.key?(:'trading_country')
413
- self.trading_country = attributes[:'trading_country']
414
- end
409
+ if attributes.key?(:'regulatory_licence_number')
410
+ self.regulatory_licence_number = attributes[:'regulatory_licence_number']
411
+ end
415
412
 
416
- if attributes.key?(:'trading_address')
417
- self.trading_address = attributes[:'trading_address']
418
- end
413
+ if attributes.key?(:'contact_person_email')
414
+ self.contact_person_email = attributes[:'contact_person_email']
415
+ end
419
416
 
420
- if attributes.key?(:'number_monthly_transactions')
421
- self.number_monthly_transactions = attributes[:'number_monthly_transactions']
422
- end
417
+ if attributes.key?(:'trading_country')
418
+ self.trading_country = attributes[:'trading_country']
419
+ end
423
420
 
424
- if attributes.key?(:'amount_monthly_transactions')
425
- self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
426
- end
421
+ if attributes.key?(:'trading_address')
422
+ self.trading_address = attributes[:'trading_address']
423
+ end
427
424
 
428
- if attributes.key?(:'documents')
429
- if (value = attributes[:'documents']).is_a?(Array)
430
- self.documents = value
431
- end
432
- end
425
+ if attributes.key?(:'number_monthly_transactions')
426
+ self.number_monthly_transactions = attributes[:'number_monthly_transactions']
427
+ end
433
428
 
434
- if attributes.key?(:'metadata')
435
- self.metadata = attributes[:'metadata']
436
- end
429
+ if attributes.key?(:'amount_monthly_transactions')
430
+ self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
431
+ end
437
432
 
438
- if attributes.key?(:'errors')
439
- if (value = attributes[:'errors']).is_a?(Hash)
440
- self.errors = value
441
- end
433
+ if attributes.key?(:'documents')
434
+ if (value = attributes[:'documents']).is_a?(Array)
435
+ self.documents = value
442
436
  end
437
+ end
443
438
 
444
- if attributes.key?(:'onboarding_status')
445
- self.onboarding_status = attributes[:'onboarding_status']
446
- end
439
+ if attributes.key?(:'metadata')
440
+ self.metadata = attributes[:'metadata']
441
+ end
447
442
 
448
- if attributes.key?(:'politically_exposed_people')
449
- if (value = attributes[:'politically_exposed_people']).is_a?(Array)
450
- self.politically_exposed_people = value
451
- end
443
+ if attributes.key?(:'errors')
444
+ if (value = attributes[:'errors']).is_a?(Hash)
445
+ self.errors = value
452
446
  end
447
+ end
453
448
 
454
- if attributes.key?(:'external_id')
455
- self.external_id = attributes[:'external_id']
456
- end
449
+ if attributes.key?(:'onboarding_status')
450
+ self.onboarding_status = attributes[:'onboarding_status']
457
451
  end
458
452
 
459
- # Show invalid properties with the reasons. Usually used together with valid?
460
- # @return Array for valid properties with the reasons
461
- def list_invalid_properties
462
- invalid_properties = Array.new
463
- if @country.nil?
464
- invalid_properties.push('invalid value for "country", country cannot be nil.')
453
+ if attributes.key?(:'politically_exposed_people')
454
+ if (value = attributes[:'politically_exposed_people']).is_a?(Array)
455
+ self.politically_exposed_people = value
465
456
  end
457
+ end
466
458
 
467
- if @street.nil?
468
- invalid_properties.push('invalid value for "street", street cannot be nil.')
469
- end
459
+ if attributes.key?(:'external_id')
460
+ self.external_id = attributes[:'external_id']
461
+ end
470
462
 
471
- if @postal_code.nil?
472
- invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
473
- end
463
+ if attributes.key?(:'created_at')
464
+ self.created_at = attributes[:'created_at']
465
+ end
466
+ end
474
467
 
475
- if @city.nil?
476
- invalid_properties.push('invalid value for "city", city cannot be nil.')
477
- end
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
478
475
 
479
- if @phone_country.nil?
480
- invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
481
- end
476
+ if @street.nil?
477
+ invalid_properties.push('invalid value for "street", street cannot be nil.')
478
+ end
482
479
 
483
- if @email.nil?
484
- invalid_properties.push('invalid value for "email", email cannot be nil.')
485
- end
480
+ if @postal_code.nil?
481
+ invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
482
+ end
486
483
 
487
- if @ip.nil?
488
- invalid_properties.push('invalid value for "ip", ip cannot be nil.')
489
- end
484
+ if @city.nil?
485
+ invalid_properties.push('invalid value for "city", city cannot be nil.')
486
+ end
490
487
 
491
- if @documents.nil?
492
- invalid_properties.push('invalid value for "documents", documents cannot be nil.')
493
- end
488
+ if @phone_country.nil?
489
+ invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
490
+ end
494
491
 
495
- invalid_properties
496
- end
497
-
498
- # Check to see if the all the properties in the model are valid
499
- # @return true if the model is valid
500
- def valid?
501
- type_validator = EnumAttributeValidator.new('String', ["person", "business"])
502
- return false unless type_validator.valid?(@type)
503
- return false if @country.nil?
504
- return false if @street.nil?
505
- return false if @postal_code.nil?
506
- return false if @city.nil?
507
- return false if @phone_country.nil?
508
- return false if @email.nil?
509
- return false if @ip.nil?
510
- identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
511
- return false unless identification_type_validator.valid?(@identification_type)
512
- 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"])
513
- return false unless legal_entity_type_validator.valid?(@legal_entity_type)
514
- return false if @documents.nil?
515
- true
492
+ if @email.nil?
493
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
516
494
  end
517
495
 
518
- # Custom attribute writer method checking allowed values (enum).
519
- # @param [Object] type Object to be assigned
520
- def type=(type)
521
- validator = EnumAttributeValidator.new('String', ["person", "business"])
522
- unless validator.valid?(type)
523
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
524
- end
525
- @type = type
496
+ if @ip.nil?
497
+ invalid_properties.push('invalid value for "ip", ip cannot be nil.')
526
498
  end
527
499
 
528
- # Custom attribute writer method checking allowed values (enum).
529
- # @param [Object] identification_type Object to be assigned
530
- def identification_type=(identification_type)
531
- validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
532
- unless validator.valid?(identification_type)
533
- fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
534
- end
535
- @identification_type = identification_type
500
+ if @documents.nil?
501
+ invalid_properties.push('invalid value for "documents", documents cannot be nil.')
536
502
  end
537
503
 
538
- # Custom attribute writer method checking allowed values (enum).
539
- # @param [Object] legal_entity_type Object to be assigned
540
- def legal_entity_type=(legal_entity_type)
541
- 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"])
542
- unless validator.valid?(legal_entity_type)
543
- fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
544
- end
545
- @legal_entity_type = legal_entity_type
546
- end
547
-
548
- # Checks equality by comparing each attribute.
549
- # @param [Object] Object to be compared
550
- def ==(o)
551
- return true if self.equal?(o)
552
- self.class == o.class &&
553
- id == o.id &&
554
- type == o.type &&
555
- state == o.state &&
556
- country == o.country &&
557
- street == o.street &&
558
- postal_code == o.postal_code &&
559
- city == o.city &&
560
- phone_country == o.phone_country &&
561
- phone_number == o.phone_number &&
562
- email == o.email &&
563
- ip == o.ip &&
564
- address_description == o.address_description &&
565
- identification_number == o.identification_number &&
566
- identification_type == o.identification_type &&
567
- name == o.name &&
568
- first_name == o.first_name &&
569
- middle_name == o.middle_name &&
570
- last_name == o.last_name &&
571
- birth_date == o.birth_date &&
572
- occupation == o.occupation &&
573
- nationality == o.nationality &&
574
- legal_entity_type == o.legal_entity_type &&
575
- registration_date == o.registration_date &&
576
- registration_number == o.registration_number &&
577
- nature_of_business == o.nature_of_business &&
578
- source_of_funds == o.source_of_funds &&
579
- core_business_activities == o.core_business_activities &&
580
- purpose_of_opening_account == o.purpose_of_opening_account &&
581
- office_phone == o.office_phone &&
582
- vat_registration_number == o.vat_registration_number &&
583
- financial_regulator == o.financial_regulator &&
584
- regulatory_licence_number == o.regulatory_licence_number &&
585
- contact_person_email == o.contact_person_email &&
586
- trading_country == o.trading_country &&
587
- trading_address == o.trading_address &&
588
- number_monthly_transactions == o.number_monthly_transactions &&
589
- amount_monthly_transactions == o.amount_monthly_transactions &&
590
- documents == o.documents &&
591
- metadata == o.metadata &&
592
- errors == o.errors &&
593
- onboarding_status == o.onboarding_status &&
594
- politically_exposed_people == o.politically_exposed_people &&
595
- external_id == o.external_id
596
- end
597
-
598
- # @see the `==` method
599
- # @param [Object] Object to be compared
600
- def eql?(o)
601
- self == o
602
- end
603
-
604
- # Calculates hash code according to all attributes.
605
- # @return [Integer] Hash code
606
- def hash
607
- [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].hash
504
+ invalid_properties
505
+ end
506
+
507
+ # Check to see if the all the properties in the model are valid
508
+ # @return true if the model is valid
509
+ def valid?
510
+ type_validator = EnumAttributeValidator.new('String', ["person", "business"])
511
+ return false unless type_validator.valid?(@type)
512
+ return false if @country.nil?
513
+ return false if @street.nil?
514
+ return false if @postal_code.nil?
515
+ return false if @city.nil?
516
+ return false if @phone_country.nil?
517
+ return false if @email.nil?
518
+ return false if @ip.nil?
519
+ identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
520
+ return false unless identification_type_validator.valid?(@identification_type)
521
+ legal_entity_type_validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
522
+ return false unless legal_entity_type_validator.valid?(@legal_entity_type)
523
+ return false if @documents.nil?
524
+ true
525
+ end
526
+
527
+ # Custom attribute writer method checking allowed values (enum).
528
+ # @param [Object] type Object to be assigned
529
+ def type=(type)
530
+ validator = EnumAttributeValidator.new('String', ["person", "business"])
531
+ unless validator.valid?(type) || type.empty?
532
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
608
533
  end
534
+ @type = type
535
+ end
536
+
537
+ # Custom attribute writer method checking allowed values (enum).
538
+ # @param [Object] identification_type Object to be assigned
539
+ def identification_type=(identification_type)
540
+ validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
541
+ unless validator.valid?(identification_type) || identification_type.empty?
542
+ fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
543
+ end
544
+ @identification_type = identification_type
545
+ end
546
+
547
+ # Custom attribute writer method checking allowed values (enum).
548
+ # @param [Object] legal_entity_type Object to be assigned
549
+ def legal_entity_type=(legal_entity_type)
550
+ validator = EnumAttributeValidator.new('String', ["sole_proprietorship", "partnership", "privately_owned_company", "publicly_owned_company", "government_owned_entity", "trust", "ngo", "club_and_society", "go", "other", "financial_institution"])
551
+ unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
552
+ fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
553
+ end
554
+ @legal_entity_type = legal_entity_type
555
+ end
556
+
557
+ # Checks equality by comparing each attribute.
558
+ # @param [Object] Object to be compared
559
+ def ==(o)
560
+ return true if self.equal?(o)
561
+ self.class == o.class &&
562
+ id == o.id &&
563
+ type == o.type &&
564
+ state == o.state &&
565
+ country == o.country &&
566
+ street == o.street &&
567
+ postal_code == o.postal_code &&
568
+ city == o.city &&
569
+ phone_country == o.phone_country &&
570
+ phone_number == o.phone_number &&
571
+ email == o.email &&
572
+ ip == o.ip &&
573
+ address_description == o.address_description &&
574
+ identification_number == o.identification_number &&
575
+ identification_type == o.identification_type &&
576
+ name == o.name &&
577
+ first_name == o.first_name &&
578
+ middle_name == o.middle_name &&
579
+ last_name == o.last_name &&
580
+ birth_date == o.birth_date &&
581
+ occupation == o.occupation &&
582
+ nationality == o.nationality &&
583
+ legal_entity_type == o.legal_entity_type &&
584
+ registration_date == o.registration_date &&
585
+ registration_number == o.registration_number &&
586
+ nature_of_business == o.nature_of_business &&
587
+ source_of_funds == o.source_of_funds &&
588
+ core_business_activities == o.core_business_activities &&
589
+ purpose_of_opening_account == o.purpose_of_opening_account &&
590
+ office_phone == o.office_phone &&
591
+ vat_registration_number == o.vat_registration_number &&
592
+ financial_regulator == o.financial_regulator &&
593
+ regulatory_licence_number == o.regulatory_licence_number &&
594
+ contact_person_email == o.contact_person_email &&
595
+ trading_country == o.trading_country &&
596
+ trading_address == o.trading_address &&
597
+ number_monthly_transactions == o.number_monthly_transactions &&
598
+ amount_monthly_transactions == o.amount_monthly_transactions &&
599
+ documents == o.documents &&
600
+ metadata == o.metadata &&
601
+ errors == o.errors &&
602
+ onboarding_status == o.onboarding_status &&
603
+ politically_exposed_people == o.politically_exposed_people &&
604
+ external_id == o.external_id &&
605
+ created_at == o.created_at
606
+ end
607
+
608
+ # @see the `==` method
609
+ # @param [Object] Object to be compared
610
+ def eql?(o)
611
+ self == o
612
+ end
613
+
614
+ # Calculates hash code according to all attributes.
615
+ # @return [Integer] Hash code
616
+ def hash
617
+ [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, core_business_activities, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, created_at].hash
618
+ end
609
619
 
610
620
  require 'active_support/core_ext/hash'
611
621
  require 'active_support/hash_with_indifferent_access.rb'
@@ -721,5 +731,6 @@ def _to_hash(value)
721
731
  end
722
732
  end
723
733
 
724
- end
734
+ end
735
+
725
736
  end