transferzero-sdk 1.7.0 → 1.11.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -0
  3. data/README.md +11 -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 +4 -0
  8. data/docs/PayoutMethod.md +1 -1
  9. data/docs/PayoutMethodCashProviderEnum.md +16 -0
  10. data/docs/PayoutMethodDetails.md +13 -1
  11. data/docs/PayoutMethodDetailsMobile.md +3 -1
  12. data/docs/PayoutMethodDetailsXOFCash.md +23 -0
  13. data/docs/PayoutMethodDetailsZARBank.md +35 -0
  14. data/docs/ProofOfPayment.md +23 -0
  15. data/docs/ProofOfPaymentListResponse.md +17 -0
  16. data/docs/Recipient.md +4 -0
  17. data/docs/RecipientStateReasonDetails.md +23 -0
  18. data/docs/RecipientsApi.md +62 -0
  19. data/docs/Sender.md +18 -8
  20. data/example/client.rb +55 -18
  21. data/lib/transferzero-sdk.rb +6 -0
  22. data/lib/transferzero-sdk/api/recipients_api.rb +54 -0
  23. data/lib/transferzero-sdk/api_client.rb +1 -1
  24. data/lib/transferzero-sdk/models/currency.rb +1 -11
  25. data/lib/transferzero-sdk/models/currency_exchange.rb +1 -11
  26. data/lib/transferzero-sdk/models/currency_opposite.rb +14 -14
  27. data/lib/transferzero-sdk/models/document.rb +21 -1
  28. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  29. data/lib/transferzero-sdk/models/payout_method_cash_provider_enum.rb +31 -0
  30. data/lib/transferzero-sdk/models/payout_method_details.rb +76 -5
  31. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +13 -4
  32. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +1 -1
  33. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +245 -0
  34. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +1 -1
  35. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +324 -0
  36. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +3 -0
  37. data/lib/transferzero-sdk/models/proof_of_payment.rb +233 -0
  38. data/lib/transferzero-sdk/models/proof_of_payment_list_response.rb +204 -0
  39. data/lib/transferzero-sdk/models/recipient.rb +20 -1
  40. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +235 -0
  41. data/lib/transferzero-sdk/models/sender.rb +88 -14
  42. data/lib/transferzero-sdk/version.rb +1 -1
  43. data/spec/models/payout_method_cash_provider_enum_spec.rb +35 -0
  44. data/spec/models/payout_method_details_xof_cash_spec.rb +71 -0
  45. data/spec/models/payout_method_details_zar_bank_spec.rb +89 -0
  46. data/spec/models/proof_of_payment_list_response_spec.rb +41 -0
  47. data/spec/models/proof_of_payment_spec.rb +59 -0
  48. data/spec/models/recipient_state_reason_details_spec.rb +59 -0
  49. data/transferzero-sdk-1.10.0.gem +0 -0
  50. metadata +28 -2
@@ -0,0 +1,23 @@
1
+ # TransferZero::RecipientStateReasonDetails
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **String** | Status code of failed transaction | [optional]
8
+ **category** | **String** | Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error | [optional]
9
+ **messages** | **Array<String>** | Tiered messages | [optional]
10
+ **description** | **String** | Public, human readable, detailed error message | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'TransferZero'
16
+
17
+ instance = TransferZero::RecipientStateReasonDetails.new(code: 311,
18
+ category: temporary_error,
19
+ messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
20
+ description: The central switch is not accepting transfers at the moment. We will retry the transaction. You can also edit or cancel this transaction.)
21
+ ```
22
+
23
+
@@ -7,6 +7,7 @@ Method | HTTP request | Description
7
7
  [**delete_recipient**](RecipientsApi.md#delete_recipient) | **DELETE** /recipients/{Recipient ID} | Cancelling a recipient
8
8
  [**get_recipients**](RecipientsApi.md#get_recipients) | **GET** /recipients | Getting a list of recipients with filtering
9
9
  [**patch_recipient**](RecipientsApi.md#patch_recipient) | **PATCH** /recipients/{Recipient ID} | Updating a recipient
10
+ [**proof_of_payments**](RecipientsApi.md#proof_of_payments) | **GET** /recipients/{Recipient ID}/proof_of_payments | Returns list of proof of payments
10
11
 
11
12
 
12
13
  # **delete_recipient**
@@ -210,3 +211,64 @@ end
210
211
 
211
212
 
212
213
 
214
+ # **proof_of_payments**
215
+ > ProofOfPaymentListResponse proof_of_payments(recipient_id)
216
+
217
+ Returns list of proof of payments
218
+
219
+ Returns a list of uploaded proof of payment files for a transaction recipient
220
+
221
+ ### Example
222
+ ```ruby
223
+ # load the gem
224
+ require 'transferzero-sdk'
225
+
226
+ api_instance = TransferZero::RecipientsApi.new
227
+
228
+
229
+ begin
230
+ #Returns list of proof of payments
231
+ result = api_instance.proof_of_payments(recipient_id)
232
+ p result
233
+ rescue TransferZero::ApiError => e
234
+ if e.validation_error
235
+ puts "WARN: Validation error occured when calling the endpoint"
236
+ result = e.response_object("ProofOfPaymentListResponse")
237
+ p result
238
+ else
239
+ puts "Exception when calling RecipientsApi->proof_of_payments: #{e}"
240
+ end
241
+ end
242
+ ```
243
+
244
+ ### Parameters
245
+
246
+ Name | Type | Description | Notes
247
+ ------------- | ------------- | ------------- | -------------
248
+ **recipient_id** | [**String**](.md)| ID of the recipient for whom the proof of payments will be returned. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33/proof_of_payments` |
249
+
250
+ ### Return type
251
+
252
+ [**ProofOfPaymentListResponse**](ProofOfPaymentListResponse.md)
253
+
254
+ ### Authorization
255
+
256
+ You can set the API Key and Secret on the TransferZero object when setting it up:
257
+
258
+ ```ruby
259
+
260
+ TransferZero.configure do |config|
261
+ config.api_key = '<key'
262
+ config.api_secret = '<secret>'
263
+ config.host = 'https://api-sandbox.transferzero.com/v1'
264
+ end
265
+
266
+ ```
267
+
268
+ ### HTTP request headers
269
+
270
+ - **Content-Type**: Not defined
271
+ - **Accept**: application/json
272
+
273
+
274
+
data/docs/Sender.md CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **id** | **String** | | [optional]
8
8
  **type** | **String** | Type of sender to create - either person or business (defaults to person) | [optional]
9
9
  **state** | [**SenderState**](SenderState.md) | | [optional]
10
- **country** | **String** | Country of sender in 2-character alpha ISO 3166-2 country format |
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
11
  **street** | **String** | Sender&#39;s street |
12
12
  **postal_code** | **String** | Zip code of sender |
13
13
  **city** | **String** | Sender&#39;s city |
@@ -17,7 +17,8 @@ Name | Type | Description | Notes
17
17
  **ip** | **String** | IP of sender |
18
18
  **address_description** | **String** | Description of address | [optional]
19
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: - &#x60;DL&#x60;: Driving License - &#x60;PP&#x60;: International Passport - &#x60;ID&#x60;: National ID - &#x60;OT&#x60;: Other | [optional]
20
+ **identification_type** | **String** | Document to be identified. The identification type can be one of the following: - &#x60;DL&#x60;: Driving License - &#x60;PP&#x60;: International Passport - &#x60;ID&#x60;: National ID - &#x60;OT&#x60;: Other Please note for Wizall &#x60;XOF::Cash&#x60; transactions the valid options are: - &#x60;ID&#x60;: National ID - &#x60;PP&#x60;: Passport | [optional]
21
+ **lang** | **String** | Determines language of the served content. Defaults to English | [optional]
21
22
  **name** | **String** | Name of sender (used only with a Business sender) | [optional]
22
23
  **first_name** | **String** | First name of sender (used only with a Personal sender) | [optional]
23
24
  **middle_name** | **String** | Middle name of sender (used only with a Personal sender) | [optional]
@@ -25,12 +26,13 @@ Name | Type | Description | Notes
25
26
  **birth_date** | **Date** | Date of birth of sender (used only with a Personal sender) | [optional]
26
27
  **occupation** | **String** | Occupation of sender (used only with a Personal sender) | [optional]
27
28
  **nationality** | **String** | The nationality of the sender (used only with a Personal sender) | [optional]
28
- **legal_entity_type** | **String** | Legal entity type (used only with a Business sender) | [optional]
29
- **registration_date** | **String** | The registration date (used only with a Business sender) | [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 &amp; 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 &#x60;financial_institution&#x60; then the fields &#x60;vat_registration_number&#x60;, &#x60;financial_regulator&#x60; and &#x60;regulatory_licence_number&#x60; will be mandatory as well. | [optional]
30
+ **registration_date** | **Date** | The registration date (used only with a Business sender) | [optional]
30
31
  **registration_number** | **String** | The registration number (used only with a Business sender) | [optional]
31
- **nature_of_business** | **String** | Nature of business options (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]
32
33
  **source_of_funds** | **String** | The source of funds | [optional]
33
- **core_business_activities** | **String** | The core activities (used only with a Business sender) | [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]
34
36
  **purpose_of_opening_account** | **String** | The purpose for opening their account (used only with a Business sender) | [optional]
35
37
  **office_phone** | **String** | The official phone number (used only with a Business sender) | [optional]
36
38
  **vat_registration_number** | **String** | The VAT registration number (used only with a Business sender) | [optional]
@@ -47,6 +49,9 @@ Name | Type | Description | Notes
47
49
  **onboarding_status** | **String** | The onboarding status of the sender | [optional]
48
50
  **politically_exposed_people** | [**Array&lt;PoliticallyExposedPerson&gt;**](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: &#x60;&#x60;&#x60;json { \&quot;politically_exposed_person\&quot;: { \&quot;name\&quot;: \&quot;Ronald Reagan\&quot;, \&quot;position\&quot;: \&quot;President of the United States\&quot;, \&quot;started_date\&quot;: \&quot;1981-01-20T00:00:00.000Z\&quot;, \&quot;ended_date\&quot;: \&quot;1989-01-20T00:00:00.000Z\&quot;, \&quot;sender_id\&quot;: \&quot;344fb668-196d-43db-9d94-b34b7e6c7e0b\&quot; } } &#x60;&#x60;&#x60; | [optional]
49
51
  **external_id** | **String** | Optional ID that is supplied by partner linking it to the partner&#39;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: - &#x60;M&#x60;: Male - &#x60;F&#x60;: Female - &#x60;O&#x60;: Other | [optional]
50
55
  **created_at** | **String** | Date and time of sender was created | [optional]
51
56
 
52
57
  ## Code Sample
@@ -68,6 +73,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
68
73
  address_description: null,
69
74
  identification_number: AB123456,
70
75
  identification_type: ID,
76
+ lang: en,
71
77
  name: null,
72
78
  first_name: Johnny,
73
79
  middle_name: Johnny,
@@ -75,12 +81,13 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
75
81
  birth_date: null,
76
82
  occupation: Accountant,
77
83
  nationality: NG,
78
- legal_entity_type: sole_proprietorship,
84
+ legal_entity_type: privately_owned_company,
79
85
  registration_date: null,
80
86
  registration_number: null,
81
87
  nature_of_business: null,
82
88
  source_of_funds: null,
83
- core_business_activities: null,
89
+ custom_source_of_funds: null,
90
+ core_business_activity: null,
84
91
  purpose_of_opening_account: null,
85
92
  office_phone: null,
86
93
  vat_registration_number: null,
@@ -97,6 +104,9 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
97
104
  onboarding_status: null,
98
105
  politically_exposed_people: [{&quot;id&quot;:&quot;40&quot;,&quot;name&quot;:&quot;Ronald Reagan&quot;,&quot;position&quot;:&quot;President of the United States&quot;,&quot;started_date&quot;:&quot;1981-01-20T00:00:00.000Z&quot;,&quot;ended_date&quot;:&quot;1989-01-20T00:00:00.000Z&quot;,&quot;sender_id&quot;:&quot;f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb&quot;}],
99
106
  external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
107
+ city_of_birth: London,
108
+ country_of_birth: GB,
109
+ gender: M,
100
110
  created_at: 2019-01-11T00:00:00.001+0000)
101
111
  ```
102
112
 
data/example/client.rb CHANGED
@@ -4,15 +4,17 @@ require 'securerandom'
4
4
  require 'bundler/inline'
5
5
 
6
6
  gemfile do
7
- gem "transferzero-sdk", "=1.0.0"
7
+ # gem "transferzero-sdk", "=1.0.0"
8
+ gem 'transferzero-sdk', path: '/Users/lindelwencube/projects/spec/api-specification/public/generated/transferzero-sdk-ruby'
8
9
  end
9
10
 
10
11
  require 'transferzero-sdk'
11
12
 
12
13
  credentials = {
13
- key: "<key>",
14
- secret: "<secret>",
15
- host: "https://api-sandbox.transferzero.com/v1"
14
+ key: "o3r9WzW3wFDgMfrC1EV7UYJ4l6XqZi3wCCQpj+siwhegFtFNdA+DzUNjhiJAQmvmS4aarH68AH4ijV4ysmvS1w==",
15
+ secret: "cc4MFbfiodRhkOh4lIMCJvJSdD/Ot553qjMlO1Bw7V4sV2wTlGhrZnsWSwIqQ6Ibksqje/aHn6LMoGFxi5tb5w==",
16
+ host: "http://localhost:3002/v1",
17
+ scheme: 'http'
16
18
  }
17
19
 
18
20
  # Please see our documentation at https://docs.transferzero.com
@@ -25,6 +27,7 @@ class Client
25
27
  config.api_key = credentials[:key]
26
28
  config.api_secret = credentials[:secret]
27
29
  config.host = credentials[:host]
30
+ config.scheme = credentials[:scheme]
28
31
  end
29
32
  end
30
33
 
@@ -141,32 +144,66 @@ class Client
141
144
  sender = TransferZero::Sender.new
142
145
  # When adding a sender to transaction, please use either an id or external_id. Providing both will result in a validation error.
143
146
  # Please see our documentation at https://docs.transferzero.com/docs/transaction-flow/#sender
144
- sender.id = 'ec33484c-4456-4625-a823-9704a3a54e68'
147
+ sender.id = "25e68ad9-1470-4816-aa40-fc5086fc80f1"
148
+ sender.identification_number = '894369978426'
149
+ sender.identification_type = 'ID'
150
+ # sender.city_of_birth = "London"
151
+ # sender.country_of_birth = "GB"
152
+ # sender.gender = "F"
153
+
154
+
155
+
145
156
 
146
157
  # You can find the various payout options at https://docs.transferzero.com/docs/transaction-flow/#payout-details
147
- ngn_bank_details = TransferZero::PayoutMethodDetails.new
148
- ngn_bank_details.bank_account = '123456789'
149
- ngn_bank_details.bank_account_type = TransferZero::PayoutMethodBankAccountTypeEnum::N20
150
- ngn_bank_details.bank_code = '082'
151
- ngn_bank_details.first_name = 'first'
152
- ngn_bank_details.last_name = 'last'
158
+ # ngn_bank_details = TransferZero::PayoutMethodDetails.new
159
+ # ngn_bank_details.bank_account = '123456789'
160
+ # ngn_bank_details.bank_account_type = TransferZero::PayoutMethodBankAccountTypeEnum::N20
161
+ # ngn_bank_details.bank_code = '082'
162
+ # ngn_bank_details.first_name = 'first'
163
+ # ngn_bank_details.last_name = 'last'
164
+
165
+ #xof cash
166
+ xof_cash_details = TransferZero::PayoutMethodDetails.new
167
+ xof_cash_details.phone_number = '221774103945'
168
+ xof_cash_details.first_name = 'first'
169
+ xof_cash_details.last_name = 'last'
170
+ # xof_cash_details.identity_card_id = 'OLD'
171
+ # xof_cash_details.identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::NI
172
+ xof_cash_details.cash_provider = TransferZero::PayoutMethodCashProviderEnum::WIZALL
173
+ # xof_cash_details.country = TransferZero::PayoutMethodCashProviderEnum::WIZALL
153
174
 
154
175
  payout_method = TransferZero::PayoutMethod.new
155
- payout_method.type = 'NGN::Bank'
156
- payout_method.details = ngn_bank_details
176
+ payout_method.type = 'XOF::Cash'
177
+ payout_method.details = xof_cash_details
178
+
179
+ # #mad cash
180
+ # mad_cash_details = TransferZero::PayoutMethodDetails.new
181
+ # mad_cash_details.phone_number = '212537718685'
182
+ # mad_cash_details.first_name = 'first'
183
+ # mad_cash_details.last_name = 'last'
184
+ # mad_cash_details.reason = "Remittance payment"
185
+ # mad_cash_details.sender_identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::O
186
+ # mad_cash_details.sender_identity_card_id = "123456789"
187
+ # mad_cash_details.identity_card_type = TransferZero::PayoutMethodIdentityCardTypeEnum::PP
188
+ # mad_cash_details.identity_card_id = "123456789"
189
+
190
+
191
+ # payout_method = TransferZero::PayoutMethod.new
192
+ # payout_method.type = 'MAD::Cash'
193
+ # payout_method.details = mad_cash_details
157
194
 
158
195
  # Please see https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
159
196
  # on what the request amount and currencies do
160
197
  recipient = TransferZero::Recipient.new
161
- recipient.requested_amount = 10000
162
- recipient.requested_currency = 'NGN'
198
+ recipient.requested_amount = 10
199
+ recipient.requested_currency = 'XOF'
163
200
  recipient.payout_method = payout_method
164
201
 
165
202
  # Similarly you can check https://docs.transferzero.com/docs/transaction-flow/#requested-amount-and-currency
166
203
  # on details about the input currency parameter
167
204
 
168
205
  # Find more details on external IDs at https://docs.transferzero.com/docs/transaction-flow/#external-id
169
- transaction.external_id = 'TRANSACTION-1f834add' # Optional field for customer's ID
206
+ # transaction.external_id = 'TRANSACTION-1f834ahfh' # Optional field for customer's ID
170
207
  transaction.input_currency = 'GBP'
171
208
  transaction.sender = sender
172
209
  transaction.recipients = [recipient]
@@ -461,7 +498,7 @@ class Client
461
498
  end
462
499
  end
463
500
 
464
- # client = Client.new(credentials)
501
+ client = Client.new(credentials)
465
502
  # client.list_currencies_example
466
503
  # client.account_validation_example
467
504
  # client.create_sender_example
@@ -469,5 +506,5 @@ end
469
506
  # client.update_sender_example
470
507
  # client.create_transaction_example
471
508
  # client.get_transaction_by_external_id_example
472
- # client.create_and_fund_transaction_example
509
+ client.create_and_fund_transaction_example
473
510
  # client.webhook_parse_example
@@ -61,6 +61,7 @@ require 'transferzero-sdk/models/payment_method_list_response'
61
61
  require 'transferzero-sdk/models/payment_method_opposite'
62
62
  require 'transferzero-sdk/models/payout_method'
63
63
  require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
64
+ require 'transferzero-sdk/models/payout_method_cash_provider_enum'
64
65
  require 'transferzero-sdk/models/payout_method_details'
65
66
  require 'transferzero-sdk/models/payout_method_details_btc'
66
67
  require 'transferzero-sdk/models/payout_method_details_balance'
@@ -71,7 +72,9 @@ require 'transferzero-sdk/models/payout_method_details_mad_cash'
71
72
  require 'transferzero-sdk/models/payout_method_details_mobile'
72
73
  require 'transferzero-sdk/models/payout_method_details_ngn_bank'
73
74
  require 'transferzero-sdk/models/payout_method_details_xof_bank'
75
+ require 'transferzero-sdk/models/payout_method_details_xof_cash'
74
76
  require 'transferzero-sdk/models/payout_method_details_xof_mobile'
77
+ require 'transferzero-sdk/models/payout_method_details_zar_bank'
75
78
  require 'transferzero-sdk/models/payout_method_gender_enum'
76
79
  require 'transferzero-sdk/models/payout_method_identity_card_type_enum'
77
80
  require 'transferzero-sdk/models/payout_method_list_response'
@@ -80,11 +83,14 @@ require 'transferzero-sdk/models/payout_method_request'
80
83
  require 'transferzero-sdk/models/payout_method_response'
81
84
  require 'transferzero-sdk/models/payout_method_webhook'
82
85
  require 'transferzero-sdk/models/politically_exposed_person'
86
+ require 'transferzero-sdk/models/proof_of_payment'
87
+ require 'transferzero-sdk/models/proof_of_payment_list_response'
83
88
  require 'transferzero-sdk/models/recipient'
84
89
  require 'transferzero-sdk/models/recipient_list_response'
85
90
  require 'transferzero-sdk/models/recipient_request'
86
91
  require 'transferzero-sdk/models/recipient_response'
87
92
  require 'transferzero-sdk/models/recipient_state'
93
+ require 'transferzero-sdk/models/recipient_state_reason_details'
88
94
  require 'transferzero-sdk/models/recipient_webhook'
89
95
  require 'transferzero-sdk/models/sender'
90
96
  require 'transferzero-sdk/models/sender_list_response'
@@ -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.7.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.11.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -38,9 +38,6 @@ class Currency
38
38
  # The maximum amount allowed in a transaction
39
39
  attr_accessor :max
40
40
 
41
- # The margin set for transactions in this currency
42
- attr_accessor :margin
43
-
44
41
  # The equivalent of the currency to 1 USD
45
42
  attr_accessor :usd_equivalent
46
43
 
@@ -55,7 +52,6 @@ class Currency
55
52
  :'primary' => :'primary',
56
53
  :'min' => :'min',
57
54
  :'max' => :'max',
58
- :'margin' => :'margin',
59
55
  :'usd_equivalent' => :'usd_equivalent'
60
56
  }
61
57
  end
@@ -71,7 +67,6 @@ class Currency
71
67
  :'primary' => :'Boolean',
72
68
  :'min' => :'String',
73
69
  :'max' => :'String',
74
- :'margin' => :'String',
75
70
  :'usd_equivalent' => :'String'
76
71
  }
77
72
  end
@@ -123,10 +118,6 @@ class Currency
123
118
  self.max = attributes[:'max']
124
119
  end
125
120
 
126
- if attributes.key?(:'margin')
127
- self.margin = attributes[:'margin']
128
- end
129
-
130
121
  if attributes.key?(:'usd_equivalent')
131
122
  self.usd_equivalent = attributes[:'usd_equivalent']
132
123
  end
@@ -158,7 +149,6 @@ class Currency
158
149
  primary == o.primary &&
159
150
  min == o.min &&
160
151
  max == o.max &&
161
- margin == o.margin &&
162
152
  usd_equivalent == o.usd_equivalent
163
153
  end
164
154
 
@@ -171,7 +161,7 @@ class Currency
171
161
  # Calculates hash code according to all attributes.
172
162
  # @return [Integer] Hash code
173
163
  def hash
174
- [code, name, symbol, decimals, subunit_to_unit, primary, min, max, margin, usd_equivalent].hash
164
+ [code, name, symbol, decimals, subunit_to_unit, primary, min, max, usd_equivalent].hash
175
165
  end
176
166
 
177
167
  require 'active_support/core_ext/hash'