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,607 @@
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 'date'
14
+ require 'time'
15
+
16
+ module VeloPayments
17
+ class PaymentChannelResponseV4
18
+ attr_accessor :id
19
+
20
+ attr_accessor :payee_id
21
+
22
+ attr_accessor :payment_channel_name
23
+
24
+ attr_accessor :account_name
25
+
26
+ # Payment channel type. One of the following values: CHANNEL_BANK
27
+ attr_accessor :channel_type
28
+
29
+ # Valid ISO 3166 2 character country code. See the <a href=\"https://www.iso.org/iso-3166-country-codes.html\" target=\"_blank\" a>ISO specification</a> for details.
30
+ attr_accessor :country_code
31
+
32
+ attr_accessor :routing_number
33
+
34
+ attr_accessor :account_number
35
+
36
+ # Must match the regular expression ```^[A-Za-z0-9]+$```.
37
+ attr_accessor :iban
38
+
39
+ # Valid ISO 4217 3 letter currency code. See the <a href=\"https://www.iso.org/iso-4217-currency-codes.html\" target=\"_blank\" a>ISO specification</a> for details.
40
+ attr_accessor :currency
41
+
42
+ attr_accessor :payor_ids
43
+
44
+ attr_accessor :payee_name
45
+
46
+ attr_accessor :bank_name
47
+
48
+ attr_accessor :bank_swift_bic
49
+
50
+ attr_accessor :bank_address
51
+
52
+ attr_accessor :deleted
53
+
54
+ attr_accessor :enabled
55
+
56
+ attr_accessor :disabled_reason_code
57
+
58
+ attr_accessor :disabled_reason
59
+
60
+ # Whether this payment channel is payable
61
+ attr_accessor :payable
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'id' => :'id',
67
+ :'payee_id' => :'payeeId',
68
+ :'payment_channel_name' => :'paymentChannelName',
69
+ :'account_name' => :'accountName',
70
+ :'channel_type' => :'channelType',
71
+ :'country_code' => :'countryCode',
72
+ :'routing_number' => :'routingNumber',
73
+ :'account_number' => :'accountNumber',
74
+ :'iban' => :'iban',
75
+ :'currency' => :'currency',
76
+ :'payor_ids' => :'payorIds',
77
+ :'payee_name' => :'payeeName',
78
+ :'bank_name' => :'bankName',
79
+ :'bank_swift_bic' => :'bankSwiftBic',
80
+ :'bank_address' => :'bankAddress',
81
+ :'deleted' => :'deleted',
82
+ :'enabled' => :'enabled',
83
+ :'disabled_reason_code' => :'disabledReasonCode',
84
+ :'disabled_reason' => :'disabledReason',
85
+ :'payable' => :'payable'
86
+ }
87
+ end
88
+
89
+ # Returns all the JSON keys this model knows about
90
+ def self.acceptable_attributes
91
+ attribute_map.values
92
+ end
93
+
94
+ # Attribute type mapping.
95
+ def self.openapi_types
96
+ {
97
+ :'id' => :'String',
98
+ :'payee_id' => :'String',
99
+ :'payment_channel_name' => :'String',
100
+ :'account_name' => :'String',
101
+ :'channel_type' => :'String',
102
+ :'country_code' => :'String',
103
+ :'routing_number' => :'String',
104
+ :'account_number' => :'String',
105
+ :'iban' => :'String',
106
+ :'currency' => :'String',
107
+ :'payor_ids' => :'Array<String>',
108
+ :'payee_name' => :'String',
109
+ :'bank_name' => :'String',
110
+ :'bank_swift_bic' => :'String',
111
+ :'bank_address' => :'AddressV4',
112
+ :'deleted' => :'Boolean',
113
+ :'enabled' => :'Boolean',
114
+ :'disabled_reason_code' => :'String',
115
+ :'disabled_reason' => :'String',
116
+ :'payable' => :'Boolean'
117
+ }
118
+ end
119
+
120
+ # List of attributes with nullable: true
121
+ def self.openapi_nullable
122
+ Set.new([
123
+ ])
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ def initialize(attributes = {})
129
+ if (!attributes.is_a?(Hash))
130
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeloPayments::PaymentChannelResponseV4` initialize method"
131
+ end
132
+
133
+ # check to see if the attribute exists and convert string to symbol for hash key
134
+ attributes = attributes.each_with_object({}) { |(k, v), h|
135
+ if (!self.class.attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeloPayments::PaymentChannelResponseV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
137
+ end
138
+ h[k.to_sym] = v
139
+ }
140
+
141
+ if attributes.key?(:'id')
142
+ self.id = attributes[:'id']
143
+ else
144
+ self.id = nil
145
+ end
146
+
147
+ if attributes.key?(:'payee_id')
148
+ self.payee_id = attributes[:'payee_id']
149
+ end
150
+
151
+ if attributes.key?(:'payment_channel_name')
152
+ self.payment_channel_name = attributes[:'payment_channel_name']
153
+ else
154
+ self.payment_channel_name = nil
155
+ end
156
+
157
+ if attributes.key?(:'account_name')
158
+ self.account_name = attributes[:'account_name']
159
+ else
160
+ self.account_name = nil
161
+ end
162
+
163
+ if attributes.key?(:'channel_type')
164
+ self.channel_type = attributes[:'channel_type']
165
+ else
166
+ self.channel_type = nil
167
+ end
168
+
169
+ if attributes.key?(:'country_code')
170
+ self.country_code = attributes[:'country_code']
171
+ else
172
+ self.country_code = nil
173
+ end
174
+
175
+ if attributes.key?(:'routing_number')
176
+ self.routing_number = attributes[:'routing_number']
177
+ end
178
+
179
+ if attributes.key?(:'account_number')
180
+ self.account_number = attributes[:'account_number']
181
+ end
182
+
183
+ if attributes.key?(:'iban')
184
+ self.iban = attributes[:'iban']
185
+ end
186
+
187
+ if attributes.key?(:'currency')
188
+ self.currency = attributes[:'currency']
189
+ else
190
+ self.currency = nil
191
+ end
192
+
193
+ if attributes.key?(:'payor_ids')
194
+ if (value = attributes[:'payor_ids']).is_a?(Array)
195
+ self.payor_ids = value
196
+ end
197
+ end
198
+
199
+ if attributes.key?(:'payee_name')
200
+ self.payee_name = attributes[:'payee_name']
201
+ end
202
+
203
+ if attributes.key?(:'bank_name')
204
+ self.bank_name = attributes[:'bank_name']
205
+ end
206
+
207
+ if attributes.key?(:'bank_swift_bic')
208
+ self.bank_swift_bic = attributes[:'bank_swift_bic']
209
+ end
210
+
211
+ if attributes.key?(:'bank_address')
212
+ self.bank_address = attributes[:'bank_address']
213
+ end
214
+
215
+ if attributes.key?(:'deleted')
216
+ self.deleted = attributes[:'deleted']
217
+ end
218
+
219
+ if attributes.key?(:'enabled')
220
+ self.enabled = attributes[:'enabled']
221
+ end
222
+
223
+ if attributes.key?(:'disabled_reason_code')
224
+ self.disabled_reason_code = attributes[:'disabled_reason_code']
225
+ end
226
+
227
+ if attributes.key?(:'disabled_reason')
228
+ self.disabled_reason = attributes[:'disabled_reason']
229
+ end
230
+
231
+ if attributes.key?(:'payable')
232
+ self.payable = attributes[:'payable']
233
+ end
234
+ end
235
+
236
+ # Show invalid properties with the reasons. Usually used together with valid?
237
+ # @return Array for valid properties with the reasons
238
+ def list_invalid_properties
239
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
240
+ invalid_properties = Array.new
241
+ if @id.nil?
242
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
243
+ end
244
+
245
+ if @payment_channel_name.nil?
246
+ invalid_properties.push('invalid value for "payment_channel_name", payment_channel_name cannot be nil.')
247
+ end
248
+
249
+ if @account_name.nil?
250
+ invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
251
+ end
252
+
253
+ if @channel_type.nil?
254
+ invalid_properties.push('invalid value for "channel_type", channel_type cannot be nil.')
255
+ end
256
+
257
+ if @country_code.nil?
258
+ invalid_properties.push('invalid value for "country_code", country_code cannot be nil.')
259
+ end
260
+
261
+ if @country_code.to_s.length > 2
262
+ invalid_properties.push('invalid value for "country_code", the character length must be smaller than or equal to 2.')
263
+ end
264
+
265
+ if @country_code.to_s.length < 2
266
+ invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 2.')
267
+ end
268
+
269
+ pattern = Regexp.new(/^[A-Z]{2}$/)
270
+ if @country_code !~ pattern
271
+ invalid_properties.push("invalid value for \"country_code\", must conform to the pattern #{pattern}.")
272
+ end
273
+
274
+ if !@routing_number.nil? && @routing_number.to_s.length > 9
275
+ invalid_properties.push('invalid value for "routing_number", the character length must be smaller than or equal to 9.')
276
+ end
277
+
278
+ if !@routing_number.nil? && @routing_number.to_s.length < 9
279
+ invalid_properties.push('invalid value for "routing_number", the character length must be great than or equal to 9.')
280
+ end
281
+
282
+ if !@account_number.nil? && @account_number.to_s.length > 17
283
+ invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 17.')
284
+ end
285
+
286
+ if !@account_number.nil? && @account_number.to_s.length < 6
287
+ invalid_properties.push('invalid value for "account_number", the character length must be great than or equal to 6.')
288
+ end
289
+
290
+ if !@iban.nil? && @iban.to_s.length > 34
291
+ invalid_properties.push('invalid value for "iban", the character length must be smaller than or equal to 34.')
292
+ end
293
+
294
+ if !@iban.nil? && @iban.to_s.length < 15
295
+ invalid_properties.push('invalid value for "iban", the character length must be great than or equal to 15.')
296
+ end
297
+
298
+ pattern = Regexp.new(/^[A-Za-z0-9]+$/)
299
+ if !@iban.nil? && @iban !~ pattern
300
+ invalid_properties.push("invalid value for \"iban\", must conform to the pattern #{pattern}.")
301
+ end
302
+
303
+ if @currency.nil?
304
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
305
+ end
306
+
307
+ if @currency.to_s.length > 3
308
+ invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
309
+ end
310
+
311
+ if @currency.to_s.length < 3
312
+ invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.')
313
+ end
314
+
315
+ pattern = Regexp.new(/^[A-Z]{3}$/)
316
+ if @currency !~ pattern
317
+ invalid_properties.push("invalid value for \"currency\", must conform to the pattern #{pattern}.")
318
+ end
319
+
320
+ invalid_properties
321
+ end
322
+
323
+ # Check to see if the all the properties in the model are valid
324
+ # @return true if the model is valid
325
+ def valid?
326
+ warn '[DEPRECATED] the `valid?` method is obsolete'
327
+ return false if @id.nil?
328
+ return false if @payment_channel_name.nil?
329
+ return false if @account_name.nil?
330
+ return false if @channel_type.nil?
331
+ return false if @country_code.nil?
332
+ return false if @country_code.to_s.length > 2
333
+ return false if @country_code.to_s.length < 2
334
+ return false if @country_code !~ Regexp.new(/^[A-Z]{2}$/)
335
+ return false if !@routing_number.nil? && @routing_number.to_s.length > 9
336
+ return false if !@routing_number.nil? && @routing_number.to_s.length < 9
337
+ return false if !@account_number.nil? && @account_number.to_s.length > 17
338
+ return false if !@account_number.nil? && @account_number.to_s.length < 6
339
+ return false if !@iban.nil? && @iban.to_s.length > 34
340
+ return false if !@iban.nil? && @iban.to_s.length < 15
341
+ return false if !@iban.nil? && @iban !~ Regexp.new(/^[A-Za-z0-9]+$/)
342
+ return false if @currency.nil?
343
+ return false if @currency.to_s.length > 3
344
+ return false if @currency.to_s.length < 3
345
+ return false if @currency !~ Regexp.new(/^[A-Z]{3}$/)
346
+ true
347
+ end
348
+
349
+ # Custom attribute writer method with validation
350
+ # @param [Object] country_code Value to be assigned
351
+ def country_code=(country_code)
352
+ if country_code.nil?
353
+ fail ArgumentError, 'country_code cannot be nil'
354
+ end
355
+
356
+ if country_code.to_s.length > 2
357
+ fail ArgumentError, 'invalid value for "country_code", the character length must be smaller than or equal to 2.'
358
+ end
359
+
360
+ if country_code.to_s.length < 2
361
+ fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 2.'
362
+ end
363
+
364
+ pattern = Regexp.new(/^[A-Z]{2}$/)
365
+ if country_code !~ pattern
366
+ fail ArgumentError, "invalid value for \"country_code\", must conform to the pattern #{pattern}."
367
+ end
368
+
369
+ @country_code = country_code
370
+ end
371
+
372
+ # Custom attribute writer method with validation
373
+ # @param [Object] routing_number Value to be assigned
374
+ def routing_number=(routing_number)
375
+ if routing_number.nil?
376
+ fail ArgumentError, 'routing_number cannot be nil'
377
+ end
378
+
379
+ if routing_number.to_s.length > 9
380
+ fail ArgumentError, 'invalid value for "routing_number", the character length must be smaller than or equal to 9.'
381
+ end
382
+
383
+ if routing_number.to_s.length < 9
384
+ fail ArgumentError, 'invalid value for "routing_number", the character length must be great than or equal to 9.'
385
+ end
386
+
387
+ @routing_number = routing_number
388
+ end
389
+
390
+ # Custom attribute writer method with validation
391
+ # @param [Object] account_number Value to be assigned
392
+ def account_number=(account_number)
393
+ if account_number.nil?
394
+ fail ArgumentError, 'account_number cannot be nil'
395
+ end
396
+
397
+ if account_number.to_s.length > 17
398
+ fail ArgumentError, 'invalid value for "account_number", the character length must be smaller than or equal to 17.'
399
+ end
400
+
401
+ if account_number.to_s.length < 6
402
+ fail ArgumentError, 'invalid value for "account_number", the character length must be great than or equal to 6.'
403
+ end
404
+
405
+ @account_number = account_number
406
+ end
407
+
408
+ # Custom attribute writer method with validation
409
+ # @param [Object] iban Value to be assigned
410
+ def iban=(iban)
411
+ if iban.nil?
412
+ fail ArgumentError, 'iban cannot be nil'
413
+ end
414
+
415
+ if iban.to_s.length > 34
416
+ fail ArgumentError, 'invalid value for "iban", the character length must be smaller than or equal to 34.'
417
+ end
418
+
419
+ if iban.to_s.length < 15
420
+ fail ArgumentError, 'invalid value for "iban", the character length must be great than or equal to 15.'
421
+ end
422
+
423
+ pattern = Regexp.new(/^[A-Za-z0-9]+$/)
424
+ if iban !~ pattern
425
+ fail ArgumentError, "invalid value for \"iban\", must conform to the pattern #{pattern}."
426
+ end
427
+
428
+ @iban = iban
429
+ end
430
+
431
+ # Custom attribute writer method with validation
432
+ # @param [Object] currency Value to be assigned
433
+ def currency=(currency)
434
+ if currency.nil?
435
+ fail ArgumentError, 'currency cannot be nil'
436
+ end
437
+
438
+ if currency.to_s.length > 3
439
+ fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
440
+ end
441
+
442
+ if currency.to_s.length < 3
443
+ fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
444
+ end
445
+
446
+ pattern = Regexp.new(/^[A-Z]{3}$/)
447
+ if currency !~ pattern
448
+ fail ArgumentError, "invalid value for \"currency\", must conform to the pattern #{pattern}."
449
+ end
450
+
451
+ @currency = currency
452
+ end
453
+
454
+ # Checks equality by comparing each attribute.
455
+ # @param [Object] Object to be compared
456
+ def ==(o)
457
+ return true if self.equal?(o)
458
+ self.class == o.class &&
459
+ id == o.id &&
460
+ payee_id == o.payee_id &&
461
+ payment_channel_name == o.payment_channel_name &&
462
+ account_name == o.account_name &&
463
+ channel_type == o.channel_type &&
464
+ country_code == o.country_code &&
465
+ routing_number == o.routing_number &&
466
+ account_number == o.account_number &&
467
+ iban == o.iban &&
468
+ currency == o.currency &&
469
+ payor_ids == o.payor_ids &&
470
+ payee_name == o.payee_name &&
471
+ bank_name == o.bank_name &&
472
+ bank_swift_bic == o.bank_swift_bic &&
473
+ bank_address == o.bank_address &&
474
+ deleted == o.deleted &&
475
+ enabled == o.enabled &&
476
+ disabled_reason_code == o.disabled_reason_code &&
477
+ disabled_reason == o.disabled_reason &&
478
+ payable == o.payable
479
+ end
480
+
481
+ # @see the `==` method
482
+ # @param [Object] Object to be compared
483
+ def eql?(o)
484
+ self == o
485
+ end
486
+
487
+ # Calculates hash code according to all attributes.
488
+ # @return [Integer] Hash code
489
+ def hash
490
+ [id, payee_id, payment_channel_name, account_name, channel_type, country_code, routing_number, account_number, iban, currency, payor_ids, payee_name, bank_name, bank_swift_bic, bank_address, deleted, enabled, disabled_reason_code, disabled_reason, payable].hash
491
+ end
492
+
493
+ # Builds the object from hash
494
+ # @param [Hash] attributes Model attributes in the form of hash
495
+ # @return [Object] Returns the model itself
496
+ def self.build_from_hash(attributes)
497
+ return nil unless attributes.is_a?(Hash)
498
+ attributes = attributes.transform_keys(&:to_sym)
499
+ transformed_hash = {}
500
+ openapi_types.each_pair do |key, type|
501
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
502
+ transformed_hash["#{key}"] = nil
503
+ elsif type =~ /\AArray<(.*)>/i
504
+ # check to ensure the input is an array given that the attribute
505
+ # is documented as an array but the input is not
506
+ if attributes[attribute_map[key]].is_a?(Array)
507
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
508
+ end
509
+ elsif !attributes[attribute_map[key]].nil?
510
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
511
+ end
512
+ end
513
+ new(transformed_hash)
514
+ end
515
+
516
+ # Deserializes the data based on type
517
+ # @param string type Data type
518
+ # @param string value Value to be deserialized
519
+ # @return [Object] Deserialized data
520
+ def self._deserialize(type, value)
521
+ case type.to_sym
522
+ when :Time
523
+ Time.parse(value)
524
+ when :Date
525
+ Date.parse(value)
526
+ when :String
527
+ value.to_s
528
+ when :Integer
529
+ value.to_i
530
+ when :Float
531
+ value.to_f
532
+ when :Boolean
533
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
534
+ true
535
+ else
536
+ false
537
+ end
538
+ when :Object
539
+ # generic object (usually a Hash), return directly
540
+ value
541
+ when /\AArray<(?<inner_type>.+)>\z/
542
+ inner_type = Regexp.last_match[:inner_type]
543
+ value.map { |v| _deserialize(inner_type, v) }
544
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
545
+ k_type = Regexp.last_match[:k_type]
546
+ v_type = Regexp.last_match[:v_type]
547
+ {}.tap do |hash|
548
+ value.each do |k, v|
549
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
550
+ end
551
+ end
552
+ else # model
553
+ # models (e.g. Pet) or oneOf
554
+ klass = VeloPayments.const_get(type)
555
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
556
+ end
557
+ end
558
+
559
+ # Returns the string representation of the object
560
+ # @return [String] String presentation of the object
561
+ def to_s
562
+ to_hash.to_s
563
+ end
564
+
565
+ # to_body is an alias to to_hash (backward compatibility)
566
+ # @return [Hash] Returns the object in the form of hash
567
+ def to_body
568
+ to_hash
569
+ end
570
+
571
+ # Returns the object in the form of hash
572
+ # @return [Hash] Returns the object in the form of hash
573
+ def to_hash
574
+ hash = {}
575
+ self.class.attribute_map.each_pair do |attr, param|
576
+ value = self.send(attr)
577
+ if value.nil?
578
+ is_nullable = self.class.openapi_nullable.include?(attr)
579
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
580
+ end
581
+
582
+ hash[param] = _to_hash(value)
583
+ end
584
+ hash
585
+ end
586
+
587
+ # Outputs non-array value in the form of hash
588
+ # For object, use to_hash. Otherwise, just return the value
589
+ # @param [Object] value Any valid value
590
+ # @return [Hash] Returns the value in the form of hash
591
+ def _to_hash(value)
592
+ if value.is_a?(Array)
593
+ value.compact.map { |v| _to_hash(v) }
594
+ elsif value.is_a?(Hash)
595
+ {}.tap do |hash|
596
+ value.each { |k, v| hash[k] = _to_hash(v) }
597
+ end
598
+ elsif value.respond_to? :to_hash
599
+ value.to_hash
600
+ else
601
+ value
602
+ end
603
+ end
604
+
605
+ end
606
+
607
+ 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