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,284 @@
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 'date'
14
+ require 'time'
15
+
16
+ module UpBankingClient
17
+ class AccountResourceAttributes
18
+ # The name associated with the account in the Up application.
19
+ attr_accessor :display_name
20
+
21
+ # The bank account type of this account.
22
+ attr_accessor :account_type
23
+
24
+ # The ownership structure for this account.
25
+ attr_accessor :ownership_type
26
+
27
+ attr_accessor :balance
28
+
29
+ # The date-time at which this account was first opened.
30
+ attr_accessor :created_at
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'display_name' => :'displayName',
36
+ :'account_type' => :'accountType',
37
+ :'ownership_type' => :'ownershipType',
38
+ :'balance' => :'balance',
39
+ :'created_at' => :'createdAt'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'display_name' => :'String',
52
+ :'account_type' => :'AccountTypeEnum',
53
+ :'ownership_type' => :'OwnershipTypeEnum',
54
+ :'balance' => :'AccountResourceAttributesBalance',
55
+ :'created_at' => :'Time'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UpBankingClient::AccountResourceAttributes` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UpBankingClient::AccountResourceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'display_name')
81
+ self.display_name = attributes[:'display_name']
82
+ end
83
+
84
+ if attributes.key?(:'account_type')
85
+ self.account_type = attributes[:'account_type']
86
+ end
87
+
88
+ if attributes.key?(:'ownership_type')
89
+ self.ownership_type = attributes[:'ownership_type']
90
+ end
91
+
92
+ if attributes.key?(:'balance')
93
+ self.balance = attributes[:'balance']
94
+ end
95
+
96
+ if attributes.key?(:'created_at')
97
+ self.created_at = attributes[:'created_at']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ if @display_name.nil?
106
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
107
+ end
108
+
109
+ if @account_type.nil?
110
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
111
+ end
112
+
113
+ if @ownership_type.nil?
114
+ invalid_properties.push('invalid value for "ownership_type", ownership_type cannot be nil.')
115
+ end
116
+
117
+ if @balance.nil?
118
+ invalid_properties.push('invalid value for "balance", balance cannot be nil.')
119
+ end
120
+
121
+ if @created_at.nil?
122
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ return false if @display_name.nil?
132
+ return false if @account_type.nil?
133
+ return false if @ownership_type.nil?
134
+ return false if @balance.nil?
135
+ return false if @created_at.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ display_name == o.display_name &&
145
+ account_type == o.account_type &&
146
+ ownership_type == o.ownership_type &&
147
+ balance == o.balance &&
148
+ created_at == o.created_at
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [display_name, account_type, ownership_type, balance, created_at].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ new.build_from_hash(attributes)
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+ attributes = attributes.transform_keys(&:to_sym)
176
+ self.class.openapi_types.each_pair do |key, type|
177
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
178
+ self.send("#{key}=", nil)
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
183
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
+ end
185
+ elsif !attributes[self.class.attribute_map[key]].nil?
186
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
+ end
188
+ end
189
+
190
+ self
191
+ end
192
+
193
+ # Deserializes the data based on type
194
+ # @param string type Data type
195
+ # @param string value Value to be deserialized
196
+ # @return [Object] Deserialized data
197
+ def _deserialize(type, value)
198
+ case type.to_sym
199
+ when :Time
200
+ Time.parse(value)
201
+ when :Date
202
+ Date.parse(value)
203
+ when :String
204
+ value.to_s
205
+ when :Integer
206
+ value.to_i
207
+ when :Float
208
+ value.to_f
209
+ when :Boolean
210
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
211
+ true
212
+ else
213
+ false
214
+ end
215
+ when :Object
216
+ # generic object (usually a Hash), return directly
217
+ value
218
+ when /\AArray<(?<inner_type>.+)>\z/
219
+ inner_type = Regexp.last_match[:inner_type]
220
+ value.map { |v| _deserialize(inner_type, v) }
221
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
222
+ k_type = Regexp.last_match[:k_type]
223
+ v_type = Regexp.last_match[:v_type]
224
+ {}.tap do |hash|
225
+ value.each do |k, v|
226
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
227
+ end
228
+ end
229
+ else # model
230
+ # models (e.g. Pet) or oneOf
231
+ klass = UpBankingClient.const_get(type)
232
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
233
+ end
234
+ end
235
+
236
+ # Returns the string representation of the object
237
+ # @return [String] String presentation of the object
238
+ def to_s
239
+ to_hash.to_s
240
+ end
241
+
242
+ # to_body is an alias to to_hash (backward compatibility)
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_body
245
+ to_hash
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ # Outputs non-array value in the form of hash
265
+ # For object, use to_hash. Otherwise, just return the value
266
+ # @param [Object] value Any valid value
267
+ # @return [Hash] Returns the value in the form of hash
268
+ def _to_hash(value)
269
+ if value.is_a?(Array)
270
+ value.compact.map { |v| _to_hash(v) }
271
+ elsif value.is_a?(Hash)
272
+ {}.tap do |hash|
273
+ value.each { |k, v| hash[k] = _to_hash(v) }
274
+ end
275
+ elsif value.respond_to? :to_hash
276
+ value.to_hash
277
+ else
278
+ value
279
+ end
280
+ end
281
+
282
+ end
283
+
284
+ end
@@ -0,0 +1,263 @@
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 'date'
14
+ require 'time'
15
+
16
+ module UpBankingClient
17
+ # The available balance of the account, taking into account any amounts that are currently on hold.
18
+ class AccountResourceAttributesBalance
19
+ # The ISO 4217 currency code.
20
+ attr_accessor :currency_code
21
+
22
+ # The amount of money, formatted as a string in the relevant currency. For example, for an Australian dollar value of $10.56, this field will be `\"10.56\"`. The currency symbol is not included in the string.
23
+ attr_accessor :value
24
+
25
+ # The amount of money in the smallest denomination for the currency, as a 64-bit integer. For example, for an Australian dollar value of $10.56, this field will be `1056`.
26
+ attr_accessor :value_in_base_units
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'currency_code' => :'currencyCode',
32
+ :'value' => :'value',
33
+ :'value_in_base_units' => :'valueInBaseUnits'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'currency_code' => :'String',
46
+ :'value' => :'String',
47
+ :'value_in_base_units' => :'Integer'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # List of class defined in allOf (OpenAPI v3)
58
+ def self.openapi_all_of
59
+ [
60
+ :'MoneyObject'
61
+ ]
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UpBankingClient::AccountResourceAttributesBalance` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UpBankingClient::AccountResourceAttributesBalance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'currency_code')
80
+ self.currency_code = attributes[:'currency_code']
81
+ end
82
+
83
+ if attributes.key?(:'value')
84
+ self.value = attributes[:'value']
85
+ end
86
+
87
+ if attributes.key?(:'value_in_base_units')
88
+ self.value_in_base_units = attributes[:'value_in_base_units']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ if @currency_code.nil?
97
+ invalid_properties.push('invalid value for "currency_code", currency_code cannot be nil.')
98
+ end
99
+
100
+ if @value.nil?
101
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
102
+ end
103
+
104
+ if @value_in_base_units.nil?
105
+ invalid_properties.push('invalid value for "value_in_base_units", value_in_base_units cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ return false if @currency_code.nil?
115
+ return false if @value.nil?
116
+ return false if @value_in_base_units.nil?
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ currency_code == o.currency_code &&
126
+ value == o.value &&
127
+ value_in_base_units == o.value_in_base_units
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [currency_code, value, value_in_base_units].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ new.build_from_hash(attributes)
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ self.class.openapi_types.each_pair do |key, type|
156
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
+ self.send("#{key}=", nil)
158
+ elsif type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ # models (e.g. Pet) or oneOf
210
+ klass = UpBankingClient.const_get(type)
211
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ end
213
+ end
214
+
215
+ # Returns the string representation of the object
216
+ # @return [String] String presentation of the object
217
+ def to_s
218
+ to_hash.to_s
219
+ end
220
+
221
+ # to_body is an alias to to_hash (backward compatibility)
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_body
224
+ to_hash
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+
261
+ end
262
+
263
+ end