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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/LICENSE +201 -0
- data/Makefile +39 -0
- data/README.md +279 -0
- data/Rakefile +10 -0
- data/docs/Address.md +31 -0
- data/docs/Challenge.md +19 -0
- data/docs/Company.md +19 -0
- data/docs/CountriesApi.md +106 -0
- data/docs/CreatePayee.md +59 -0
- data/docs/CreatePayeesCSVRequest.md +71 -0
- data/docs/CreatePayeesCSVResponse.md +19 -0
- data/docs/CreatePayeesRequest.md +19 -0
- data/docs/CreatePaymentChannel.md +29 -0
- data/docs/CreatePayoutRequest.md +21 -0
- data/docs/CurrenciesApi.md +57 -0
- data/docs/FailedSubmission.md +19 -0
- data/docs/FundingAudit.md +31 -0
- data/docs/FundingEvent.md +21 -0
- data/docs/FundingEventType.md +16 -0
- data/docs/FundingManagerApi.md +347 -0
- data/docs/FundingRequest.md +17 -0
- data/docs/FundingRequest2.md +17 -0
- data/docs/FxSummary.md +35 -0
- data/docs/GetFundingsResponse.md +21 -0
- data/docs/GetPaymentsForPayoutResponse.md +23 -0
- data/docs/GetPaymentsForPayoutResponseLinks.md +19 -0
- data/docs/GetPaymentsForPayoutResponsePage.md +25 -0
- data/docs/GetPaymentsForPayoutResponseSummary.md +25 -0
- data/docs/GetPayoutApi.md +61 -0
- data/docs/GetPayoutStatistics.md +19 -0
- data/docs/GetPayoutsResponse.md +23 -0
- data/docs/Individual.md +21 -0
- data/docs/IndividualName.md +23 -0
- data/docs/InstructPayoutApi.md +60 -0
- data/docs/InvitationStatusResponse.md +17 -0
- data/docs/InvitePayeeRequest.md +17 -0
- data/docs/Language.md +16 -0
- data/docs/ListPaymentsResponse.md +23 -0
- data/docs/ListSourceAccountResponse.md +21 -0
- data/docs/MarketingOptIn.md +19 -0
- data/docs/OfacStatus.md +16 -0
- data/docs/OnboardedStatus.md +16 -0
- data/docs/PagedResponse.md +19 -0
- data/docs/PagedResponsePage.md +25 -0
- data/docs/Payee.md +57 -0
- data/docs/PayeeInvitationApi.md +222 -0
- data/docs/PayeeInvitationStatus.md +21 -0
- data/docs/PayeeResponse.md +23 -0
- data/docs/PayeeType.md +16 -0
- data/docs/PayeesApi.md +192 -0
- data/docs/PaymentAuditCurrency.md +16 -0
- data/docs/PaymentAuditServiceApi.md +424 -0
- data/docs/PaymentChannel.md +29 -0
- data/docs/PaymentChannelCountry.md +19 -0
- data/docs/PaymentChannelRule.md +29 -0
- data/docs/PaymentChannelRulesResponse.md +17 -0
- data/docs/PaymentEventResponse.md +39 -0
- data/docs/PaymentInstruction.md +27 -0
- data/docs/PaymentResponse.md +81 -0
- data/docs/Payor.md +55 -0
- data/docs/PayorApplicationsApi.md +119 -0
- data/docs/PayorBrandingResponse.md +25 -0
- data/docs/PayorCreateApiKeyRequest.md +21 -0
- data/docs/PayorCreateApiKeyResponse.md +19 -0
- data/docs/PayorCreateApplicationRequest.md +19 -0
- data/docs/PayorEmailOptOutRequest.md +17 -0
- data/docs/PayorFundingBankDetailsUpdate.md +21 -0
- data/docs/PayorLogoRequest.md +17 -0
- data/docs/PayorRef.md +21 -0
- data/docs/PayorsApi.md +224 -0
- data/docs/PayoutHistoryApi.md +142 -0
- data/docs/PayoutStatus.md +16 -0
- data/docs/PayoutSummaryAudit.md +39 -0
- data/docs/PayoutSummaryResponse.md +31 -0
- data/docs/QueryBatchResponse.md +23 -0
- data/docs/QuoteFxSummary.md +37 -0
- data/docs/QuotePayoutApi.md +61 -0
- data/docs/QuoteResponse.md +17 -0
- data/docs/RejectedPayment.md +31 -0
- data/docs/Social.md +21 -0
- data/docs/SourceAccount.md +23 -0
- data/docs/SourceAccountResponse.md +39 -0
- data/docs/SourceAccountSummary.md +21 -0
- data/docs/SubmitPayoutApi.md +60 -0
- data/docs/SupportedCountriesResponse.md +17 -0
- data/docs/SupportedCountry.md +19 -0
- data/docs/SupportedCurrency.md +19 -0
- data/docs/SupportedCurrencyResponse.md +17 -0
- data/docs/WithdrawPayoutApi.md +60 -0
- data/lib/velopayments.rb +124 -0
- data/lib/velopayments/api/countries_api.rb +116 -0
- data/lib/velopayments/api/currencies_api.rb +69 -0
- data/lib/velopayments/api/funding_manager_api.rb +374 -0
- data/lib/velopayments/api/get_payout_api.rb +75 -0
- data/lib/velopayments/api/instruct_payout_api.rb +72 -0
- data/lib/velopayments/api/payee_invitation_api.rb +244 -0
- data/lib/velopayments/api/payees_api.rb +217 -0
- data/lib/velopayments/api/payment_audit_service_api.rb +473 -0
- data/lib/velopayments/api/payor_applications_api.rb +147 -0
- data/lib/velopayments/api/payors_api.rb +241 -0
- data/lib/velopayments/api/payout_history_api.rb +165 -0
- data/lib/velopayments/api/quote_payout_api.rb +75 -0
- data/lib/velopayments/api/submit_payout_api.rb +74 -0
- data/lib/velopayments/api/withdraw_payout_api.rb +72 -0
- data/lib/velopayments/api_client.rb +387 -0
- data/lib/velopayments/api_error.rb +57 -0
- data/lib/velopayments/configuration.rb +251 -0
- data/lib/velopayments/models/address.rb +478 -0
- data/lib/velopayments/models/challenge.rb +271 -0
- data/lib/velopayments/models/company.rb +256 -0
- data/lib/velopayments/models/create_payee.rb +466 -0
- data/lib/velopayments/models/create_payees_csv_request.rb +1052 -0
- data/lib/velopayments/models/create_payees_csv_response.rb +207 -0
- data/lib/velopayments/models/create_payees_request.rb +217 -0
- data/lib/velopayments/models/create_payment_channel.rb +414 -0
- data/lib/velopayments/models/create_payout_request.rb +226 -0
- data/lib/velopayments/models/failed_submission.rb +205 -0
- data/lib/velopayments/models/funding_audit.rb +295 -0
- data/lib/velopayments/models/funding_event.rb +214 -0
- data/lib/velopayments/models/funding_event_type.rb +41 -0
- data/lib/velopayments/models/funding_request.rb +230 -0
- data/lib/velopayments/models/funding_request2.rb +230 -0
- data/lib/velopayments/models/fx_summary.rb +363 -0
- data/lib/velopayments/models/get_fundings_response.rb +223 -0
- data/lib/velopayments/models/get_payments_for_payout_response.rb +228 -0
- data/lib/velopayments/models/get_payments_for_payout_response_links.rb +205 -0
- data/lib/velopayments/models/get_payments_for_payout_response_page.rb +232 -0
- data/lib/velopayments/models/get_payments_for_payout_response_summary.rb +232 -0
- data/lib/velopayments/models/get_payout_statistics.rb +215 -0
- data/lib/velopayments/models/get_payouts_response.rb +228 -0
- data/lib/velopayments/models/individual.rb +224 -0
- data/lib/velopayments/models/individual_name.rb +337 -0
- data/lib/velopayments/models/invitation_status_response.rb +203 -0
- data/lib/velopayments/models/invite_payee_request.rb +201 -0
- data/lib/velopayments/models/language.rb +45 -0
- data/lib/velopayments/models/list_payments_response.rb +228 -0
- data/lib/velopayments/models/list_source_account_response.rb +219 -0
- data/lib/velopayments/models/marketing_opt_in.rb +205 -0
- data/lib/velopayments/models/ofac_status.rb +37 -0
- data/lib/velopayments/models/onboarded_status.rb +38 -0
- data/lib/velopayments/models/paged_response.rb +207 -0
- data/lib/velopayments/models/paged_response_page.rb +232 -0
- data/lib/velopayments/models/payee.rb +381 -0
- data/lib/velopayments/models/payee_invitation_status.rb +258 -0
- data/lib/velopayments/models/payee_response.rb +228 -0
- data/lib/velopayments/models/payee_type.rb +36 -0
- data/lib/velopayments/models/payment_audit_currency.rb +37 -0
- data/lib/velopayments/models/payment_channel.rb +430 -0
- data/lib/velopayments/models/payment_channel_country.rb +207 -0
- data/lib/velopayments/models/payment_channel_rule.rb +250 -0
- data/lib/velopayments/models/payment_channel_rules_response.rb +198 -0
- data/lib/velopayments/models/payment_event_response.rb +351 -0
- data/lib/velopayments/models/payment_instruction.rb +430 -0
- data/lib/velopayments/models/payment_response.rb +587 -0
- data/lib/velopayments/models/payor.rb +435 -0
- data/lib/velopayments/models/payor_branding_response.rb +247 -0
- data/lib/velopayments/models/payor_create_api_key_request.rb +303 -0
- data/lib/velopayments/models/payor_create_api_key_response.rb +207 -0
- data/lib/velopayments/models/payor_create_application_request.rb +264 -0
- data/lib/velopayments/models/payor_email_opt_out_request.rb +196 -0
- data/lib/velopayments/models/payor_funding_bank_details_update.rb +316 -0
- data/lib/velopayments/models/payor_logo_request.rb +196 -0
- data/lib/velopayments/models/payor_ref.rb +214 -0
- data/lib/velopayments/models/payout_status.rb +43 -0
- data/lib/velopayments/models/payout_summary_audit.rb +314 -0
- data/lib/velopayments/models/payout_summary_response.rb +280 -0
- data/lib/velopayments/models/query_batch_response.rb +260 -0
- data/lib/velopayments/models/quote_fx_summary.rb +377 -0
- data/lib/velopayments/models/quote_response.rb +198 -0
- data/lib/velopayments/models/rejected_payment.rb +323 -0
- data/lib/velopayments/models/social.rb +214 -0
- data/lib/velopayments/models/source_account.rb +243 -0
- data/lib/velopayments/models/source_account_response.rb +341 -0
- data/lib/velopayments/models/source_account_summary.rb +224 -0
- data/lib/velopayments/models/supported_countries_response.rb +198 -0
- data/lib/velopayments/models/supported_country.rb +207 -0
- data/lib/velopayments/models/supported_currency.rb +206 -0
- data/lib/velopayments/models/supported_currency_response.rb +198 -0
- data/lib/velopayments/version.rb +15 -0
- data/oa3-config.json +8 -0
- data/spec/api/countries_api_spec.rb +57 -0
- data/spec/api/currencies_api_spec.rb +46 -0
- data/spec/api/funding_manager_api_spec.rb +117 -0
- data/spec/api/get_payout_api_spec.rb +47 -0
- data/spec/api/instruct_payout_api_spec.rb +47 -0
- data/spec/api/payee_invitation_api_spec.rb +84 -0
- data/spec/api/payees_api_spec.rb +82 -0
- data/spec/api/payment_audit_service_api_spec.rb +150 -0
- data/spec/api/payor_applications_api_spec.rb +62 -0
- data/spec/api/payors_api_spec.rb +85 -0
- data/spec/api/payout_history_api_spec.rb +71 -0
- data/spec/api/quote_payout_api_spec.rb +47 -0
- data/spec/api/submit_payout_api_spec.rb +47 -0
- data/spec/api/withdraw_payout_api_spec.rb +47 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/address_spec.rb +83 -0
- data/spec/models/challenge_spec.rb +47 -0
- data/spec/models/company_spec.rb +47 -0
- data/spec/models/create_payee_spec.rb +167 -0
- data/spec/models/create_payees_csv_request_spec.rb +211 -0
- data/spec/models/create_payees_csv_response_spec.rb +47 -0
- data/spec/models/create_payees_request_spec.rb +47 -0
- data/spec/models/create_payment_channel_spec.rb +81 -0
- data/spec/models/create_payout_request_spec.rb +53 -0
- data/spec/models/failed_submission_spec.rb +47 -0
- data/spec/models/funding_audit_spec.rb +87 -0
- data/spec/models/funding_event_spec.rb +53 -0
- data/spec/models/funding_event_type_spec.rb +35 -0
- data/spec/models/funding_request2_spec.rb +41 -0
- data/spec/models/funding_request_spec.rb +41 -0
- data/spec/models/fx_summary_spec.rb +103 -0
- data/spec/models/get_fundings_response_spec.rb +53 -0
- data/spec/models/get_payments_for_payout_response_links_spec.rb +47 -0
- data/spec/models/get_payments_for_payout_response_page_spec.rb +65 -0
- data/spec/models/get_payments_for_payout_response_spec.rb +59 -0
- data/spec/models/get_payments_for_payout_response_summary_spec.rb +65 -0
- data/spec/models/get_payout_statistics_spec.rb +47 -0
- data/spec/models/get_payouts_response_spec.rb +59 -0
- data/spec/models/individual_name_spec.rb +59 -0
- data/spec/models/individual_spec.rb +53 -0
- data/spec/models/invitation_status_response_spec.rb +41 -0
- data/spec/models/invite_payee_request_spec.rb +41 -0
- data/spec/models/language_spec.rb +35 -0
- data/spec/models/list_payments_response_spec.rb +59 -0
- data/spec/models/list_source_account_response_spec.rb +53 -0
- data/spec/models/marketing_opt_in_spec.rb +47 -0
- data/spec/models/ofac_status_spec.rb +35 -0
- data/spec/models/onboarded_status_spec.rb +35 -0
- data/spec/models/paged_response_page_spec.rb +65 -0
- data/spec/models/paged_response_spec.rb +47 -0
- data/spec/models/payee_invitation_status_spec.rb +57 -0
- data/spec/models/payee_response_spec.rb +59 -0
- data/spec/models/payee_spec.rb +161 -0
- data/spec/models/payee_type_spec.rb +35 -0
- data/spec/models/payment_audit_currency_spec.rb +35 -0
- data/spec/models/payment_channel_country_spec.rb +47 -0
- data/spec/models/payment_channel_rule_spec.rb +77 -0
- data/spec/models/payment_channel_rules_response_spec.rb +41 -0
- data/spec/models/payment_channel_spec.rb +81 -0
- data/spec/models/payment_event_response_spec.rb +111 -0
- data/spec/models/payment_instruction_spec.rb +75 -0
- data/spec/models/payment_response_spec.rb +241 -0
- data/spec/models/payor_branding_response_spec.rb +65 -0
- data/spec/models/payor_create_api_key_request_spec.rb +57 -0
- data/spec/models/payor_create_api_key_response_spec.rb +47 -0
- data/spec/models/payor_create_application_request_spec.rb +47 -0
- data/spec/models/payor_email_opt_out_request_spec.rb +41 -0
- data/spec/models/payor_funding_bank_details_update_spec.rb +53 -0
- data/spec/models/payor_logo_request_spec.rb +41 -0
- data/spec/models/payor_ref_spec.rb +53 -0
- data/spec/models/payor_spec.rb +163 -0
- data/spec/models/payout_status_spec.rb +35 -0
- data/spec/models/payout_summary_audit_spec.rb +107 -0
- data/spec/models/payout_summary_response_spec.rb +83 -0
- data/spec/models/query_batch_response_spec.rb +63 -0
- data/spec/models/quote_fx_summary_spec.rb +101 -0
- data/spec/models/quote_response_spec.rb +41 -0
- data/spec/models/rejected_payment_spec.rb +87 -0
- data/spec/models/social_spec.rb +53 -0
- data/spec/models/source_account_response_spec.rb +111 -0
- data/spec/models/source_account_spec.rb +59 -0
- data/spec/models/source_account_summary_spec.rb +53 -0
- data/spec/models/supported_countries_response_spec.rb +41 -0
- data/spec/models/supported_country_spec.rb +47 -0
- data/spec/models/supported_currency_response_spec.rb +41 -0
- data/spec/models/supported_currency_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- data/velopayments.gemspec +45 -0
- metadata +586 -0
@@ -0,0 +1,59 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SourceAccount
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SourceAccount' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SourceAccount.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SourceAccount' do
|
31
|
+
it 'should create an instance of SourceAccount' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SourceAccount)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "source_account_name"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "source_account_id"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "currency"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "total_payout_cost"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SourceAccountSummary
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SourceAccountSummary' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SourceAccountSummary.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SourceAccountSummary' do
|
31
|
+
it 'should create an instance of SourceAccountSummary' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SourceAccountSummary)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "source_account_id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "total_cost"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "currency"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,41 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SupportedCountriesResponse
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SupportedCountriesResponse' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SupportedCountriesResponse.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SupportedCountriesResponse' do
|
31
|
+
it 'should create an instance of SupportedCountriesResponse' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SupportedCountriesResponse)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "countries"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SupportedCountry
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SupportedCountry' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SupportedCountry.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SupportedCountry' do
|
31
|
+
it 'should create an instance of SupportedCountry' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SupportedCountry)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "iso_country_code"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "currencies"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,41 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SupportedCurrencyResponse
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SupportedCurrencyResponse' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SupportedCurrencyResponse.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SupportedCurrencyResponse' do
|
31
|
+
it 'should create an instance of SupportedCurrencyResponse' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SupportedCurrencyResponse)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "currencies"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for VeloPayments::SupportedCurrency
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SupportedCurrency' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = VeloPayments::SupportedCurrency.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SupportedCurrency' do
|
31
|
+
it 'should create an instance of SupportedCurrency' do
|
32
|
+
expect(@instance).to be_instance_of(VeloPayments::SupportedCurrency)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "currency"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "max_payment_amount"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,111 @@
|
|
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
|
+
# load the gem
|
14
|
+
require 'velopayments'
|
15
|
+
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
17
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
18
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
19
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
20
|
+
# files.
|
21
|
+
#
|
22
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
23
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
24
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
25
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
26
|
+
# a separate helper file that requires the additional dependencies and performs
|
27
|
+
# the additional setup, and require it from the spec files that actually need
|
28
|
+
# it.
|
29
|
+
#
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
31
|
+
# users commonly want.
|
32
|
+
#
|
33
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
34
|
+
RSpec.configure do |config|
|
35
|
+
# rspec-expectations config goes here. You can use an alternate
|
36
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
37
|
+
# assertions if you prefer.
|
38
|
+
config.expect_with :rspec do |expectations|
|
39
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
40
|
+
# and `failure_message` of custom matchers include text for helper methods
|
41
|
+
# defined using `chain`, e.g.:
|
42
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
43
|
+
# # => "be bigger than 2 and smaller than 4"
|
44
|
+
# ...rather than:
|
45
|
+
# # => "be bigger than 2"
|
46
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
47
|
+
end
|
48
|
+
|
49
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
50
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
51
|
+
config.mock_with :rspec do |mocks|
|
52
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
53
|
+
# a real object. This is generally recommended, and will default to
|
54
|
+
# `true` in RSpec 4.
|
55
|
+
mocks.verify_partial_doubles = true
|
56
|
+
end
|
57
|
+
|
58
|
+
# The settings below are suggested to provide a good initial experience
|
59
|
+
# with RSpec, but feel free to customize to your heart's content.
|
60
|
+
=begin
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
64
|
+
# get run.
|
65
|
+
config.filter_run :focus
|
66
|
+
config.run_all_when_everything_filtered = true
|
67
|
+
|
68
|
+
# Allows RSpec to persist some state between runs in order to support
|
69
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
70
|
+
# you configure your source control system to ignore this file.
|
71
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
72
|
+
|
73
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
74
|
+
# recommended. For more details, see:
|
75
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
76
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
77
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
78
|
+
config.disable_monkey_patching!
|
79
|
+
|
80
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
81
|
+
# be too noisy due to issues in dependencies.
|
82
|
+
config.warnings = true
|
83
|
+
|
84
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
85
|
+
# file, and it's useful to allow more verbose output when running an
|
86
|
+
# individual spec file.
|
87
|
+
if config.files_to_run.one?
|
88
|
+
# Use the documentation formatter for detailed output,
|
89
|
+
# unless a formatter has already been configured
|
90
|
+
# (e.g. via a command-line flag).
|
91
|
+
config.default_formatter = 'doc'
|
92
|
+
end
|
93
|
+
|
94
|
+
# Print the 10 slowest examples and example groups at the
|
95
|
+
# end of the spec run, to help surface which specs are running
|
96
|
+
# particularly slow.
|
97
|
+
config.profile_examples = 10
|
98
|
+
|
99
|
+
# Run specs in random order to surface order dependencies. If you find an
|
100
|
+
# order dependency and want to debug it, you can fix the order by providing
|
101
|
+
# the seed, which is printed after each run.
|
102
|
+
# --seed 1234
|
103
|
+
config.order = :random
|
104
|
+
|
105
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
106
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
107
|
+
# test failures related to randomization by passing the same `--seed` value
|
108
|
+
# as the one that triggered the failure.
|
109
|
+
Kernel.srand config.seed
|
110
|
+
=end
|
111
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Velo Payments APIs
|
5
|
+
|
6
|
+
### 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.
|
7
|
+
|
8
|
+
OpenAPI spec version: 2.11.73
|
9
|
+
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 4.0.0-SNAPSHOT
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "velopayments/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "velopayments"
|
20
|
+
s.version = VeloPayments::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Velo Payments API"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://github.com/velopaymentsapi/velo-ruby"
|
25
|
+
s.summary = "Velo Payments APIs Ruby Gem"
|
26
|
+
s.description = "This library provides a Ruby client that simplifies interactions with the Velo Payments API. For full details covering the API visit our docs at Velo Payments APIs https://apidocs.velopayments.com. Note: some of the Velo API calls which require authorization via an access token, see the full docs on how to configure."
|
27
|
+
s.license = "Unlicense"
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|