velopayments 2.35.58 → 2.37.150.beta1

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 (336) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +50 -11
  4. data/docs/{PayorAddress.md → AddressV4.md} +3 -3
  5. data/docs/CommonLinkObject.md +20 -0
  6. data/docs/CommonPageObject.md +26 -0
  7. data/docs/CreateFundingAccountRequestV2.md +2 -2
  8. data/docs/CreatePaymentChannelRequestV4.md +30 -0
  9. data/docs/CreateTransactionRequest.md +24 -0
  10. data/docs/CreateTransactionResponse.md +20 -0
  11. data/docs/FundingAccountResponseV2.md +3 -3
  12. data/docs/FundingApi.md +2 -2
  13. data/docs/FundingAudit.md +8 -2
  14. data/docs/FundingEvent.md +6 -8
  15. data/docs/FundingEvent2.md +24 -0
  16. data/docs/FundingManagerPrivateApi.md +1 -1
  17. data/docs/FundingResponse.md +7 -3
  18. data/docs/GetPayeeListResponseV4.md +2 -0
  19. data/docs/InstructPayoutRequestV3.md +4 -2
  20. data/docs/ListFundingAccountsResponseV2.md +1 -1
  21. data/docs/NotificationSource.md +3 -0
  22. data/docs/PageResourceTransactions.md +22 -0
  23. data/docs/PayeeDetailResponseV4.md +4 -0
  24. data/docs/PayeePaymentChannelsApi.md +522 -0
  25. data/docs/PayeesApi.md +2 -2
  26. data/docs/PaymentAuditServiceApi.md +7 -1
  27. data/docs/PaymentChannelOrderRequestV4.md +18 -0
  28. data/docs/PaymentChannelResponseV4.md +56 -0
  29. data/docs/PaymentChannelSummaryV4.md +32 -0
  30. data/docs/PaymentChannelsResponseV4.md +20 -0
  31. data/docs/PaymentInstructionV3.md +4 -2
  32. data/docs/PaymentResponseV4.md +10 -0
  33. data/docs/PaymentV3.md +4 -2
  34. data/docs/PayorCreateApiKeyRequest.md +3 -3
  35. data/docs/PayorFundingDetected.md +46 -0
  36. data/docs/PayorFundingDetectedAllOf.md +40 -0
  37. data/docs/PayorToPaymentChannelMappingV4.md +20 -0
  38. data/docs/PayorV2.md +19 -19
  39. data/docs/PayorsApi.md +14 -84
  40. data/docs/PayoutsApi.md +2 -2
  41. data/docs/SourceAccountResponseV3.md +3 -1
  42. data/docs/TransactionResponse.md +36 -0
  43. data/docs/TransactionsApi.md +229 -0
  44. data/docs/UpdatePayeeDetailsRequestV3.md +3 -1
  45. data/docs/UpdatePaymentChannelRequestV4.md +30 -0
  46. data/docs/WebhooksResponse.md +2 -2
  47. data/lib/velopayments/api/countries_api.rb +2 -2
  48. data/lib/velopayments/api/currencies_api.rb +2 -2
  49. data/lib/velopayments/api/funding_api.rb +5 -5
  50. data/lib/velopayments/api/funding_manager_private_api.rb +2 -2
  51. data/lib/velopayments/api/login_api.rb +2 -2
  52. data/lib/velopayments/api/payee_invitation_api.rb +2 -2
  53. data/lib/velopayments/api/payee_payment_channels_api.rb +538 -0
  54. data/lib/velopayments/api/payees_api.rb +6 -2
  55. data/lib/velopayments/api/payment_audit_service_api.rb +12 -3
  56. data/lib/velopayments/api/payment_audit_service_deprecated_api.rb +2 -2
  57. data/lib/velopayments/api/payor_hierarchy_api.rb +2 -2
  58. data/lib/velopayments/api/payors_api.rb +16 -79
  59. data/lib/velopayments/api/payors_private_api.rb +2 -2
  60. data/lib/velopayments/api/payouts_api.rb +2 -6
  61. data/lib/velopayments/api/source_accounts_api.rb +2 -2
  62. data/lib/velopayments/api/tokens_api.rb +2 -2
  63. data/lib/velopayments/api/transactions_api.rb +229 -0
  64. data/lib/velopayments/api/users_api.rb +2 -2
  65. data/lib/velopayments/api/webhooks_api.rb +2 -2
  66. data/lib/velopayments/api_client.rb +2 -2
  67. data/lib/velopayments/api_error.rb +2 -2
  68. data/lib/velopayments/configuration.rb +2 -2
  69. data/lib/velopayments/models/accepted_payment_v3.rb +2 -2
  70. data/lib/velopayments/models/access_token_response.rb +2 -2
  71. data/lib/velopayments/models/access_token_validation_request.rb +2 -2
  72. data/lib/velopayments/models/{payor_address.rb → address_v4.rb} +92 -80
  73. data/lib/velopayments/models/auth_response.rb +2 -2
  74. data/lib/velopayments/models/auto_top_up_config_v2.rb +2 -2
  75. data/lib/velopayments/models/auto_top_up_config_v3.rb +2 -2
  76. data/lib/velopayments/models/category.rb +4 -3
  77. data/lib/velopayments/models/challenge_v3.rb +2 -2
  78. data/lib/velopayments/models/challenge_v4.rb +2 -2
  79. data/lib/velopayments/models/{list_funding_accounts_response_v2_links.rb → common_link_object.rb} +7 -5
  80. data/lib/velopayments/models/common_page_object.rb +250 -0
  81. data/lib/velopayments/models/company_v3.rb +2 -2
  82. data/lib/velopayments/models/company_v4.rb +2 -2
  83. data/lib/velopayments/models/create_funding_account_request_v2.rb +34 -27
  84. data/lib/velopayments/models/create_individual_v3.rb +2 -2
  85. data/lib/velopayments/models/create_individual_v3_name.rb +2 -2
  86. data/lib/velopayments/models/create_individual_v4.rb +2 -2
  87. data/lib/velopayments/models/create_payee_address_v3.rb +2 -2
  88. data/lib/velopayments/models/create_payee_address_v4.rb +2 -2
  89. data/lib/velopayments/models/create_payee_v3.rb +2 -2
  90. data/lib/velopayments/models/create_payee_v4.rb +2 -2
  91. data/lib/velopayments/models/create_payees_csv_request_v3.rb +2 -2
  92. data/lib/velopayments/models/create_payees_csv_request_v4.rb +2 -2
  93. data/lib/velopayments/models/create_payees_csv_response_v3.rb +2 -2
  94. data/lib/velopayments/models/create_payees_csv_response_v3_rejected_csv_rows.rb +2 -2
  95. data/lib/velopayments/models/create_payees_csv_response_v4.rb +2 -2
  96. data/lib/velopayments/models/create_payees_request_v3.rb +2 -2
  97. data/lib/velopayments/models/create_payees_request_v4.rb +2 -2
  98. data/lib/velopayments/models/create_payment_channel_request_v4.rb +472 -0
  99. data/lib/velopayments/models/create_payment_channel_v3.rb +2 -2
  100. data/lib/velopayments/models/create_payment_channel_v4.rb +2 -2
  101. data/lib/velopayments/models/create_payor_link_request.rb +2 -2
  102. data/lib/velopayments/models/create_payout_request_v3.rb +2 -2
  103. data/lib/velopayments/models/create_transaction_request.rb +324 -0
  104. data/lib/velopayments/models/create_transaction_response.rb +239 -0
  105. data/lib/velopayments/models/create_webhook_request.rb +2 -2
  106. data/lib/velopayments/models/debit_event.rb +2 -2
  107. data/lib/velopayments/models/debit_event_all_of.rb +2 -2
  108. data/lib/velopayments/models/debit_status_changed.rb +2 -2
  109. data/lib/velopayments/models/debit_status_changed_all_of.rb +2 -2
  110. data/lib/velopayments/models/error.rb +2 -2
  111. data/lib/velopayments/models/error_data.rb +2 -2
  112. data/lib/velopayments/models/error_response.rb +2 -2
  113. data/lib/velopayments/models/failed_payee_v3.rb +2 -2
  114. data/lib/velopayments/models/failed_payee_v4.rb +2 -2
  115. data/lib/velopayments/models/failed_submission_v3.rb +2 -2
  116. data/lib/velopayments/models/failed_submission_v4.rb +2 -2
  117. data/lib/velopayments/models/funding_account_response_v2.rb +25 -25
  118. data/lib/velopayments/models/funding_audit.rb +37 -7
  119. data/lib/velopayments/models/funding_event.rb +50 -28
  120. data/lib/velopayments/models/funding_event2.rb +242 -0
  121. data/lib/velopayments/models/funding_payor_status_audit_response.rb +2 -2
  122. data/lib/velopayments/models/funding_request_v2.rb +2 -2
  123. data/lib/velopayments/models/funding_request_v3.rb +2 -2
  124. data/lib/velopayments/models/funding_response.rb +35 -14
  125. data/lib/velopayments/models/fx_summary.rb +2 -2
  126. data/lib/velopayments/models/fx_summary_v3.rb +2 -2
  127. data/lib/velopayments/models/get_fundings_response.rb +2 -2
  128. data/lib/velopayments/models/get_fundings_response_links.rb +2 -2
  129. data/lib/velopayments/models/get_payee_list_response_company_v3.rb +2 -2
  130. data/lib/velopayments/models/get_payee_list_response_company_v4.rb +2 -2
  131. data/lib/velopayments/models/get_payee_list_response_individual_v3.rb +2 -2
  132. data/lib/velopayments/models/get_payee_list_response_individual_v4.rb +2 -2
  133. data/lib/velopayments/models/get_payee_list_response_v3.rb +2 -2
  134. data/lib/velopayments/models/get_payee_list_response_v4.rb +13 -3
  135. data/lib/velopayments/models/get_payments_for_payout_response_v3.rb +2 -2
  136. data/lib/velopayments/models/get_payments_for_payout_response_v3_page.rb +2 -2
  137. data/lib/velopayments/models/get_payments_for_payout_response_v3_summary.rb +2 -2
  138. data/lib/velopayments/models/get_payments_for_payout_response_v4.rb +2 -2
  139. data/lib/velopayments/models/get_payments_for_payout_response_v4_summary.rb +2 -2
  140. data/lib/velopayments/models/get_payout_statistics.rb +2 -2
  141. data/lib/velopayments/models/get_payouts_response.rb +2 -2
  142. data/lib/velopayments/models/get_payouts_response_v3.rb +2 -2
  143. data/lib/velopayments/models/get_payouts_response_v3_links.rb +2 -2
  144. data/lib/velopayments/models/get_payouts_response_v3_page.rb +2 -2
  145. data/lib/velopayments/models/individual_v3.rb +2 -2
  146. data/lib/velopayments/models/individual_v3_name.rb +2 -2
  147. data/lib/velopayments/models/individual_v4.rb +2 -2
  148. data/lib/velopayments/models/inline_response400.rb +2 -2
  149. data/lib/velopayments/models/inline_response401.rb +2 -2
  150. data/lib/velopayments/models/inline_response403.rb +2 -2
  151. data/lib/velopayments/models/inline_response404.rb +2 -2
  152. data/lib/velopayments/models/inline_response409.rb +2 -2
  153. data/lib/velopayments/models/inline_response412.rb +2 -2
  154. data/lib/velopayments/models/instruct_payout_request_v3.rb +19 -7
  155. data/lib/velopayments/models/invite_payee_request_v3.rb +2 -2
  156. data/lib/velopayments/models/invite_payee_request_v4.rb +2 -2
  157. data/lib/velopayments/models/invite_user_request.rb +2 -2
  158. data/lib/velopayments/models/link_for_response.rb +2 -2
  159. data/lib/velopayments/models/list_funding_accounts_response_v2.rb +3 -3
  160. data/lib/velopayments/models/list_funding_accounts_response_v2_page.rb +2 -2
  161. data/lib/velopayments/models/list_payments_response_v3.rb +2 -2
  162. data/lib/velopayments/models/list_payments_response_v3_page.rb +2 -2
  163. data/lib/velopayments/models/list_payments_response_v4.rb +2 -2
  164. data/lib/velopayments/models/list_source_account_response_v2.rb +2 -2
  165. data/lib/velopayments/models/list_source_account_response_v2_links.rb +2 -2
  166. data/lib/velopayments/models/list_source_account_response_v3.rb +2 -2
  167. data/lib/velopayments/models/list_source_account_response_v3_links.rb +2 -2
  168. data/lib/velopayments/models/localisation_details.rb +2 -2
  169. data/lib/velopayments/models/mfa_details.rb +2 -2
  170. data/lib/velopayments/models/mfa_type.rb +2 -2
  171. data/lib/velopayments/models/name_v3.rb +2 -2
  172. data/lib/velopayments/models/name_v4.rb +2 -2
  173. data/lib/velopayments/models/notification.rb +2 -2
  174. data/lib/velopayments/models/notification_source.rb +4 -2
  175. data/lib/velopayments/models/notifications_v2.rb +2 -2
  176. data/lib/velopayments/models/notifications_v3.rb +2 -2
  177. data/lib/velopayments/models/onboarding_status_changed.rb +2 -2
  178. data/lib/velopayments/models/page_for_response.rb +2 -2
  179. data/lib/velopayments/models/page_resource_funding_payor_status_audit_response_funding_payor_status_audit_response.rb +2 -2
  180. data/lib/velopayments/models/page_resource_transactions.rb +236 -0
  181. data/lib/velopayments/models/paged_payee_invitation_status_response_v3.rb +2 -2
  182. data/lib/velopayments/models/paged_payee_invitation_status_response_v3_page.rb +2 -2
  183. data/lib/velopayments/models/paged_payee_invitation_status_response_v4.rb +2 -2
  184. data/lib/velopayments/models/paged_payee_response_v3.rb +2 -2
  185. data/lib/velopayments/models/paged_payee_response_v3_links.rb +2 -2
  186. data/lib/velopayments/models/paged_payee_response_v3_page.rb +2 -2
  187. data/lib/velopayments/models/paged_payee_response_v3_summary.rb +2 -2
  188. data/lib/velopayments/models/paged_payee_response_v4.rb +2 -2
  189. data/lib/velopayments/models/paged_payments_response_v3.rb +2 -2
  190. data/lib/velopayments/models/paged_user_response.rb +2 -2
  191. data/lib/velopayments/models/paged_user_response_links.rb +2 -2
  192. data/lib/velopayments/models/paged_user_response_page.rb +2 -2
  193. data/lib/velopayments/models/password_request.rb +12 -12
  194. data/lib/velopayments/models/payable_issue_v3.rb +2 -2
  195. data/lib/velopayments/models/payable_issue_v4.rb +2 -2
  196. data/lib/velopayments/models/payable_status_changed.rb +2 -2
  197. data/lib/velopayments/models/payee_address_v3.rb +2 -2
  198. data/lib/velopayments/models/payee_address_v4.rb +2 -2
  199. data/lib/velopayments/models/payee_delta_response_v3.rb +2 -2
  200. data/lib/velopayments/models/payee_delta_response_v3_links.rb +2 -2
  201. data/lib/velopayments/models/payee_delta_response_v3_page.rb +2 -2
  202. data/lib/velopayments/models/payee_delta_response_v4.rb +2 -2
  203. data/lib/velopayments/models/payee_delta_response_v4_links.rb +2 -2
  204. data/lib/velopayments/models/payee_delta_v3.rb +2 -2
  205. data/lib/velopayments/models/payee_delta_v4.rb +2 -2
  206. data/lib/velopayments/models/payee_detail_response_v3.rb +2 -2
  207. data/lib/velopayments/models/payee_detail_response_v4.rb +26 -3
  208. data/lib/velopayments/models/payee_details_changed.rb +2 -2
  209. data/lib/velopayments/models/payee_event.rb +2 -2
  210. data/lib/velopayments/models/payee_event_all_of.rb +2 -2
  211. data/lib/velopayments/models/payee_event_all_of_reasons.rb +2 -2
  212. data/lib/velopayments/models/payee_invitation_status_response_v3.rb +2 -2
  213. data/lib/velopayments/models/payee_invitation_status_response_v4.rb +2 -2
  214. data/lib/velopayments/models/payee_payor_ref_v3.rb +2 -2
  215. data/lib/velopayments/models/payee_payor_ref_v4.rb +2 -2
  216. data/lib/velopayments/models/payee_type.rb +2 -2
  217. data/lib/velopayments/models/payee_type_enum.rb +2 -2
  218. data/lib/velopayments/models/payee_user_self_update_request.rb +2 -2
  219. data/lib/velopayments/models/payment_channel_country.rb +2 -2
  220. data/lib/velopayments/models/{transmission_types.rb → payment_channel_order_request_v4.rb} +19 -51
  221. data/lib/velopayments/models/payment_channel_response_v4.rb +607 -0
  222. data/lib/velopayments/models/payment_channel_rule.rb +2 -2
  223. data/lib/velopayments/models/payment_channel_rules_response.rb +2 -2
  224. data/lib/velopayments/models/payment_channel_summary_v4.rb +396 -0
  225. data/lib/velopayments/models/payment_channels_response_v4.rb +227 -0
  226. data/lib/velopayments/models/payment_delta.rb +2 -2
  227. data/lib/velopayments/models/payment_delta_response.rb +2 -2
  228. data/lib/velopayments/models/payment_delta_response_v1.rb +2 -2
  229. data/lib/velopayments/models/payment_delta_v1.rb +2 -2
  230. data/lib/velopayments/models/payment_event.rb +2 -2
  231. data/lib/velopayments/models/payment_event_all_of.rb +2 -2
  232. data/lib/velopayments/models/payment_event_response.rb +2 -2
  233. data/lib/velopayments/models/payment_event_response_v3.rb +2 -2
  234. data/lib/velopayments/models/payment_instruction_v3.rb +19 -50
  235. data/lib/velopayments/models/payment_rejected_or_returned.rb +2 -2
  236. data/lib/velopayments/models/payment_rejected_or_returned_all_of.rb +2 -2
  237. data/lib/velopayments/models/payment_response_v3.rb +2 -2
  238. data/lib/velopayments/models/payment_response_v4.rb +50 -3
  239. data/lib/velopayments/models/payment_response_v4_payout.rb +2 -2
  240. data/lib/velopayments/models/payment_status_changed.rb +2 -2
  241. data/lib/velopayments/models/payment_status_changed_all_of.rb +2 -2
  242. data/lib/velopayments/models/payment_v3.rb +17 -7
  243. data/lib/velopayments/models/payor_address_v2.rb +32 -17
  244. data/lib/velopayments/models/payor_aml_transaction.rb +2 -2
  245. data/lib/velopayments/models/payor_aml_transaction_v3.rb +2 -2
  246. data/lib/velopayments/models/payor_branding_response.rb +2 -5
  247. data/lib/velopayments/models/payor_create_api_key_request.rb +2 -2
  248. data/lib/velopayments/models/payor_create_api_key_response.rb +2 -2
  249. data/lib/velopayments/models/payor_create_application_request.rb +2 -2
  250. data/lib/velopayments/models/payor_email_opt_out_request.rb +2 -2
  251. data/lib/velopayments/models/payor_funding_detected.rb +399 -0
  252. data/lib/velopayments/models/payor_funding_detected_all_of.rb +339 -0
  253. data/lib/velopayments/models/payor_links_response.rb +2 -2
  254. data/lib/velopayments/models/payor_links_response_links.rb +2 -2
  255. data/lib/velopayments/models/payor_links_response_payors.rb +2 -2
  256. data/lib/velopayments/models/{transmission_types2.rb → payor_to_payment_channel_mapping_v4.rb} +18 -51
  257. data/lib/velopayments/models/payor_v2.rb +26 -20
  258. data/lib/velopayments/models/payout_company_v3.rb +2 -2
  259. data/lib/velopayments/models/payout_individual_v3.rb +2 -2
  260. data/lib/velopayments/models/payout_name_v3.rb +2 -2
  261. data/lib/velopayments/models/payout_payee_v3.rb +2 -2
  262. data/lib/velopayments/models/payout_payor.rb +2 -2
  263. data/lib/velopayments/models/payout_payor_ids.rb +2 -2
  264. data/lib/velopayments/models/payout_principal.rb +2 -2
  265. data/lib/velopayments/models/payout_schedule.rb +2 -2
  266. data/lib/velopayments/models/payout_schedule_v3.rb +2 -2
  267. data/lib/velopayments/models/payout_summary_audit.rb +2 -2
  268. data/lib/velopayments/models/payout_summary_audit_v3.rb +2 -2
  269. data/lib/velopayments/models/payout_summary_response_v3.rb +2 -2
  270. data/lib/velopayments/models/ping.rb +2 -2
  271. data/lib/velopayments/models/ping_response.rb +2 -2
  272. data/lib/velopayments/models/post_instruct_fx_info.rb +2 -2
  273. data/lib/velopayments/models/query_batch_response_v3.rb +2 -2
  274. data/lib/velopayments/models/query_batch_response_v4.rb +2 -2
  275. data/lib/velopayments/models/quote_fx_summary_v3.rb +2 -2
  276. data/lib/velopayments/models/quote_response_v3.rb +2 -2
  277. data/lib/velopayments/models/region_v2.rb +2 -2
  278. data/lib/velopayments/models/register_sms_request.rb +2 -2
  279. data/lib/velopayments/models/rejected_payment_v3.rb +2 -2
  280. data/lib/velopayments/models/resend_token_request.rb +2 -2
  281. data/lib/velopayments/models/reset_password_request.rb +2 -2
  282. data/lib/velopayments/models/role.rb +2 -2
  283. data/lib/velopayments/models/role_update_request.rb +2 -2
  284. data/lib/velopayments/models/schedule_payout_request_v3.rb +2 -2
  285. data/lib/velopayments/models/self_mfa_type_unregister_request.rb +2 -2
  286. data/lib/velopayments/models/self_update_password_request.rb +22 -22
  287. data/lib/velopayments/models/set_notifications_request.rb +2 -2
  288. data/lib/velopayments/models/set_notifications_request2.rb +2 -2
  289. data/lib/velopayments/models/source_account_response_v2.rb +2 -2
  290. data/lib/velopayments/models/source_account_response_v3.rb +18 -6
  291. data/lib/velopayments/models/source_account_summary.rb +2 -2
  292. data/lib/velopayments/models/source_account_summary_v3.rb +2 -2
  293. data/lib/velopayments/models/source_account_v3.rb +2 -2
  294. data/lib/velopayments/models/source_event.rb +2 -2
  295. data/lib/velopayments/models/supported_countries_response.rb +2 -2
  296. data/lib/velopayments/models/supported_countries_response_v2.rb +2 -2
  297. data/lib/velopayments/models/supported_country.rb +2 -2
  298. data/lib/velopayments/models/supported_country_v2.rb +2 -2
  299. data/lib/velopayments/models/supported_currency_response_v2.rb +2 -2
  300. data/lib/velopayments/models/supported_currency_v2.rb +2 -2
  301. data/lib/velopayments/models/{payor_v1.rb → transaction_response.rb} +143 -181
  302. data/lib/velopayments/models/transfer_request_v2.rb +2 -2
  303. data/lib/velopayments/models/transfer_request_v3.rb +2 -2
  304. data/lib/velopayments/models/unregister_mfa_request.rb +2 -2
  305. data/lib/velopayments/models/update_payee_details_request_v3.rb +38 -7
  306. data/lib/velopayments/models/update_payee_details_request_v4.rb +2 -2
  307. data/lib/velopayments/models/update_payment_channel_request_v4.rb +472 -0
  308. data/lib/velopayments/models/update_remote_id_request_v3.rb +2 -2
  309. data/lib/velopayments/models/update_remote_id_request_v4.rb +2 -2
  310. data/lib/velopayments/models/update_webhook_request.rb +2 -2
  311. data/lib/velopayments/models/user_details_update_request.rb +2 -2
  312. data/lib/velopayments/models/user_info.rb +2 -2
  313. data/lib/velopayments/models/user_response.rb +4 -4
  314. data/lib/velopayments/models/user_status.rb +2 -2
  315. data/lib/velopayments/models/user_type.rb +2 -2
  316. data/lib/velopayments/models/user_type2.rb +2 -2
  317. data/lib/velopayments/models/validate_password_response.rb +2 -2
  318. data/lib/velopayments/models/webhook_response.rb +2 -2
  319. data/lib/velopayments/models/webhooks_response.rb +4 -4
  320. data/lib/velopayments/models/withdraw_payment_request.rb +2 -2
  321. data/lib/velopayments/version.rb +3 -3
  322. data/lib/velopayments.rb +21 -7
  323. data/oa3-config.json +1 -1
  324. data/spec/api/payee_payment_channels_api_spec.rb +132 -0
  325. data/spec/api/transactions_api_spec.rb +75 -0
  326. data/spec/api_client_spec.rb +2 -2
  327. data/spec/configuration_spec.rb +2 -2
  328. data/spec/spec_helper.rb +2 -2
  329. data/specs/api/payee_payment_channels_api_spec.rb +132 -0
  330. data/specs/api/transactions_api_spec.rb +75 -0
  331. data/velopayments.gemspec +2 -2
  332. metadata +48 -14
  333. data/docs/ListFundingAccountsResponseV2Links.md +0 -20
  334. data/docs/PayorV1.md +0 -60
  335. data/docs/TransmissionTypes.md +0 -22
  336. data/docs/TransmissionTypes2.md +0 -22
@@ -0,0 +1,538 @@
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. ## Http Status Codes Following is a list of Http Status codes that could be returned by the platform | Status Code | Description | | -----------------------| -------------------------------------------------------------------------------------| | 200 OK | The request was successfully processed and usually returns a json response | | 201 Created | A resource was created and a Location header is returned linking to the new resource | | 202 Accepted | The request has been accepted for processing | | 204 No Content | The request has been processed and there is no response (usually deletes and updates)| | 400 Bad Request | The request is invalid and should be fixed before retrying | | 401 Unauthorized | Authentication has failed, usually means the token has expired | | 403 Forbidden | The user does not have permissions for the request | | 404 Not Found | The resource was not found | | 409 Conflict | The resource already exists and there is a conflict | | 429 Too Many Requests | The user has submitted too many requests in a given amount of time | | 5xx Server Error | Platform internal error (should rarely happen) |
5
+
6
+ The version of the OpenAPI document: 2.37.150
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module VeloPayments
16
+ class PayeePaymentChannelsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Payment Channel
23
+ # <p>Create a payment channel</p>
24
+ # @param payee_id [String] The UUID of the payee.
25
+ # @param create_payment_channel_request_v4 [CreatePaymentChannelRequestV4] Post payment channel to update
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def create_payment_channel_v4(payee_id, create_payment_channel_request_v4, opts = {})
29
+ create_payment_channel_v4_with_http_info(payee_id, create_payment_channel_request_v4, opts)
30
+ nil
31
+ end
32
+
33
+ # Create Payment Channel
34
+ # &lt;p&gt;Create a payment channel&lt;/p&gt;
35
+ # @param payee_id [String] The UUID of the payee.
36
+ # @param create_payment_channel_request_v4 [CreatePaymentChannelRequestV4] Post payment channel to update
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def create_payment_channel_v4_with_http_info(payee_id, create_payment_channel_request_v4, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.create_payment_channel_v4 ...'
42
+ end
43
+ # verify the required parameter 'payee_id' is set
44
+ if @api_client.config.client_side_validation && payee_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.create_payment_channel_v4"
46
+ end
47
+ # verify the required parameter 'create_payment_channel_request_v4' is set
48
+ if @api_client.config.client_side_validation && create_payment_channel_request_v4.nil?
49
+ fail ArgumentError, "Missing the required parameter 'create_payment_channel_request_v4' when calling PayeePaymentChannelsApi.create_payment_channel_v4"
50
+ end
51
+ # resource path
52
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[: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
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_payment_channel_request_v4)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type]
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"PayeePaymentChannelsApi.create_payment_channel_v4",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#create_payment_channel_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Delete Payment Channel
97
+ # <p>Delete a payees payment channel</p>
98
+ # @param payee_id [String] The UUID of the payee.
99
+ # @param payment_channel_id [String] The UUID of the payment channel.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [nil]
102
+ def delete_payment_channel_v4(payee_id, payment_channel_id, opts = {})
103
+ delete_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts)
104
+ nil
105
+ end
106
+
107
+ # Delete Payment Channel
108
+ # &lt;p&gt;Delete a payees payment channel&lt;/p&gt;
109
+ # @param payee_id [String] The UUID of the payee.
110
+ # @param payment_channel_id [String] The UUID of the payment channel.
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
113
+ def delete_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.delete_payment_channel_v4 ...'
116
+ end
117
+ # verify the required parameter 'payee_id' is set
118
+ if @api_client.config.client_side_validation && payee_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.delete_payment_channel_v4"
120
+ end
121
+ # verify the required parameter 'payment_channel_id' is set
122
+ if @api_client.config.client_side_validation && payment_channel_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'payment_channel_id' when calling PayeePaymentChannelsApi.delete_payment_channel_v4"
124
+ end
125
+ # resource path
126
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/{paymentChannelId}'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s)).sub('{' + 'paymentChannelId' + '}', CGI.escape(payment_channel_id.to_s))
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
135
+
136
+ # form parameters
137
+ form_params = opts[:form_params] || {}
138
+
139
+ # http body (model)
140
+ post_body = opts[:debug_body]
141
+
142
+ # return_type
143
+ return_type = opts[:debug_return_type]
144
+
145
+ # auth_names
146
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
147
+
148
+ new_options = opts.merge(
149
+ :operation => :"PayeePaymentChannelsApi.delete_payment_channel_v4",
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#delete_payment_channel_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+
165
+ # Enable Payment Channel
166
+ # <p>Enable a payment channel for a payee</p>
167
+ # @param payee_id [String] The UUID of the payee.
168
+ # @param payment_channel_id [String] The UUID of the payment channel.
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [nil]
171
+ def enable_payment_channel_v4(payee_id, payment_channel_id, opts = {})
172
+ enable_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts)
173
+ nil
174
+ end
175
+
176
+ # Enable Payment Channel
177
+ # &lt;p&gt;Enable a payment channel for a payee&lt;/p&gt;
178
+ # @param payee_id [String] The UUID of the payee.
179
+ # @param payment_channel_id [String] The UUID of the payment channel.
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
182
+ def enable_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.enable_payment_channel_v4 ...'
185
+ end
186
+ # verify the required parameter 'payee_id' is set
187
+ if @api_client.config.client_side_validation && payee_id.nil?
188
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.enable_payment_channel_v4"
189
+ end
190
+ # verify the required parameter 'payment_channel_id' is set
191
+ if @api_client.config.client_side_validation && payment_channel_id.nil?
192
+ fail ArgumentError, "Missing the required parameter 'payment_channel_id' when calling PayeePaymentChannelsApi.enable_payment_channel_v4"
193
+ end
194
+ # resource path
195
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/{paymentChannelId}/enable'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s)).sub('{' + 'paymentChannelId' + '}', CGI.escape(payment_channel_id.to_s))
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+
205
+ # form parameters
206
+ form_params = opts[:form_params] || {}
207
+
208
+ # http body (model)
209
+ post_body = opts[:debug_body]
210
+
211
+ # return_type
212
+ return_type = opts[:debug_return_type]
213
+
214
+ # auth_names
215
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
216
+
217
+ new_options = opts.merge(
218
+ :operation => :"PayeePaymentChannelsApi.enable_payment_channel_v4",
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#enable_payment_channel_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+
234
+ # Get Payment Channel Details
235
+ # <p>Get the payment channel details for the payee</p>
236
+ # @param payee_id [String] The UUID of the payee.
237
+ # @param payment_channel_id [String] The UUID of the payment channel.
238
+ # @param [Hash] opts the optional parameters
239
+ # @option opts [Boolean] :payable payable if true only return the payment channel if the payee is payable
240
+ # @option opts [Boolean] :sensitive &lt;p&gt;Optional. If omitted or set to false, any Personal Identifiable Information (PII) values are returned masked.&lt;/p&gt; &lt;p&gt;If set to true, and you have permission, the PII values will be returned as their original unmasked values.&lt;/p&gt;
241
+ # @return [PaymentChannelResponseV4]
242
+ def get_payment_channel_v4(payee_id, payment_channel_id, opts = {})
243
+ data, _status_code, _headers = get_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts)
244
+ data
245
+ end
246
+
247
+ # Get Payment Channel Details
248
+ # &lt;p&gt;Get the payment channel details for the payee&lt;/p&gt;
249
+ # @param payee_id [String] The UUID of the payee.
250
+ # @param payment_channel_id [String] The UUID of the payment channel.
251
+ # @param [Hash] opts the optional parameters
252
+ # @option opts [Boolean] :payable payable if true only return the payment channel if the payee is payable
253
+ # @option opts [Boolean] :sensitive &lt;p&gt;Optional. If omitted or set to false, any Personal Identifiable Information (PII) values are returned masked.&lt;/p&gt; &lt;p&gt;If set to true, and you have permission, the PII values will be returned as their original unmasked values.&lt;/p&gt;
254
+ # @return [Array<(PaymentChannelResponseV4, Integer, Hash)>] PaymentChannelResponseV4 data, response status code and response headers
255
+ def get_payment_channel_v4_with_http_info(payee_id, payment_channel_id, opts = {})
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.get_payment_channel_v4 ...'
258
+ end
259
+ # verify the required parameter 'payee_id' is set
260
+ if @api_client.config.client_side_validation && payee_id.nil?
261
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.get_payment_channel_v4"
262
+ end
263
+ # verify the required parameter 'payment_channel_id' is set
264
+ if @api_client.config.client_side_validation && payment_channel_id.nil?
265
+ fail ArgumentError, "Missing the required parameter 'payment_channel_id' when calling PayeePaymentChannelsApi.get_payment_channel_v4"
266
+ end
267
+ # resource path
268
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/{paymentChannelId}'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s)).sub('{' + 'paymentChannelId' + '}', CGI.escape(payment_channel_id.to_s))
269
+
270
+ # query parameters
271
+ query_params = opts[:query_params] || {}
272
+ query_params[:'payable'] = opts[:'payable'] if !opts[:'payable'].nil?
273
+ query_params[:'sensitive'] = opts[:'sensitive'] if !opts[:'sensitive'].nil?
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
+
280
+ # form parameters
281
+ form_params = opts[:form_params] || {}
282
+
283
+ # http body (model)
284
+ post_body = opts[:debug_body]
285
+
286
+ # return_type
287
+ return_type = opts[:debug_return_type] || 'PaymentChannelResponseV4'
288
+
289
+ # auth_names
290
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
291
+
292
+ new_options = opts.merge(
293
+ :operation => :"PayeePaymentChannelsApi.get_payment_channel_v4",
294
+ :header_params => header_params,
295
+ :query_params => query_params,
296
+ :form_params => form_params,
297
+ :body => post_body,
298
+ :auth_names => auth_names,
299
+ :return_type => return_type
300
+ )
301
+
302
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
303
+ if @api_client.config.debugging
304
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#get_payment_channel_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
305
+ end
306
+ return data, status_code, headers
307
+ end
308
+
309
+ # Get All Payment Channels Details
310
+ # <p>Get all payment channels details for a payee</p>
311
+ # @param payee_id [String] The UUID of the payee.
312
+ # @param [Hash] opts the optional parameters
313
+ # @option opts [String] :payor_id &lt;p&gt;(UUID) the id of the Payor.&lt;/p&gt; &lt;p&gt;If specified the payment channels are filtered to those mapped to this payor.&lt;/p&gt;
314
+ # @option opts [Boolean] :payable payable if true only return the payment channel if the payee is payable
315
+ # @option opts [Boolean] :sensitive &lt;p&gt;Optional. If omitted or set to false, any Personal Identifiable Information (PII) values are returned masked.&lt;/p&gt; &lt;p&gt;If set to true, and you have permission, the PII values will be returned as their original unmasked values.&lt;/p&gt;
316
+ # @option opts [Boolean] :ignore_payor_invite_status payable if true only return the payment channel if the payee is payable
317
+ # @return [PaymentChannelsResponseV4]
318
+ def get_payment_channels_v4(payee_id, opts = {})
319
+ data, _status_code, _headers = get_payment_channels_v4_with_http_info(payee_id, opts)
320
+ data
321
+ end
322
+
323
+ # Get All Payment Channels Details
324
+ # &lt;p&gt;Get all payment channels details for a payee&lt;/p&gt;
325
+ # @param payee_id [String] The UUID of the payee.
326
+ # @param [Hash] opts the optional parameters
327
+ # @option opts [String] :payor_id &lt;p&gt;(UUID) the id of the Payor.&lt;/p&gt; &lt;p&gt;If specified the payment channels are filtered to those mapped to this payor.&lt;/p&gt;
328
+ # @option opts [Boolean] :payable payable if true only return the payment channel if the payee is payable
329
+ # @option opts [Boolean] :sensitive &lt;p&gt;Optional. If omitted or set to false, any Personal Identifiable Information (PII) values are returned masked.&lt;/p&gt; &lt;p&gt;If set to true, and you have permission, the PII values will be returned as their original unmasked values.&lt;/p&gt;
330
+ # @option opts [Boolean] :ignore_payor_invite_status payable if true only return the payment channel if the payee is payable
331
+ # @return [Array<(PaymentChannelsResponseV4, Integer, Hash)>] PaymentChannelsResponseV4 data, response status code and response headers
332
+ def get_payment_channels_v4_with_http_info(payee_id, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.get_payment_channels_v4 ...'
335
+ end
336
+ # verify the required parameter 'payee_id' is set
337
+ if @api_client.config.client_side_validation && payee_id.nil?
338
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.get_payment_channels_v4"
339
+ end
340
+ # resource path
341
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s))
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+ query_params[:'payorId'] = opts[:'payor_id'] if !opts[:'payor_id'].nil?
346
+ query_params[:'payable'] = opts[:'payable'] if !opts[:'payable'].nil?
347
+ query_params[:'sensitive'] = opts[:'sensitive'] if !opts[:'sensitive'].nil?
348
+ query_params[:'ignorePayorInviteStatus'] = opts[:'ignore_payor_invite_status'] if !opts[:'ignore_payor_invite_status'].nil?
349
+
350
+ # header parameters
351
+ header_params = opts[:header_params] || {}
352
+ # HTTP header 'Accept' (if needed)
353
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
354
+
355
+ # form parameters
356
+ form_params = opts[:form_params] || {}
357
+
358
+ # http body (model)
359
+ post_body = opts[:debug_body]
360
+
361
+ # return_type
362
+ return_type = opts[:debug_return_type] || 'PaymentChannelsResponseV4'
363
+
364
+ # auth_names
365
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
366
+
367
+ new_options = opts.merge(
368
+ :operation => :"PayeePaymentChannelsApi.get_payment_channels_v4",
369
+ :header_params => header_params,
370
+ :query_params => query_params,
371
+ :form_params => form_params,
372
+ :body => post_body,
373
+ :auth_names => auth_names,
374
+ :return_type => return_type
375
+ )
376
+
377
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#get_payment_channels_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
380
+ end
381
+ return data, status_code, headers
382
+ end
383
+
384
+ # Update Payees preferred Payment Channel order
385
+ # <p>Update the Payee's preferred order of payment channels by passing in just the payment channel ids. When payments are made to the payee then in the absence of any other rules (e.g. matching on currency) the first payment channel in this list will be chosen. </p>
386
+ # @param payee_id [String] The UUID of the payee.
387
+ # @param payment_channel_order_request_v4 [PaymentChannelOrderRequestV4] Put the payment channel ids in the preferred order
388
+ # @param [Hash] opts the optional parameters
389
+ # @return [nil]
390
+ def update_payment_channel_order_v4(payee_id, payment_channel_order_request_v4, opts = {})
391
+ update_payment_channel_order_v4_with_http_info(payee_id, payment_channel_order_request_v4, opts)
392
+ nil
393
+ end
394
+
395
+ # Update Payees preferred Payment Channel order
396
+ # &lt;p&gt;Update the Payee&#39;s preferred order of payment channels by passing in just the payment channel ids. When payments are made to the payee then in the absence of any other rules (e.g. matching on currency) the first payment channel in this list will be chosen. &lt;/p&gt;
397
+ # @param payee_id [String] The UUID of the payee.
398
+ # @param payment_channel_order_request_v4 [PaymentChannelOrderRequestV4] Put the payment channel ids in the preferred order
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
401
+ def update_payment_channel_order_v4_with_http_info(payee_id, payment_channel_order_request_v4, opts = {})
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.update_payment_channel_order_v4 ...'
404
+ end
405
+ # verify the required parameter 'payee_id' is set
406
+ if @api_client.config.client_side_validation && payee_id.nil?
407
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.update_payment_channel_order_v4"
408
+ end
409
+ # verify the required parameter 'payment_channel_order_request_v4' is set
410
+ if @api_client.config.client_side_validation && payment_channel_order_request_v4.nil?
411
+ fail ArgumentError, "Missing the required parameter 'payment_channel_order_request_v4' when calling PayeePaymentChannelsApi.update_payment_channel_order_v4"
412
+ end
413
+ # resource path
414
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/order'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s))
415
+
416
+ # query parameters
417
+ query_params = opts[:query_params] || {}
418
+
419
+ # header parameters
420
+ header_params = opts[:header_params] || {}
421
+ # HTTP header 'Accept' (if needed)
422
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
423
+ # HTTP header 'Content-Type'
424
+ content_type = @api_client.select_header_content_type(['application/json'])
425
+ if !content_type.nil?
426
+ header_params['Content-Type'] = content_type
427
+ end
428
+
429
+ # form parameters
430
+ form_params = opts[:form_params] || {}
431
+
432
+ # http body (model)
433
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_channel_order_request_v4)
434
+
435
+ # return_type
436
+ return_type = opts[:debug_return_type]
437
+
438
+ # auth_names
439
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
440
+
441
+ new_options = opts.merge(
442
+ :operation => :"PayeePaymentChannelsApi.update_payment_channel_order_v4",
443
+ :header_params => header_params,
444
+ :query_params => query_params,
445
+ :form_params => form_params,
446
+ :body => post_body,
447
+ :auth_names => auth_names,
448
+ :return_type => return_type
449
+ )
450
+
451
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
452
+ if @api_client.config.debugging
453
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#update_payment_channel_order_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
454
+ end
455
+ return data, status_code, headers
456
+ end
457
+
458
+ # Update Payment Channel
459
+ # <p>Update the details of the payment channel. Note payment channels are immutable. The current payment channel will be logically deleted as part of this call and replaced with new one with the correct details; this endpoint will return a Location header with a link to the new payment channel upon success. Updating a currently disabled payment channel will result in a new, fully enabled, payment channel.</p>
460
+ # @param payee_id [String] The UUID of the payee.
461
+ # @param payment_channel_id [String] The UUID of the payment channel.
462
+ # @param update_payment_channel_request_v4 [UpdatePaymentChannelRequestV4] Post payment channel to update
463
+ # @param [Hash] opts the optional parameters
464
+ # @return [nil]
465
+ def update_payment_channel_v4(payee_id, payment_channel_id, update_payment_channel_request_v4, opts = {})
466
+ update_payment_channel_v4_with_http_info(payee_id, payment_channel_id, update_payment_channel_request_v4, opts)
467
+ nil
468
+ end
469
+
470
+ # Update Payment Channel
471
+ # &lt;p&gt;Update the details of the payment channel. Note payment channels are immutable. The current payment channel will be logically deleted as part of this call and replaced with new one with the correct details; this endpoint will return a Location header with a link to the new payment channel upon success. Updating a currently disabled payment channel will result in a new, fully enabled, payment channel.&lt;/p&gt;
472
+ # @param payee_id [String] The UUID of the payee.
473
+ # @param payment_channel_id [String] The UUID of the payment channel.
474
+ # @param update_payment_channel_request_v4 [UpdatePaymentChannelRequestV4] Post payment channel to update
475
+ # @param [Hash] opts the optional parameters
476
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
477
+ def update_payment_channel_v4_with_http_info(payee_id, payment_channel_id, update_payment_channel_request_v4, opts = {})
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug 'Calling API: PayeePaymentChannelsApi.update_payment_channel_v4 ...'
480
+ end
481
+ # verify the required parameter 'payee_id' is set
482
+ if @api_client.config.client_side_validation && payee_id.nil?
483
+ fail ArgumentError, "Missing the required parameter 'payee_id' when calling PayeePaymentChannelsApi.update_payment_channel_v4"
484
+ end
485
+ # verify the required parameter 'payment_channel_id' is set
486
+ if @api_client.config.client_side_validation && payment_channel_id.nil?
487
+ fail ArgumentError, "Missing the required parameter 'payment_channel_id' when calling PayeePaymentChannelsApi.update_payment_channel_v4"
488
+ end
489
+ # verify the required parameter 'update_payment_channel_request_v4' is set
490
+ if @api_client.config.client_side_validation && update_payment_channel_request_v4.nil?
491
+ fail ArgumentError, "Missing the required parameter 'update_payment_channel_request_v4' when calling PayeePaymentChannelsApi.update_payment_channel_v4"
492
+ end
493
+ # resource path
494
+ local_var_path = '/v4/payees/{payeeId}/paymentChannels/{paymentChannelId}'.sub('{' + 'payeeId' + '}', CGI.escape(payee_id.to_s)).sub('{' + 'paymentChannelId' + '}', CGI.escape(payment_channel_id.to_s))
495
+
496
+ # query parameters
497
+ query_params = opts[:query_params] || {}
498
+
499
+ # header parameters
500
+ header_params = opts[:header_params] || {}
501
+ # HTTP header 'Accept' (if needed)
502
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
503
+ # HTTP header 'Content-Type'
504
+ content_type = @api_client.select_header_content_type(['application/json'])
505
+ if !content_type.nil?
506
+ header_params['Content-Type'] = content_type
507
+ end
508
+
509
+ # form parameters
510
+ form_params = opts[:form_params] || {}
511
+
512
+ # http body (model)
513
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_payment_channel_request_v4)
514
+
515
+ # return_type
516
+ return_type = opts[:debug_return_type]
517
+
518
+ # auth_names
519
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
520
+
521
+ new_options = opts.merge(
522
+ :operation => :"PayeePaymentChannelsApi.update_payment_channel_v4",
523
+ :header_params => header_params,
524
+ :query_params => query_params,
525
+ :form_params => form_params,
526
+ :body => post_body,
527
+ :auth_names => auth_names,
528
+ :return_type => return_type
529
+ )
530
+
531
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug "API called: PayeePaymentChannelsApi#update_payment_channel_v4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
534
+ end
535
+ return data, status_code, headers
536
+ end
537
+ end
538
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Velo Payments APIs
3
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.
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. ## Http Status Codes Following is a list of Http Status codes that could be returned by the platform | Status Code | Description | | -----------------------| -------------------------------------------------------------------------------------| | 200 OK | The request was successfully processed and usually returns a json response | | 201 Created | A resource was created and a Location header is returned linking to the new resource | | 202 Accepted | The request has been accepted for processing | | 204 No Content | The request has been processed and there is no response (usually deletes and updates)| | 400 Bad Request | The request is invalid and should be fixed before retrying | | 401 Unauthorized | Authentication has failed, usually means the token has expired | | 403 Forbidden | The user does not have permissions for the request | | 404 Not Found | The resource was not found | | 409 Conflict | The resource already exists and there is a conflict | | 429 Too Many Requests | The user has submitted too many requests in a given amount of time | | 5xx Server Error | Platform internal error (should rarely happen) |
5
5
 
6
- The version of the OpenAPI document: 2.35.58
6
+ The version of the OpenAPI document: 2.37.150
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.1.0-SNAPSHOT
@@ -50,6 +50,8 @@ module VeloPayments
50
50
 
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
55
 
54
56
  # form parameters
55
57
  form_params = opts[:form_params] || {}
@@ -111,6 +113,8 @@ module VeloPayments
111
113
 
112
114
  # header parameters
113
115
  header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
118
 
115
119
  # form parameters
116
120
  form_params = opts[:form_params] || {}