transferzero-sdk 1.6.0 → 1.10.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 (138) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -0
  3. data/README.md +12 -4
  4. data/docs/Currency.md +0 -2
  5. data/docs/CurrencyExchange.md +0 -2
  6. data/docs/CurrencyOpposite.md +3 -3
  7. data/docs/Document.md +2 -0
  8. data/docs/PayoutMethod.md +1 -1
  9. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  10. data/docs/PayoutMethodDetails.md +19 -5
  11. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  12. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  13. data/docs/PayoutMethodDetailsMobile.md +3 -1
  14. data/docs/PayoutMethodDetailsXOFCash.md +27 -0
  15. data/docs/PayoutMethodDetailsZARBank.md +35 -0
  16. data/docs/ProofOfPayment.md +23 -0
  17. data/docs/ProofOfPaymentListResponse.md +17 -0
  18. data/docs/Recipient.md +3 -1
  19. data/docs/RecipientStateReasonDetails.md +23 -0
  20. data/docs/RecipientsApi.md +63 -1
  21. data/docs/Sender.md +20 -8
  22. data/lib/transferzero-sdk.rb +7 -0
  23. data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
  24. data/lib/transferzero-sdk/api_client.rb +5 -3
  25. data/lib/transferzero-sdk/models/account.rb +70 -69
  26. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  27. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  28. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  29. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  30. data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
  31. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  32. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  33. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  34. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  35. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  36. data/lib/transferzero-sdk/models/currency.rb +133 -142
  37. data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
  38. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  39. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  40. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
  41. data/lib/transferzero-sdk/models/debit.rb +151 -150
  42. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  43. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  44. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  45. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  46. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  47. data/lib/transferzero-sdk/models/document.rb +180 -169
  48. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  49. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  50. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  51. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  52. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  53. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  54. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  55. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  56. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  57. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  58. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  59. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -121
  60. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
  61. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  62. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
  63. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  64. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  65. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  66. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  67. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  68. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  69. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  70. data/lib/transferzero-sdk/models/payout_method_details.rb +402 -320
  71. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  72. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
  73. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  74. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  75. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  76. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  77. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
  78. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
  79. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
  80. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +263 -0
  81. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  82. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
  83. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  84. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  85. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  86. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
  87. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  88. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  89. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  90. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -122
  91. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  92. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  93. data/lib/transferzero-sdk/models/recipient.rb +237 -227
  94. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  95. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  96. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  97. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  98. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  99. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  100. data/lib/transferzero-sdk/models/sender.rb +565 -480
  101. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  102. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  103. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  104. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  105. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  106. data/lib/transferzero-sdk/models/sender_state.rb +19 -24
  107. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  108. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  109. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  110. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  111. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  112. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  113. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  114. data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
  115. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  116. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  117. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  118. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  119. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  120. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  121. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  122. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  123. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  124. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  125. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  126. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  127. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  128. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  129. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  130. data/lib/transferzero-sdk/version.rb +1 -1
  131. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  132. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  133. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  134. data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
  135. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  136. data/spec/models/proof_of_payment_spec.rb +59 -0
  137. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  138. metadata +32 -3
@@ -13,599 +13,683 @@ 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 { // name \"first_name\": \"Jane\", \"last_name\": \"Doe\", // address \"country\": \"US\", \"city\": \"New York\", \"street\": \"20 W 34th St\", \"postal_code\": \"10001\", \"address_description\": \"\", // DOB \"birth_date\": \"1974-12-24\", // Contact Details; You can usually use your company's contact details here \"phone_country\": \"US\", \"phone_number\": \"5555551234\", \"email\": \"info@transferzero.com\", // ID of the sender in your system \"external_id\": \"Sender:US:234523\", // these fields are mandatory, but you can usually leave them with the following default values: \"documents\": [ ], \"ip\": \"127.0.0.1\", \"metadata\": {} } ``` Business Sender Example: ```json { \"type\": \"business\", \"name\": \"Company name\", // Country of Incorporation \"country\": \"US\", // Trading address of the company \"trading_country\": \"US\", \"city\": \"New York\", \"street\": \"20 W 34th St\", \"postal_code\": \"10001\", \"address_description\": \"\", // Company Details \"legal_entity_type\": \"privately_owned_company\", \"registration_date\": \"2012-01-25\", \"registration_number\": \"VAT1234567\", \"nature_of_business\": \"retail_trade\", // Contact Details \"phone_country\": \"US\", \"phone_number\": \"5555551234\", \"email\": \"example@home.org\", // ID of the sender in your system \"external_id\": \"Sender:Business:US:234523\", // these fields are mandatory, but you can usually leave them with the following default values: \"documents\": [ ], \"ip\": \"127.0.0.1\", \"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. This is the residential country for personal senders and the country of incorporation for business senders.
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
+ # Determines language of the served content. Defaults to English
59
+ attr_accessor :lang
60
60
 
61
- # First name of sender (used only with a Personal sender)
62
- attr_accessor :first_name
61
+ # Name of sender (used only with a Business sender)
62
+ attr_accessor :name
63
63
 
64
- # Middle name of sender (used only with a Personal sender)
65
- attr_accessor :middle_name
64
+ # First name of sender (used only with a Personal sender)
65
+ attr_accessor :first_name
66
66
 
67
- # Last name of sender (used only with a Personal sender)
68
- attr_accessor :last_name
67
+ # Middle name of sender (used only with a Personal sender)
68
+ attr_accessor :middle_name
69
69
 
70
- # Date of birth of sender (used only with a Personal sender)
71
- attr_accessor :birth_date
70
+ # Last name of sender (used only with a Personal sender)
71
+ attr_accessor :last_name
72
72
 
73
- # Occupation of sender (used only with a Personal sender)
74
- attr_accessor :occupation
73
+ # Date of birth of sender (used only with a Personal sender)
74
+ attr_accessor :birth_date
75
75
 
76
- # The nationality of the sender (used only with a Personal sender)
77
- attr_accessor :nationality
76
+ # Occupation of sender (used only with a Personal sender)
77
+ attr_accessor :occupation
78
78
 
79
- # Legal entity type (used only with a Business sender)
80
- attr_accessor :legal_entity_type
79
+ # The nationality of the sender (used only with a Personal sender)
80
+ attr_accessor :nationality
81
81
 
82
- # The registration date (used only with a Business sender)
83
- attr_accessor :registration_date
82
+ # Legal entity type (used only with a Business sender) Available values: - sole_proprietorship: Sole Proprietorship - partnership: Partnership - privately_owned_company: Privately Owned Company (Limited Company) - publicly_owned_company: Publicly Listed Company (PLC) - government_owned_entity: Government Owned Entity Trusts - trust: Foundations & Similar Entities - ngo: Non-Government Organisations / Charities inc Religious bodies and place of worship - club_and_society: Clubs and Societies - go: GO (Majority Owned Subsidiary of State-Owned Company) - financial_institution: Financial Institution Please note not all values are acceptable for some our corridors. Please reach out to our sales teams for more information. Note that if you select `financial_institution` then the fields `vat_registration_number`, `financial_regulator` and `regulatory_licence_number` will be mandatory as well.
83
+ attr_accessor :legal_entity_type
84
84
 
85
- # The registration number (used only with a Business sender)
86
- attr_accessor :registration_number
85
+ # The registration date (used only with a Business sender)
86
+ attr_accessor :registration_date
87
87
 
88
- # Nature of business options (used only with a Business sender)
89
- attr_accessor :nature_of_business
88
+ # The registration number (used only with a Business sender)
89
+ attr_accessor :registration_number
90
90
 
91
- # The source of funds
92
- attr_accessor :source_of_funds
91
+ # Nature of business options (used only with a Business sender) Available values: - personal: Personal - agriculture_and_hunting: Agriculture and Hunting - forestry: Forestry - fishing: Fishing - agricultural_by_products: Agricultural By-Products - coal_mining: Coal Mining - oil_mining: Oil Mining - iron_ore_mining: Iron Ore Mining - other_metal_and_diamond_mining: Other Metal and Diamond Mining - other_mineral_mining: Other Mineral Mining - manufacturing_of_food_drink_tobacco: Manufacture of Food/Drink/Tobacco - manufacturing_of_textiles_leather_fur_furniture: Manufacture of Textiles/Leather/Fur/Furniture - manufacture_of_wooden_products_furniture: Manufacture of Wooden Products/Furniture - manufacture_of_paper_pulp_allied_products: Manufacture of Paper/Pulp/Allied Products - manufacture_of_chemicals_medical_petroleum_rubber_plastic_products: Manufacture Of Chemicals Medical Petroleum Rubber Plastic Products - manufacture_of_pottery_china_glass_stone: Manufacture Of Pottery China Glass Stone - manufacture_of_iron_steel_non_ferrous_metals_basic_industries: Manufacture Of Iron Steel Non-Ferrous Metals Basic Industries - manufacture_of_metal_products_electrical_and_scientific_engineering: Manufacture Of Metal Products Electrical And Scientific Engineering - manufacture_of_jewelry_musical_instruments_toys: Manufacture Of Jewelry Musical Instruments Toys - electricity_gas_and_water: Electricity, Gas And Water - construction: Construction - wholesale_trade: Wholesale Trade - retail_trade: Retail Trade - catering_incl_hotels: Catering Incl. Hotels - transport_storage: Transport Storage - communications: Communications - finance_and_holding_companies: Finance And Holding Companies - insurance: Insurance - business_services: Business Services - real_estate_development_investment: Real Estate Development Investment - central_state_governments: Central State Governments - community_services_defence_police_prisons_etc: Community Services Defence Police Prisons Etc - social_services_education_health_care: Social Services Education Health Care - personal_services_leisure_services: Personal Services - Leisure Services - personal_services_domestic_laundry_repairs: Personal Services - Domestic Laundry Repairs - personal_services_embassies_international_organisations: Personal Services - Embassies
92
+ attr_accessor :nature_of_business
93
93
 
94
- # The core activities (used only with a Business sender)
95
- attr_accessor :core_business_activities
94
+ # The source of funds
95
+ attr_accessor :source_of_funds
96
96
 
97
- # The purpose for opening their account (used only with a Business sender)
98
- attr_accessor :purpose_of_opening_account
97
+ # Custom source of funds
98
+ attr_accessor :custom_source_of_funds
99
99
 
100
- # The official phone number (used only with a Business sender)
101
- attr_accessor :office_phone
100
+ # The core activity (used only with a Business sender)
101
+ attr_accessor :core_business_activity
102
102
 
103
- # The VAT registration number (used only with a Business sender)
104
- attr_accessor :vat_registration_number
103
+ # The purpose for opening their account (used only with a Business sender)
104
+ attr_accessor :purpose_of_opening_account
105
105
 
106
- # The Financial Regulator (used only with a Business sender)
107
- attr_accessor :financial_regulator
106
+ # The official phone number (used only with a Business sender)
107
+ attr_accessor :office_phone
108
108
 
109
- # The Regulatory Licence Number (used only with a Business sender)
110
- attr_accessor :regulatory_licence_number
109
+ # The VAT registration number (used only with a Business sender)
110
+ attr_accessor :vat_registration_number
111
111
 
112
- # The contact's email address (used only with a Business sender)
113
- attr_accessor :contact_person_email
112
+ # The Financial Regulator (used only with a Business sender)
113
+ attr_accessor :financial_regulator
114
114
 
115
- # The Business trading country (used only with a Business sender)
116
- attr_accessor :trading_country
115
+ # The Regulatory Licence Number (used only with a Business sender)
116
+ attr_accessor :regulatory_licence_number
117
117
 
118
- # The Business trading address (used only with a Business sender)
119
- attr_accessor :trading_address
118
+ # The contact's email address (used only with a Business sender)
119
+ attr_accessor :contact_person_email
120
120
 
121
- # The estimated number of monthly transactions (used only with a Business sender)
122
- attr_accessor :number_monthly_transactions
121
+ # The Business trading country (used only with a Business sender)
122
+ attr_accessor :trading_country
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 Business trading address (used only with a Business sender)
125
+ attr_accessor :trading_address
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
+ # The estimated number of monthly transactions (used only with a Business sender)
128
+ attr_accessor :number_monthly_transactions
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
+ # The estimated amount for all transactions each month in USD (used only with a Business sender)
131
+ attr_accessor :amount_monthly_transactions
132
132
 
133
- # The fields that have some problems and don't pass validation
134
- attr_accessor :errors
133
+ # 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\" } ] ```
134
+ attr_accessor :documents
135
135
 
136
- # The onboarding status of the sender
137
- attr_accessor :onboarding_status
136
+ # 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.
137
+ attr_accessor :metadata
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
+ # The fields that have some problems and don't pass validation
140
+ attr_accessor :errors
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
+ # The onboarding status of the sender
143
+ attr_accessor :onboarding_status
144
144
 
145
- class EnumAttributeValidator
146
- attr_reader :datatype
147
- attr_reader :allowable_values
145
+ # 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\" } } ```
146
+ attr_accessor :politically_exposed_people
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
+ # 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.
149
+ attr_accessor :external_id
150
+
151
+ # City of birth of sender
152
+ attr_accessor :city_of_birth
153
+
154
+ # Country of birth of sender in 2-character alpha ISO 3166-2 country format
155
+ attr_accessor :country_of_birth
156
+
157
+ # The gender of the sender: - `M`: Male - `F`: Female - `O`: Other
158
+ attr_accessor :gender
159
+
160
+ # Date and time of sender was created
161
+ attr_accessor :created_at
162
+
163
+ class EnumAttributeValidator
164
+ attr_reader :datatype
165
+ attr_reader :allowable_values
166
+
167
+ def initialize(datatype, allowable_values)
168
+ @allowable_values = allowable_values.map do |value|
169
+ case datatype.to_s
170
+ when /Integer/i
171
+ value.to_i
172
+ when /Float/i
173
+ value.to_f
174
+ else
175
+ value
159
176
  end
160
177
  end
178
+ end
161
179
 
162
- def valid?(value)
163
- !value || allowable_values.include?(value)
164
- end
180
+ def valid?(value)
181
+ !value || allowable_values.include?(value)
165
182
  end
183
+ end
166
184
 
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
185
+ # Attribute mapping from ruby-style variable name to JSON key.
186
+ def self.attribute_map
187
+ {
188
+ :'id' => :'id',
189
+ :'type' => :'type',
190
+ :'state' => :'state',
191
+ :'country' => :'country',
192
+ :'street' => :'street',
193
+ :'postal_code' => :'postal_code',
194
+ :'city' => :'city',
195
+ :'phone_country' => :'phone_country',
196
+ :'phone_number' => :'phone_number',
197
+ :'email' => :'email',
198
+ :'ip' => :'ip',
199
+ :'address_description' => :'address_description',
200
+ :'identification_number' => :'identification_number',
201
+ :'identification_type' => :'identification_type',
202
+ :'lang' => :'lang',
203
+ :'name' => :'name',
204
+ :'first_name' => :'first_name',
205
+ :'middle_name' => :'middle_name',
206
+ :'last_name' => :'last_name',
207
+ :'birth_date' => :'birth_date',
208
+ :'occupation' => :'occupation',
209
+ :'nationality' => :'nationality',
210
+ :'legal_entity_type' => :'legal_entity_type',
211
+ :'registration_date' => :'registration_date',
212
+ :'registration_number' => :'registration_number',
213
+ :'nature_of_business' => :'nature_of_business',
214
+ :'source_of_funds' => :'source_of_funds',
215
+ :'custom_source_of_funds' => :'custom_source_of_funds',
216
+ :'core_business_activity' => :'core_business_activity',
217
+ :'purpose_of_opening_account' => :'purpose_of_opening_account',
218
+ :'office_phone' => :'office_phone',
219
+ :'vat_registration_number' => :'vat_registration_number',
220
+ :'financial_regulator' => :'financial_regulator',
221
+ :'regulatory_licence_number' => :'regulatory_licence_number',
222
+ :'contact_person_email' => :'contact_person_email',
223
+ :'trading_country' => :'trading_country',
224
+ :'trading_address' => :'trading_address',
225
+ :'number_monthly_transactions' => :'number_monthly_transactions',
226
+ :'amount_monthly_transactions' => :'amount_monthly_transactions',
227
+ :'documents' => :'documents',
228
+ :'metadata' => :'metadata',
229
+ :'errors' => :'errors',
230
+ :'onboarding_status' => :'onboarding_status',
231
+ :'politically_exposed_people' => :'politically_exposed_people',
232
+ :'external_id' => :'external_id',
233
+ :'city_of_birth' => :'city_of_birth',
234
+ :'country_of_birth' => :'country_of_birth',
235
+ :'gender' => :'gender',
236
+ :'created_at' => :'created_at'
237
+ }
238
+ end
271
239
 
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
- }
240
+ # Attribute type mapping.
241
+ def self.openapi_types
242
+ {
243
+ :'id' => :'String',
244
+ :'type' => :'String',
245
+ :'state' => :'SenderState',
246
+ :'country' => :'String',
247
+ :'street' => :'String',
248
+ :'postal_code' => :'String',
249
+ :'city' => :'String',
250
+ :'phone_country' => :'String',
251
+ :'phone_number' => :'String',
252
+ :'email' => :'String',
253
+ :'ip' => :'String',
254
+ :'address_description' => :'String',
255
+ :'identification_number' => :'String',
256
+ :'identification_type' => :'String',
257
+ :'lang' => :'String',
258
+ :'name' => :'String',
259
+ :'first_name' => :'String',
260
+ :'middle_name' => :'String',
261
+ :'last_name' => :'String',
262
+ :'birth_date' => :'Date',
263
+ :'occupation' => :'String',
264
+ :'nationality' => :'String',
265
+ :'legal_entity_type' => :'String',
266
+ :'registration_date' => :'Date',
267
+ :'registration_number' => :'String',
268
+ :'nature_of_business' => :'String',
269
+ :'source_of_funds' => :'String',
270
+ :'custom_source_of_funds' => :'String',
271
+ :'core_business_activity' => :'String',
272
+ :'purpose_of_opening_account' => :'String',
273
+ :'office_phone' => :'String',
274
+ :'vat_registration_number' => :'String',
275
+ :'financial_regulator' => :'String',
276
+ :'regulatory_licence_number' => :'String',
277
+ :'contact_person_email' => :'String',
278
+ :'trading_country' => :'String',
279
+ :'trading_address' => :'String',
280
+ :'number_monthly_transactions' => :'String',
281
+ :'amount_monthly_transactions' => :'String',
282
+ :'documents' => :'Array<Document>',
283
+ :'metadata' => :'Object',
284
+ :'errors' => :'Hash<String, Array<ValidationErrorDescription>>',
285
+ :'onboarding_status' => :'String',
286
+ :'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
287
+ :'external_id' => :'String',
288
+ :'city_of_birth' => :'String',
289
+ :'country_of_birth' => :'String',
290
+ :'gender' => :'String',
291
+ :'created_at' => :'String'
292
+ }
293
+ end
279
294
 
280
- if attributes.key?(:'id')
281
- self.id = attributes[:'id']
282
- end
295
+ # Initializes the object
296
+ # @param [Hash] attributes Model attributes in the form of hash
297
+ def initialize(attributes = {})
298
+ if (!attributes.is_a?(Hash))
299
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Sender` initialize method"
300
+ end
283
301
 
284
- if attributes.key?(:'type')
285
- self.type = attributes[:'type']
302
+ # check to see if the attribute exists and convert string to symbol for hash key
303
+ attributes = attributes.each_with_object({}) { |(k, v), h|
304
+ if (!self.class.attribute_map.key?(k.to_sym))
305
+ 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
306
  end
307
+ h[k.to_sym] = v
308
+ }
287
309
 
288
- if attributes.key?(:'state')
289
- self.state = attributes[:'state']
290
- end
310
+ if attributes.key?(:'id')
311
+ self.id = attributes[:'id']
312
+ end
291
313
 
292
- if attributes.key?(:'country')
293
- self.country = attributes[:'country']
294
- end
314
+ if attributes.key?(:'type')
315
+ self.type = attributes[:'type']
316
+ end
295
317
 
296
- if attributes.key?(:'street')
297
- self.street = attributes[:'street']
298
- end
318
+ if attributes.key?(:'state')
319
+ self.state = attributes[:'state']
320
+ end
299
321
 
300
- if attributes.key?(:'postal_code')
301
- self.postal_code = attributes[:'postal_code']
302
- end
322
+ if attributes.key?(:'country')
323
+ self.country = attributes[:'country']
324
+ end
303
325
 
304
- if attributes.key?(:'city')
305
- self.city = attributes[:'city']
306
- end
326
+ if attributes.key?(:'street')
327
+ self.street = attributes[:'street']
328
+ end
307
329
 
308
- if attributes.key?(:'phone_country')
309
- self.phone_country = attributes[:'phone_country']
310
- end
330
+ if attributes.key?(:'postal_code')
331
+ self.postal_code = attributes[:'postal_code']
332
+ end
311
333
 
312
- if attributes.key?(:'phone_number')
313
- self.phone_number = attributes[:'phone_number']
314
- end
334
+ if attributes.key?(:'city')
335
+ self.city = attributes[:'city']
336
+ end
315
337
 
316
- if attributes.key?(:'email')
317
- self.email = attributes[:'email']
318
- end
338
+ if attributes.key?(:'phone_country')
339
+ self.phone_country = attributes[:'phone_country']
340
+ end
319
341
 
320
- if attributes.key?(:'ip')
321
- self.ip = attributes[:'ip']
322
- end
342
+ if attributes.key?(:'phone_number')
343
+ self.phone_number = attributes[:'phone_number']
344
+ end
323
345
 
324
- if attributes.key?(:'address_description')
325
- self.address_description = attributes[:'address_description']
326
- end
346
+ if attributes.key?(:'email')
347
+ self.email = attributes[:'email']
348
+ end
327
349
 
328
- if attributes.key?(:'identification_number')
329
- self.identification_number = attributes[:'identification_number']
330
- end
350
+ if attributes.key?(:'ip')
351
+ self.ip = attributes[:'ip']
352
+ end
331
353
 
332
- if attributes.key?(:'identification_type')
333
- self.identification_type = attributes[:'identification_type']
334
- end
354
+ if attributes.key?(:'address_description')
355
+ self.address_description = attributes[:'address_description']
356
+ end
335
357
 
336
- if attributes.key?(:'name')
337
- self.name = attributes[:'name']
338
- end
358
+ if attributes.key?(:'identification_number')
359
+ self.identification_number = attributes[:'identification_number']
360
+ end
339
361
 
340
- if attributes.key?(:'first_name')
341
- self.first_name = attributes[:'first_name']
342
- end
362
+ if attributes.key?(:'identification_type')
363
+ self.identification_type = attributes[:'identification_type']
364
+ end
343
365
 
344
- if attributes.key?(:'middle_name')
345
- self.middle_name = attributes[:'middle_name']
346
- end
366
+ if attributes.key?(:'lang')
367
+ self.lang = attributes[:'lang']
368
+ end
347
369
 
348
- if attributes.key?(:'last_name')
349
- self.last_name = attributes[:'last_name']
350
- end
370
+ if attributes.key?(:'name')
371
+ self.name = attributes[:'name']
372
+ end
351
373
 
352
- if attributes.key?(:'birth_date')
353
- self.birth_date = attributes[:'birth_date']
354
- end
374
+ if attributes.key?(:'first_name')
375
+ self.first_name = attributes[:'first_name']
376
+ end
355
377
 
356
- if attributes.key?(:'occupation')
357
- self.occupation = attributes[:'occupation']
358
- end
378
+ if attributes.key?(:'middle_name')
379
+ self.middle_name = attributes[:'middle_name']
380
+ end
359
381
 
360
- if attributes.key?(:'nationality')
361
- self.nationality = attributes[:'nationality']
362
- end
382
+ if attributes.key?(:'last_name')
383
+ self.last_name = attributes[:'last_name']
384
+ end
363
385
 
364
- if attributes.key?(:'legal_entity_type')
365
- self.legal_entity_type = attributes[:'legal_entity_type']
366
- end
386
+ if attributes.key?(:'birth_date')
387
+ self.birth_date = attributes[:'birth_date']
388
+ end
367
389
 
368
- if attributes.key?(:'registration_date')
369
- self.registration_date = attributes[:'registration_date']
370
- end
390
+ if attributes.key?(:'occupation')
391
+ self.occupation = attributes[:'occupation']
392
+ end
371
393
 
372
- if attributes.key?(:'registration_number')
373
- self.registration_number = attributes[:'registration_number']
374
- end
394
+ if attributes.key?(:'nationality')
395
+ self.nationality = attributes[:'nationality']
396
+ end
375
397
 
376
- if attributes.key?(:'nature_of_business')
377
- self.nature_of_business = attributes[:'nature_of_business']
378
- end
398
+ if attributes.key?(:'legal_entity_type')
399
+ self.legal_entity_type = attributes[:'legal_entity_type']
400
+ end
379
401
 
380
- if attributes.key?(:'source_of_funds')
381
- self.source_of_funds = attributes[:'source_of_funds']
382
- end
402
+ if attributes.key?(:'registration_date')
403
+ self.registration_date = attributes[:'registration_date']
404
+ end
383
405
 
384
- if attributes.key?(:'core_business_activities')
385
- self.core_business_activities = attributes[:'core_business_activities']
386
- end
406
+ if attributes.key?(:'registration_number')
407
+ self.registration_number = attributes[:'registration_number']
408
+ end
387
409
 
388
- if attributes.key?(:'purpose_of_opening_account')
389
- self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
390
- end
410
+ if attributes.key?(:'nature_of_business')
411
+ self.nature_of_business = attributes[:'nature_of_business']
412
+ end
391
413
 
392
- if attributes.key?(:'office_phone')
393
- self.office_phone = attributes[:'office_phone']
394
- end
414
+ if attributes.key?(:'source_of_funds')
415
+ self.source_of_funds = attributes[:'source_of_funds']
416
+ end
395
417
 
396
- if attributes.key?(:'vat_registration_number')
397
- self.vat_registration_number = attributes[:'vat_registration_number']
398
- end
418
+ if attributes.key?(:'custom_source_of_funds')
419
+ self.custom_source_of_funds = attributes[:'custom_source_of_funds']
420
+ end
399
421
 
400
- if attributes.key?(:'financial_regulator')
401
- self.financial_regulator = attributes[:'financial_regulator']
402
- end
422
+ if attributes.key?(:'core_business_activity')
423
+ self.core_business_activity = attributes[:'core_business_activity']
424
+ end
403
425
 
404
- if attributes.key?(:'regulatory_licence_number')
405
- self.regulatory_licence_number = attributes[:'regulatory_licence_number']
406
- end
426
+ if attributes.key?(:'purpose_of_opening_account')
427
+ self.purpose_of_opening_account = attributes[:'purpose_of_opening_account']
428
+ end
407
429
 
408
- if attributes.key?(:'contact_person_email')
409
- self.contact_person_email = attributes[:'contact_person_email']
410
- end
430
+ if attributes.key?(:'office_phone')
431
+ self.office_phone = attributes[:'office_phone']
432
+ end
411
433
 
412
- if attributes.key?(:'trading_country')
413
- self.trading_country = attributes[:'trading_country']
414
- end
434
+ if attributes.key?(:'vat_registration_number')
435
+ self.vat_registration_number = attributes[:'vat_registration_number']
436
+ end
415
437
 
416
- if attributes.key?(:'trading_address')
417
- self.trading_address = attributes[:'trading_address']
418
- end
438
+ if attributes.key?(:'financial_regulator')
439
+ self.financial_regulator = attributes[:'financial_regulator']
440
+ end
419
441
 
420
- if attributes.key?(:'number_monthly_transactions')
421
- self.number_monthly_transactions = attributes[:'number_monthly_transactions']
422
- end
442
+ if attributes.key?(:'regulatory_licence_number')
443
+ self.regulatory_licence_number = attributes[:'regulatory_licence_number']
444
+ end
423
445
 
424
- if attributes.key?(:'amount_monthly_transactions')
425
- self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
426
- end
446
+ if attributes.key?(:'contact_person_email')
447
+ self.contact_person_email = attributes[:'contact_person_email']
448
+ end
427
449
 
428
- if attributes.key?(:'documents')
429
- if (value = attributes[:'documents']).is_a?(Array)
430
- self.documents = value
431
- end
432
- end
450
+ if attributes.key?(:'trading_country')
451
+ self.trading_country = attributes[:'trading_country']
452
+ end
433
453
 
434
- if attributes.key?(:'metadata')
435
- self.metadata = attributes[:'metadata']
436
- end
454
+ if attributes.key?(:'trading_address')
455
+ self.trading_address = attributes[:'trading_address']
456
+ end
437
457
 
438
- if attributes.key?(:'errors')
439
- if (value = attributes[:'errors']).is_a?(Hash)
440
- self.errors = value
441
- end
442
- end
458
+ if attributes.key?(:'number_monthly_transactions')
459
+ self.number_monthly_transactions = attributes[:'number_monthly_transactions']
460
+ end
443
461
 
444
- if attributes.key?(:'onboarding_status')
445
- self.onboarding_status = attributes[:'onboarding_status']
446
- end
462
+ if attributes.key?(:'amount_monthly_transactions')
463
+ self.amount_monthly_transactions = attributes[:'amount_monthly_transactions']
464
+ end
447
465
 
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
466
+ if attributes.key?(:'documents')
467
+ if (value = attributes[:'documents']).is_a?(Array)
468
+ self.documents = value
452
469
  end
470
+ end
453
471
 
454
- if attributes.key?(:'external_id')
455
- self.external_id = attributes[:'external_id']
456
- end
472
+ if attributes.key?(:'metadata')
473
+ self.metadata = attributes[:'metadata']
457
474
  end
458
475
 
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.')
476
+ if attributes.key?(:'errors')
477
+ if (value = attributes[:'errors']).is_a?(Hash)
478
+ self.errors = value
465
479
  end
480
+ end
466
481
 
467
- if @street.nil?
468
- invalid_properties.push('invalid value for "street", street cannot be nil.')
469
- end
482
+ if attributes.key?(:'onboarding_status')
483
+ self.onboarding_status = attributes[:'onboarding_status']
484
+ end
470
485
 
471
- if @postal_code.nil?
472
- invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
486
+ if attributes.key?(:'politically_exposed_people')
487
+ if (value = attributes[:'politically_exposed_people']).is_a?(Array)
488
+ self.politically_exposed_people = value
473
489
  end
490
+ end
474
491
 
475
- if @city.nil?
476
- invalid_properties.push('invalid value for "city", city cannot be nil.')
477
- end
492
+ if attributes.key?(:'external_id')
493
+ self.external_id = attributes[:'external_id']
494
+ end
478
495
 
479
- if @phone_country.nil?
480
- invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
481
- end
496
+ if attributes.key?(:'city_of_birth')
497
+ self.city_of_birth = attributes[:'city_of_birth']
498
+ end
482
499
 
483
- if @email.nil?
484
- invalid_properties.push('invalid value for "email", email cannot be nil.')
485
- end
500
+ if attributes.key?(:'country_of_birth')
501
+ self.country_of_birth = attributes[:'country_of_birth']
502
+ end
486
503
 
487
- if @ip.nil?
488
- invalid_properties.push('invalid value for "ip", ip cannot be nil.')
489
- end
504
+ if attributes.key?(:'gender')
505
+ self.gender = attributes[:'gender']
506
+ end
490
507
 
491
- if @documents.nil?
492
- invalid_properties.push('invalid value for "documents", documents cannot be nil.')
493
- end
508
+ if attributes.key?(:'created_at')
509
+ self.created_at = attributes[:'created_at']
510
+ end
511
+ end
494
512
 
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
513
+ # Show invalid properties with the reasons. Usually used together with valid?
514
+ # @return Array for valid properties with the reasons
515
+ def list_invalid_properties
516
+ invalid_properties = Array.new
517
+ if @country.nil?
518
+ invalid_properties.push('invalid value for "country", country cannot be nil.')
516
519
  end
517
520
 
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
521
+ if @street.nil?
522
+ invalid_properties.push('invalid value for "street", street cannot be nil.')
526
523
  end
527
524
 
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
525
+ if @postal_code.nil?
526
+ invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.')
536
527
  end
537
528
 
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
529
+ if @city.nil?
530
+ invalid_properties.push('invalid value for "city", city cannot be nil.')
531
+ end
532
+
533
+ if @phone_country.nil?
534
+ invalid_properties.push('invalid value for "phone_country", phone_country cannot be nil.')
535
+ end
536
+
537
+ if @email.nil?
538
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
539
+ end
540
+
541
+ if @ip.nil?
542
+ invalid_properties.push('invalid value for "ip", ip cannot be nil.')
543
+ end
544
+
545
+ if @documents.nil?
546
+ invalid_properties.push('invalid value for "documents", documents cannot be nil.')
547
+ end
548
+
549
+ invalid_properties
550
+ end
551
+
552
+ # Check to see if the all the properties in the model are valid
553
+ # @return true if the model is valid
554
+ def valid?
555
+ type_validator = EnumAttributeValidator.new('String', ["person", "business"])
556
+ return false unless type_validator.valid?(@type)
557
+ return false if @country.nil?
558
+ return false if @street.nil?
559
+ return false if @postal_code.nil?
560
+ return false if @city.nil?
561
+ return false if @phone_country.nil?
562
+ return false if @email.nil?
563
+ return false if @ip.nil?
564
+ identification_type_validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
565
+ return false unless identification_type_validator.valid?(@identification_type)
566
+ 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"])
567
+ return false unless legal_entity_type_validator.valid?(@legal_entity_type)
568
+ nature_of_business_validator = EnumAttributeValidator.new('String', ["personal", "agriculture_and_hunting", "forestry", "fishing", "agricultural_by_products", "coal_mining", "oil_mining", "iron_ore_mining", "other_metal_and_diamond_mining", "other_mineral_mining", "manufacturing_of_food_drink_tobacco", "manufacturing_of_textiles_leather_fur_furniture", "manufacture_of_wooden_products_furniture", "manufacture_of_paper_pulp_allied_products", "manufacture_of_chemicals_medical_petroleum_rubber_plastic_products", "manufacture_of_pottery_china_glass_stone", "manufacture_of_iron_steel_non_ferrous_metals_basic_industries", "manufacture_of_metal_products_electrical_and_scientific_engineering", "manufacture_of_jewelry_musical_instruments_toys", "electricity_gas_and_water", "construction", "wholesale_trade", "retail_trade", "catering_incl_hotels", "transport_storage", "communications", "finance_and_holding_companies", "insurance", "business_services", "real_estate_development_investment", "central_state_governments", "community_services_defence_police_prisons_etc", "social_services_education_health_care", "personal_services_leisure_services", "personal_services_domestic_laundry_repairs", "personal_services_embassies_international_organisations"])
569
+ return false unless nature_of_business_validator.valid?(@nature_of_business)
570
+ return false if @documents.nil?
571
+ gender_validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
572
+ return false unless gender_validator.valid?(@gender)
573
+ true
574
+ end
575
+
576
+ # Custom attribute writer method checking allowed values (enum).
577
+ # @param [Object] type Object to be assigned
578
+ def type=(type)
579
+ validator = EnumAttributeValidator.new('String', ["person", "business"])
580
+ unless validator.valid?(type) || type.empty?
581
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
582
+ end
583
+ @type = type
584
+ end
585
+
586
+ # Custom attribute writer method checking allowed values (enum).
587
+ # @param [Object] identification_type Object to be assigned
588
+ def identification_type=(identification_type)
589
+ validator = EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
590
+ unless validator.valid?(identification_type) || identification_type.empty?
591
+ fail ArgumentError, "invalid value for \"identification_type\", must be one of #{validator.allowable_values}."
608
592
  end
593
+ @identification_type = identification_type
594
+ end
595
+
596
+ # Custom attribute writer method checking allowed values (enum).
597
+ # @param [Object] legal_entity_type Object to be assigned
598
+ def legal_entity_type=(legal_entity_type)
599
+ 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"])
600
+ unless validator.valid?(legal_entity_type) || legal_entity_type.empty?
601
+ fail ArgumentError, "invalid value for \"legal_entity_type\", must be one of #{validator.allowable_values}."
602
+ end
603
+ @legal_entity_type = legal_entity_type
604
+ end
605
+
606
+ # Custom attribute writer method checking allowed values (enum).
607
+ # @param [Object] nature_of_business Object to be assigned
608
+ def nature_of_business=(nature_of_business)
609
+ validator = EnumAttributeValidator.new('String', ["personal", "agriculture_and_hunting", "forestry", "fishing", "agricultural_by_products", "coal_mining", "oil_mining", "iron_ore_mining", "other_metal_and_diamond_mining", "other_mineral_mining", "manufacturing_of_food_drink_tobacco", "manufacturing_of_textiles_leather_fur_furniture", "manufacture_of_wooden_products_furniture", "manufacture_of_paper_pulp_allied_products", "manufacture_of_chemicals_medical_petroleum_rubber_plastic_products", "manufacture_of_pottery_china_glass_stone", "manufacture_of_iron_steel_non_ferrous_metals_basic_industries", "manufacture_of_metal_products_electrical_and_scientific_engineering", "manufacture_of_jewelry_musical_instruments_toys", "electricity_gas_and_water", "construction", "wholesale_trade", "retail_trade", "catering_incl_hotels", "transport_storage", "communications", "finance_and_holding_companies", "insurance", "business_services", "real_estate_development_investment", "central_state_governments", "community_services_defence_police_prisons_etc", "social_services_education_health_care", "personal_services_leisure_services", "personal_services_domestic_laundry_repairs", "personal_services_embassies_international_organisations"])
610
+ unless validator.valid?(nature_of_business) || nature_of_business.empty?
611
+ fail ArgumentError, "invalid value for \"nature_of_business\", must be one of #{validator.allowable_values}."
612
+ end
613
+ @nature_of_business = nature_of_business
614
+ end
615
+
616
+ # Custom attribute writer method checking allowed values (enum).
617
+ # @param [Object] gender Object to be assigned
618
+ def gender=(gender)
619
+ validator = EnumAttributeValidator.new('String', ["M", "F", "O"])
620
+ unless validator.valid?(gender) || gender.empty?
621
+ fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
622
+ end
623
+ @gender = gender
624
+ end
625
+
626
+ # Checks equality by comparing each attribute.
627
+ # @param [Object] Object to be compared
628
+ def ==(o)
629
+ return true if self.equal?(o)
630
+ self.class == o.class &&
631
+ id == o.id &&
632
+ type == o.type &&
633
+ state == o.state &&
634
+ country == o.country &&
635
+ street == o.street &&
636
+ postal_code == o.postal_code &&
637
+ city == o.city &&
638
+ phone_country == o.phone_country &&
639
+ phone_number == o.phone_number &&
640
+ email == o.email &&
641
+ ip == o.ip &&
642
+ address_description == o.address_description &&
643
+ identification_number == o.identification_number &&
644
+ identification_type == o.identification_type &&
645
+ lang == o.lang &&
646
+ name == o.name &&
647
+ first_name == o.first_name &&
648
+ middle_name == o.middle_name &&
649
+ last_name == o.last_name &&
650
+ birth_date == o.birth_date &&
651
+ occupation == o.occupation &&
652
+ nationality == o.nationality &&
653
+ legal_entity_type == o.legal_entity_type &&
654
+ registration_date == o.registration_date &&
655
+ registration_number == o.registration_number &&
656
+ nature_of_business == o.nature_of_business &&
657
+ source_of_funds == o.source_of_funds &&
658
+ custom_source_of_funds == o.custom_source_of_funds &&
659
+ core_business_activity == o.core_business_activity &&
660
+ purpose_of_opening_account == o.purpose_of_opening_account &&
661
+ office_phone == o.office_phone &&
662
+ vat_registration_number == o.vat_registration_number &&
663
+ financial_regulator == o.financial_regulator &&
664
+ regulatory_licence_number == o.regulatory_licence_number &&
665
+ contact_person_email == o.contact_person_email &&
666
+ trading_country == o.trading_country &&
667
+ trading_address == o.trading_address &&
668
+ number_monthly_transactions == o.number_monthly_transactions &&
669
+ amount_monthly_transactions == o.amount_monthly_transactions &&
670
+ documents == o.documents &&
671
+ metadata == o.metadata &&
672
+ errors == o.errors &&
673
+ onboarding_status == o.onboarding_status &&
674
+ politically_exposed_people == o.politically_exposed_people &&
675
+ external_id == o.external_id &&
676
+ city_of_birth == o.city_of_birth &&
677
+ country_of_birth == o.country_of_birth &&
678
+ gender == o.gender &&
679
+ created_at == o.created_at
680
+ end
681
+
682
+ # @see the `==` method
683
+ # @param [Object] Object to be compared
684
+ def eql?(o)
685
+ self == o
686
+ end
687
+
688
+ # Calculates hash code according to all attributes.
689
+ # @return [Integer] Hash code
690
+ def hash
691
+ [id, type, state, country, street, postal_code, city, phone_country, phone_number, email, ip, address_description, identification_number, identification_type, lang, name, first_name, middle_name, last_name, birth_date, occupation, nationality, legal_entity_type, registration_date, registration_number, nature_of_business, source_of_funds, custom_source_of_funds, core_business_activity, purpose_of_opening_account, office_phone, vat_registration_number, financial_regulator, regulatory_licence_number, contact_person_email, trading_country, trading_address, number_monthly_transactions, amount_monthly_transactions, documents, metadata, errors, onboarding_status, politically_exposed_people, external_id, city_of_birth, country_of_birth, gender, created_at].hash
692
+ end
609
693
 
610
694
  require 'active_support/core_ext/hash'
611
695
  require 'active_support/hash_with_indifferent_access.rb'
@@ -721,5 +805,6 @@ def _to_hash(value)
721
805
  end
722
806
  end
723
807
 
724
- end
808
+ end
809
+
725
810
  end