up_banking 1.0.0

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 (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,213 @@
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 CategoriesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List categories
23
+ # Retrieve a list of all categories and their ancestry. The returned list is not paginated.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :filter_parent The unique identifier of a parent category for which to return only its children. Providing an invalid category identifier results in a `404` response.
26
+ # @return [ListCategoriesResponse]
27
+ def categories_get(opts = {})
28
+ data, _status_code, _headers = categories_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # List categories
33
+ # Retrieve a list of all categories and their ancestry. The returned list is not paginated.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :filter_parent The unique identifier of a parent category for which to return only its children. Providing an invalid category identifier results in a `404` response.
36
+ # @return [Array<(ListCategoriesResponse, Integer, Hash)>] ListCategoriesResponse data, response status code and response headers
37
+ def categories_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/categories'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+ query_params[:'filter[parent]'] = opts[:'filter_parent'] if !opts[:'filter_parent'].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] || 'ListCategoriesResponse'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"CategoriesApi.categories_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: CategoriesApi#categories_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Retrieve category
83
+ # Retrieve a specific category by providing its unique identifier.
84
+ # @param id [String] The unique identifier for the category.
85
+ # @param [Hash] opts the optional parameters
86
+ # @return [GetCategoryResponse]
87
+ def categories_id_get(id, opts = {})
88
+ data, _status_code, _headers = categories_id_get_with_http_info(id, opts)
89
+ data
90
+ end
91
+
92
+ # Retrieve category
93
+ # Retrieve a specific category by providing its unique identifier.
94
+ # @param id [String] The unique identifier for the category.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(GetCategoryResponse, Integer, Hash)>] GetCategoryResponse data, response status code and response headers
97
+ def categories_id_get_with_http_info(id, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_id_get ...'
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 CategoriesApi.categories_id_get"
104
+ end
105
+ # resource path
106
+ local_var_path = '/categories/{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
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+
116
+ # form parameters
117
+ form_params = opts[:form_params] || {}
118
+
119
+ # http body (model)
120
+ post_body = opts[:debug_body]
121
+
122
+ # return_type
123
+ return_type = opts[:debug_return_type] || 'GetCategoryResponse'
124
+
125
+ # auth_names
126
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
127
+
128
+ new_options = opts.merge(
129
+ :operation => :"CategoriesApi.categories_id_get",
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => return_type
136
+ )
137
+
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
145
+ # Categorize transaction
146
+ # Updates the category associated with a transaction. Only transactions for which `isCategorizable` is set to true support this operation. The `id` is taken from the list exposed on `/categories` and cannot be one of the top-level (parent) categories. To de-categorize a transaction, set the entire `data` key to `null`. An HTTP `204` is returned on success. The associated category, along with its request URL is also exposed via the `category` relationship on the transaction resource returned from `/transactions/{id}`.
147
+ # @param transaction_id [String] The unique identifier for the transaction.
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [UpdateTransactionCategoryRequest] :update_transaction_category_request
150
+ # @return [nil]
151
+ def transactions_transaction_id_relationships_category_patch(transaction_id, opts = {})
152
+ transactions_transaction_id_relationships_category_patch_with_http_info(transaction_id, opts)
153
+ nil
154
+ end
155
+
156
+ # Categorize transaction
157
+ # Updates the category associated with a transaction. Only transactions for which &#x60;isCategorizable&#x60; is set to true support this operation. The &#x60;id&#x60; is taken from the list exposed on &#x60;/categories&#x60; and cannot be one of the top-level (parent) categories. To de-categorize a transaction, set the entire &#x60;data&#x60; key to &#x60;null&#x60;. An HTTP &#x60;204&#x60; is returned on success. The associated category, along with its request URL is also exposed via the &#x60;category&#x60; relationship on the transaction resource returned from &#x60;/transactions/{id}&#x60;.
158
+ # @param transaction_id [String] The unique identifier for the transaction.
159
+ # @param [Hash] opts the optional parameters
160
+ # @option opts [UpdateTransactionCategoryRequest] :update_transaction_category_request
161
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
162
+ def transactions_transaction_id_relationships_category_patch_with_http_info(transaction_id, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.transactions_transaction_id_relationships_category_patch ...'
165
+ end
166
+ # verify the required parameter 'transaction_id' is set
167
+ if @api_client.config.client_side_validation && transaction_id.nil?
168
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling CategoriesApi.transactions_transaction_id_relationships_category_patch"
169
+ end
170
+ # resource path
171
+ local_var_path = '/transactions/{transactionId}/relationships/category'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Content-Type'
179
+ content_type = @api_client.select_header_content_type(['application/json'])
180
+ if !content_type.nil?
181
+ header_params['Content-Type'] = content_type
182
+ end
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_transaction_category_request'])
189
+
190
+ # return_type
191
+ return_type = opts[:debug_return_type]
192
+
193
+ # auth_names
194
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
195
+
196
+ new_options = opts.merge(
197
+ :operation => :"CategoriesApi.transactions_transaction_id_relationships_category_patch",
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: CategoriesApi#transactions_transaction_id_relationships_category_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end
@@ -0,0 +1,218 @@
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 TagsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List tags
23
+ # Retrieve a list of all tags currently in use. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. Results are ordered lexicographically. The `transactions` relationship for each tag exposes a link to get the transactions with the given tag.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :page_size The number of records to return in each page.
26
+ # @return [ListTagsResponse]
27
+ def tags_get(opts = {})
28
+ data, _status_code, _headers = tags_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # List tags
33
+ # Retrieve a list of all tags currently in use. 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 lexicographically. The &#x60;transactions&#x60; relationship for each tag exposes a link to get the transactions with the given tag.
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<(ListTagsResponse, Integer, Hash)>] ListTagsResponse data, response status code and response headers
37
+ def tags_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: TagsApi.tags_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/tags'
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] || 'ListTagsResponse'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"TagsApi.tags_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: TagsApi#tags_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Remove tags from transaction
83
+ # Disassociates one or more tags from a specific transaction. Tags that are not associated are silently ignored. An HTTP `204` is returned on success. The associated tags, along with this request URL, are also exposed via the `tags` relationship on the transaction resource returned from `/transactions/{id}`.
84
+ # @param transaction_id [String] The unique identifier for the transaction.
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [UpdateTransactionTagsRequest] :update_transaction_tags_request
87
+ # @return [nil]
88
+ def transactions_transaction_id_relationships_tags_delete(transaction_id, opts = {})
89
+ transactions_transaction_id_relationships_tags_delete_with_http_info(transaction_id, opts)
90
+ nil
91
+ end
92
+
93
+ # Remove tags from transaction
94
+ # Disassociates one or more tags from a specific transaction. Tags that are not associated are silently ignored. An HTTP &#x60;204&#x60; is returned on success. The associated tags, along with this request URL, are also exposed via the &#x60;tags&#x60; relationship on the transaction resource returned from &#x60;/transactions/{id}&#x60;.
95
+ # @param transaction_id [String] The unique identifier for the transaction.
96
+ # @param [Hash] opts the optional parameters
97
+ # @option opts [UpdateTransactionTagsRequest] :update_transaction_tags_request
98
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
99
+ def transactions_transaction_id_relationships_tags_delete_with_http_info(transaction_id, opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: TagsApi.transactions_transaction_id_relationships_tags_delete ...'
102
+ end
103
+ # verify the required parameter 'transaction_id' is set
104
+ if @api_client.config.client_side_validation && transaction_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TagsApi.transactions_transaction_id_relationships_tags_delete"
106
+ end
107
+ # resource path
108
+ local_var_path = '/transactions/{transactionId}/relationships/tags'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s))
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+
113
+ # header parameters
114
+ header_params = opts[:header_params] || {}
115
+ # HTTP header 'Content-Type'
116
+ content_type = @api_client.select_header_content_type(['application/json'])
117
+ if !content_type.nil?
118
+ header_params['Content-Type'] = content_type
119
+ end
120
+
121
+ # form parameters
122
+ form_params = opts[:form_params] || {}
123
+
124
+ # http body (model)
125
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_transaction_tags_request'])
126
+
127
+ # return_type
128
+ return_type = opts[:debug_return_type]
129
+
130
+ # auth_names
131
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
132
+
133
+ new_options = opts.merge(
134
+ :operation => :"TagsApi.transactions_transaction_id_relationships_tags_delete",
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :form_params => form_params,
138
+ :body => post_body,
139
+ :auth_names => auth_names,
140
+ :return_type => return_type
141
+ )
142
+
143
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: TagsApi#transactions_transaction_id_relationships_tags_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
149
+
150
+ # Add tags to transaction
151
+ # Associates one or more tags with a specific transaction. No more than 6 tags may be present on any single transaction. Duplicate tags are silently ignored. An HTTP `204` is returned on success. The associated tags, along with this request URL, are also exposed via the `tags` relationship on the transaction resource returned from `/transactions/{id}`.
152
+ # @param transaction_id [String] The unique identifier for the transaction.
153
+ # @param [Hash] opts the optional parameters
154
+ # @option opts [UpdateTransactionTagsRequest] :update_transaction_tags_request
155
+ # @return [nil]
156
+ def transactions_transaction_id_relationships_tags_post(transaction_id, opts = {})
157
+ transactions_transaction_id_relationships_tags_post_with_http_info(transaction_id, opts)
158
+ nil
159
+ end
160
+
161
+ # Add tags to transaction
162
+ # Associates one or more tags with a specific transaction. No more than 6 tags may be present on any single transaction. Duplicate tags are silently ignored. An HTTP &#x60;204&#x60; is returned on success. The associated tags, along with this request URL, are also exposed via the &#x60;tags&#x60; relationship on the transaction resource returned from &#x60;/transactions/{id}&#x60;.
163
+ # @param transaction_id [String] The unique identifier for the transaction.
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [UpdateTransactionTagsRequest] :update_transaction_tags_request
166
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
167
+ def transactions_transaction_id_relationships_tags_post_with_http_info(transaction_id, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: TagsApi.transactions_transaction_id_relationships_tags_post ...'
170
+ end
171
+ # verify the required parameter 'transaction_id' is set
172
+ if @api_client.config.client_side_validation && transaction_id.nil?
173
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TagsApi.transactions_transaction_id_relationships_tags_post"
174
+ end
175
+ # resource path
176
+ local_var_path = '/transactions/{transactionId}/relationships/tags'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s))
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+
181
+ # header parameters
182
+ header_params = opts[:header_params] || {}
183
+ # HTTP header 'Content-Type'
184
+ content_type = @api_client.select_header_content_type(['application/json'])
185
+ if !content_type.nil?
186
+ header_params['Content-Type'] = content_type
187
+ end
188
+
189
+ # form parameters
190
+ form_params = opts[:form_params] || {}
191
+
192
+ # http body (model)
193
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_transaction_tags_request'])
194
+
195
+ # return_type
196
+ return_type = opts[:debug_return_type]
197
+
198
+ # auth_names
199
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
200
+
201
+ new_options = opts.merge(
202
+ :operation => :"TagsApi.transactions_transaction_id_relationships_tags_post",
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => return_type
209
+ )
210
+
211
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug "API called: TagsApi#transactions_transaction_id_relationships_tags_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
+ end
215
+ return data, status_code, headers
216
+ end
217
+ end
218
+ end
@@ -0,0 +1,241 @@
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 TransactionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List transactions by account
23
+ # Retrieve a list of all transactions for a specific account. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. To narrow the results to a specific date range pass one or both of `filter[since]` and `filter[until]` in the query string. These filter parameters **should not** be used for pagination. Results are ordered newest first to oldest last.
24
+ # @param account_id [String] The unique identifier for the account.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page_size The number of records to return in each page.
27
+ # @option opts [TransactionStatusEnum] :filter_status The transaction status for which to return records. This can be used to filter &#x60;HELD&#x60; transactions from those that are &#x60;SETTLED&#x60;.
28
+ # @option opts [Time] :filter_since The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
29
+ # @option opts [Time] :filter_until The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
30
+ # @option opts [String] :filter_category The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a &#x60;404&#x60; response.
31
+ # @option opts [String] :filter_tag A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given.
32
+ # @return [ListTransactionsResponse]
33
+ def accounts_account_id_transactions_get(account_id, opts = {})
34
+ data, _status_code, _headers = accounts_account_id_transactions_get_with_http_info(account_id, opts)
35
+ data
36
+ end
37
+
38
+ # List transactions by account
39
+ # Retrieve a list of all transactions for a specific account. The returned list is [paginated](#pagination) and can be scrolled by following the &#x60;next&#x60; and &#x60;prev&#x60; links where present. To narrow the results to a specific date range pass one or both of &#x60;filter[since]&#x60; and &#x60;filter[until]&#x60; in the query string. These filter parameters **should not** be used for pagination. Results are ordered newest first to oldest last.
40
+ # @param account_id [String] The unique identifier for the account.
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [Integer] :page_size The number of records to return in each page.
43
+ # @option opts [TransactionStatusEnum] :filter_status The transaction status for which to return records. This can be used to filter &#x60;HELD&#x60; transactions from those that are &#x60;SETTLED&#x60;.
44
+ # @option opts [Time] :filter_since The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
45
+ # @option opts [Time] :filter_until The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
46
+ # @option opts [String] :filter_category The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a &#x60;404&#x60; response.
47
+ # @option opts [String] :filter_tag A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given.
48
+ # @return [Array<(ListTransactionsResponse, Integer, Hash)>] ListTransactionsResponse data, response status code and response headers
49
+ def accounts_account_id_transactions_get_with_http_info(account_id, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.accounts_account_id_transactions_get ...'
52
+ end
53
+ # verify the required parameter 'account_id' is set
54
+ if @api_client.config.client_side_validation && account_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TransactionsApi.accounts_account_id_transactions_get"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounts/{accountId}/transactions'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
63
+ query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
64
+ query_params[:'filter[since]'] = opts[:'filter_since'] if !opts[:'filter_since'].nil?
65
+ query_params[:'filter[until]'] = opts[:'filter_until'] if !opts[:'filter_until'].nil?
66
+ query_params[:'filter[category]'] = opts[:'filter_category'] if !opts[:'filter_category'].nil?
67
+ query_params[:'filter[tag]'] = opts[:'filter_tag'] if !opts[:'filter_tag'].nil?
68
+
69
+ # header parameters
70
+ header_params = opts[:header_params] || {}
71
+ # HTTP header 'Accept' (if needed)
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
+
74
+ # form parameters
75
+ form_params = opts[:form_params] || {}
76
+
77
+ # http body (model)
78
+ post_body = opts[:debug_body]
79
+
80
+ # return_type
81
+ return_type = opts[:debug_return_type] || 'ListTransactionsResponse'
82
+
83
+ # auth_names
84
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
85
+
86
+ new_options = opts.merge(
87
+ :operation => :"TransactionsApi.accounts_account_id_transactions_get",
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names,
93
+ :return_type => return_type
94
+ )
95
+
96
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug "API called: TransactionsApi#accounts_account_id_transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ end
100
+ return data, status_code, headers
101
+ end
102
+
103
+ # List transactions
104
+ # Retrieve a list of all transactions across all accounts for the currently authenticated user. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. To narrow the results to a specific date range pass one or both of `filter[since]` and `filter[until]` in the query string. These filter parameters **should not** be used for pagination. Results are ordered newest first to oldest last.
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Integer] :page_size The number of records to return in each page.
107
+ # @option opts [TransactionStatusEnum] :filter_status The transaction status for which to return records. This can be used to filter &#x60;HELD&#x60; transactions from those that are &#x60;SETTLED&#x60;.
108
+ # @option opts [Time] :filter_since The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
109
+ # @option opts [Time] :filter_until The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
110
+ # @option opts [String] :filter_category The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a &#x60;404&#x60; response.
111
+ # @option opts [String] :filter_tag A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given.
112
+ # @return [ListTransactionsResponse]
113
+ def transactions_get(opts = {})
114
+ data, _status_code, _headers = transactions_get_with_http_info(opts)
115
+ data
116
+ end
117
+
118
+ # List transactions
119
+ # Retrieve a list of all transactions across all accounts for the currently authenticated user. The returned list is [paginated](#pagination) and can be scrolled by following the &#x60;next&#x60; and &#x60;prev&#x60; links where present. To narrow the results to a specific date range pass one or both of &#x60;filter[since]&#x60; and &#x60;filter[until]&#x60; in the query string. These filter parameters **should not** be used for pagination. Results are ordered newest first to oldest last.
120
+ # @param [Hash] opts the optional parameters
121
+ # @option opts [Integer] :page_size The number of records to return in each page.
122
+ # @option opts [TransactionStatusEnum] :filter_status The transaction status for which to return records. This can be used to filter &#x60;HELD&#x60; transactions from those that are &#x60;SETTLED&#x60;.
123
+ # @option opts [Time] :filter_since The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
124
+ # @option opts [Time] :filter_until The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes.
125
+ # @option opts [String] :filter_category The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a &#x60;404&#x60; response.
126
+ # @option opts [String] :filter_tag A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given.
127
+ # @return [Array<(ListTransactionsResponse, Integer, Hash)>] ListTransactionsResponse data, response status code and response headers
128
+ def transactions_get_with_http_info(opts = {})
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.transactions_get ...'
131
+ end
132
+ # resource path
133
+ local_var_path = '/transactions'
134
+
135
+ # query parameters
136
+ query_params = opts[:query_params] || {}
137
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
138
+ query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
139
+ query_params[:'filter[since]'] = opts[:'filter_since'] if !opts[:'filter_since'].nil?
140
+ query_params[:'filter[until]'] = opts[:'filter_until'] if !opts[:'filter_until'].nil?
141
+ query_params[:'filter[category]'] = opts[:'filter_category'] if !opts[:'filter_category'].nil?
142
+ query_params[:'filter[tag]'] = opts[:'filter_tag'] if !opts[:'filter_tag'].nil?
143
+
144
+ # header parameters
145
+ header_params = opts[:header_params] || {}
146
+ # HTTP header 'Accept' (if needed)
147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
148
+
149
+ # form parameters
150
+ form_params = opts[:form_params] || {}
151
+
152
+ # http body (model)
153
+ post_body = opts[:debug_body]
154
+
155
+ # return_type
156
+ return_type = opts[:debug_return_type] || 'ListTransactionsResponse'
157
+
158
+ # auth_names
159
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
160
+
161
+ new_options = opts.merge(
162
+ :operation => :"TransactionsApi.transactions_get",
163
+ :header_params => header_params,
164
+ :query_params => query_params,
165
+ :form_params => form_params,
166
+ :body => post_body,
167
+ :auth_names => auth_names,
168
+ :return_type => return_type
169
+ )
170
+
171
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: TransactionsApi#transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+
178
+ # Retrieve transaction
179
+ # Retrieve a specific transaction by providing its unique identifier.
180
+ # @param id [String] The unique identifier for the transaction.
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [GetTransactionResponse]
183
+ def transactions_id_get(id, opts = {})
184
+ data, _status_code, _headers = transactions_id_get_with_http_info(id, opts)
185
+ data
186
+ end
187
+
188
+ # Retrieve transaction
189
+ # Retrieve a specific transaction by providing its unique identifier.
190
+ # @param id [String] The unique identifier for the transaction.
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [Array<(GetTransactionResponse, Integer, Hash)>] GetTransactionResponse data, response status code and response headers
193
+ def transactions_id_get_with_http_info(id, opts = {})
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.transactions_id_get ...'
196
+ end
197
+ # verify the required parameter 'id' is set
198
+ if @api_client.config.client_side_validation && id.nil?
199
+ fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.transactions_id_get"
200
+ end
201
+ # resource path
202
+ local_var_path = '/transactions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
203
+
204
+ # query parameters
205
+ query_params = opts[:query_params] || {}
206
+
207
+ # header parameters
208
+ header_params = opts[:header_params] || {}
209
+ # HTTP header 'Accept' (if needed)
210
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
211
+
212
+ # form parameters
213
+ form_params = opts[:form_params] || {}
214
+
215
+ # http body (model)
216
+ post_body = opts[:debug_body]
217
+
218
+ # return_type
219
+ return_type = opts[:debug_return_type] || 'GetTransactionResponse'
220
+
221
+ # auth_names
222
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
223
+
224
+ new_options = opts.merge(
225
+ :operation => :"TransactionsApi.transactions_id_get",
226
+ :header_params => header_params,
227
+ :query_params => query_params,
228
+ :form_params => form_params,
229
+ :body => post_body,
230
+ :auth_names => auth_names,
231
+ :return_type => return_type
232
+ )
233
+
234
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
235
+ if @api_client.config.debugging
236
+ @api_client.config.logger.debug "API called: TransactionsApi#transactions_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
237
+ end
238
+ return data, status_code, headers
239
+ end
240
+ end
241
+ end