up_banking 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (325) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +219 -0
  4. data/Rakefile +10 -0
  5. data/config.json +11 -0
  6. data/docs/AccountResource.md +26 -0
  7. data/docs/AccountResourceAttributes.md +26 -0
  8. data/docs/AccountResourceAttributesBalance.md +22 -0
  9. data/docs/AccountResourceLinks.md +18 -0
  10. data/docs/AccountResourceRelationships.md +18 -0
  11. data/docs/AccountResourceRelationshipsTransactions.md +18 -0
  12. data/docs/AccountResourceRelationshipsTransactionsLinks.md +18 -0
  13. data/docs/AccountTypeEnum.md +15 -0
  14. data/docs/AccountsApi.md +153 -0
  15. data/docs/CashbackObject.md +20 -0
  16. data/docs/CashbackObjectAmount.md +22 -0
  17. data/docs/CategoriesApi.md +222 -0
  18. data/docs/CategoryInputResourceIdentifier.md +20 -0
  19. data/docs/CategoryResource.md +26 -0
  20. data/docs/CategoryResourceAttributes.md +18 -0
  21. data/docs/CategoryResourceRelationships.md +20 -0
  22. data/docs/CategoryResourceRelationshipsChildren.md +20 -0
  23. data/docs/CategoryResourceRelationshipsChildrenDataInner.md +20 -0
  24. data/docs/CategoryResourceRelationshipsParent.md +20 -0
  25. data/docs/CategoryResourceRelationshipsParentData.md +20 -0
  26. data/docs/CreateWebhookRequest.md +18 -0
  27. data/docs/CreateWebhookRequestData.md +18 -0
  28. data/docs/CreateWebhookResponse.md +18 -0
  29. data/docs/CreateWebhookResponseData.md +26 -0
  30. data/docs/ErrorObject.md +24 -0
  31. data/docs/ErrorObjectSource.md +20 -0
  32. data/docs/ErrorResponse.md +18 -0
  33. data/docs/GetAccountResponse.md +18 -0
  34. data/docs/GetAccountResponseData.md +26 -0
  35. data/docs/GetCategoryResponse.md +18 -0
  36. data/docs/GetCategoryResponseData.md +26 -0
  37. data/docs/GetTransactionResponse.md +18 -0
  38. data/docs/GetTransactionResponseData.md +26 -0
  39. data/docs/GetWebhookResponse.md +18 -0
  40. data/docs/GetWebhookResponseData.md +26 -0
  41. data/docs/HoldInfoObject.md +20 -0
  42. data/docs/HoldInfoObjectAmount.md +22 -0
  43. data/docs/HoldInfoObjectForeignAmount.md +22 -0
  44. data/docs/ListAccountsResponse.md +20 -0
  45. data/docs/ListAccountsResponseLinks.md +20 -0
  46. data/docs/ListCategoriesResponse.md +18 -0
  47. data/docs/ListTagsResponse.md +20 -0
  48. data/docs/ListTransactionsResponse.md +20 -0
  49. data/docs/ListWebhookDeliveryLogsResponse.md +20 -0
  50. data/docs/ListWebhooksResponse.md +20 -0
  51. data/docs/MoneyObject.md +22 -0
  52. data/docs/OwnershipTypeEnum.md +15 -0
  53. data/docs/PingResponse.md +18 -0
  54. data/docs/PingResponseMeta.md +20 -0
  55. data/docs/RoundUpObject.md +20 -0
  56. data/docs/RoundUpObjectAmount.md +22 -0
  57. data/docs/RoundUpObjectBoostPortion.md +22 -0
  58. data/docs/TagInputResourceIdentifier.md +20 -0
  59. data/docs/TagResource.md +22 -0
  60. data/docs/TagsApi.md +225 -0
  61. data/docs/TransactionResource.md +26 -0
  62. data/docs/TransactionResourceAttributes.md +40 -0
  63. data/docs/TransactionResourceAttributesAmount.md +22 -0
  64. data/docs/TransactionResourceAttributesCashback.md +20 -0
  65. data/docs/TransactionResourceAttributesForeignAmount.md +22 -0
  66. data/docs/TransactionResourceAttributesHoldInfo.md +20 -0
  67. data/docs/TransactionResourceAttributesRoundUp.md +20 -0
  68. data/docs/TransactionResourceRelationships.md +26 -0
  69. data/docs/TransactionResourceRelationshipsAccount.md +20 -0
  70. data/docs/TransactionResourceRelationshipsAccountData.md +20 -0
  71. data/docs/TransactionResourceRelationshipsCategory.md +20 -0
  72. data/docs/TransactionResourceRelationshipsCategoryLinks.md +20 -0
  73. data/docs/TransactionResourceRelationshipsTags.md +20 -0
  74. data/docs/TransactionResourceRelationshipsTagsDataInner.md +20 -0
  75. data/docs/TransactionResourceRelationshipsTagsLinks.md +18 -0
  76. data/docs/TransactionResourceRelationshipsTransferAccount.md +20 -0
  77. data/docs/TransactionResourceRelationshipsTransferAccountData.md +20 -0
  78. data/docs/TransactionStatusEnum.md +15 -0
  79. data/docs/TransactionsApi.md +243 -0
  80. data/docs/UpdateTransactionCategoryRequest.md +18 -0
  81. data/docs/UpdateTransactionCategoryRequestData.md +20 -0
  82. data/docs/UpdateTransactionTagsRequest.md +18 -0
  83. data/docs/UtilityEndpointsApi.md +74 -0
  84. data/docs/WebhookDeliveryLogResource.md +24 -0
  85. data/docs/WebhookDeliveryLogResourceAttributes.md +24 -0
  86. data/docs/WebhookDeliveryLogResourceAttributesRequest.md +18 -0
  87. data/docs/WebhookDeliveryLogResourceAttributesResponse.md +20 -0
  88. data/docs/WebhookDeliveryLogResourceRelationships.md +18 -0
  89. data/docs/WebhookDeliveryLogResourceRelationshipsWebhookEvent.md +18 -0
  90. data/docs/WebhookDeliveryLogResourceRelationshipsWebhookEventData.md +20 -0
  91. data/docs/WebhookDeliveryStatusEnum.md +15 -0
  92. data/docs/WebhookEventCallback.md +18 -0
  93. data/docs/WebhookEventCallbackData.md +24 -0
  94. data/docs/WebhookEventResource.md +24 -0
  95. data/docs/WebhookEventResourceAttributes.md +20 -0
  96. data/docs/WebhookEventResourceRelationships.md +20 -0
  97. data/docs/WebhookEventResourceRelationshipsTransaction.md +20 -0
  98. data/docs/WebhookEventResourceRelationshipsTransactionData.md +20 -0
  99. data/docs/WebhookEventResourceRelationshipsWebhook.md +20 -0
  100. data/docs/WebhookEventResourceRelationshipsWebhookData.md +20 -0
  101. data/docs/WebhookEventTypeEnum.md +15 -0
  102. data/docs/WebhookInputResource.md +18 -0
  103. data/docs/WebhookInputResourceAttributes.md +20 -0
  104. data/docs/WebhookResource.md +26 -0
  105. data/docs/WebhookResourceAttributes.md +24 -0
  106. data/docs/WebhookResourceRelationships.md +18 -0
  107. data/docs/WebhooksApi.md +434 -0
  108. data/git_push.sh +57 -0
  109. data/lib/.DS_Store +0 -0
  110. data/lib/up_banking/.DS_Store +0 -0
  111. data/lib/up_banking/api/accounts_api.rb +151 -0
  112. data/lib/up_banking/api/categories_api.rb +213 -0
  113. data/lib/up_banking/api/tags_api.rb +218 -0
  114. data/lib/up_banking/api/transactions_api.rb +241 -0
  115. data/lib/up_banking/api/utility_endpoints_api.rb +79 -0
  116. data/lib/up_banking/api/webhooks_api.rb +399 -0
  117. data/lib/up_banking/api_client.rb +392 -0
  118. data/lib/up_banking/api_error.rb +57 -0
  119. data/lib/up_banking/configuration.rb +279 -0
  120. data/lib/up_banking/models/account_resource.rb +278 -0
  121. data/lib/up_banking/models/account_resource_attributes.rb +284 -0
  122. data/lib/up_banking/models/account_resource_attributes_balance.rb +263 -0
  123. data/lib/up_banking/models/account_resource_links.rb +225 -0
  124. data/lib/up_banking/models/account_resource_relationships.rb +224 -0
  125. data/lib/up_banking/models/account_resource_relationships_transactions.rb +219 -0
  126. data/lib/up_banking/models/account_resource_relationships_transactions_links.rb +225 -0
  127. data/lib/up_banking/models/account_type_enum.rb +40 -0
  128. data/lib/up_banking/models/cashback_object.rb +240 -0
  129. data/lib/up_banking/models/cashback_object_amount.rb +263 -0
  130. data/lib/up_banking/models/category_input_resource_identifier.rb +241 -0
  131. data/lib/up_banking/models/category_resource.rb +278 -0
  132. data/lib/up_banking/models/category_resource_attributes.rb +225 -0
  133. data/lib/up_banking/models/category_resource_relationships.rb +238 -0
  134. data/lib/up_banking/models/category_resource_relationships_children.rb +235 -0
  135. data/lib/up_banking/models/category_resource_relationships_children_data_inner.rb +240 -0
  136. data/lib/up_banking/models/category_resource_relationships_parent.rb +229 -0
  137. data/lib/up_banking/models/category_resource_relationships_parent_data.rb +240 -0
  138. data/lib/up_banking/models/create_webhook_request.rb +225 -0
  139. data/lib/up_banking/models/create_webhook_request_data.rb +232 -0
  140. data/lib/up_banking/models/create_webhook_response.rb +225 -0
  141. data/lib/up_banking/models/create_webhook_response_data.rb +285 -0
  142. data/lib/up_banking/models/error_object.rb +265 -0
  143. data/lib/up_banking/models/error_object_source.rb +231 -0
  144. data/lib/up_banking/models/error_response.rb +228 -0
  145. data/lib/up_banking/models/get_account_response.rb +225 -0
  146. data/lib/up_banking/models/get_account_response_data.rb +285 -0
  147. data/lib/up_banking/models/get_category_response.rb +225 -0
  148. data/lib/up_banking/models/get_category_response_data.rb +285 -0
  149. data/lib/up_banking/models/get_transaction_response.rb +225 -0
  150. data/lib/up_banking/models/get_transaction_response_data.rb +285 -0
  151. data/lib/up_banking/models/get_webhook_response.rb +225 -0
  152. data/lib/up_banking/models/get_webhook_response_data.rb +285 -0
  153. data/lib/up_banking/models/hold_info_object.rb +235 -0
  154. data/lib/up_banking/models/hold_info_object_amount.rb +263 -0
  155. data/lib/up_banking/models/hold_info_object_foreign_amount.rb +263 -0
  156. data/lib/up_banking/models/list_accounts_response.rb +242 -0
  157. data/lib/up_banking/models/list_accounts_response_links.rb +232 -0
  158. data/lib/up_banking/models/list_categories_response.rb +228 -0
  159. data/lib/up_banking/models/list_tags_response.rb +242 -0
  160. data/lib/up_banking/models/list_transactions_response.rb +242 -0
  161. data/lib/up_banking/models/list_webhook_delivery_logs_response.rb +242 -0
  162. data/lib/up_banking/models/list_webhooks_response.rb +242 -0
  163. data/lib/up_banking/models/money_object.rb +256 -0
  164. data/lib/up_banking/models/ownership_type_enum.rb +40 -0
  165. data/lib/up_banking/models/ping_response.rb +225 -0
  166. data/lib/up_banking/models/ping_response_meta.rb +240 -0
  167. data/lib/up_banking/models/round_up_object.rb +235 -0
  168. data/lib/up_banking/models/round_up_object_amount.rb +263 -0
  169. data/lib/up_banking/models/round_up_object_boost_portion.rb +263 -0
  170. data/lib/up_banking/models/tag_input_resource_identifier.rb +241 -0
  171. data/lib/up_banking/models/tag_resource.rb +255 -0
  172. data/lib/up_banking/models/transaction_resource.rb +277 -0
  173. data/lib/up_banking/models/transaction_resource_attributes.rb +357 -0
  174. data/lib/up_banking/models/transaction_resource_attributes_amount.rb +263 -0
  175. data/lib/up_banking/models/transaction_resource_attributes_cashback.rb +247 -0
  176. data/lib/up_banking/models/transaction_resource_attributes_foreign_amount.rb +263 -0
  177. data/lib/up_banking/models/transaction_resource_attributes_hold_info.rb +242 -0
  178. data/lib/up_banking/models/transaction_resource_attributes_round_up.rb +242 -0
  179. data/lib/up_banking/models/transaction_resource_relationships.rb +280 -0
  180. data/lib/up_banking/models/transaction_resource_relationships_account.rb +233 -0
  181. data/lib/up_banking/models/transaction_resource_relationships_account_data.rb +240 -0
  182. data/lib/up_banking/models/transaction_resource_relationships_category.rb +229 -0
  183. data/lib/up_banking/models/transaction_resource_relationships_category_links.rb +235 -0
  184. data/lib/up_banking/models/transaction_resource_relationships_tags.rb +235 -0
  185. data/lib/up_banking/models/transaction_resource_relationships_tags_data_inner.rb +240 -0
  186. data/lib/up_banking/models/transaction_resource_relationships_tags_links.rb +225 -0
  187. data/lib/up_banking/models/transaction_resource_relationships_transfer_account.rb +230 -0
  188. data/lib/up_banking/models/transaction_resource_relationships_transfer_account_data.rb +240 -0
  189. data/lib/up_banking/models/transaction_status_enum.rb +40 -0
  190. data/lib/up_banking/models/update_transaction_category_request.rb +221 -0
  191. data/lib/up_banking/models/update_transaction_category_request_data.rb +248 -0
  192. data/lib/up_banking/models/update_transaction_tags_request.rb +228 -0
  193. data/lib/up_banking/models/webhook_delivery_log_resource.rb +269 -0
  194. data/lib/up_banking/models/webhook_delivery_log_resource_attributes.rb +264 -0
  195. data/lib/up_banking/models/webhook_delivery_log_resource_attributes_request.rb +226 -0
  196. data/lib/up_banking/models/webhook_delivery_log_resource_attributes_response.rb +241 -0
  197. data/lib/up_banking/models/webhook_delivery_log_resource_relationships.rb +224 -0
  198. data/lib/up_banking/models/webhook_delivery_log_resource_relationships_webhook_event.rb +224 -0
  199. data/lib/up_banking/models/webhook_delivery_log_resource_relationships_webhook_event_data.rb +240 -0
  200. data/lib/up_banking/models/webhook_delivery_status_enum.rb +41 -0
  201. data/lib/up_banking/models/webhook_event_callback.rb +225 -0
  202. data/lib/up_banking/models/webhook_event_callback_data.rb +276 -0
  203. data/lib/up_banking/models/webhook_event_resource.rb +269 -0
  204. data/lib/up_banking/models/webhook_event_resource_attributes.rb +240 -0
  205. data/lib/up_banking/models/webhook_event_resource_relationships.rb +233 -0
  206. data/lib/up_banking/models/webhook_event_resource_relationships_transaction.rb +233 -0
  207. data/lib/up_banking/models/webhook_event_resource_relationships_transaction_data.rb +240 -0
  208. data/lib/up_banking/models/webhook_event_resource_relationships_webhook.rb +233 -0
  209. data/lib/up_banking/models/webhook_event_resource_relationships_webhook_data.rb +240 -0
  210. data/lib/up_banking/models/webhook_event_type_enum.rb +42 -0
  211. data/lib/up_banking/models/webhook_input_resource.rb +225 -0
  212. data/lib/up_banking/models/webhook_input_resource_attributes.rb +236 -0
  213. data/lib/up_banking/models/webhook_resource.rb +278 -0
  214. data/lib/up_banking/models/webhook_resource_attributes.rb +261 -0
  215. data/lib/up_banking/models/webhook_resource_relationships.rb +224 -0
  216. data/lib/up_banking/version.rb +15 -0
  217. data/lib/up_banking.rb +141 -0
  218. data/spec/.DS_Store +0 -0
  219. data/spec/api/accounts_api_spec.rb +61 -0
  220. data/spec/api/categories_api_spec.rb +72 -0
  221. data/spec/api/tags_api_spec.rb +73 -0
  222. data/spec/api/transactions_api_spec.rb +82 -0
  223. data/spec/api/utility_endpoints_api_spec.rb +46 -0
  224. data/spec/api/webhooks_api_spec.rb +108 -0
  225. data/spec/api_client_spec.rb +226 -0
  226. data/spec/configuration_spec.rb +42 -0
  227. data/spec/models/account_resource_attributes_balance_spec.rb +46 -0
  228. data/spec/models/account_resource_attributes_spec.rb +58 -0
  229. data/spec/models/account_resource_links_spec.rb +34 -0
  230. data/spec/models/account_resource_relationships_spec.rb +34 -0
  231. data/spec/models/account_resource_relationships_transactions_links_spec.rb +34 -0
  232. data/spec/models/account_resource_relationships_transactions_spec.rb +34 -0
  233. data/spec/models/account_resource_spec.rb +58 -0
  234. data/spec/models/account_type_enum_spec.rb +28 -0
  235. data/spec/models/cashback_object_amount_spec.rb +46 -0
  236. data/spec/models/cashback_object_spec.rb +40 -0
  237. data/spec/models/category_input_resource_identifier_spec.rb +40 -0
  238. data/spec/models/category_resource_attributes_spec.rb +34 -0
  239. data/spec/models/category_resource_relationships_children_data_inner_spec.rb +40 -0
  240. data/spec/models/category_resource_relationships_children_spec.rb +40 -0
  241. data/spec/models/category_resource_relationships_parent_data_spec.rb +40 -0
  242. data/spec/models/category_resource_relationships_parent_spec.rb +40 -0
  243. data/spec/models/category_resource_relationships_spec.rb +40 -0
  244. data/spec/models/category_resource_spec.rb +58 -0
  245. data/spec/models/create_webhook_request_data_spec.rb +34 -0
  246. data/spec/models/create_webhook_request_spec.rb +34 -0
  247. data/spec/models/create_webhook_response_data_spec.rb +58 -0
  248. data/spec/models/create_webhook_response_spec.rb +34 -0
  249. data/spec/models/error_object_source_spec.rb +40 -0
  250. data/spec/models/error_object_spec.rb +52 -0
  251. data/spec/models/error_response_spec.rb +34 -0
  252. data/spec/models/get_account_response_data_spec.rb +58 -0
  253. data/spec/models/get_account_response_spec.rb +34 -0
  254. data/spec/models/get_category_response_data_spec.rb +58 -0
  255. data/spec/models/get_category_response_spec.rb +34 -0
  256. data/spec/models/get_transaction_response_data_spec.rb +58 -0
  257. data/spec/models/get_transaction_response_spec.rb +34 -0
  258. data/spec/models/get_webhook_response_data_spec.rb +58 -0
  259. data/spec/models/get_webhook_response_spec.rb +34 -0
  260. data/spec/models/hold_info_object_amount_spec.rb +46 -0
  261. data/spec/models/hold_info_object_foreign_amount_spec.rb +46 -0
  262. data/spec/models/hold_info_object_spec.rb +40 -0
  263. data/spec/models/list_accounts_response_links_spec.rb +40 -0
  264. data/spec/models/list_accounts_response_spec.rb +40 -0
  265. data/spec/models/list_categories_response_spec.rb +34 -0
  266. data/spec/models/list_tags_response_spec.rb +40 -0
  267. data/spec/models/list_transactions_response_spec.rb +40 -0
  268. data/spec/models/list_webhook_delivery_logs_response_spec.rb +40 -0
  269. data/spec/models/list_webhooks_response_spec.rb +40 -0
  270. data/spec/models/money_object_spec.rb +46 -0
  271. data/spec/models/ownership_type_enum_spec.rb +28 -0
  272. data/spec/models/ping_response_meta_spec.rb +40 -0
  273. data/spec/models/ping_response_spec.rb +34 -0
  274. data/spec/models/round_up_object_amount_spec.rb +46 -0
  275. data/spec/models/round_up_object_boost_portion_spec.rb +46 -0
  276. data/spec/models/round_up_object_spec.rb +40 -0
  277. data/spec/models/tag_input_resource_identifier_spec.rb +40 -0
  278. data/spec/models/tag_resource_spec.rb +46 -0
  279. data/spec/models/transaction_resource_attributes_amount_spec.rb +46 -0
  280. data/spec/models/transaction_resource_attributes_cashback_spec.rb +40 -0
  281. data/spec/models/transaction_resource_attributes_foreign_amount_spec.rb +46 -0
  282. data/spec/models/transaction_resource_attributes_hold_info_spec.rb +40 -0
  283. data/spec/models/transaction_resource_attributes_round_up_spec.rb +40 -0
  284. data/spec/models/transaction_resource_attributes_spec.rb +100 -0
  285. data/spec/models/transaction_resource_relationships_account_data_spec.rb +40 -0
  286. data/spec/models/transaction_resource_relationships_account_spec.rb +40 -0
  287. data/spec/models/transaction_resource_relationships_category_links_spec.rb +40 -0
  288. data/spec/models/transaction_resource_relationships_category_spec.rb +40 -0
  289. data/spec/models/transaction_resource_relationships_spec.rb +58 -0
  290. data/spec/models/transaction_resource_relationships_tags_data_inner_spec.rb +40 -0
  291. data/spec/models/transaction_resource_relationships_tags_links_spec.rb +34 -0
  292. data/spec/models/transaction_resource_relationships_tags_spec.rb +40 -0
  293. data/spec/models/transaction_resource_relationships_transfer_account_data_spec.rb +40 -0
  294. data/spec/models/transaction_resource_relationships_transfer_account_spec.rb +40 -0
  295. data/spec/models/transaction_resource_spec.rb +58 -0
  296. data/spec/models/transaction_status_enum_spec.rb +28 -0
  297. data/spec/models/update_transaction_category_request_data_spec.rb +40 -0
  298. data/spec/models/update_transaction_category_request_spec.rb +34 -0
  299. data/spec/models/update_transaction_tags_request_spec.rb +34 -0
  300. data/spec/models/webhook_delivery_log_resource_attributes_request_spec.rb +34 -0
  301. data/spec/models/webhook_delivery_log_resource_attributes_response_spec.rb +40 -0
  302. data/spec/models/webhook_delivery_log_resource_attributes_spec.rb +52 -0
  303. data/spec/models/webhook_delivery_log_resource_relationships_spec.rb +34 -0
  304. data/spec/models/webhook_delivery_log_resource_relationships_webhook_event_data_spec.rb +40 -0
  305. data/spec/models/webhook_delivery_log_resource_relationships_webhook_event_spec.rb +34 -0
  306. data/spec/models/webhook_delivery_log_resource_spec.rb +52 -0
  307. data/spec/models/webhook_delivery_status_enum_spec.rb +28 -0
  308. data/spec/models/webhook_event_callback_data_spec.rb +52 -0
  309. data/spec/models/webhook_event_callback_spec.rb +34 -0
  310. data/spec/models/webhook_event_resource_attributes_spec.rb +40 -0
  311. data/spec/models/webhook_event_resource_relationships_spec.rb +40 -0
  312. data/spec/models/webhook_event_resource_relationships_transaction_data_spec.rb +40 -0
  313. data/spec/models/webhook_event_resource_relationships_transaction_spec.rb +40 -0
  314. data/spec/models/webhook_event_resource_relationships_webhook_data_spec.rb +40 -0
  315. data/spec/models/webhook_event_resource_relationships_webhook_spec.rb +40 -0
  316. data/spec/models/webhook_event_resource_spec.rb +52 -0
  317. data/spec/models/webhook_event_type_enum_spec.rb +28 -0
  318. data/spec/models/webhook_input_resource_attributes_spec.rb +40 -0
  319. data/spec/models/webhook_input_resource_spec.rb +34 -0
  320. data/spec/models/webhook_resource_attributes_spec.rb +52 -0
  321. data/spec/models/webhook_resource_relationships_spec.rb +34 -0
  322. data/spec/models/webhook_resource_spec.rb +58 -0
  323. data/spec/spec_helper.rb +111 -0
  324. data/up_banking.gemspec +38 -0
  325. metadata +511 -0
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #Up API
3
+
4
+ #The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning.
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module UpBankingClient
16
+ class UtilityEndpointsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Ping
23
+ # Make a basic ping request to the API. This is useful to verify that authentication is functioning correctly. On authentication success an HTTP `200` status is returned. On failure an HTTP `401` error response is returned.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [PingResponse]
26
+ def util_ping_get(opts = {})
27
+ data, _status_code, _headers = util_ping_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Ping
32
+ # Make a basic ping request to the API. This is useful to verify that authentication is functioning correctly. On authentication success an HTTP `200` status is returned. On failure an HTTP `401` error response is returned.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(PingResponse, Integer, Hash)>] PingResponse data, response status code and response headers
35
+ def util_ping_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: UtilityEndpointsApi.util_ping_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/util/ping'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'PingResponse'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"UtilityEndpointsApi.util_ping_get",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: UtilityEndpointsApi#util_ping_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,399 @@
1
+ =begin
2
+ #Up API
3
+
4
+ #The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning.
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module UpBankingClient
16
+ class WebhooksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List webhooks
23
+ # Retrieve a list of configured webhooks. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. Results are ordered oldest first to newest last.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :page_size The number of records to return in each page.
26
+ # @return [ListWebhooksResponse]
27
+ def webhooks_get(opts = {})
28
+ data, _status_code, _headers = webhooks_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # List webhooks
33
+ # Retrieve a list of configured webhooks. The returned list is [paginated](#pagination) and can be scrolled by following the &#x60;next&#x60; and &#x60;prev&#x60; links where present. Results are ordered oldest first to newest last.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [Integer] :page_size The number of records to return in each page.
36
+ # @return [Array<(ListWebhooksResponse, Integer, Hash)>] ListWebhooksResponse data, response status code and response headers
37
+ def webhooks_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/webhooks'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
47
+
48
+ # header parameters
49
+ header_params = opts[:header_params] || {}
50
+ # HTTP header 'Accept' (if needed)
51
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:debug_body]
58
+
59
+ # return_type
60
+ return_type = opts[:debug_return_type] || 'ListWebhooksResponse'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"WebhooksApi.webhooks_get",
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Delete webhook
83
+ # Delete a specific webhook by providing its unique identifier. Once deleted, webhook events will no longer be sent to the configured URL.
84
+ # @param id [String] The unique identifier for the webhook.
85
+ # @param [Hash] opts the optional parameters
86
+ # @return [nil]
87
+ def webhooks_id_delete(id, opts = {})
88
+ webhooks_id_delete_with_http_info(id, opts)
89
+ nil
90
+ end
91
+
92
+ # Delete webhook
93
+ # Delete a specific webhook by providing its unique identifier. Once deleted, webhook events will no longer be sent to the configured URL.
94
+ # @param id [String] The unique identifier for the webhook.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
+ def webhooks_id_delete_with_http_info(id, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_id_delete ...'
100
+ end
101
+ # verify the required parameter 'id' is set
102
+ if @api_client.config.client_side_validation && id.nil?
103
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_id_delete"
104
+ end
105
+ # resource path
106
+ local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
107
+
108
+ # query parameters
109
+ query_params = opts[:query_params] || {}
110
+
111
+ # header parameters
112
+ header_params = opts[:header_params] || {}
113
+
114
+ # form parameters
115
+ form_params = opts[:form_params] || {}
116
+
117
+ # http body (model)
118
+ post_body = opts[:debug_body]
119
+
120
+ # return_type
121
+ return_type = opts[:debug_return_type]
122
+
123
+ # auth_names
124
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
125
+
126
+ new_options = opts.merge(
127
+ :operation => :"WebhooksApi.webhooks_id_delete",
128
+ :header_params => header_params,
129
+ :query_params => query_params,
130
+ :form_params => form_params,
131
+ :body => post_body,
132
+ :auth_names => auth_names,
133
+ :return_type => return_type
134
+ )
135
+
136
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+
143
+ # Retrieve webhook
144
+ # Retrieve a specific webhook by providing its unique identifier.
145
+ # @param id [String] The unique identifier for the webhook.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [GetWebhookResponse]
148
+ def webhooks_id_get(id, opts = {})
149
+ data, _status_code, _headers = webhooks_id_get_with_http_info(id, opts)
150
+ data
151
+ end
152
+
153
+ # Retrieve webhook
154
+ # Retrieve a specific webhook by providing its unique identifier.
155
+ # @param id [String] The unique identifier for the webhook.
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [Array<(GetWebhookResponse, Integer, Hash)>] GetWebhookResponse data, response status code and response headers
158
+ def webhooks_id_get_with_http_info(id, opts = {})
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_id_get ...'
161
+ end
162
+ # verify the required parameter 'id' is set
163
+ if @api_client.config.client_side_validation && id.nil?
164
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_id_get"
165
+ end
166
+ # resource path
167
+ local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
168
+
169
+ # query parameters
170
+ query_params = opts[:query_params] || {}
171
+
172
+ # header parameters
173
+ header_params = opts[:header_params] || {}
174
+ # HTTP header 'Accept' (if needed)
175
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
176
+
177
+ # form parameters
178
+ form_params = opts[:form_params] || {}
179
+
180
+ # http body (model)
181
+ post_body = opts[:debug_body]
182
+
183
+ # return_type
184
+ return_type = opts[:debug_return_type] || 'GetWebhookResponse'
185
+
186
+ # auth_names
187
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
188
+
189
+ new_options = opts.merge(
190
+ :operation => :"WebhooksApi.webhooks_id_get",
191
+ :header_params => header_params,
192
+ :query_params => query_params,
193
+ :form_params => form_params,
194
+ :body => post_body,
195
+ :auth_names => auth_names,
196
+ :return_type => return_type
197
+ )
198
+
199
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+
206
+ # Create webhook
207
+ # Create a new webhook with a given URL. The URL will receive webhook events as JSON-encoded `POST` requests. The URL must respond with a HTTP `200` status on success. There is currently a limit of 10 webhooks at any given time. Once this limit is reached, existing webhooks will need to be deleted before new webhooks can be created. Event delivery is retried with exponential backoff if the URL is unreachable or it does not respond with a `200` status. The response includes a `secretKey` attribute, which is used to sign requests sent to the webhook URL. It will not be returned from any other endpoints within the Up API. If the `secretKey` is lost, simply create a new webhook with the same URL, capture its `secretKey` and then delete the original webhook. See [Handling webhook events](#callback_post_webhookURL) for details on how to process webhook events. It is probably a good idea to test the webhook by [sending it a `PING` event](#post_webhooks_webhookId_ping) after creating it.
208
+ # @param [Hash] opts the optional parameters
209
+ # @option opts [CreateWebhookRequest] :create_webhook_request
210
+ # @return [CreateWebhookResponse]
211
+ def webhooks_post(opts = {})
212
+ data, _status_code, _headers = webhooks_post_with_http_info(opts)
213
+ data
214
+ end
215
+
216
+ # Create webhook
217
+ # Create a new webhook with a given URL. The URL will receive webhook events as JSON-encoded &#x60;POST&#x60; requests. The URL must respond with a HTTP &#x60;200&#x60; status on success. There is currently a limit of 10 webhooks at any given time. Once this limit is reached, existing webhooks will need to be deleted before new webhooks can be created. Event delivery is retried with exponential backoff if the URL is unreachable or it does not respond with a &#x60;200&#x60; status. The response includes a &#x60;secretKey&#x60; attribute, which is used to sign requests sent to the webhook URL. It will not be returned from any other endpoints within the Up API. If the &#x60;secretKey&#x60; is lost, simply create a new webhook with the same URL, capture its &#x60;secretKey&#x60; and then delete the original webhook. See [Handling webhook events](#callback_post_webhookURL) for details on how to process webhook events. It is probably a good idea to test the webhook by [sending it a &#x60;PING&#x60; event](#post_webhooks_webhookId_ping) after creating it.
218
+ # @param [Hash] opts the optional parameters
219
+ # @option opts [CreateWebhookRequest] :create_webhook_request
220
+ # @return [Array<(CreateWebhookResponse, Integer, Hash)>] CreateWebhookResponse data, response status code and response headers
221
+ def webhooks_post_with_http_info(opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_post ...'
224
+ end
225
+ # resource path
226
+ local_var_path = '/webhooks'
227
+
228
+ # query parameters
229
+ query_params = opts[:query_params] || {}
230
+
231
+ # header parameters
232
+ header_params = opts[:header_params] || {}
233
+ # HTTP header 'Accept' (if needed)
234
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
235
+ # HTTP header 'Content-Type'
236
+ content_type = @api_client.select_header_content_type(['application/json'])
237
+ if !content_type.nil?
238
+ header_params['Content-Type'] = content_type
239
+ end
240
+
241
+ # form parameters
242
+ form_params = opts[:form_params] || {}
243
+
244
+ # http body (model)
245
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_webhook_request'])
246
+
247
+ # return_type
248
+ return_type = opts[:debug_return_type] || 'CreateWebhookResponse'
249
+
250
+ # auth_names
251
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"WebhooksApi.webhooks_post",
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # List webhook logs
271
+ # Retrieve a list of delivery logs for a webhook by providing its unique identifier. This is useful for analysis and debugging purposes. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. Results are ordered newest first to oldest last. Logs may be automatically purged after a period of time.
272
+ # @param webhook_id [String] The unique identifier for the webhook.
273
+ # @param [Hash] opts the optional parameters
274
+ # @option opts [Integer] :page_size The number of records to return in each page.
275
+ # @return [ListWebhookDeliveryLogsResponse]
276
+ def webhooks_webhook_id_logs_get(webhook_id, opts = {})
277
+ data, _status_code, _headers = webhooks_webhook_id_logs_get_with_http_info(webhook_id, opts)
278
+ data
279
+ end
280
+
281
+ # List webhook logs
282
+ # Retrieve a list of delivery logs for a webhook by providing its unique identifier. This is useful for analysis and debugging purposes. The returned list is [paginated](#pagination) and can be scrolled by following the &#x60;next&#x60; and &#x60;prev&#x60; links where present. Results are ordered newest first to oldest last. Logs may be automatically purged after a period of time.
283
+ # @param webhook_id [String] The unique identifier for the webhook.
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [Integer] :page_size The number of records to return in each page.
286
+ # @return [Array<(ListWebhookDeliveryLogsResponse, Integer, Hash)>] ListWebhookDeliveryLogsResponse data, response status code and response headers
287
+ def webhooks_webhook_id_logs_get_with_http_info(webhook_id, opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_webhook_id_logs_get ...'
290
+ end
291
+ # verify the required parameter 'webhook_id' is set
292
+ if @api_client.config.client_side_validation && webhook_id.nil?
293
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.webhooks_webhook_id_logs_get"
294
+ end
295
+ # resource path
296
+ local_var_path = '/webhooks/{webhookId}/logs'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
301
+
302
+ # header parameters
303
+ header_params = opts[:header_params] || {}
304
+ # HTTP header 'Accept' (if needed)
305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
306
+
307
+ # form parameters
308
+ form_params = opts[:form_params] || {}
309
+
310
+ # http body (model)
311
+ post_body = opts[:debug_body]
312
+
313
+ # return_type
314
+ return_type = opts[:debug_return_type] || 'ListWebhookDeliveryLogsResponse'
315
+
316
+ # auth_names
317
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
318
+
319
+ new_options = opts.merge(
320
+ :operation => :"WebhooksApi.webhooks_webhook_id_logs_get",
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => return_type
327
+ )
328
+
329
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_webhook_id_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
335
+
336
+ # Ping webhook
337
+ # Send a `PING` event to a webhook by providing its unique identifier. This is useful for testing and debugging purposes. The event is delivered asynchronously and its data is returned in the response to this request.
338
+ # @param webhook_id [String] The unique identifier for the webhook.
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [WebhookEventCallback]
341
+ def webhooks_webhook_id_ping_post(webhook_id, opts = {})
342
+ data, _status_code, _headers = webhooks_webhook_id_ping_post_with_http_info(webhook_id, opts)
343
+ data
344
+ end
345
+
346
+ # Ping webhook
347
+ # Send a &#x60;PING&#x60; event to a webhook by providing its unique identifier. This is useful for testing and debugging purposes. The event is delivered asynchronously and its data is returned in the response to this request.
348
+ # @param webhook_id [String] The unique identifier for the webhook.
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [Array<(WebhookEventCallback, Integer, Hash)>] WebhookEventCallback data, response status code and response headers
351
+ def webhooks_webhook_id_ping_post_with_http_info(webhook_id, opts = {})
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_webhook_id_ping_post ...'
354
+ end
355
+ # verify the required parameter 'webhook_id' is set
356
+ if @api_client.config.client_side_validation && webhook_id.nil?
357
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.webhooks_webhook_id_ping_post"
358
+ end
359
+ # resource path
360
+ local_var_path = '/webhooks/{webhookId}/ping'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
361
+
362
+ # query parameters
363
+ query_params = opts[:query_params] || {}
364
+
365
+ # header parameters
366
+ header_params = opts[:header_params] || {}
367
+ # HTTP header 'Accept' (if needed)
368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
369
+
370
+ # form parameters
371
+ form_params = opts[:form_params] || {}
372
+
373
+ # http body (model)
374
+ post_body = opts[:debug_body]
375
+
376
+ # return_type
377
+ return_type = opts[:debug_return_type] || 'WebhookEventCallback'
378
+
379
+ # auth_names
380
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
381
+
382
+ new_options = opts.merge(
383
+ :operation => :"WebhooksApi.webhooks_webhook_id_ping_post",
384
+ :header_params => header_params,
385
+ :query_params => query_params,
386
+ :form_params => form_params,
387
+ :body => post_body,
388
+ :auth_names => auth_names,
389
+ :return_type => return_type
390
+ )
391
+
392
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_webhook_id_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
395
+ end
396
+ return data, status_code, headers
397
+ end
398
+ end
399
+ end