transferzero-sdk 1.8.0 → 1.12.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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -0
  3. data/README.md +15 -5
  4. data/docs/AccountMeta.md +1 -1
  5. data/docs/AccountValidationRequest.md +2 -0
  6. data/docs/Currency.md +1 -3
  7. data/docs/CurrencyExchange.md +1 -3
  8. data/docs/CurrencyOpposite.md +4 -4
  9. data/docs/Document.md +7 -3
  10. data/docs/DocumentsApi.md +2 -74
  11. data/docs/FieldSelectValidation.md +1 -1
  12. data/docs/FieldValidation.md +1 -1
  13. data/docs/PayinMethodDetails.md +3 -1
  14. data/docs/PayinMethodDetailsBTC.md +17 -0
  15. data/docs/PayinMethodDetailsMobile.md +1 -1
  16. data/docs/PaymentMethod.md +2 -2
  17. data/docs/PaymentMethodOpposite.md +2 -2
  18. data/docs/PayoutMethod.md +1 -1
  19. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  20. data/docs/PayoutMethodCountryEnum.md +16 -0
  21. data/docs/PayoutMethodDetails.md +21 -1
  22. data/docs/PayoutMethodDetailsBTC.md +23 -0
  23. data/docs/PayoutMethodDetailsGBPBank.md +29 -0
  24. data/docs/PayoutMethodDetailsIBAN.md +1 -1
  25. data/docs/PayoutMethodDetailsMobile.md +3 -1
  26. data/docs/PayoutMethodDetailsXOFCash.md +25 -0
  27. data/docs/PayoutMethodDetailsZARBank.md +35 -0
  28. data/docs/ProofOfPayment.md +23 -0
  29. data/docs/ProofOfPaymentListResponse.md +17 -0
  30. data/docs/Recipient.md +8 -4
  31. data/docs/RecipientStateReasonDetails.md +23 -0
  32. data/docs/RecipientsApi.md +63 -1
  33. data/docs/Sender.md +74 -34
  34. data/lib/transferzero-sdk.rb +10 -0
  35. data/lib/transferzero-sdk/api/documents_api.rb +0 -63
  36. data/lib/transferzero-sdk/api/recipients_api.rb +56 -2
  37. data/lib/transferzero-sdk/api_client.rb +5 -3
  38. data/lib/transferzero-sdk/models/account.rb +70 -69
  39. data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
  40. data/lib/transferzero-sdk/models/account_meta.rb +61 -60
  41. data/lib/transferzero-sdk/models/account_response.rb +66 -65
  42. data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
  43. data/lib/transferzero-sdk/models/account_validation_request.rb +171 -161
  44. data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
  45. data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
  46. data/lib/transferzero-sdk/models/api_log.rb +136 -135
  47. data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
  48. data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
  49. data/lib/transferzero-sdk/models/currency.rb +133 -142
  50. data/lib/transferzero-sdk/models/currency_exchange.rb +149 -158
  51. data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
  52. data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
  53. data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
  54. data/lib/transferzero-sdk/models/debit.rb +151 -150
  55. data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
  56. data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
  57. data/lib/transferzero-sdk/models/debit_request.rb +60 -59
  58. data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
  59. data/lib/transferzero-sdk/models/debit_response.rb +60 -59
  60. data/lib/transferzero-sdk/models/document.rb +197 -175
  61. data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
  62. data/lib/transferzero-sdk/models/document_request.rb +60 -59
  63. data/lib/transferzero-sdk/models/document_response.rb +60 -59
  64. data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
  65. data/lib/transferzero-sdk/models/error_status.rb +66 -65
  66. data/lib/transferzero-sdk/models/field_description.rb +95 -94
  67. data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
  68. data/lib/transferzero-sdk/models/field_validation.rb +78 -77
  69. data/lib/transferzero-sdk/models/pagination.rb +97 -96
  70. data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
  71. data/lib/transferzero-sdk/models/payin_method.rb +97 -96
  72. data/lib/transferzero-sdk/models/payin_method_details.rb +122 -110
  73. data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
  74. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
  75. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
  76. data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
  77. data/lib/transferzero-sdk/models/payment_method.rb +109 -108
  78. data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
  79. data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
  80. data/lib/transferzero-sdk/models/payout_method.rb +107 -106
  81. data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
  82. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  83. data/lib/transferzero-sdk/models/payout_method_country_enum.rb +32 -0
  84. data/lib/transferzero-sdk/models/payout_method_details.rb +417 -297
  85. data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
  86. data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
  87. data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
  88. data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
  89. data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
  90. data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
  91. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +93 -83
  92. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
  93. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
  94. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +254 -0
  95. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
  96. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
  97. data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
  98. data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
  99. data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
  100. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +17 -19
  101. data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
  102. data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
  103. data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
  104. data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -123
  105. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  106. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  107. data/lib/transferzero-sdk/models/recipient.rb +246 -226
  108. data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
  109. data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
  110. data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
  111. data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
  112. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  113. data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
  114. data/lib/transferzero-sdk/models/sender.rb +595 -358
  115. data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
  116. data/lib/transferzero-sdk/models/sender_request.rb +60 -59
  117. data/lib/transferzero-sdk/models/sender_response.rb +66 -65
  118. data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
  119. data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
  120. data/lib/transferzero-sdk/models/sender_state.rb +19 -24
  121. data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
  122. data/lib/transferzero-sdk/models/transaction.rb +192 -191
  123. data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
  124. data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
  125. data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
  126. data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
  127. data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
  128. data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
  129. data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
  130. data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
  131. data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
  132. data/lib/transferzero-sdk/models/webhook.rb +92 -91
  133. data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
  134. data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
  135. data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
  136. data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
  137. data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
  138. data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
  139. data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
  140. data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
  141. data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
  142. data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
  143. data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
  144. data/lib/transferzero-sdk/version.rb +1 -1
  145. data/spec/models/payin_method_details_btc_spec.rb +41 -0
  146. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  147. data/spec/models/payout_method_country_enum_spec.rb +35 -0
  148. data/spec/models/payout_method_details_btc_spec.rb +59 -0
  149. data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
  150. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  151. data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
  152. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  153. data/spec/models/proof_of_payment_spec.rb +59 -0
  154. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  155. data/transferzero-sdk-1.10.0.gem +0 -0
  156. data/transferzero-sdk-1.11.0.gem +0 -0
  157. metadata +46 -3
data/docs/Sender.md CHANGED
@@ -4,70 +4,110 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | | [optional]
7
8
  **type** | **String** | Type of sender to create - either person or business (defaults to person) | [optional]
8
- **country** | **String** | Country of sender in 2-character alpha ISO 3166-2 country format |
9
+ **state** | [**SenderState**](SenderState.md) | | [optional]
10
+ **country** | **String** | 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. |
11
+ **street** | **String** | Sender's street |
12
+ **postal_code** | **String** | Zip code of sender |
13
+ **city** | **String** | Sender's city |
9
14
  **phone_country** | **String** | Phone country of sender in 2-character alpha ISO 3166-2 country format |
10
15
  **phone_number** | **String** | Phone number of sender (without country callcode) | [optional]
11
16
  **email** | **String** | Email of sender |
17
+ **ip** | **String** | IP of sender |
18
+ **address_description** | **String** | Description of address | [optional]
19
+ **identification_number** | **String** | Identification number of document used | [optional]
20
+ **identification_type** | **String** | Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other Please note for Wizall `XOF::Cash` transactions the valid options are: - `ID`: National ID - `PP`: Passport | [optional]
21
+ **lang** | **String** | Determines language of the served content. Defaults to English | [optional]
22
+ **name** | **String** | Name of sender (used only with a Business sender) | [optional]
12
23
  **first_name** | **String** | First name of sender (used only with a Personal sender) | [optional]
13
24
  **middle_name** | **String** | Middle name of sender (used only with a Personal sender) | [optional]
14
25
  **last_name** | **String** | Last name of sender (used only with a Personal sender) | [optional]
26
+ **birth_date** | **Date** | Date of birth of sender (used only with a Personal sender) | [optional]
15
27
  **occupation** | **String** | Occupation of sender (used only with a Personal sender) | [optional]
16
28
  **nationality** | **String** | The nationality of the sender (used only with a Personal sender) | [optional]
17
- **onboarding_status** | **String** | The onboarding status of the sender | [optional]
18
- **address** | **String** | The address of the sender | [optional]
19
- **description** | **String** | Description of the sender | [optional]
20
- **name** | **String** | Name of sender (used only with a Business sender) | [optional]
21
- **city** | **String** | Sender's city |
22
- **street** | **String** | Sender's street |
23
- **address_description** | **String** | Description of address | [optional]
24
- **postal_code** | **String** | Zip code of sender |
25
- **birth_date** | **Date** | Date of birth of sender | [optional]
26
- **ip** | **String** | IP of sender |
27
- **identification_number** | **String** | Identification number of document used | [optional]
28
- **identification_type** | **String** | Document to be identified. The identification type can be one of the following: - `DL`: Driving License - `PP`: International Passport - `ID`: National ID - `OT`: Other | [optional]
29
+ **legal_entity_type** | **String** | 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. | [optional]
30
+ **registration_date** | **Date** | The registration date (used only with a Business sender) | [optional]
31
+ **registration_number** | **String** | The registration number (used only with a Business sender) | [optional]
32
+ **nature_of_business** | **String** | 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 | [optional]
33
+ **source_of_funds** | **String** | The source of funds | [optional]
34
+ **custom_source_of_funds** | **String** | Custom source of funds | [optional]
35
+ **core_business_activity** | **String** | The core activity (used only with a Business sender) | [optional]
36
+ **purpose_of_opening_account** | **String** | The purpose for opening their account (used only with a Business sender) | [optional]
37
+ **office_phone** | **String** | The official phone number (used only with a Business sender) | [optional]
38
+ **vat_registration_number** | **String** | The VAT registration number (used only with a Business sender) | [optional]
39
+ **financial_regulator** | **String** | The Financial Regulator (used only with a Business sender) | [optional]
40
+ **regulatory_licence_number** | **String** | The Regulatory Licence Number (used only with a Business sender) | [optional]
41
+ **contact_person_email** | **String** | The contact's email address (used only with a Business sender) | [optional]
42
+ **trading_country** | **String** | The Business trading country (used only with a Business sender) | [optional]
43
+ **trading_address** | **String** | The Business trading address (used only with a Business sender) | [optional]
44
+ **number_monthly_transactions** | **String** | The estimated number of monthly transactions (used only with a Business sender) | [optional]
45
+ **amount_monthly_transactions** | **String** | The estimated amount for all transactions each month in USD (used only with a Business sender) | [optional]
29
46
  **documents** | [**Array<Document>**](Document.md) | 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\" } ] ``` |
30
- **politically_exposed_people** | [**Array<PoliticallyExposedPerson>**](PoliticallyExposedPerson.md) | A list of politically exposed people, individuals who are or have been entrusted with prominent public functions by a country, for example heads of state or heads of government, senior politicians, senior government, judicial or military officials, senior executives of state owned corporations, important political party officials. There is a limit of three (3) politically exposed people per Sender. Politically exposed person example: ```json { \"name\": \"Ronald Reagan\", \"position\": \"President of the United States\", \"started_date\": \"1981-01-20T00:00:00.000Z\", \"ended_date\": \"1989-01-20T00:00:00.000Z\" } ``` | [optional]
31
47
  **metadata** | [**Object**](.md) | 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. | [optional]
32
- **state** | [**SenderState**](SenderState.md) | | [optional]
33
- **id** | **String** | | [optional]
34
- **external_id** | **String** | 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. | [optional]
35
48
  **errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
49
+ **onboarding_status** | **String** | The onboarding status of the sender | [optional]
50
+ **politically_exposed_people** | [**Array<PoliticallyExposedPerson>**](PoliticallyExposedPerson.md) | 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\" } } ``` | [optional]
51
+ **external_id** | **String** | 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. | [optional]
52
+ **city_of_birth** | **String** | City of birth of sender | [optional]
53
+ **country_of_birth** | **String** | Country of birth of sender in 2-character alpha ISO 3166-2 country format | [optional]
54
+ **gender** | **String** | The gender of the sender: - `M`: Male - `F`: Female - `O`: Other | [optional]
55
+ **created_at** | **String** | Date and time of sender was created | [optional]
36
56
 
37
57
  ## Code Sample
38
58
 
39
59
  ```ruby
40
60
  require 'TransferZero'
41
61
 
42
- instance = TransferZero::Sender.new(type: person,
62
+ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
63
+ type: person,
64
+ state: null,
43
65
  country: NG,
66
+ street: Fake Street,
67
+ postal_code: 798983,
68
+ city: Kampala,
44
69
  phone_country: NG,
45
70
  phone_number: 752403639,
46
71
  email: example@home.org,
72
+ ip: 127.0.0.1,
73
+ address_description: null,
74
+ identification_number: AB123456,
75
+ identification_type: ID,
76
+ lang: en,
77
+ name: null,
47
78
  first_name: Johnny,
48
79
  middle_name: Johnny,
49
80
  last_name: English,
81
+ birth_date: null,
50
82
  occupation: Accountant,
51
83
  nationality: NG,
52
- onboarding_status: null,
53
- address: null,
54
- description: null,
55
- name: null,
56
- city: Kampala,
57
- street: Fake Street,
58
- address_description: null,
59
- postal_code: 798983,
60
- birth_date: null,
61
- ip: 127.0.0.1,
62
- identification_number: AB123456,
63
- identification_type: ID,
84
+ legal_entity_type: privately_owned_company,
85
+ registration_date: null,
86
+ registration_number: null,
87
+ nature_of_business: null,
88
+ source_of_funds: null,
89
+ custom_source_of_funds: null,
90
+ core_business_activity: null,
91
+ purpose_of_opening_account: null,
92
+ office_phone: null,
93
+ vat_registration_number: null,
94
+ financial_regulator: null,
95
+ regulatory_licence_number: null,
96
+ contact_person_email: null,
97
+ trading_country: null,
98
+ trading_address: null,
99
+ number_monthly_transactions: null,
100
+ amount_monthly_transactions: null,
64
101
  documents: [{"id":"b6648ba3-1c7b-4f59-8580-684899c84a07"}],
65
- politically_exposed_people: [{"id":"40","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":"f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb"}],
66
102
  metadata: {},
67
- state: null,
68
- id: bf9ff782-e182-45ac-abea-5bce83ad6670,
103
+ errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]},
104
+ onboarding_status: null,
105
+ politically_exposed_people: [{"id":"40","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":"f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb"}],
69
106
  external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
70
- errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]})
107
+ city_of_birth: London,
108
+ country_of_birth: GB,
109
+ gender: M,
110
+ created_at: 2019-01-11T00:00:00.001+0000)
71
111
  ```
72
112
 
73
113
 
@@ -52,6 +52,7 @@ require 'transferzero-sdk/models/pagination'
52
52
  require 'transferzero-sdk/models/pagination_meta'
53
53
  require 'transferzero-sdk/models/payin_method'
54
54
  require 'transferzero-sdk/models/payin_method_details'
55
+ require 'transferzero-sdk/models/payin_method_details_btc'
55
56
  require 'transferzero-sdk/models/payin_method_details_mobile'
56
57
  require 'transferzero-sdk/models/payin_method_details_ngn_bank'
57
58
  require 'transferzero-sdk/models/payin_method_request'
@@ -60,15 +61,21 @@ require 'transferzero-sdk/models/payment_method_list_response'
60
61
  require 'transferzero-sdk/models/payment_method_opposite'
61
62
  require 'transferzero-sdk/models/payout_method'
62
63
  require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
64
+ require 'transferzero-sdk/models/payout_method_cash_provider_enum'
65
+ require 'transferzero-sdk/models/payout_method_country_enum'
63
66
  require 'transferzero-sdk/models/payout_method_details'
67
+ require 'transferzero-sdk/models/payout_method_details_btc'
64
68
  require 'transferzero-sdk/models/payout_method_details_balance'
69
+ require 'transferzero-sdk/models/payout_method_details_gbp_bank'
65
70
  require 'transferzero-sdk/models/payout_method_details_ghs_bank'
66
71
  require 'transferzero-sdk/models/payout_method_details_iban'
67
72
  require 'transferzero-sdk/models/payout_method_details_mad_cash'
68
73
  require 'transferzero-sdk/models/payout_method_details_mobile'
69
74
  require 'transferzero-sdk/models/payout_method_details_ngn_bank'
70
75
  require 'transferzero-sdk/models/payout_method_details_xof_bank'
76
+ require 'transferzero-sdk/models/payout_method_details_xof_cash'
71
77
  require 'transferzero-sdk/models/payout_method_details_xof_mobile'
78
+ require 'transferzero-sdk/models/payout_method_details_zar_bank'
72
79
  require 'transferzero-sdk/models/payout_method_gender_enum'
73
80
  require 'transferzero-sdk/models/payout_method_identity_card_type_enum'
74
81
  require 'transferzero-sdk/models/payout_method_list_response'
@@ -77,11 +84,14 @@ require 'transferzero-sdk/models/payout_method_request'
77
84
  require 'transferzero-sdk/models/payout_method_response'
78
85
  require 'transferzero-sdk/models/payout_method_webhook'
79
86
  require 'transferzero-sdk/models/politically_exposed_person'
87
+ require 'transferzero-sdk/models/proof_of_payment'
88
+ require 'transferzero-sdk/models/proof_of_payment_list_response'
80
89
  require 'transferzero-sdk/models/recipient'
81
90
  require 'transferzero-sdk/models/recipient_list_response'
82
91
  require 'transferzero-sdk/models/recipient_request'
83
92
  require 'transferzero-sdk/models/recipient_response'
84
93
  require 'transferzero-sdk/models/recipient_state'
94
+ require 'transferzero-sdk/models/recipient_state_reason_details'
85
95
  require 'transferzero-sdk/models/recipient_webhook'
86
96
  require 'transferzero-sdk/models/sender'
87
97
  require 'transferzero-sdk/models/sender_list_response'
@@ -21,68 +21,10 @@ module TransferZero
21
21
  end
22
22
 
23
23
 
24
- # Deleting a document
25
- # Deletes a single document by the Document ID
26
- # @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
27
- # @param [Hash] opts the optional parameters
28
- # @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
29
- # @return [DocumentResponse]
30
- def delete_document(document_id, opts = {})
31
- data, _status_code, _headers = delete_document_with_http_info(document_id, opts)
32
- data
33
- end
34
-
35
- # Deleting a document
36
- # Deletes a single document by the Document ID
37
- # @param document_id ID of the document to delete. Example: `/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670`
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :sender_id Allows filtering results by `sender_id`. Example: `/v1/transactions?sender_id=b41d3cb7-6c54-4245-85fc-8e30690eb0f7`
40
- # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
41
- def delete_document_with_http_info(document_id, opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: DocumentsApi.delete_document ...'
44
- end
45
- # verify the required parameter 'document_id' is set
46
- if @api_client.config.client_side_validation && document_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'document_id' when calling DocumentsApi.delete_document"
48
- end
49
- # resource path
50
- local_var_path = '/documents/{Document ID}'.sub('{' + 'Document ID' + '}', document_id.to_s)
51
-
52
- # query parameters
53
- query_params = {}
54
- query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
55
-
56
- # header parameters
57
- header_params = {}
58
- # HTTP header 'Accept' (if needed)
59
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
-
61
- # form parameters
62
- form_params = {}
63
-
64
- # http body (model)
65
- post_body = nil
66
- auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
67
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
68
- :header_params => header_params,
69
- :query_params => query_params,
70
- :form_params => form_params,
71
- :body => post_body,
72
- :auth_names => auth_names,
73
- :return_type => 'DocumentResponse')
74
- if @api_client.config.debugging
75
- @api_client.config.logger.debug "API called: DocumentsApi#delete_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
- end
77
- return data, status_code, headers
78
- end
79
-
80
-
81
24
  # Fetching a document
82
25
  # Returns a single document by the Documents ID
83
26
  # @param document_id ID of the document to get. Example: &#x60;/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
84
27
  # @param [Hash] opts the optional parameters
85
- # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
86
28
  # @return [DocumentResponse]
87
29
  def get_document(document_id, opts = {})
88
30
  data, _status_code, _headers = get_document_with_http_info(document_id, opts)
@@ -93,7 +35,6 @@ module TransferZero
93
35
  # Returns a single document by the Documents ID
94
36
  # @param document_id ID of the document to get. Example: &#x60;/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
95
37
  # @param [Hash] opts the optional parameters
96
- # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
97
38
  # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers
98
39
  def get_document_with_http_info(document_id, opts = {})
99
40
  if @api_client.config.debugging
@@ -108,7 +49,6 @@ module TransferZero
108
49
 
109
50
  # query parameters
110
51
  query_params = {}
111
- query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
112
52
 
113
53
  # header parameters
114
54
  header_params = {}
@@ -150,7 +90,6 @@ module TransferZero
150
90
  # @param [Hash] opts the optional parameters
151
91
  # @option opts [Integer] :page The page number to request (defaults to 1)
152
92
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
153
- # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
154
93
  # @return [DocumentListResponse]
155
94
  def get_documents(opts = {})
156
95
  data, _status_code, _headers = get_documents_with_http_info(opts)
@@ -162,7 +101,6 @@ module TransferZero
162
101
  # @param [Hash] opts the optional parameters
163
102
  # @option opts [Integer] :page The page number to request (defaults to 1)
164
103
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
165
- # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
166
104
  # @return [Array<(DocumentListResponse, Fixnum, Hash)>] DocumentListResponse data, response status code and response headers
167
105
  def get_documents_with_http_info(opts = {})
168
106
  if @api_client.config.debugging
@@ -175,7 +113,6 @@ module TransferZero
175
113
  query_params = {}
176
114
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
177
115
  query_params[:'per'] = opts[:'per'] if !opts[:'per'].nil?
178
- query_params[:'sender_id'] = opts[:'sender_id'] if !opts[:'sender_id'].nil?
179
116
 
180
117
  # header parameters
181
118
  header_params = {}
@@ -22,7 +22,7 @@ module TransferZero
22
22
 
23
23
 
24
24
  # Cancelling a recipient
25
- # Cancels the payment to the recipient specified in the URL path. Please note only recipients where the `may_cancel` attribute is true can be cancelled.
25
+ # Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
26
26
  # @param recipient_id ID of recipient to cancel. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33&#x60;
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @return [RecipientResponse]
@@ -32,7 +32,7 @@ module TransferZero
32
32
  end
33
33
 
34
34
  # Cancelling a recipient
35
- # Cancels the payment to the recipient specified in the URL path. Please note only recipients where the &#x60;may_cancel&#x60; attribute is true can be cancelled.
35
+ # Cancels the payment to the recipient specified in the URL path. Please note recipients where the &#x60;may_cancel&#x60; attribute is true will be cancelled immediately. If the &#x60;may_cancel&#x60; attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
36
36
  # @param recipient_id ID of recipient to cancel. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33&#x60;
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(RecipientResponse, Fixnum, Hash)>] RecipientResponse data, response status code and response headers
@@ -217,5 +217,59 @@ module TransferZero
217
217
  end
218
218
  return data, status_code, headers
219
219
  end
220
+
221
+
222
+ # Returns list of proof of payments
223
+ # Returns a list of uploaded proof of payment files for a transaction recipient
224
+ # @param recipient_id ID of the recipient for whom the proof of payments will be returned. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments&#x60;
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [ProofOfPaymentListResponse]
227
+ def proof_of_payments(recipient_id, opts = {})
228
+ data, _status_code, _headers = proof_of_payments_with_http_info(recipient_id, opts)
229
+ data
230
+ end
231
+
232
+ # Returns list of proof of payments
233
+ # Returns a list of uploaded proof of payment files for a transaction recipient
234
+ # @param recipient_id ID of the recipient for whom the proof of payments will be returned. Example: &#x60;/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments&#x60;
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [Array<(ProofOfPaymentListResponse, Fixnum, Hash)>] ProofOfPaymentListResponse data, response status code and response headers
237
+ def proof_of_payments_with_http_info(recipient_id, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: RecipientsApi.proof_of_payments ...'
240
+ end
241
+ # verify the required parameter 'recipient_id' is set
242
+ if @api_client.config.client_side_validation && recipient_id.nil?
243
+ fail ArgumentError, "Missing the required parameter 'recipient_id' when calling RecipientsApi.proof_of_payments"
244
+ end
245
+ # resource path
246
+ local_var_path = '/recipients/{Recipient ID}/proof_of_payments'.sub('{' + 'Recipient ID' + '}', recipient_id.to_s)
247
+
248
+ # query parameters
249
+ query_params = {}
250
+
251
+ # header parameters
252
+ header_params = {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+
256
+ # form parameters
257
+ form_params = {}
258
+
259
+ # http body (model)
260
+ post_body = nil
261
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
262
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => 'ProofOfPaymentListResponse')
269
+ if @api_client.config.debugging
270
+ @api_client.config.logger.debug "API called: RecipientsApi#proof_of_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
271
+ end
272
+ return data, status_code, headers
273
+ end
220
274
  end
221
275
  end
@@ -35,7 +35,7 @@ module TransferZero
35
35
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
36
36
  def initialize(config = Configuration.default)
37
37
  @config = config
38
- @user_agent = "TransferZero-SDK/Ruby/1.8.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.12.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -106,12 +106,14 @@ module TransferZero
106
106
  url_with_params = add_query(url, query_params)
107
107
  form_params = opts[:form_params] || {}
108
108
 
109
+ request_body = opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip
110
+
109
111
  request_nonce = SecureRandom.uuid
110
112
  request_signature = sign_request([
111
113
  request_nonce,
112
114
  http_method.to_s.upcase,
113
115
  url_with_params,
114
- DIGEST.hexdigest(opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip)
116
+ DIGEST.hexdigest(request_body)
115
117
  ])
116
118
 
117
119
  header_params['Authorization-Nonce'] = request_nonce
@@ -138,7 +140,7 @@ module TransferZero
138
140
  req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
139
141
 
140
142
  if [:post, :patch, :put, :delete].include?(http_method)
141
- req_body = build_request_body(header_params, form_params, opts[:body])
143
+ req_body = build_request_body(header_params, form_params, request_body)
142
144
  req_opts.update :body => req_body
143
145
  if @config.debugging
144
146
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class Account
17
- # The account balance for the given currency
18
- attr_accessor :amount
19
-
20
- # The currency of this balance
21
- attr_accessor :currency
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'amount' => :'amount',
27
- :'currency' => :'currency'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.openapi_types
33
- {
34
- :'amount' => :'Float',
35
- :'currency' => :'String'
36
- }
37
- end
16
+ class Account
17
+ # The account balance for the given currency
18
+ attr_accessor :amount
19
+
20
+ # The currency of this balance
21
+ attr_accessor :currency
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'amount' => :'amount',
27
+ :'currency' => :'currency'
28
+ }
29
+ end
38
30
 
39
- # Initializes the object
40
- # @param [Hash] attributes Model attributes in the form of hash
41
- def initialize(attributes = {})
42
- if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
44
- end
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'amount' => :'Float',
35
+ :'currency' => :'String'
36
+ }
37
+ end
45
38
 
46
- # check to see if the attribute exists and convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}) { |(k, v), h|
48
- if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
- end
51
- h[k.to_sym] = v
52
- }
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
44
+ end
53
45
 
54
- if attributes.key?(:'amount')
55
- self.amount = attributes[:'amount']
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
50
  end
51
+ h[k.to_sym] = v
52
+ }
57
53
 
58
- if attributes.key?(:'currency')
59
- self.currency = attributes[:'currency']
60
- end
54
+ if attributes.key?(:'amount')
55
+ self.amount = attributes[:'amount']
61
56
  end
62
57
 
63
- # Show invalid properties with the reasons. Usually used together with valid?
64
- # @return Array for valid properties with the reasons
65
- def list_invalid_properties
66
- invalid_properties = Array.new
67
- invalid_properties
58
+ if attributes.key?(:'currency')
59
+ self.currency = attributes[:'currency']
68
60
  end
61
+ end
69
62
 
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- true
74
- end
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
75
69
 
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class &&
81
- amount == o.amount &&
82
- currency == o.currency
83
- end
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
84
75
 
85
- # @see the `==` method
86
- # @param [Object] Object to be compared
87
- def eql?(o)
88
- self == o
89
- end
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ amount == o.amount &&
82
+ currency == o.currency
83
+ end
90
84
 
91
- # Calculates hash code according to all attributes.
92
- # @return [Integer] Hash code
93
- def hash
94
- [amount, currency].hash
95
- end
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [amount, currency].hash
95
+ end
96
96
 
97
97
  require 'active_support/core_ext/hash'
98
98
  require 'active_support/hash_with_indifferent_access.rb'
@@ -208,5 +208,6 @@ def _to_hash(value)
208
208
  end
209
209
  end
210
210
 
211
- end
211
+ end
212
+
212
213
  end