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
@@ -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
@@ -0,0 +1,396 @@
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 PaymentChannelSummaryV4
18
+ attr_accessor :payment_channel_id
19
+
20
+ # The payment channel name
21
+ attr_accessor :name
22
+
23
+ # 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.
24
+ attr_accessor :country_code
25
+
26
+ # 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.
27
+ attr_accessor :currency
28
+
29
+ # The last 4 digits of the account number or IBAN
30
+ attr_accessor :last4_digits
31
+
32
+ # Usually true. False if an associated payment is returned
33
+ attr_accessor :enabled
34
+
35
+ # Indicates why the payment channel was disabled
36
+ attr_accessor :disabled_reason
37
+
38
+ attr_accessor :disabled_reason_code
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'payment_channel_id' => :'paymentChannelId',
44
+ :'name' => :'name',
45
+ :'country_code' => :'countryCode',
46
+ :'currency' => :'currency',
47
+ :'last4_digits' => :'last4Digits',
48
+ :'enabled' => :'enabled',
49
+ :'disabled_reason' => :'disabledReason',
50
+ :'disabled_reason_code' => :'disabledReasonCode'
51
+ }
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'payment_channel_id' => :'String',
63
+ :'name' => :'String',
64
+ :'country_code' => :'String',
65
+ :'currency' => :'String',
66
+ :'last4_digits' => :'String',
67
+ :'enabled' => :'Boolean',
68
+ :'disabled_reason' => :'String',
69
+ :'disabled_reason_code' => :'String'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeloPayments::PaymentChannelSummaryV4` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeloPayments::PaymentChannelSummaryV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'payment_channel_id')
95
+ self.payment_channel_id = attributes[:'payment_channel_id']
96
+ else
97
+ self.payment_channel_id = nil
98
+ end
99
+
100
+ if attributes.key?(:'name')
101
+ self.name = attributes[:'name']
102
+ else
103
+ self.name = nil
104
+ end
105
+
106
+ if attributes.key?(:'country_code')
107
+ self.country_code = attributes[:'country_code']
108
+ else
109
+ self.country_code = nil
110
+ end
111
+
112
+ if attributes.key?(:'currency')
113
+ self.currency = attributes[:'currency']
114
+ else
115
+ self.currency = nil
116
+ end
117
+
118
+ if attributes.key?(:'last4_digits')
119
+ self.last4_digits = attributes[:'last4_digits']
120
+ end
121
+
122
+ if attributes.key?(:'enabled')
123
+ self.enabled = attributes[:'enabled']
124
+ else
125
+ self.enabled = nil
126
+ end
127
+
128
+ if attributes.key?(:'disabled_reason')
129
+ self.disabled_reason = attributes[:'disabled_reason']
130
+ end
131
+
132
+ if attributes.key?(:'disabled_reason_code')
133
+ self.disabled_reason_code = attributes[:'disabled_reason_code']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
+ invalid_properties = Array.new
142
+ if @payment_channel_id.nil?
143
+ invalid_properties.push('invalid value for "payment_channel_id", payment_channel_id cannot be nil.')
144
+ end
145
+
146
+ if @name.nil?
147
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
148
+ end
149
+
150
+ if @country_code.nil?
151
+ invalid_properties.push('invalid value for "country_code", country_code cannot be nil.')
152
+ end
153
+
154
+ if @country_code.to_s.length > 2
155
+ invalid_properties.push('invalid value for "country_code", the character length must be smaller than or equal to 2.')
156
+ end
157
+
158
+ if @country_code.to_s.length < 2
159
+ invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 2.')
160
+ end
161
+
162
+ pattern = Regexp.new(/^[A-Z]{2}$/)
163
+ if @country_code !~ pattern
164
+ invalid_properties.push("invalid value for \"country_code\", must conform to the pattern #{pattern}.")
165
+ end
166
+
167
+ if @currency.nil?
168
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
169
+ end
170
+
171
+ if @currency.to_s.length > 3
172
+ invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
173
+ end
174
+
175
+ if @currency.to_s.length < 3
176
+ invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.')
177
+ end
178
+
179
+ pattern = Regexp.new(/^[A-Z]{3}$/)
180
+ if @currency !~ pattern
181
+ invalid_properties.push("invalid value for \"currency\", must conform to the pattern #{pattern}.")
182
+ end
183
+
184
+ if @enabled.nil?
185
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
186
+ end
187
+
188
+ invalid_properties
189
+ end
190
+
191
+ # Check to see if the all the properties in the model are valid
192
+ # @return true if the model is valid
193
+ def valid?
194
+ warn '[DEPRECATED] the `valid?` method is obsolete'
195
+ return false if @payment_channel_id.nil?
196
+ return false if @name.nil?
197
+ return false if @country_code.nil?
198
+ return false if @country_code.to_s.length > 2
199
+ return false if @country_code.to_s.length < 2
200
+ return false if @country_code !~ Regexp.new(/^[A-Z]{2}$/)
201
+ return false if @currency.nil?
202
+ return false if @currency.to_s.length > 3
203
+ return false if @currency.to_s.length < 3
204
+ return false if @currency !~ Regexp.new(/^[A-Z]{3}$/)
205
+ return false if @enabled.nil?
206
+ true
207
+ end
208
+
209
+ # Custom attribute writer method with validation
210
+ # @param [Object] country_code Value to be assigned
211
+ def country_code=(country_code)
212
+ if country_code.nil?
213
+ fail ArgumentError, 'country_code cannot be nil'
214
+ end
215
+
216
+ if country_code.to_s.length > 2
217
+ fail ArgumentError, 'invalid value for "country_code", the character length must be smaller than or equal to 2.'
218
+ end
219
+
220
+ if country_code.to_s.length < 2
221
+ fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 2.'
222
+ end
223
+
224
+ pattern = Regexp.new(/^[A-Z]{2}$/)
225
+ if country_code !~ pattern
226
+ fail ArgumentError, "invalid value for \"country_code\", must conform to the pattern #{pattern}."
227
+ end
228
+
229
+ @country_code = country_code
230
+ end
231
+
232
+ # Custom attribute writer method with validation
233
+ # @param [Object] currency Value to be assigned
234
+ def currency=(currency)
235
+ if currency.nil?
236
+ fail ArgumentError, 'currency cannot be nil'
237
+ end
238
+
239
+ if currency.to_s.length > 3
240
+ fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
241
+ end
242
+
243
+ if currency.to_s.length < 3
244
+ fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
245
+ end
246
+
247
+ pattern = Regexp.new(/^[A-Z]{3}$/)
248
+ if currency !~ pattern
249
+ fail ArgumentError, "invalid value for \"currency\", must conform to the pattern #{pattern}."
250
+ end
251
+
252
+ @currency = currency
253
+ end
254
+
255
+ # Checks equality by comparing each attribute.
256
+ # @param [Object] Object to be compared
257
+ def ==(o)
258
+ return true if self.equal?(o)
259
+ self.class == o.class &&
260
+ payment_channel_id == o.payment_channel_id &&
261
+ name == o.name &&
262
+ country_code == o.country_code &&
263
+ currency == o.currency &&
264
+ last4_digits == o.last4_digits &&
265
+ enabled == o.enabled &&
266
+ disabled_reason == o.disabled_reason &&
267
+ disabled_reason_code == o.disabled_reason_code
268
+ end
269
+
270
+ # @see the `==` method
271
+ # @param [Object] Object to be compared
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculates hash code according to all attributes.
277
+ # @return [Integer] Hash code
278
+ def hash
279
+ [payment_channel_id, name, country_code, currency, last4_digits, enabled, disabled_reason, disabled_reason_code].hash
280
+ end
281
+
282
+ # Builds the object from hash
283
+ # @param [Hash] attributes Model attributes in the form of hash
284
+ # @return [Object] Returns the model itself
285
+ def self.build_from_hash(attributes)
286
+ return nil unless attributes.is_a?(Hash)
287
+ attributes = attributes.transform_keys(&:to_sym)
288
+ transformed_hash = {}
289
+ openapi_types.each_pair do |key, type|
290
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
291
+ transformed_hash["#{key}"] = nil
292
+ elsif type =~ /\AArray<(.*)>/i
293
+ # check to ensure the input is an array given that the attribute
294
+ # is documented as an array but the input is not
295
+ if attributes[attribute_map[key]].is_a?(Array)
296
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
297
+ end
298
+ elsif !attributes[attribute_map[key]].nil?
299
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
300
+ end
301
+ end
302
+ new(transformed_hash)
303
+ end
304
+
305
+ # Deserializes the data based on type
306
+ # @param string type Data type
307
+ # @param string value Value to be deserialized
308
+ # @return [Object] Deserialized data
309
+ def self._deserialize(type, value)
310
+ case type.to_sym
311
+ when :Time
312
+ Time.parse(value)
313
+ when :Date
314
+ Date.parse(value)
315
+ when :String
316
+ value.to_s
317
+ when :Integer
318
+ value.to_i
319
+ when :Float
320
+ value.to_f
321
+ when :Boolean
322
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
323
+ true
324
+ else
325
+ false
326
+ end
327
+ when :Object
328
+ # generic object (usually a Hash), return directly
329
+ value
330
+ when /\AArray<(?<inner_type>.+)>\z/
331
+ inner_type = Regexp.last_match[:inner_type]
332
+ value.map { |v| _deserialize(inner_type, v) }
333
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
334
+ k_type = Regexp.last_match[:k_type]
335
+ v_type = Regexp.last_match[:v_type]
336
+ {}.tap do |hash|
337
+ value.each do |k, v|
338
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
339
+ end
340
+ end
341
+ else # model
342
+ # models (e.g. Pet) or oneOf
343
+ klass = VeloPayments.const_get(type)
344
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
345
+ end
346
+ end
347
+
348
+ # Returns the string representation of the object
349
+ # @return [String] String presentation of the object
350
+ def to_s
351
+ to_hash.to_s
352
+ end
353
+
354
+ # to_body is an alias to to_hash (backward compatibility)
355
+ # @return [Hash] Returns the object in the form of hash
356
+ def to_body
357
+ to_hash
358
+ end
359
+
360
+ # Returns the object in the form of hash
361
+ # @return [Hash] Returns the object in the form of hash
362
+ def to_hash
363
+ hash = {}
364
+ self.class.attribute_map.each_pair do |attr, param|
365
+ value = self.send(attr)
366
+ if value.nil?
367
+ is_nullable = self.class.openapi_nullable.include?(attr)
368
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
369
+ end
370
+
371
+ hash[param] = _to_hash(value)
372
+ end
373
+ hash
374
+ end
375
+
376
+ # Outputs non-array value in the form of hash
377
+ # For object, use to_hash. Otherwise, just return the value
378
+ # @param [Object] value Any valid value
379
+ # @return [Hash] Returns the value in the form of hash
380
+ def _to_hash(value)
381
+ if value.is_a?(Array)
382
+ value.compact.map { |v| _to_hash(v) }
383
+ elsif value.is_a?(Hash)
384
+ {}.tap do |hash|
385
+ value.each { |k, v| hash[k] = _to_hash(v) }
386
+ end
387
+ elsif value.respond_to? :to_hash
388
+ value.to_hash
389
+ else
390
+ value
391
+ end
392
+ end
393
+
394
+ end
395
+
396
+ end
@@ -0,0 +1,227 @@
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 PaymentChannelsResponseV4
18
+ attr_accessor :payment_channels
19
+
20
+ attr_accessor :payor_to_payment_channel_mappings
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'payment_channels' => :'paymentChannels',
26
+ :'payor_to_payment_channel_mappings' => :'payorToPaymentChannelMappings'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'payment_channels' => :'Array<PaymentChannelResponseV4>',
39
+ :'payor_to_payment_channel_mappings' => :'Array<PayorToPaymentChannelMappingV4>'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VeloPayments::PaymentChannelsResponseV4` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VeloPayments::PaymentChannelsResponseV4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'payment_channels')
65
+ if (value = attributes[:'payment_channels']).is_a?(Array)
66
+ self.payment_channels = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'payor_to_payment_channel_mappings')
71
+ if (value = attributes[:'payor_to_payment_channel_mappings']).is_a?(Array)
72
+ self.payor_to_payment_channel_mappings = value
73
+ end
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
+ invalid_properties = Array.new
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ payment_channels == o.payment_channels &&
98
+ payor_to_payment_channel_mappings == o.payor_to_payment_channel_mappings
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ def hash
110
+ [payment_channels, payor_to_payment_channel_mappings].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def self.build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ attributes = attributes.transform_keys(&:to_sym)
119
+ transformed_hash = {}
120
+ openapi_types.each_pair do |key, type|
121
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
122
+ transformed_hash["#{key}"] = nil
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[attribute_map[key]].is_a?(Array)
127
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
+ end
129
+ elsif !attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
+ end
132
+ end
133
+ new(transformed_hash)
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def self._deserialize(type, value)
141
+ case type.to_sym
142
+ when :Time
143
+ Time.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ # models (e.g. Pet) or oneOf
174
+ klass = VeloPayments.const_get(type)
175
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+
227
+ end