velopayments 2.11.73

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 (273) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/LICENSE +201 -0
  5. data/Makefile +39 -0
  6. data/README.md +279 -0
  7. data/Rakefile +10 -0
  8. data/docs/Address.md +31 -0
  9. data/docs/Challenge.md +19 -0
  10. data/docs/Company.md +19 -0
  11. data/docs/CountriesApi.md +106 -0
  12. data/docs/CreatePayee.md +59 -0
  13. data/docs/CreatePayeesCSVRequest.md +71 -0
  14. data/docs/CreatePayeesCSVResponse.md +19 -0
  15. data/docs/CreatePayeesRequest.md +19 -0
  16. data/docs/CreatePaymentChannel.md +29 -0
  17. data/docs/CreatePayoutRequest.md +21 -0
  18. data/docs/CurrenciesApi.md +57 -0
  19. data/docs/FailedSubmission.md +19 -0
  20. data/docs/FundingAudit.md +31 -0
  21. data/docs/FundingEvent.md +21 -0
  22. data/docs/FundingEventType.md +16 -0
  23. data/docs/FundingManagerApi.md +347 -0
  24. data/docs/FundingRequest.md +17 -0
  25. data/docs/FundingRequest2.md +17 -0
  26. data/docs/FxSummary.md +35 -0
  27. data/docs/GetFundingsResponse.md +21 -0
  28. data/docs/GetPaymentsForPayoutResponse.md +23 -0
  29. data/docs/GetPaymentsForPayoutResponseLinks.md +19 -0
  30. data/docs/GetPaymentsForPayoutResponsePage.md +25 -0
  31. data/docs/GetPaymentsForPayoutResponseSummary.md +25 -0
  32. data/docs/GetPayoutApi.md +61 -0
  33. data/docs/GetPayoutStatistics.md +19 -0
  34. data/docs/GetPayoutsResponse.md +23 -0
  35. data/docs/Individual.md +21 -0
  36. data/docs/IndividualName.md +23 -0
  37. data/docs/InstructPayoutApi.md +60 -0
  38. data/docs/InvitationStatusResponse.md +17 -0
  39. data/docs/InvitePayeeRequest.md +17 -0
  40. data/docs/Language.md +16 -0
  41. data/docs/ListPaymentsResponse.md +23 -0
  42. data/docs/ListSourceAccountResponse.md +21 -0
  43. data/docs/MarketingOptIn.md +19 -0
  44. data/docs/OfacStatus.md +16 -0
  45. data/docs/OnboardedStatus.md +16 -0
  46. data/docs/PagedResponse.md +19 -0
  47. data/docs/PagedResponsePage.md +25 -0
  48. data/docs/Payee.md +57 -0
  49. data/docs/PayeeInvitationApi.md +222 -0
  50. data/docs/PayeeInvitationStatus.md +21 -0
  51. data/docs/PayeeResponse.md +23 -0
  52. data/docs/PayeeType.md +16 -0
  53. data/docs/PayeesApi.md +192 -0
  54. data/docs/PaymentAuditCurrency.md +16 -0
  55. data/docs/PaymentAuditServiceApi.md +424 -0
  56. data/docs/PaymentChannel.md +29 -0
  57. data/docs/PaymentChannelCountry.md +19 -0
  58. data/docs/PaymentChannelRule.md +29 -0
  59. data/docs/PaymentChannelRulesResponse.md +17 -0
  60. data/docs/PaymentEventResponse.md +39 -0
  61. data/docs/PaymentInstruction.md +27 -0
  62. data/docs/PaymentResponse.md +81 -0
  63. data/docs/Payor.md +55 -0
  64. data/docs/PayorApplicationsApi.md +119 -0
  65. data/docs/PayorBrandingResponse.md +25 -0
  66. data/docs/PayorCreateApiKeyRequest.md +21 -0
  67. data/docs/PayorCreateApiKeyResponse.md +19 -0
  68. data/docs/PayorCreateApplicationRequest.md +19 -0
  69. data/docs/PayorEmailOptOutRequest.md +17 -0
  70. data/docs/PayorFundingBankDetailsUpdate.md +21 -0
  71. data/docs/PayorLogoRequest.md +17 -0
  72. data/docs/PayorRef.md +21 -0
  73. data/docs/PayorsApi.md +224 -0
  74. data/docs/PayoutHistoryApi.md +142 -0
  75. data/docs/PayoutStatus.md +16 -0
  76. data/docs/PayoutSummaryAudit.md +39 -0
  77. data/docs/PayoutSummaryResponse.md +31 -0
  78. data/docs/QueryBatchResponse.md +23 -0
  79. data/docs/QuoteFxSummary.md +37 -0
  80. data/docs/QuotePayoutApi.md +61 -0
  81. data/docs/QuoteResponse.md +17 -0
  82. data/docs/RejectedPayment.md +31 -0
  83. data/docs/Social.md +21 -0
  84. data/docs/SourceAccount.md +23 -0
  85. data/docs/SourceAccountResponse.md +39 -0
  86. data/docs/SourceAccountSummary.md +21 -0
  87. data/docs/SubmitPayoutApi.md +60 -0
  88. data/docs/SupportedCountriesResponse.md +17 -0
  89. data/docs/SupportedCountry.md +19 -0
  90. data/docs/SupportedCurrency.md +19 -0
  91. data/docs/SupportedCurrencyResponse.md +17 -0
  92. data/docs/WithdrawPayoutApi.md +60 -0
  93. data/lib/velopayments.rb +124 -0
  94. data/lib/velopayments/api/countries_api.rb +116 -0
  95. data/lib/velopayments/api/currencies_api.rb +69 -0
  96. data/lib/velopayments/api/funding_manager_api.rb +374 -0
  97. data/lib/velopayments/api/get_payout_api.rb +75 -0
  98. data/lib/velopayments/api/instruct_payout_api.rb +72 -0
  99. data/lib/velopayments/api/payee_invitation_api.rb +244 -0
  100. data/lib/velopayments/api/payees_api.rb +217 -0
  101. data/lib/velopayments/api/payment_audit_service_api.rb +473 -0
  102. data/lib/velopayments/api/payor_applications_api.rb +147 -0
  103. data/lib/velopayments/api/payors_api.rb +241 -0
  104. data/lib/velopayments/api/payout_history_api.rb +165 -0
  105. data/lib/velopayments/api/quote_payout_api.rb +75 -0
  106. data/lib/velopayments/api/submit_payout_api.rb +74 -0
  107. data/lib/velopayments/api/withdraw_payout_api.rb +72 -0
  108. data/lib/velopayments/api_client.rb +387 -0
  109. data/lib/velopayments/api_error.rb +57 -0
  110. data/lib/velopayments/configuration.rb +251 -0
  111. data/lib/velopayments/models/address.rb +478 -0
  112. data/lib/velopayments/models/challenge.rb +271 -0
  113. data/lib/velopayments/models/company.rb +256 -0
  114. data/lib/velopayments/models/create_payee.rb +466 -0
  115. data/lib/velopayments/models/create_payees_csv_request.rb +1052 -0
  116. data/lib/velopayments/models/create_payees_csv_response.rb +207 -0
  117. data/lib/velopayments/models/create_payees_request.rb +217 -0
  118. data/lib/velopayments/models/create_payment_channel.rb +414 -0
  119. data/lib/velopayments/models/create_payout_request.rb +226 -0
  120. data/lib/velopayments/models/failed_submission.rb +205 -0
  121. data/lib/velopayments/models/funding_audit.rb +295 -0
  122. data/lib/velopayments/models/funding_event.rb +214 -0
  123. data/lib/velopayments/models/funding_event_type.rb +41 -0
  124. data/lib/velopayments/models/funding_request.rb +230 -0
  125. data/lib/velopayments/models/funding_request2.rb +230 -0
  126. data/lib/velopayments/models/fx_summary.rb +363 -0
  127. data/lib/velopayments/models/get_fundings_response.rb +223 -0
  128. data/lib/velopayments/models/get_payments_for_payout_response.rb +228 -0
  129. data/lib/velopayments/models/get_payments_for_payout_response_links.rb +205 -0
  130. data/lib/velopayments/models/get_payments_for_payout_response_page.rb +232 -0
  131. data/lib/velopayments/models/get_payments_for_payout_response_summary.rb +232 -0
  132. data/lib/velopayments/models/get_payout_statistics.rb +215 -0
  133. data/lib/velopayments/models/get_payouts_response.rb +228 -0
  134. data/lib/velopayments/models/individual.rb +224 -0
  135. data/lib/velopayments/models/individual_name.rb +337 -0
  136. data/lib/velopayments/models/invitation_status_response.rb +203 -0
  137. data/lib/velopayments/models/invite_payee_request.rb +201 -0
  138. data/lib/velopayments/models/language.rb +45 -0
  139. data/lib/velopayments/models/list_payments_response.rb +228 -0
  140. data/lib/velopayments/models/list_source_account_response.rb +219 -0
  141. data/lib/velopayments/models/marketing_opt_in.rb +205 -0
  142. data/lib/velopayments/models/ofac_status.rb +37 -0
  143. data/lib/velopayments/models/onboarded_status.rb +38 -0
  144. data/lib/velopayments/models/paged_response.rb +207 -0
  145. data/lib/velopayments/models/paged_response_page.rb +232 -0
  146. data/lib/velopayments/models/payee.rb +381 -0
  147. data/lib/velopayments/models/payee_invitation_status.rb +258 -0
  148. data/lib/velopayments/models/payee_response.rb +228 -0
  149. data/lib/velopayments/models/payee_type.rb +36 -0
  150. data/lib/velopayments/models/payment_audit_currency.rb +37 -0
  151. data/lib/velopayments/models/payment_channel.rb +430 -0
  152. data/lib/velopayments/models/payment_channel_country.rb +207 -0
  153. data/lib/velopayments/models/payment_channel_rule.rb +250 -0
  154. data/lib/velopayments/models/payment_channel_rules_response.rb +198 -0
  155. data/lib/velopayments/models/payment_event_response.rb +351 -0
  156. data/lib/velopayments/models/payment_instruction.rb +430 -0
  157. data/lib/velopayments/models/payment_response.rb +587 -0
  158. data/lib/velopayments/models/payor.rb +435 -0
  159. data/lib/velopayments/models/payor_branding_response.rb +247 -0
  160. data/lib/velopayments/models/payor_create_api_key_request.rb +303 -0
  161. data/lib/velopayments/models/payor_create_api_key_response.rb +207 -0
  162. data/lib/velopayments/models/payor_create_application_request.rb +264 -0
  163. data/lib/velopayments/models/payor_email_opt_out_request.rb +196 -0
  164. data/lib/velopayments/models/payor_funding_bank_details_update.rb +316 -0
  165. data/lib/velopayments/models/payor_logo_request.rb +196 -0
  166. data/lib/velopayments/models/payor_ref.rb +214 -0
  167. data/lib/velopayments/models/payout_status.rb +43 -0
  168. data/lib/velopayments/models/payout_summary_audit.rb +314 -0
  169. data/lib/velopayments/models/payout_summary_response.rb +280 -0
  170. data/lib/velopayments/models/query_batch_response.rb +260 -0
  171. data/lib/velopayments/models/quote_fx_summary.rb +377 -0
  172. data/lib/velopayments/models/quote_response.rb +198 -0
  173. data/lib/velopayments/models/rejected_payment.rb +323 -0
  174. data/lib/velopayments/models/social.rb +214 -0
  175. data/lib/velopayments/models/source_account.rb +243 -0
  176. data/lib/velopayments/models/source_account_response.rb +341 -0
  177. data/lib/velopayments/models/source_account_summary.rb +224 -0
  178. data/lib/velopayments/models/supported_countries_response.rb +198 -0
  179. data/lib/velopayments/models/supported_country.rb +207 -0
  180. data/lib/velopayments/models/supported_currency.rb +206 -0
  181. data/lib/velopayments/models/supported_currency_response.rb +198 -0
  182. data/lib/velopayments/version.rb +15 -0
  183. data/oa3-config.json +8 -0
  184. data/spec/api/countries_api_spec.rb +57 -0
  185. data/spec/api/currencies_api_spec.rb +46 -0
  186. data/spec/api/funding_manager_api_spec.rb +117 -0
  187. data/spec/api/get_payout_api_spec.rb +47 -0
  188. data/spec/api/instruct_payout_api_spec.rb +47 -0
  189. data/spec/api/payee_invitation_api_spec.rb +84 -0
  190. data/spec/api/payees_api_spec.rb +82 -0
  191. data/spec/api/payment_audit_service_api_spec.rb +150 -0
  192. data/spec/api/payor_applications_api_spec.rb +62 -0
  193. data/spec/api/payors_api_spec.rb +85 -0
  194. data/spec/api/payout_history_api_spec.rb +71 -0
  195. data/spec/api/quote_payout_api_spec.rb +47 -0
  196. data/spec/api/submit_payout_api_spec.rb +47 -0
  197. data/spec/api/withdraw_payout_api_spec.rb +47 -0
  198. data/spec/api_client_spec.rb +226 -0
  199. data/spec/configuration_spec.rb +42 -0
  200. data/spec/models/address_spec.rb +83 -0
  201. data/spec/models/challenge_spec.rb +47 -0
  202. data/spec/models/company_spec.rb +47 -0
  203. data/spec/models/create_payee_spec.rb +167 -0
  204. data/spec/models/create_payees_csv_request_spec.rb +211 -0
  205. data/spec/models/create_payees_csv_response_spec.rb +47 -0
  206. data/spec/models/create_payees_request_spec.rb +47 -0
  207. data/spec/models/create_payment_channel_spec.rb +81 -0
  208. data/spec/models/create_payout_request_spec.rb +53 -0
  209. data/spec/models/failed_submission_spec.rb +47 -0
  210. data/spec/models/funding_audit_spec.rb +87 -0
  211. data/spec/models/funding_event_spec.rb +53 -0
  212. data/spec/models/funding_event_type_spec.rb +35 -0
  213. data/spec/models/funding_request2_spec.rb +41 -0
  214. data/spec/models/funding_request_spec.rb +41 -0
  215. data/spec/models/fx_summary_spec.rb +103 -0
  216. data/spec/models/get_fundings_response_spec.rb +53 -0
  217. data/spec/models/get_payments_for_payout_response_links_spec.rb +47 -0
  218. data/spec/models/get_payments_for_payout_response_page_spec.rb +65 -0
  219. data/spec/models/get_payments_for_payout_response_spec.rb +59 -0
  220. data/spec/models/get_payments_for_payout_response_summary_spec.rb +65 -0
  221. data/spec/models/get_payout_statistics_spec.rb +47 -0
  222. data/spec/models/get_payouts_response_spec.rb +59 -0
  223. data/spec/models/individual_name_spec.rb +59 -0
  224. data/spec/models/individual_spec.rb +53 -0
  225. data/spec/models/invitation_status_response_spec.rb +41 -0
  226. data/spec/models/invite_payee_request_spec.rb +41 -0
  227. data/spec/models/language_spec.rb +35 -0
  228. data/spec/models/list_payments_response_spec.rb +59 -0
  229. data/spec/models/list_source_account_response_spec.rb +53 -0
  230. data/spec/models/marketing_opt_in_spec.rb +47 -0
  231. data/spec/models/ofac_status_spec.rb +35 -0
  232. data/spec/models/onboarded_status_spec.rb +35 -0
  233. data/spec/models/paged_response_page_spec.rb +65 -0
  234. data/spec/models/paged_response_spec.rb +47 -0
  235. data/spec/models/payee_invitation_status_spec.rb +57 -0
  236. data/spec/models/payee_response_spec.rb +59 -0
  237. data/spec/models/payee_spec.rb +161 -0
  238. data/spec/models/payee_type_spec.rb +35 -0
  239. data/spec/models/payment_audit_currency_spec.rb +35 -0
  240. data/spec/models/payment_channel_country_spec.rb +47 -0
  241. data/spec/models/payment_channel_rule_spec.rb +77 -0
  242. data/spec/models/payment_channel_rules_response_spec.rb +41 -0
  243. data/spec/models/payment_channel_spec.rb +81 -0
  244. data/spec/models/payment_event_response_spec.rb +111 -0
  245. data/spec/models/payment_instruction_spec.rb +75 -0
  246. data/spec/models/payment_response_spec.rb +241 -0
  247. data/spec/models/payor_branding_response_spec.rb +65 -0
  248. data/spec/models/payor_create_api_key_request_spec.rb +57 -0
  249. data/spec/models/payor_create_api_key_response_spec.rb +47 -0
  250. data/spec/models/payor_create_application_request_spec.rb +47 -0
  251. data/spec/models/payor_email_opt_out_request_spec.rb +41 -0
  252. data/spec/models/payor_funding_bank_details_update_spec.rb +53 -0
  253. data/spec/models/payor_logo_request_spec.rb +41 -0
  254. data/spec/models/payor_ref_spec.rb +53 -0
  255. data/spec/models/payor_spec.rb +163 -0
  256. data/spec/models/payout_status_spec.rb +35 -0
  257. data/spec/models/payout_summary_audit_spec.rb +107 -0
  258. data/spec/models/payout_summary_response_spec.rb +83 -0
  259. data/spec/models/query_batch_response_spec.rb +63 -0
  260. data/spec/models/quote_fx_summary_spec.rb +101 -0
  261. data/spec/models/quote_response_spec.rb +41 -0
  262. data/spec/models/rejected_payment_spec.rb +87 -0
  263. data/spec/models/social_spec.rb +53 -0
  264. data/spec/models/source_account_response_spec.rb +111 -0
  265. data/spec/models/source_account_spec.rb +59 -0
  266. data/spec/models/source_account_summary_spec.rb +53 -0
  267. data/spec/models/supported_countries_response_spec.rb +41 -0
  268. data/spec/models/supported_country_spec.rb +47 -0
  269. data/spec/models/supported_currency_response_spec.rb +41 -0
  270. data/spec/models/supported_currency_spec.rb +47 -0
  271. data/spec/spec_helper.rb +111 -0
  272. data/velopayments.gemspec +45 -0
  273. metadata +586 -0
@@ -0,0 +1,19 @@
1
+ # VeloPayments::SupportedCountry
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **iso_country_code** | **String** | | [optional]
8
+ **currencies** | **Array<String>** | | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'VeloPayments'
14
+
15
+ instance = VeloPayments::SupportedCountry.new(iso_country_code: null,
16
+ currencies: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,19 @@
1
+ # VeloPayments::SupportedCurrency
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **currency** | **String** | ISO Currency Code | [optional]
8
+ **max_payment_amount** | **Integer** | | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'VeloPayments'
14
+
15
+ instance = VeloPayments::SupportedCurrency.new(currency: null,
16
+ max_payment_amount: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,17 @@
1
+ # VeloPayments::SupportedCurrencyResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **currencies** | [**Array<SupportedCurrency>**](SupportedCurrency.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'VeloPayments'
13
+
14
+ instance = VeloPayments::SupportedCurrencyResponse.new(currencies: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,60 @@
1
+ # VeloPayments::WithdrawPayoutApi
2
+
3
+ All URIs are relative to *https://api.sandbox.velopayments.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**v3_payouts_payout_id_delete**](WithdrawPayoutApi.md#v3_payouts_payout_id_delete) | **DELETE** /v3/payouts/{payoutId} | Withdraw Payout
8
+
9
+
10
+
11
+ ## v3_payouts_payout_id_delete
12
+
13
+ > v3_payouts_payout_id_delete(payout_id)
14
+
15
+ Withdraw Payout
16
+
17
+ Withdraw Payout will delete payout details from payout service and rails services but will just move the status of the payout to WITHDRAWN in payment audit.
18
+
19
+ ### Example
20
+
21
+ ```ruby
22
+ # load the gem
23
+ require 'velopayments'
24
+ # setup authorization
25
+ VeloPayments.configure do |config|
26
+ # Configure OAuth2 access token for authorization: OAuth2
27
+ config.access_token = 'YOUR ACCESS TOKEN'
28
+ end
29
+
30
+ api_instance = VeloPayments::WithdrawPayoutApi.new
31
+ payout_id = 'payout_id_example' # String | Id of the payout
32
+
33
+ begin
34
+ #Withdraw Payout
35
+ api_instance.v3_payouts_payout_id_delete(payout_id)
36
+ rescue VeloPayments::ApiError => e
37
+ puts "Exception when calling WithdrawPayoutApi->v3_payouts_payout_id_delete: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Parameters
42
+
43
+
44
+ Name | Type | Description | Notes
45
+ ------------- | ------------- | ------------- | -------------
46
+ **payout_id** | [**String**](.md)| Id of the payout |
47
+
48
+ ### Return type
49
+
50
+ nil (empty response body)
51
+
52
+ ### Authorization
53
+
54
+ [OAuth2](../README.md#OAuth2)
55
+
56
+ ### HTTP request headers
57
+
58
+ - **Content-Type**: Not defined
59
+ - **Accept**: Not defined
60
+
@@ -0,0 +1,124 @@
1
+ =begin
2
+ #Velo Payments APIs
3
+
4
+ ### Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor. * **Payment.** A single transfer of funds from a payor to a payee. * **Payout.** A batch of Payments, typically used by a payor to logically group payments (e.g. by business day). Technically there need be no relationship between the payments in a payout - a single payout can contain payments to multiple payees and/or multiple payments to a single payee. * **Sandbox.** An integration environment provided by Velo Payments which offers a similar API experience to the production environment, but all funding and payment events are simulated, along with many other services such as OFAC sanctions list checking. ## Overview The Velo Payments API allows a payor to perform a number of operations. The following is a list of the main capabilities in a natural order of execution: * Authenticate with the Velo platform * Maintain a collection of payees * Query the payor’s current balance of funds within the platform and perform additional funding * Issue payments to payees * Query the platform for a history of those payments This document describes the main concepts and APIs required to get up and running with the Velo Payments platform. It is not an exhaustive API reference. For that, please see the separate Velo Payments API Reference. ## API Considerations The Velo Payments API is REST based and uses the JSON format for requests and responses. Most calls are secured using OAuth 2 security and require a valid authentication access token for successful operation. See the Authentication section for details. Where a dynamic value is required in the examples below, the {token} format is used, suggesting that the caller needs to supply the appropriate value of the token in question (without including the { or } characters). Where curl examples are given, the –d @filename.json approach is used, indicating that the request body should be placed into a file named filename.json in the current directory. Each of the curl examples in this document should be considered a single line on the command-line, regardless of how they appear in print. ## Authenticating with the Velo Platform Once Velo backoffice staff have added your organization as a payor within the Velo platform sandbox, they will create you a payor Id, an API key and an API secret and share these with you in a secure manner. You will need to use these values to authenticate with the Velo platform in order to gain access to the APIs. The steps to take are explained in the following: create a string comprising the API key (e.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8) and API secret (e.g. c396b26b-137a-44fd-87f5-34631f8fd529) with a colon between them. E.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8:c396b26b-137a-44fd-87f5-34631f8fd529 base64 encode this string. E.g.: NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== create an HTTP **Authorization** header with the value set to e.g. Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== perform the Velo authentication REST call using the HTTP header created above e.g. via curl: ``` curl -X POST \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==\" \\ 'https://api.sandbox.velopayments.com/v1/authenticate?grant_type=client_credentials' ``` If successful, this call will result in a **200** HTTP status code and a response body such as: ``` { \"access_token\":\"19f6bafd-93fd-4747-b229-00507bbc991f\", \"token_type\":\"bearer\", \"expires_in\":1799, \"scope\":\"...\" } ``` ## API access following authentication Following successful authentication, the value of the access_token field in the response (indicated in green above) should then be presented with all subsequent API calls to allow the Velo platform to validate that the caller is authenticated. This is achieved by setting the HTTP Authorization header with the value set to e.g. Bearer 19f6bafd-93fd-4747-b229-00507bbc991f such as the curl example below: ``` -H \"Authorization: Bearer 19f6bafd-93fd-4747-b229-00507bbc991f \" ``` If you make other Velo API calls which require authorization but the Authorization header is missing or invalid then you will get a **401** HTTP status response.
5
+
6
+ OpenAPI spec version: 2.11.73
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'velopayments/api_client'
15
+ require 'velopayments/api_error'
16
+ require 'velopayments/version'
17
+ require 'velopayments/configuration'
18
+
19
+ # Models
20
+ require 'velopayments/models/address'
21
+ require 'velopayments/models/challenge'
22
+ require 'velopayments/models/company'
23
+ require 'velopayments/models/create_payee'
24
+ require 'velopayments/models/create_payees_csv_request'
25
+ require 'velopayments/models/create_payees_csv_response'
26
+ require 'velopayments/models/create_payees_request'
27
+ require 'velopayments/models/create_payment_channel'
28
+ require 'velopayments/models/create_payout_request'
29
+ require 'velopayments/models/failed_submission'
30
+ require 'velopayments/models/funding_audit'
31
+ require 'velopayments/models/funding_event'
32
+ require 'velopayments/models/funding_event_type'
33
+ require 'velopayments/models/funding_request'
34
+ require 'velopayments/models/funding_request2'
35
+ require 'velopayments/models/fx_summary'
36
+ require 'velopayments/models/get_fundings_response'
37
+ require 'velopayments/models/get_payments_for_payout_response'
38
+ require 'velopayments/models/get_payments_for_payout_response_links'
39
+ require 'velopayments/models/get_payments_for_payout_response_page'
40
+ require 'velopayments/models/get_payments_for_payout_response_summary'
41
+ require 'velopayments/models/get_payout_statistics'
42
+ require 'velopayments/models/get_payouts_response'
43
+ require 'velopayments/models/individual'
44
+ require 'velopayments/models/individual_name'
45
+ require 'velopayments/models/invitation_status_response'
46
+ require 'velopayments/models/invite_payee_request'
47
+ require 'velopayments/models/language'
48
+ require 'velopayments/models/list_payments_response'
49
+ require 'velopayments/models/list_source_account_response'
50
+ require 'velopayments/models/marketing_opt_in'
51
+ require 'velopayments/models/ofac_status'
52
+ require 'velopayments/models/onboarded_status'
53
+ require 'velopayments/models/paged_response'
54
+ require 'velopayments/models/paged_response_page'
55
+ require 'velopayments/models/payee'
56
+ require 'velopayments/models/payee_invitation_status'
57
+ require 'velopayments/models/payee_response'
58
+ require 'velopayments/models/payee_type'
59
+ require 'velopayments/models/payment_audit_currency'
60
+ require 'velopayments/models/payment_channel'
61
+ require 'velopayments/models/payment_channel_country'
62
+ require 'velopayments/models/payment_channel_rule'
63
+ require 'velopayments/models/payment_channel_rules_response'
64
+ require 'velopayments/models/payment_event_response'
65
+ require 'velopayments/models/payment_instruction'
66
+ require 'velopayments/models/payment_response'
67
+ require 'velopayments/models/payor'
68
+ require 'velopayments/models/payor_branding_response'
69
+ require 'velopayments/models/payor_create_api_key_request'
70
+ require 'velopayments/models/payor_create_api_key_response'
71
+ require 'velopayments/models/payor_create_application_request'
72
+ require 'velopayments/models/payor_email_opt_out_request'
73
+ require 'velopayments/models/payor_funding_bank_details_update'
74
+ require 'velopayments/models/payor_logo_request'
75
+ require 'velopayments/models/payor_ref'
76
+ require 'velopayments/models/payout_status'
77
+ require 'velopayments/models/payout_summary_audit'
78
+ require 'velopayments/models/payout_summary_response'
79
+ require 'velopayments/models/query_batch_response'
80
+ require 'velopayments/models/quote_fx_summary'
81
+ require 'velopayments/models/quote_response'
82
+ require 'velopayments/models/rejected_payment'
83
+ require 'velopayments/models/social'
84
+ require 'velopayments/models/source_account'
85
+ require 'velopayments/models/source_account_response'
86
+ require 'velopayments/models/source_account_summary'
87
+ require 'velopayments/models/supported_countries_response'
88
+ require 'velopayments/models/supported_country'
89
+ require 'velopayments/models/supported_currency'
90
+ require 'velopayments/models/supported_currency_response'
91
+
92
+ # APIs
93
+ require 'velopayments/api/countries_api'
94
+ require 'velopayments/api/currencies_api'
95
+ require 'velopayments/api/funding_manager_api'
96
+ require 'velopayments/api/get_payout_api'
97
+ require 'velopayments/api/instruct_payout_api'
98
+ require 'velopayments/api/payee_invitation_api'
99
+ require 'velopayments/api/payees_api'
100
+ require 'velopayments/api/payment_audit_service_api'
101
+ require 'velopayments/api/payor_applications_api'
102
+ require 'velopayments/api/payors_api'
103
+ require 'velopayments/api/payout_history_api'
104
+ require 'velopayments/api/quote_payout_api'
105
+ require 'velopayments/api/submit_payout_api'
106
+ require 'velopayments/api/withdraw_payout_api'
107
+
108
+ module VeloPayments
109
+ class << self
110
+ # Customize default settings for the SDK using block.
111
+ # VeloPayments.configure do |config|
112
+ # config.username = "xxx"
113
+ # config.password = "xxx"
114
+ # end
115
+ # If no block given, return the default Configuration object.
116
+ def configure
117
+ if block_given?
118
+ yield(Configuration.default)
119
+ else
120
+ Configuration.default
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,116 @@
1
+ =begin
2
+ #Velo Payments APIs
3
+
4
+ ### Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor. * **Payment.** A single transfer of funds from a payor to a payee. * **Payout.** A batch of Payments, typically used by a payor to logically group payments (e.g. by business day). Technically there need be no relationship between the payments in a payout - a single payout can contain payments to multiple payees and/or multiple payments to a single payee. * **Sandbox.** An integration environment provided by Velo Payments which offers a similar API experience to the production environment, but all funding and payment events are simulated, along with many other services such as OFAC sanctions list checking. ## Overview The Velo Payments API allows a payor to perform a number of operations. The following is a list of the main capabilities in a natural order of execution: * Authenticate with the Velo platform * Maintain a collection of payees * Query the payor’s current balance of funds within the platform and perform additional funding * Issue payments to payees * Query the platform for a history of those payments This document describes the main concepts and APIs required to get up and running with the Velo Payments platform. It is not an exhaustive API reference. For that, please see the separate Velo Payments API Reference. ## API Considerations The Velo Payments API is REST based and uses the JSON format for requests and responses. Most calls are secured using OAuth 2 security and require a valid authentication access token for successful operation. See the Authentication section for details. Where a dynamic value is required in the examples below, the {token} format is used, suggesting that the caller needs to supply the appropriate value of the token in question (without including the { or } characters). Where curl examples are given, the –d @filename.json approach is used, indicating that the request body should be placed into a file named filename.json in the current directory. Each of the curl examples in this document should be considered a single line on the command-line, regardless of how they appear in print. ## Authenticating with the Velo Platform Once Velo backoffice staff have added your organization as a payor within the Velo platform sandbox, they will create you a payor Id, an API key and an API secret and share these with you in a secure manner. You will need to use these values to authenticate with the Velo platform in order to gain access to the APIs. The steps to take are explained in the following: create a string comprising the API key (e.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8) and API secret (e.g. c396b26b-137a-44fd-87f5-34631f8fd529) with a colon between them. E.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8:c396b26b-137a-44fd-87f5-34631f8fd529 base64 encode this string. E.g.: NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== create an HTTP **Authorization** header with the value set to e.g. Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== perform the Velo authentication REST call using the HTTP header created above e.g. via curl: ``` curl -X POST \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==\" \\ 'https://api.sandbox.velopayments.com/v1/authenticate?grant_type=client_credentials' ``` If successful, this call will result in a **200** HTTP status code and a response body such as: ``` { \"access_token\":\"19f6bafd-93fd-4747-b229-00507bbc991f\", \"token_type\":\"bearer\", \"expires_in\":1799, \"scope\":\"...\" } ``` ## API access following authentication Following successful authentication, the value of the access_token field in the response (indicated in green above) should then be presented with all subsequent API calls to allow the Velo platform to validate that the caller is authenticated. This is achieved by setting the HTTP Authorization header with the value set to e.g. Bearer 19f6bafd-93fd-4747-b229-00507bbc991f such as the curl example below: ``` -H \"Authorization: Bearer 19f6bafd-93fd-4747-b229-00507bbc991f \" ``` If you make other Velo API calls which require authorization but the Authorization header is missing or invalid then you will get a **401** HTTP status response.
5
+
6
+ OpenAPI spec version: 2.11.73
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module VeloPayments
16
+ class CountriesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List Supported Countries
23
+ # List the supported countries.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [SupportedCountriesResponse]
26
+ def list_supported_countries(opts = {})
27
+ data, _status_code, _headers = list_supported_countries_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # List Supported Countries
32
+ # List the supported countries.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(SupportedCountriesResponse, Integer, Hash)>] SupportedCountriesResponse data, response status code and response headers
35
+ def list_supported_countries_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CountriesApi.list_supported_countries ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/v1/supportedCountries'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['OAuth2']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'SupportedCountriesResponse')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: CountriesApi#list_supported_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+
69
+ # List Payment Channel Country Rules
70
+ # List the country specific payment channel rules.
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [PaymentChannelRulesResponse]
73
+ def v1_payment_channel_rules_get(opts = {})
74
+ data, _status_code, _headers = v1_payment_channel_rules_get_with_http_info(opts)
75
+ data
76
+ end
77
+
78
+ # List Payment Channel Country Rules
79
+ # List the country specific payment channel rules.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [Array<(PaymentChannelRulesResponse, Integer, Hash)>] PaymentChannelRulesResponse data, response status code and response headers
82
+ def v1_payment_channel_rules_get_with_http_info(opts = {})
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug 'Calling API: CountriesApi.v1_payment_channel_rules_get ...'
85
+ end
86
+ # resource path
87
+ local_var_path = '/v1/paymentChannelRules'
88
+
89
+ # query parameters
90
+ query_params = {}
91
+
92
+ # header parameters
93
+ header_params = {}
94
+ # HTTP header 'Accept' (if needed)
95
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
96
+
97
+ # form parameters
98
+ form_params = {}
99
+
100
+ # http body (model)
101
+ post_body = nil
102
+ auth_names = ['OAuth2']
103
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
104
+ :header_params => header_params,
105
+ :query_params => query_params,
106
+ :form_params => form_params,
107
+ :body => post_body,
108
+ :auth_names => auth_names,
109
+ :return_type => 'PaymentChannelRulesResponse')
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "API called: CountriesApi#v1_payment_channel_rules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
112
+ end
113
+ return data, status_code, headers
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,69 @@
1
+ =begin
2
+ #Velo Payments APIs
3
+
4
+ ### Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor. * **Payment.** A single transfer of funds from a payor to a payee. * **Payout.** A batch of Payments, typically used by a payor to logically group payments (e.g. by business day). Technically there need be no relationship between the payments in a payout - a single payout can contain payments to multiple payees and/or multiple payments to a single payee. * **Sandbox.** An integration environment provided by Velo Payments which offers a similar API experience to the production environment, but all funding and payment events are simulated, along with many other services such as OFAC sanctions list checking. ## Overview The Velo Payments API allows a payor to perform a number of operations. The following is a list of the main capabilities in a natural order of execution: * Authenticate with the Velo platform * Maintain a collection of payees * Query the payor’s current balance of funds within the platform and perform additional funding * Issue payments to payees * Query the platform for a history of those payments This document describes the main concepts and APIs required to get up and running with the Velo Payments platform. It is not an exhaustive API reference. For that, please see the separate Velo Payments API Reference. ## API Considerations The Velo Payments API is REST based and uses the JSON format for requests and responses. Most calls are secured using OAuth 2 security and require a valid authentication access token for successful operation. See the Authentication section for details. Where a dynamic value is required in the examples below, the {token} format is used, suggesting that the caller needs to supply the appropriate value of the token in question (without including the { or } characters). Where curl examples are given, the –d @filename.json approach is used, indicating that the request body should be placed into a file named filename.json in the current directory. Each of the curl examples in this document should be considered a single line on the command-line, regardless of how they appear in print. ## Authenticating with the Velo Platform Once Velo backoffice staff have added your organization as a payor within the Velo platform sandbox, they will create you a payor Id, an API key and an API secret and share these with you in a secure manner. You will need to use these values to authenticate with the Velo platform in order to gain access to the APIs. The steps to take are explained in the following: create a string comprising the API key (e.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8) and API secret (e.g. c396b26b-137a-44fd-87f5-34631f8fd529) with a colon between them. E.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8:c396b26b-137a-44fd-87f5-34631f8fd529 base64 encode this string. E.g.: NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== create an HTTP **Authorization** header with the value set to e.g. Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== perform the Velo authentication REST call using the HTTP header created above e.g. via curl: ``` curl -X POST \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==\" \\ 'https://api.sandbox.velopayments.com/v1/authenticate?grant_type=client_credentials' ``` If successful, this call will result in a **200** HTTP status code and a response body such as: ``` { \"access_token\":\"19f6bafd-93fd-4747-b229-00507bbc991f\", \"token_type\":\"bearer\", \"expires_in\":1799, \"scope\":\"...\" } ``` ## API access following authentication Following successful authentication, the value of the access_token field in the response (indicated in green above) should then be presented with all subsequent API calls to allow the Velo platform to validate that the caller is authenticated. This is achieved by setting the HTTP Authorization header with the value set to e.g. Bearer 19f6bafd-93fd-4747-b229-00507bbc991f such as the curl example below: ``` -H \"Authorization: Bearer 19f6bafd-93fd-4747-b229-00507bbc991f \" ``` If you make other Velo API calls which require authorization but the Authorization header is missing or invalid then you will get a **401** HTTP status response.
5
+
6
+ OpenAPI spec version: 2.11.73
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module VeloPayments
16
+ class CurrenciesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List Supported Currencies
23
+ # List the supported currencies.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [SupportedCurrencyResponse]
26
+ def list_supported_currencies(opts = {})
27
+ data, _status_code, _headers = list_supported_currencies_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # List Supported Currencies
32
+ # List the supported currencies.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(SupportedCurrencyResponse, Integer, Hash)>] SupportedCurrencyResponse data, response status code and response headers
35
+ def list_supported_currencies_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_supported_currencies ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/v2/currencies'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['OAuth2']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'SupportedCurrencyResponse')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_supported_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,374 @@
1
+ =begin
2
+ #Velo Payments APIs
3
+
4
+ ### Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor. * **Payment.** A single transfer of funds from a payor to a payee. * **Payout.** A batch of Payments, typically used by a payor to logically group payments (e.g. by business day). Technically there need be no relationship between the payments in a payout - a single payout can contain payments to multiple payees and/or multiple payments to a single payee. * **Sandbox.** An integration environment provided by Velo Payments which offers a similar API experience to the production environment, but all funding and payment events are simulated, along with many other services such as OFAC sanctions list checking. ## Overview The Velo Payments API allows a payor to perform a number of operations. The following is a list of the main capabilities in a natural order of execution: * Authenticate with the Velo platform * Maintain a collection of payees * Query the payor’s current balance of funds within the platform and perform additional funding * Issue payments to payees * Query the platform for a history of those payments This document describes the main concepts and APIs required to get up and running with the Velo Payments platform. It is not an exhaustive API reference. For that, please see the separate Velo Payments API Reference. ## API Considerations The Velo Payments API is REST based and uses the JSON format for requests and responses. Most calls are secured using OAuth 2 security and require a valid authentication access token for successful operation. See the Authentication section for details. Where a dynamic value is required in the examples below, the {token} format is used, suggesting that the caller needs to supply the appropriate value of the token in question (without including the { or } characters). Where curl examples are given, the –d @filename.json approach is used, indicating that the request body should be placed into a file named filename.json in the current directory. Each of the curl examples in this document should be considered a single line on the command-line, regardless of how they appear in print. ## Authenticating with the Velo Platform Once Velo backoffice staff have added your organization as a payor within the Velo platform sandbox, they will create you a payor Id, an API key and an API secret and share these with you in a secure manner. You will need to use these values to authenticate with the Velo platform in order to gain access to the APIs. The steps to take are explained in the following: create a string comprising the API key (e.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8) and API secret (e.g. c396b26b-137a-44fd-87f5-34631f8fd529) with a colon between them. E.g. 44a9537d-d55d-4b47-8082-14061c2bcdd8:c396b26b-137a-44fd-87f5-34631f8fd529 base64 encode this string. E.g.: NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== create an HTTP **Authorization** header with the value set to e.g. Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ== perform the Velo authentication REST call using the HTTP header created above e.g. via curl: ``` curl -X POST \\ -H \"Content-Type: application/json\" \\ -H \"Authorization: Basic NDRhOTUzN2QtZDU1ZC00YjQ3LTgwODItMTQwNjFjMmJjZGQ4OmMzOTZiMjZiLTEzN2EtNDRmZC04N2Y1LTM0NjMxZjhmZDUyOQ==\" \\ 'https://api.sandbox.velopayments.com/v1/authenticate?grant_type=client_credentials' ``` If successful, this call will result in a **200** HTTP status code and a response body such as: ``` { \"access_token\":\"19f6bafd-93fd-4747-b229-00507bbc991f\", \"token_type\":\"bearer\", \"expires_in\":1799, \"scope\":\"...\" } ``` ## API access following authentication Following successful authentication, the value of the access_token field in the response (indicated in green above) should then be presented with all subsequent API calls to allow the Velo platform to validate that the caller is authenticated. This is achieved by setting the HTTP Authorization header with the value set to e.g. Bearer 19f6bafd-93fd-4747-b229-00507bbc991f such as the curl example below: ``` -H \"Authorization: Bearer 19f6bafd-93fd-4747-b229-00507bbc991f \" ``` If you make other Velo API calls which require authorization but the Authorization header is missing or invalid then you will get a **401** HTTP status response.
5
+
6
+ OpenAPI spec version: 2.11.73
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module VeloPayments
16
+ class FundingManagerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Funding Request
23
+ # Instruct a funding request to transfer funds from the payor’s funding bank to the payor’s balance held within Velo (202 - accepted, 400 - invalid request body, 404 - source account not found).
24
+ # @param source_account_id [String] Source account id
25
+ # @param funding_request [FundingRequest] Body to included ammount to be funded
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def create_ach_funding_request(source_account_id, funding_request, opts = {})
29
+ create_ach_funding_request_with_http_info(source_account_id, funding_request, opts)
30
+ nil
31
+ end
32
+
33
+ # Create Funding Request
34
+ # Instruct a funding request to transfer funds from the payor’s funding bank to the payor’s balance held within Velo (202 - accepted, 400 - invalid request body, 404 - source account not found).
35
+ # @param source_account_id [String] Source account id
36
+ # @param funding_request [FundingRequest] Body to included ammount to be funded
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def create_ach_funding_request_with_http_info(source_account_id, funding_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.create_ach_funding_request ...'
42
+ end
43
+ # verify the required parameter 'source_account_id' is set
44
+ if @api_client.config.client_side_validation && source_account_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'source_account_id' when calling FundingManagerApi.create_ach_funding_request"
46
+ end
47
+ # verify the required parameter 'funding_request' is set
48
+ if @api_client.config.client_side_validation && funding_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'funding_request' when calling FundingManagerApi.create_ach_funding_request"
50
+ end
51
+ # resource path
52
+ local_var_path = '/v1/sourceAccounts/{sourceAccountId}/achFundingRequest'.sub('{' + 'sourceAccountId' + '}', source_account_id.to_s)
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = {}
66
+
67
+ # http body (model)
68
+ post_body = @api_client.object_to_http_body(funding_request)
69
+ auth_names = ['OAuth2']
70
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: FundingManagerApi#create_ach_funding_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Create Funding Request
83
+ # Instruct a funding request to transfer funds from the payor’s funding bank to the payor’s balance held within Velo (202 - accepted, 400 - invalid request body, 404 - source account not found).
84
+ # @param source_account_id [String] Source account id
85
+ # @param funding_request2 [FundingRequest2] Body to included ammount to be funded
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ def create_funding_request(source_account_id, funding_request2, opts = {})
89
+ create_funding_request_with_http_info(source_account_id, funding_request2, opts)
90
+ nil
91
+ end
92
+
93
+ # Create Funding Request
94
+ # Instruct a funding request to transfer funds from the payor’s funding bank to the payor’s balance held within Velo (202 - accepted, 400 - invalid request body, 404 - source account not found).
95
+ # @param source_account_id [String] Source account id
96
+ # @param funding_request2 [FundingRequest2] Body to included ammount to be funded
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
99
+ def create_funding_request_with_http_info(source_account_id, funding_request2, opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.create_funding_request ...'
102
+ end
103
+ # verify the required parameter 'source_account_id' is set
104
+ if @api_client.config.client_side_validation && source_account_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'source_account_id' when calling FundingManagerApi.create_funding_request"
106
+ end
107
+ # verify the required parameter 'funding_request2' is set
108
+ if @api_client.config.client_side_validation && funding_request2.nil?
109
+ fail ArgumentError, "Missing the required parameter 'funding_request2' when calling FundingManagerApi.create_funding_request"
110
+ end
111
+ # resource path
112
+ local_var_path = '/v2/sourceAccounts/{sourceAccountId}/fundingRequest'.sub('{' + 'sourceAccountId' + '}', source_account_id.to_s)
113
+
114
+ # query parameters
115
+ query_params = {}
116
+
117
+ # header parameters
118
+ header_params = {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+ # HTTP header 'Content-Type'
122
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
+
124
+ # form parameters
125
+ form_params = {}
126
+
127
+ # http body (model)
128
+ post_body = @api_client.object_to_http_body(funding_request2)
129
+ auth_names = ['OAuth2']
130
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names)
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: FundingManagerApi#create_funding_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+
142
+ # Get Fundings for Payor
143
+ # Get a list of Fundings for a payor.
144
+ # @param [Hash] opts the optional parameters
145
+ # @option opts [String] :payor_id The account owner Payor ID
146
+ # @option opts [Integer] :page Page number. Default is 1. (default to 1)
147
+ # @option opts [Integer] :page_size Page size. Default is 25. Max allowable is 100. (default to 25)
148
+ # @option opts [String] :sort List of sort fields. Example: &#x60;&#x60;&#x60;?sort&#x3D;destinationCurrency:asc,destinationAmount:asc&#x60;&#x60;&#x60; Default is no sort. The supported sort fields are: dateTime and amount.
149
+ # @return [GetFundingsResponse]
150
+ def get_fundings(opts = {})
151
+ data, _status_code, _headers = get_fundings_with_http_info(opts)
152
+ data
153
+ end
154
+
155
+ # Get Fundings for Payor
156
+ # Get a list of Fundings for a payor.
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [String] :payor_id The account owner Payor ID
159
+ # @option opts [Integer] :page Page number. Default is 1.
160
+ # @option opts [Integer] :page_size Page size. Default is 25. Max allowable is 100.
161
+ # @option opts [String] :sort List of sort fields. Example: &#x60;&#x60;&#x60;?sort&#x3D;destinationCurrency:asc,destinationAmount:asc&#x60;&#x60;&#x60; Default is no sort. The supported sort fields are: dateTime and amount.
162
+ # @return [Array<(GetFundingsResponse, Integer, Hash)>] GetFundingsResponse data, response status code and response headers
163
+ def get_fundings_with_http_info(opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.get_fundings ...'
166
+ end
167
+ # resource path
168
+ local_var_path = '/v1/paymentaudit/fundings'
169
+
170
+ # query parameters
171
+ query_params = {}
172
+ query_params[:'payorId'] = opts[:'payor_id'] if !opts[:'payor_id'].nil?
173
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
174
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
175
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
176
+
177
+ # header parameters
178
+ header_params = {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = {}
184
+
185
+ # http body (model)
186
+ post_body = nil
187
+ auth_names = ['OAuth2']
188
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names,
194
+ :return_type => 'GetFundingsResponse')
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: FundingManagerApi#get_fundings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Get details about given source account.
202
+ # Get details about given source account.
203
+ # @param source_account_id [String] Source account id
204
+ # @param [Hash] opts the optional parameters
205
+ # @return [SourceAccountResponse]
206
+ def get_source_account(source_account_id, opts = {})
207
+ data, _status_code, _headers = get_source_account_with_http_info(source_account_id, opts)
208
+ data
209
+ end
210
+
211
+ # Get details about given source account.
212
+ # Get details about given source account.
213
+ # @param source_account_id [String] Source account id
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Array<(SourceAccountResponse, Integer, Hash)>] SourceAccountResponse data, response status code and response headers
216
+ def get_source_account_with_http_info(source_account_id, opts = {})
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.get_source_account ...'
219
+ end
220
+ # verify the required parameter 'source_account_id' is set
221
+ if @api_client.config.client_side_validation && source_account_id.nil?
222
+ fail ArgumentError, "Missing the required parameter 'source_account_id' when calling FundingManagerApi.get_source_account"
223
+ end
224
+ # resource path
225
+ local_var_path = '/v1/sourceAccounts/{sourceAccountId}'.sub('{' + 'sourceAccountId' + '}', source_account_id.to_s)
226
+
227
+ # query parameters
228
+ query_params = {}
229
+
230
+ # header parameters
231
+ header_params = {}
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
234
+
235
+ # form parameters
236
+ form_params = {}
237
+
238
+ # http body (model)
239
+ post_body = nil
240
+ auth_names = ['OAuth2']
241
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
242
+ :header_params => header_params,
243
+ :query_params => query_params,
244
+ :form_params => form_params,
245
+ :body => post_body,
246
+ :auth_names => auth_names,
247
+ :return_type => 'SourceAccountResponse')
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: FundingManagerApi#get_source_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+
254
+ # Get list of source accounts
255
+ # List source accounts.
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [String] :physical_account_name Physical Account Name
258
+ # @option opts [String] :payor_id The account owner Payor ID
259
+ # @option opts [Integer] :page Page number. Default is 1. (default to 1)
260
+ # @option opts [Integer] :page_size Page size. Default is 25. Max allowable is 100. (default to 25)
261
+ # @option opts [String] :sort Sort String
262
+ # @return [ListSourceAccountResponse]
263
+ def get_source_accounts(opts = {})
264
+ data, _status_code, _headers = get_source_accounts_with_http_info(opts)
265
+ data
266
+ end
267
+
268
+ # Get list of source accounts
269
+ # List source accounts.
270
+ # @param [Hash] opts the optional parameters
271
+ # @option opts [String] :physical_account_name Physical Account Name
272
+ # @option opts [String] :payor_id The account owner Payor ID
273
+ # @option opts [Integer] :page Page number. Default is 1.
274
+ # @option opts [Integer] :page_size Page size. Default is 25. Max allowable is 100.
275
+ # @option opts [String] :sort Sort String
276
+ # @return [Array<(ListSourceAccountResponse, Integer, Hash)>] ListSourceAccountResponse data, response status code and response headers
277
+ def get_source_accounts_with_http_info(opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.get_source_accounts ...'
280
+ end
281
+ # resource path
282
+ local_var_path = '/v1/sourceAccounts'
283
+
284
+ # query parameters
285
+ query_params = {}
286
+ query_params[:'physicalAccountName'] = opts[:'physical_account_name'] if !opts[:'physical_account_name'].nil?
287
+ query_params[:'payorId'] = opts[:'payor_id'] if !opts[:'payor_id'].nil?
288
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
289
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
290
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
291
+
292
+ # header parameters
293
+ header_params = {}
294
+ # HTTP header 'Accept' (if needed)
295
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
296
+
297
+ # form parameters
298
+ form_params = {}
299
+
300
+ # http body (model)
301
+ post_body = nil
302
+ auth_names = ['OAuth2']
303
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => 'ListSourceAccountResponse')
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug "API called: FundingManagerApi#get_source_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
312
+ end
313
+ return data, status_code, headers
314
+ end
315
+
316
+ # Set Funding Bank Details
317
+ # This API allows you to set or update the funding details for the given Payor ID.
318
+ # @param payor_id [String] The account owner Payor ID
319
+ # @param payor_funding_bank_details_update [PayorFundingBankDetailsUpdate] Update Funding bank details of given Payor Id
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [nil]
322
+ def set_payor_funding_bank_details(payor_id, payor_funding_bank_details_update, opts = {})
323
+ set_payor_funding_bank_details_with_http_info(payor_id, payor_funding_bank_details_update, opts)
324
+ nil
325
+ end
326
+
327
+ # Set Funding Bank Details
328
+ # This API allows you to set or update the funding details for the given Payor ID.
329
+ # @param payor_id [String] The account owner Payor ID
330
+ # @param payor_funding_bank_details_update [PayorFundingBankDetailsUpdate] Update Funding bank details of given Payor Id
331
+ # @param [Hash] opts the optional parameters
332
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
333
+ def set_payor_funding_bank_details_with_http_info(payor_id, payor_funding_bank_details_update, opts = {})
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug 'Calling API: FundingManagerApi.set_payor_funding_bank_details ...'
336
+ end
337
+ # verify the required parameter 'payor_id' is set
338
+ if @api_client.config.client_side_validation && payor_id.nil?
339
+ fail ArgumentError, "Missing the required parameter 'payor_id' when calling FundingManagerApi.set_payor_funding_bank_details"
340
+ end
341
+ # verify the required parameter 'payor_funding_bank_details_update' is set
342
+ if @api_client.config.client_side_validation && payor_funding_bank_details_update.nil?
343
+ fail ArgumentError, "Missing the required parameter 'payor_funding_bank_details_update' when calling FundingManagerApi.set_payor_funding_bank_details"
344
+ end
345
+ # resource path
346
+ local_var_path = '/v1/payors/{payorId}/payorFundingBankDetailsUpdate'.sub('{' + 'payorId' + '}', payor_id.to_s)
347
+
348
+ # query parameters
349
+ query_params = {}
350
+
351
+ # header parameters
352
+ header_params = {}
353
+ # HTTP header 'Content-Type'
354
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
355
+
356
+ # form parameters
357
+ form_params = {}
358
+
359
+ # http body (model)
360
+ post_body = @api_client.object_to_http_body(payor_funding_bank_details_update)
361
+ auth_names = ['OAuth2']
362
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
363
+ :header_params => header_params,
364
+ :query_params => query_params,
365
+ :form_params => form_params,
366
+ :body => post_body,
367
+ :auth_names => auth_names)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: FundingManagerApi#set_payor_funding_bank_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+ end
374
+ end