firefly-iii-client 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 (414) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +349 -0
  4. data/Rakefile +10 -0
  5. data/docs/AboutApi.md +143 -0
  6. data/docs/Account.md +70 -0
  7. data/docs/AccountArray.md +20 -0
  8. data/docs/AccountRead.md +22 -0
  9. data/docs/AccountSingle.md +18 -0
  10. data/docs/AccountTypeFilter.md +15 -0
  11. data/docs/AccountTypeProperty.md +15 -0
  12. data/docs/AccountsApi.md +531 -0
  13. data/docs/Attachment.md +44 -0
  14. data/docs/AttachmentArray.md +20 -0
  15. data/docs/AttachmentRead.md +24 -0
  16. data/docs/AttachmentSingle.md +18 -0
  17. data/docs/AttachmentsApi.md +510 -0
  18. data/docs/AvailableBudget.md +38 -0
  19. data/docs/AvailableBudgetArray.md +20 -0
  20. data/docs/AvailableBudgetRead.md +22 -0
  21. data/docs/AvailableBudgetSingle.md +18 -0
  22. data/docs/AvailableBudgetsApi.md +369 -0
  23. data/docs/BasicSummaryEntry.md +36 -0
  24. data/docs/Bill.md +50 -0
  25. data/docs/BillArray.md +20 -0
  26. data/docs/BillPaidDates.md +22 -0
  27. data/docs/BillRead.md +22 -0
  28. data/docs/BillSingle.md +18 -0
  29. data/docs/BillsApi.md +600 -0
  30. data/docs/Budget.md +28 -0
  31. data/docs/BudgetArray.md +20 -0
  32. data/docs/BudgetLimit.md +38 -0
  33. data/docs/BudgetLimitArray.md +20 -0
  34. data/docs/BudgetLimitRead.md +22 -0
  35. data/docs/BudgetLimitSingle.md +18 -0
  36. data/docs/BudgetRead.md +22 -0
  37. data/docs/BudgetSingle.md +18 -0
  38. data/docs/BudgetSpent.md +26 -0
  39. data/docs/BudgetsApi.md +897 -0
  40. data/docs/CategoriesApi.md +446 -0
  41. data/docs/Category.md +26 -0
  42. data/docs/CategoryArray.md +20 -0
  43. data/docs/CategoryEarned.md +30 -0
  44. data/docs/CategoryRead.md +22 -0
  45. data/docs/CategorySingle.md +18 -0
  46. data/docs/CategorySpent.md +30 -0
  47. data/docs/ChartDataPoint.md +18 -0
  48. data/docs/ChartDataSet.md +32 -0
  49. data/docs/ChartsApi.md +374 -0
  50. data/docs/ConfigurationApi.md +148 -0
  51. data/docs/ConfigurationUpdate.md +18 -0
  52. data/docs/CurrenciesApi.md +1198 -0
  53. data/docs/Currency.md +32 -0
  54. data/docs/CurrencyArray.md +22 -0
  55. data/docs/CurrencyExchangeRatesApi.md +86 -0
  56. data/docs/CurrencyRead.md +22 -0
  57. data/docs/CurrencySingle.md +18 -0
  58. data/docs/ExchangeRate.md +22 -0
  59. data/docs/ExchangeRateArray.md +22 -0
  60. data/docs/ExchangeRateAttributes.md +44 -0
  61. data/docs/ImportApi.md +232 -0
  62. data/docs/ImportJob.md +22 -0
  63. data/docs/ImportJobArray.md +22 -0
  64. data/docs/ImportJobAttributes.md +42 -0
  65. data/docs/ImportJobSingle.md +18 -0
  66. data/docs/LinkType.md +26 -0
  67. data/docs/LinkTypeArray.md +22 -0
  68. data/docs/LinkTypeRead.md +24 -0
  69. data/docs/LinkTypeSingle.md +18 -0
  70. data/docs/LinksApi.md +804 -0
  71. data/docs/Meta.md +18 -0
  72. data/docs/MetaPagination.md +26 -0
  73. data/docs/ObjectLink.md +20 -0
  74. data/docs/ObjectLink0.md +20 -0
  75. data/docs/PageLink.md +22 -0
  76. data/docs/PiggyBank.md +54 -0
  77. data/docs/PiggyBankArray.md +22 -0
  78. data/docs/PiggyBankEvent.md +24 -0
  79. data/docs/PiggyBankEventArray.md +22 -0
  80. data/docs/PiggyBankEventAttributes.md +34 -0
  81. data/docs/PiggyBankRead.md +24 -0
  82. data/docs/PiggyBankSingle.md +18 -0
  83. data/docs/PiggyBanksApi.md +440 -0
  84. data/docs/Preference.md +24 -0
  85. data/docs/PreferenceArray.md +22 -0
  86. data/docs/PreferenceRead.md +22 -0
  87. data/docs/PreferenceSingle.md +18 -0
  88. data/docs/PreferencesApi.md +224 -0
  89. data/docs/Recurrence.md +45 -0
  90. data/docs/RecurrenceArray.md +22 -0
  91. data/docs/RecurrenceRead.md +24 -0
  92. data/docs/RecurrenceRepetition.md +34 -0
  93. data/docs/RecurrenceSingle.md +18 -0
  94. data/docs/RecurrenceTransaction.md +68 -0
  95. data/docs/RecurrencesApi.md +513 -0
  96. data/docs/Rule.md +42 -0
  97. data/docs/RuleAction.md +32 -0
  98. data/docs/RuleArray.md +22 -0
  99. data/docs/RuleGroup.md +28 -0
  100. data/docs/RuleGroupArray.md +22 -0
  101. data/docs/RuleGroupRead.md +24 -0
  102. data/docs/RuleGroupSingle.md +18 -0
  103. data/docs/RuleGroupsApi.md +603 -0
  104. data/docs/RuleRead.md +24 -0
  105. data/docs/RuleSingle.md +18 -0
  106. data/docs/RuleTrigger.md +32 -0
  107. data/docs/RulesApi.md +528 -0
  108. data/docs/SummaryApi.md +84 -0
  109. data/docs/SystemConfiguration.md +18 -0
  110. data/docs/SystemConfigurationData.md +24 -0
  111. data/docs/SystemInfo.md +18 -0
  112. data/docs/SystemInfoData.md +26 -0
  113. data/docs/TagArray.md +22 -0
  114. data/docs/TagCloud.md +18 -0
  115. data/docs/TagCloudTag.md +24 -0
  116. data/docs/TagModel.md +34 -0
  117. data/docs/TagRead.md +24 -0
  118. data/docs/TagSingle.md +18 -0
  119. data/docs/TagsApi.md +523 -0
  120. data/docs/Transaction.md +26 -0
  121. data/docs/TransactionArray.md +22 -0
  122. data/docs/TransactionLink.md +30 -0
  123. data/docs/TransactionLinkArray.md +22 -0
  124. data/docs/TransactionLinkRead.md +24 -0
  125. data/docs/TransactionLinkSingle.md +18 -0
  126. data/docs/TransactionRead.md +24 -0
  127. data/docs/TransactionSingle.md +18 -0
  128. data/docs/TransactionSplit.md +128 -0
  129. data/docs/TransactionTypeFilter.md +15 -0
  130. data/docs/TransactionsApi.md +592 -0
  131. data/docs/User.md +28 -0
  132. data/docs/UserArray.md +22 -0
  133. data/docs/UserRead.md +24 -0
  134. data/docs/UserSingle.md +18 -0
  135. data/docs/UsersApi.md +365 -0
  136. data/docs/ValidationError.md +20 -0
  137. data/docs/ValidationErrorErrors.md +20 -0
  138. data/firefly-iii-client.gemspec +39 -0
  139. data/git_push.sh +58 -0
  140. data/lib/firefly_iii_client.rb +172 -0
  141. data/lib/firefly_iii_client/api/about_api.rb +136 -0
  142. data/lib/firefly_iii_client/api/accounts_api.rb +495 -0
  143. data/lib/firefly_iii_client/api/attachments_api.rb +470 -0
  144. data/lib/firefly_iii_client/api/available_budgets_api.rb +348 -0
  145. data/lib/firefly_iii_client/api/bills_api.rb +555 -0
  146. data/lib/firefly_iii_client/api/budgets_api.rb +866 -0
  147. data/lib/firefly_iii_client/api/categories_api.rb +417 -0
  148. data/lib/firefly_iii_client/api/charts_api.rb +383 -0
  149. data/lib/firefly_iii_client/api/configuration_api.rb +156 -0
  150. data/lib/firefly_iii_client/api/currencies_api.rb +1089 -0
  151. data/lib/firefly_iii_client/api/currency_exchange_rates_api.rb +91 -0
  152. data/lib/firefly_iii_client/api/import_api.rb +220 -0
  153. data/lib/firefly_iii_client/api/links_api.rb +737 -0
  154. data/lib/firefly_iii_client/api/piggy_banks_api.rb +408 -0
  155. data/lib/firefly_iii_client/api/preferences_api.rb +216 -0
  156. data/lib/firefly_iii_client/api/recurrences_api.rb +472 -0
  157. data/lib/firefly_iii_client/api/rule_groups_api.rb +559 -0
  158. data/lib/firefly_iii_client/api/rules_api.rb +493 -0
  159. data/lib/firefly_iii_client/api/summary_api.rb +96 -0
  160. data/lib/firefly_iii_client/api/tags_api.rb +491 -0
  161. data/lib/firefly_iii_client/api/transactions_api.rb +546 -0
  162. data/lib/firefly_iii_client/api/users_api.rb +342 -0
  163. data/lib/firefly_iii_client/api_client.rb +390 -0
  164. data/lib/firefly_iii_client/api_error.rb +57 -0
  165. data/lib/firefly_iii_client/configuration.rb +277 -0
  166. data/lib/firefly_iii_client/models/account.rb +564 -0
  167. data/lib/firefly_iii_client/models/account_array.rb +229 -0
  168. data/lib/firefly_iii_client/models/account_read.rb +237 -0
  169. data/lib/firefly_iii_client/models/account_single.rb +218 -0
  170. data/lib/firefly_iii_client/models/account_type_filter.rb +56 -0
  171. data/lib/firefly_iii_client/models/account_type_property.rb +47 -0
  172. data/lib/firefly_iii_client/models/attachment.rb +401 -0
  173. data/lib/firefly_iii_client/models/attachment_array.rb +229 -0
  174. data/lib/firefly_iii_client/models/attachment_read.rb +246 -0
  175. data/lib/firefly_iii_client/models/attachment_single.rb +218 -0
  176. data/lib/firefly_iii_client/models/available_budget.rb +331 -0
  177. data/lib/firefly_iii_client/models/available_budget_array.rb +229 -0
  178. data/lib/firefly_iii_client/models/available_budget_read.rb +237 -0
  179. data/lib/firefly_iii_client/models/available_budget_single.rb +218 -0
  180. data/lib/firefly_iii_client/models/basic_summary_entry.rb +307 -0
  181. data/lib/firefly_iii_client/models/bill.rb +433 -0
  182. data/lib/firefly_iii_client/models/bill_array.rb +229 -0
  183. data/lib/firefly_iii_client/models/bill_paid_dates.rb +239 -0
  184. data/lib/firefly_iii_client/models/bill_read.rb +237 -0
  185. data/lib/firefly_iii_client/models/bill_single.rb +218 -0
  186. data/lib/firefly_iii_client/models/budget.rb +271 -0
  187. data/lib/firefly_iii_client/models/budget_array.rb +229 -0
  188. data/lib/firefly_iii_client/models/budget_limit.rb +335 -0
  189. data/lib/firefly_iii_client/models/budget_limit_array.rb +229 -0
  190. data/lib/firefly_iii_client/models/budget_limit_read.rb +237 -0
  191. data/lib/firefly_iii_client/models/budget_limit_single.rb +218 -0
  192. data/lib/firefly_iii_client/models/budget_read.rb +237 -0
  193. data/lib/firefly_iii_client/models/budget_single.rb +218 -0
  194. data/lib/firefly_iii_client/models/budget_spent.rb +256 -0
  195. data/lib/firefly_iii_client/models/category.rb +263 -0
  196. data/lib/firefly_iii_client/models/category_array.rb +229 -0
  197. data/lib/firefly_iii_client/models/category_earned.rb +274 -0
  198. data/lib/firefly_iii_client/models/category_read.rb +237 -0
  199. data/lib/firefly_iii_client/models/category_single.rb +218 -0
  200. data/lib/firefly_iii_client/models/category_spent.rb +274 -0
  201. data/lib/firefly_iii_client/models/chart_data_point.rb +219 -0
  202. data/lib/firefly_iii_client/models/chart_data_set.rb +289 -0
  203. data/lib/firefly_iii_client/models/configuration_update.rb +224 -0
  204. data/lib/firefly_iii_client/models/currency.rb +299 -0
  205. data/lib/firefly_iii_client/models/currency_array.rb +238 -0
  206. data/lib/firefly_iii_client/models/currency_read.rb +237 -0
  207. data/lib/firefly_iii_client/models/currency_single.rb +218 -0
  208. data/lib/firefly_iii_client/models/exchange_rate.rb +237 -0
  209. data/lib/firefly_iii_client/models/exchange_rate_array.rb +238 -0
  210. data/lib/firefly_iii_client/models/exchange_rate_attributes.rb +336 -0
  211. data/lib/firefly_iii_client/models/import_job.rb +237 -0
  212. data/lib/firefly_iii_client/models/import_job_array.rb +238 -0
  213. data/lib/firefly_iii_client/models/import_job_attributes.rb +337 -0
  214. data/lib/firefly_iii_client/models/import_job_single.rb +218 -0
  215. data/lib/firefly_iii_client/models/link_type.rb +260 -0
  216. data/lib/firefly_iii_client/models/link_type_array.rb +238 -0
  217. data/lib/firefly_iii_client/models/link_type_read.rb +246 -0
  218. data/lib/firefly_iii_client/models/link_type_single.rb +218 -0
  219. data/lib/firefly_iii_client/models/meta.rb +218 -0
  220. data/lib/firefly_iii_client/models/meta_pagination.rb +254 -0
  221. data/lib/firefly_iii_client/models/object_link.rb +227 -0
  222. data/lib/firefly_iii_client/models/object_link0.rb +227 -0
  223. data/lib/firefly_iii_client/models/page_link.rb +236 -0
  224. data/lib/firefly_iii_client/models/piggy_bank.rb +400 -0
  225. data/lib/firefly_iii_client/models/piggy_bank_array.rb +238 -0
  226. data/lib/firefly_iii_client/models/piggy_bank_event.rb +246 -0
  227. data/lib/firefly_iii_client/models/piggy_bank_event_array.rb +238 -0
  228. data/lib/firefly_iii_client/models/piggy_bank_event_attributes.rb +291 -0
  229. data/lib/firefly_iii_client/models/piggy_bank_read.rb +246 -0
  230. data/lib/firefly_iii_client/models/piggy_bank_single.rb +218 -0
  231. data/lib/firefly_iii_client/models/preference.rb +251 -0
  232. data/lib/firefly_iii_client/models/preference_array.rb +238 -0
  233. data/lib/firefly_iii_client/models/preference_read.rb +237 -0
  234. data/lib/firefly_iii_client/models/preference_single.rb +218 -0
  235. data/lib/firefly_iii_client/models/recurrence.rb +395 -0
  236. data/lib/firefly_iii_client/models/recurrence_array.rb +238 -0
  237. data/lib/firefly_iii_client/models/recurrence_read.rb +246 -0
  238. data/lib/firefly_iii_client/models/recurrence_repetition.rb +342 -0
  239. data/lib/firefly_iii_client/models/recurrence_single.rb +218 -0
  240. data/lib/firefly_iii_client/models/recurrence_transaction.rb +483 -0
  241. data/lib/firefly_iii_client/models/rule.rb +395 -0
  242. data/lib/firefly_iii_client/models/rule_action.rb +326 -0
  243. data/lib/firefly_iii_client/models/rule_array.rb +238 -0
  244. data/lib/firefly_iii_client/models/rule_group.rb +268 -0
  245. data/lib/firefly_iii_client/models/rule_group_array.rb +238 -0
  246. data/lib/firefly_iii_client/models/rule_group_read.rb +246 -0
  247. data/lib/firefly_iii_client/models/rule_group_single.rb +218 -0
  248. data/lib/firefly_iii_client/models/rule_read.rb +246 -0
  249. data/lib/firefly_iii_client/models/rule_single.rb +218 -0
  250. data/lib/firefly_iii_client/models/rule_trigger.rb +330 -0
  251. data/lib/firefly_iii_client/models/system_configuration.rb +218 -0
  252. data/lib/firefly_iii_client/models/system_configuration_data.rb +248 -0
  253. data/lib/firefly_iii_client/models/system_info.rb +223 -0
  254. data/lib/firefly_iii_client/models/system_info_data.rb +279 -0
  255. data/lib/firefly_iii_client/models/tag_array.rb +238 -0
  256. data/lib/firefly_iii_client/models/tag_cloud.rb +220 -0
  257. data/lib/firefly_iii_client/models/tag_cloud_tag.rb +249 -0
  258. data/lib/firefly_iii_client/models/tag_model.rb +295 -0
  259. data/lib/firefly_iii_client/models/tag_read.rb +246 -0
  260. data/lib/firefly_iii_client/models/tag_single.rb +218 -0
  261. data/lib/firefly_iii_client/models/transaction.rb +263 -0
  262. data/lib/firefly_iii_client/models/transaction_array.rb +238 -0
  263. data/lib/firefly_iii_client/models/transaction_link.rb +292 -0
  264. data/lib/firefly_iii_client/models/transaction_link_array.rb +238 -0
  265. data/lib/firefly_iii_client/models/transaction_link_read.rb +246 -0
  266. data/lib/firefly_iii_client/models/transaction_link_single.rb +218 -0
  267. data/lib/firefly_iii_client/models/transaction_read.rb +246 -0
  268. data/lib/firefly_iii_client/models/transaction_single.rb +218 -0
  269. data/lib/firefly_iii_client/models/transaction_split.rb +850 -0
  270. data/lib/firefly_iii_client/models/transaction_type_filter.rb +49 -0
  271. data/lib/firefly_iii_client/models/user.rb +320 -0
  272. data/lib/firefly_iii_client/models/user_array.rb +238 -0
  273. data/lib/firefly_iii_client/models/user_read.rb +246 -0
  274. data/lib/firefly_iii_client/models/user_single.rb +218 -0
  275. data/lib/firefly_iii_client/models/validation_error.rb +227 -0
  276. data/lib/firefly_iii_client/models/validation_error_errors.rb +231 -0
  277. data/lib/firefly_iii_client/version.rb +15 -0
  278. data/spec/api/about_api_spec.rb +57 -0
  279. data/spec/api/accounts_api_spec.rb +129 -0
  280. data/spec/api/attachments_api_spec.rb +121 -0
  281. data/spec/api/available_budgets_api_spec.rb +98 -0
  282. data/spec/api/bills_api_spec.rb +140 -0
  283. data/spec/api/budgets_api_spec.rb +194 -0
  284. data/spec/api/categories_api_spec.rb +112 -0
  285. data/spec/api/charts_api_spec.rb +101 -0
  286. data/spec/api/configuration_api_spec.rb +59 -0
  287. data/spec/api/currencies_api_spec.rb +246 -0
  288. data/spec/api/currency_exchange_rates_api_spec.rb +50 -0
  289. data/spec/api/import_api_spec.rb +75 -0
  290. data/spec/api/links_api_spec.rb +173 -0
  291. data/spec/api/piggy_banks_api_spec.rb +109 -0
  292. data/spec/api/preferences_api_spec.rb +72 -0
  293. data/spec/api/recurrences_api_spec.rb +123 -0
  294. data/spec/api/rule_groups_api_spec.rb +142 -0
  295. data/spec/api/rules_api_spec.rb +129 -0
  296. data/spec/api/summary_api_spec.rb +49 -0
  297. data/spec/api/tags_api_spec.rb +126 -0
  298. data/spec/api/transactions_api_spec.rb +137 -0
  299. data/spec/api/users_api_spec.rb +96 -0
  300. data/spec/api_client_spec.rb +226 -0
  301. data/spec/configuration_spec.rb +42 -0
  302. data/spec/models/account_array_spec.rb +40 -0
  303. data/spec/models/account_read_spec.rb +46 -0
  304. data/spec/models/account_single_spec.rb +34 -0
  305. data/spec/models/account_spec.rb +210 -0
  306. data/spec/models/account_type_filter_spec.rb +28 -0
  307. data/spec/models/account_type_property_spec.rb +28 -0
  308. data/spec/models/attachment_array_spec.rb +40 -0
  309. data/spec/models/attachment_read_spec.rb +52 -0
  310. data/spec/models/attachment_single_spec.rb +34 -0
  311. data/spec/models/attachment_spec.rb +120 -0
  312. data/spec/models/available_budget_array_spec.rb +40 -0
  313. data/spec/models/available_budget_read_spec.rb +46 -0
  314. data/spec/models/available_budget_single_spec.rb +34 -0
  315. data/spec/models/available_budget_spec.rb +94 -0
  316. data/spec/models/basic_summary_entry_spec.rb +88 -0
  317. data/spec/models/bill_array_spec.rb +40 -0
  318. data/spec/models/bill_paid_dates_spec.rb +46 -0
  319. data/spec/models/bill_read_spec.rb +46 -0
  320. data/spec/models/bill_single_spec.rb +34 -0
  321. data/spec/models/bill_spec.rb +134 -0
  322. data/spec/models/budget_array_spec.rb +40 -0
  323. data/spec/models/budget_limit_array_spec.rb +40 -0
  324. data/spec/models/budget_limit_read_spec.rb +46 -0
  325. data/spec/models/budget_limit_single_spec.rb +34 -0
  326. data/spec/models/budget_limit_spec.rb +94 -0
  327. data/spec/models/budget_read_spec.rb +46 -0
  328. data/spec/models/budget_single_spec.rb +34 -0
  329. data/spec/models/budget_spec.rb +64 -0
  330. data/spec/models/budget_spent_spec.rb +58 -0
  331. data/spec/models/category_array_spec.rb +40 -0
  332. data/spec/models/category_earned_spec.rb +70 -0
  333. data/spec/models/category_read_spec.rb +46 -0
  334. data/spec/models/category_single_spec.rb +34 -0
  335. data/spec/models/category_spec.rb +58 -0
  336. data/spec/models/category_spent_spec.rb +70 -0
  337. data/spec/models/chart_data_point_spec.rb +34 -0
  338. data/spec/models/chart_data_set_spec.rb +76 -0
  339. data/spec/models/configuration_update_spec.rb +34 -0
  340. data/spec/models/currency_array_spec.rb +46 -0
  341. data/spec/models/currency_read_spec.rb +46 -0
  342. data/spec/models/currency_single_spec.rb +34 -0
  343. data/spec/models/currency_spec.rb +76 -0
  344. data/spec/models/exchange_rate_array_spec.rb +46 -0
  345. data/spec/models/exchange_rate_attributes_spec.rb +112 -0
  346. data/spec/models/exchange_rate_spec.rb +46 -0
  347. data/spec/models/import_job_array_spec.rb +46 -0
  348. data/spec/models/import_job_attributes_spec.rb +106 -0
  349. data/spec/models/import_job_single_spec.rb +34 -0
  350. data/spec/models/import_job_spec.rb +46 -0
  351. data/spec/models/link_type_array_spec.rb +46 -0
  352. data/spec/models/link_type_read_spec.rb +52 -0
  353. data/spec/models/link_type_single_spec.rb +34 -0
  354. data/spec/models/link_type_spec.rb +52 -0
  355. data/spec/models/meta_pagination_spec.rb +58 -0
  356. data/spec/models/meta_spec.rb +34 -0
  357. data/spec/models/object_link0_spec.rb +40 -0
  358. data/spec/models/object_link_spec.rb +40 -0
  359. data/spec/models/page_link_spec.rb +46 -0
  360. data/spec/models/piggy_bank_array_spec.rb +46 -0
  361. data/spec/models/piggy_bank_event_array_spec.rb +46 -0
  362. data/spec/models/piggy_bank_event_attributes_spec.rb +82 -0
  363. data/spec/models/piggy_bank_event_spec.rb +52 -0
  364. data/spec/models/piggy_bank_read_spec.rb +52 -0
  365. data/spec/models/piggy_bank_single_spec.rb +34 -0
  366. data/spec/models/piggy_bank_spec.rb +142 -0
  367. data/spec/models/preference_array_spec.rb +46 -0
  368. data/spec/models/preference_read_spec.rb +46 -0
  369. data/spec/models/preference_single_spec.rb +34 -0
  370. data/spec/models/preference_spec.rb +52 -0
  371. data/spec/models/recurrence_array_spec.rb +46 -0
  372. data/spec/models/recurrence_read_spec.rb +52 -0
  373. data/spec/models/recurrence_repetition_spec.rb +86 -0
  374. data/spec/models/recurrence_single_spec.rb +34 -0
  375. data/spec/models/recurrence_spec.rb +116 -0
  376. data/spec/models/recurrence_transaction_spec.rb +184 -0
  377. data/spec/models/rule_action_spec.rb +80 -0
  378. data/spec/models/rule_array_spec.rb +46 -0
  379. data/spec/models/rule_group_array_spec.rb +46 -0
  380. data/spec/models/rule_group_read_spec.rb +52 -0
  381. data/spec/models/rule_group_single_spec.rb +34 -0
  382. data/spec/models/rule_group_spec.rb +64 -0
  383. data/spec/models/rule_read_spec.rb +52 -0
  384. data/spec/models/rule_single_spec.rb +34 -0
  385. data/spec/models/rule_spec.rb +110 -0
  386. data/spec/models/rule_trigger_spec.rb +80 -0
  387. data/spec/models/system_configuration_data_spec.rb +52 -0
  388. data/spec/models/system_configuration_spec.rb +34 -0
  389. data/spec/models/system_info_data_spec.rb +58 -0
  390. data/spec/models/system_info_spec.rb +34 -0
  391. data/spec/models/tag_array_spec.rb +46 -0
  392. data/spec/models/tag_cloud_spec.rb +34 -0
  393. data/spec/models/tag_cloud_tag_spec.rb +52 -0
  394. data/spec/models/tag_model_spec.rb +76 -0
  395. data/spec/models/tag_read_spec.rb +52 -0
  396. data/spec/models/tag_single_spec.rb +34 -0
  397. data/spec/models/transaction_array_spec.rb +46 -0
  398. data/spec/models/transaction_link_array_spec.rb +46 -0
  399. data/spec/models/transaction_link_read_spec.rb +52 -0
  400. data/spec/models/transaction_link_single_spec.rb +34 -0
  401. data/spec/models/transaction_link_spec.rb +70 -0
  402. data/spec/models/transaction_read_spec.rb +52 -0
  403. data/spec/models/transaction_single_spec.rb +34 -0
  404. data/spec/models/transaction_spec.rb +58 -0
  405. data/spec/models/transaction_split_spec.rb +368 -0
  406. data/spec/models/transaction_type_filter_spec.rb +28 -0
  407. data/spec/models/user_array_spec.rb +46 -0
  408. data/spec/models/user_read_spec.rb +52 -0
  409. data/spec/models/user_single_spec.rb +34 -0
  410. data/spec/models/user_spec.rb +72 -0
  411. data/spec/models/validation_error_errors_spec.rb +40 -0
  412. data/spec/models/validation_error_spec.rb +40 -0
  413. data/spec/spec_helper.rb +111 -0
  414. metadata +495 -0
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Firefly III API
3
+
4
+ #This is the official documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. This version of the API is live from version v4.7.9 and onwards. You may use the \"Authorize\" button to try the API below.
5
+
6
+ The version of the OpenAPI document: 0.10.4-modified
7
+ Contact: thegrumpydictator@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module FireflyIIIClient
16
+ class ConfigurationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Firefly III system configuration.
23
+ # Get system configuration
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [SystemConfiguration]
26
+ def get_configuration(opts = {})
27
+ data, _status_code, _headers = get_configuration_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get Firefly III system configuration.
32
+ # Get system configuration
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(SystemConfiguration, Integer, Hash)>] SystemConfiguration data, response status code and response headers
35
+ def get_configuration_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ConfigurationApi.get_configuration ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/configuration'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'SystemConfiguration'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"ConfigurationApi.get_configuration",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: ConfigurationApi#get_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Update configuration
80
+ # Set a single config value.
81
+ # @param name [String] The configuration value name.
82
+ # @param value [String] Can be a number or a boolean. This depends on the actual configuration value.
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [SystemConfiguration]
85
+ def set_configuration(name, value, opts = {})
86
+ data, _status_code, _headers = set_configuration_with_http_info(name, value, opts)
87
+ data
88
+ end
89
+
90
+ # Update configuration
91
+ # Set a single config value.
92
+ # @param name [String] The configuration value name.
93
+ # @param value [String] Can be a number or a boolean. This depends on the actual configuration value.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<(SystemConfiguration, Integer, Hash)>] SystemConfiguration data, response status code and response headers
96
+ def set_configuration_with_http_info(name, value, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: ConfigurationApi.set_configuration ...'
99
+ end
100
+ # verify the required parameter 'name' is set
101
+ if @api_client.config.client_side_validation && name.nil?
102
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConfigurationApi.set_configuration"
103
+ end
104
+ # verify enum value
105
+ allowable_values = ["is_demo_site", "last_update_check", "single_user_mode"]
106
+ if @api_client.config.client_side_validation && !allowable_values.include?(name)
107
+ fail ArgumentError, "invalid value for \"name\", must be one of #{allowable_values}"
108
+ end
109
+ # verify the required parameter 'value' is set
110
+ if @api_client.config.client_side_validation && value.nil?
111
+ fail ArgumentError, "Missing the required parameter 'value' when calling ConfigurationApi.set_configuration"
112
+ end
113
+ # resource path
114
+ local_var_path = '/api/v1/configuration/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+ # HTTP header 'Content-Type'
124
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded', 'application/json'])
125
+
126
+ # form parameters
127
+ form_params = opts[:form_params] || {}
128
+ form_params['value'] = value
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body]
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'SystemConfiguration'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"ConfigurationApi.set_configuration",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: ConfigurationApi#set_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,1089 @@
1
+ =begin
2
+ #Firefly III API
3
+
4
+ #This is the official documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. This version of the API is live from version v4.7.9 and onwards. You may use the \"Authorize\" button to try the API below.
5
+
6
+ The version of the OpenAPI document: 0.10.4-modified
7
+ Contact: thegrumpydictator@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module FireflyIIIClient
16
+ class CurrenciesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Make currency default currency.
23
+ # Make this currency the default currency. If the currency is not enabled, it will be enabled as well.
24
+ # @param code [String] The currency code.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CurrencySingle]
27
+ def default_currency(code, opts = {})
28
+ data, _status_code, _headers = default_currency_with_http_info(code, opts)
29
+ data
30
+ end
31
+
32
+ # Make currency default currency.
33
+ # Make this currency the default currency. If the currency is not enabled, it will be enabled as well.
34
+ # @param code [String] The currency code.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
37
+ def default_currency_with_http_info(code, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.default_currency ...'
40
+ end
41
+ # verify the required parameter 'code' is set
42
+ if @api_client.config.client_side_validation && code.nil?
43
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.default_currency"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/currencies/{code}/default'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"CurrenciesApi.default_currency",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: CurrenciesApi#default_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Delete a currency.
86
+ # Delete a currency.
87
+ # @param code [String] The currency code.
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [nil]
90
+ def delete_currency(code, opts = {})
91
+ delete_currency_with_http_info(code, opts)
92
+ nil
93
+ end
94
+
95
+ # Delete a currency.
96
+ # Delete a currency.
97
+ # @param code [String] The currency code.
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
100
+ def delete_currency_with_http_info(code, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.delete_currency ...'
103
+ end
104
+ # verify the required parameter 'code' is set
105
+ if @api_client.config.client_side_validation && code.nil?
106
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.delete_currency"
107
+ end
108
+ # resource path
109
+ local_var_path = '/api/v1/currencies/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type]
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"CurrenciesApi.delete_currency",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: CurrenciesApi#delete_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Disable a currency.
147
+ # Disable a currency.
148
+ # @param code [Integer] The currency code.
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [CurrencySingle]
151
+ def disable_currency(code, opts = {})
152
+ data, _status_code, _headers = disable_currency_with_http_info(code, opts)
153
+ data
154
+ end
155
+
156
+ # Disable a currency.
157
+ # Disable a currency.
158
+ # @param code [Integer] The currency code.
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
161
+ def disable_currency_with_http_info(code, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.disable_currency ...'
164
+ end
165
+ # verify the required parameter 'code' is set
166
+ if @api_client.config.client_side_validation && code.nil?
167
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.disable_currency"
168
+ end
169
+ # resource path
170
+ local_var_path = '/api/v1/currencies/{code}/disable'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
171
+
172
+ # query parameters
173
+ query_params = opts[:query_params] || {}
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = opts[:form_params] || {}
182
+
183
+ # http body (model)
184
+ post_body = opts[:debug_body]
185
+
186
+ # return_type
187
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
188
+
189
+ # auth_names
190
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
191
+
192
+ new_options = opts.merge(
193
+ :operation => :"CurrenciesApi.disable_currency",
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => return_type
200
+ )
201
+
202
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: CurrenciesApi#disable_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+
209
+ # Enable a single currency.
210
+ # Enable a single currency.
211
+ # @param code [String] The currency code.
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [CurrencySingle]
214
+ def enable_currency(code, opts = {})
215
+ data, _status_code, _headers = enable_currency_with_http_info(code, opts)
216
+ data
217
+ end
218
+
219
+ # Enable a single currency.
220
+ # Enable a single currency.
221
+ # @param code [String] The currency code.
222
+ # @param [Hash] opts the optional parameters
223
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
224
+ def enable_currency_with_http_info(code, opts = {})
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.enable_currency ...'
227
+ end
228
+ # verify the required parameter 'code' is set
229
+ if @api_client.config.client_side_validation && code.nil?
230
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.enable_currency"
231
+ end
232
+ # resource path
233
+ local_var_path = '/api/v1/currencies/{code}/enable'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
234
+
235
+ # query parameters
236
+ query_params = opts[:query_params] || {}
237
+
238
+ # header parameters
239
+ header_params = opts[:header_params] || {}
240
+ # HTTP header 'Accept' (if needed)
241
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
242
+
243
+ # form parameters
244
+ form_params = opts[:form_params] || {}
245
+
246
+ # http body (model)
247
+ post_body = opts[:debug_body]
248
+
249
+ # return_type
250
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
251
+
252
+ # auth_names
253
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
254
+
255
+ new_options = opts.merge(
256
+ :operation => :"CurrenciesApi.enable_currency",
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => return_type
263
+ )
264
+
265
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "API called: CurrenciesApi#enable_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ end
269
+ return data, status_code, headers
270
+ end
271
+
272
+ # Get a single currency.
273
+ # Get a single currency.
274
+ # @param code [String] The currency code.
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [CurrencySingle]
277
+ def get_currency(code, opts = {})
278
+ data, _status_code, _headers = get_currency_with_http_info(code, opts)
279
+ data
280
+ end
281
+
282
+ # Get a single currency.
283
+ # Get a single currency.
284
+ # @param code [String] The currency code.
285
+ # @param [Hash] opts the optional parameters
286
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
287
+ def get_currency_with_http_info(code, opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.get_currency ...'
290
+ end
291
+ # verify the required parameter 'code' is set
292
+ if @api_client.config.client_side_validation && code.nil?
293
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.get_currency"
294
+ end
295
+ # resource path
296
+ local_var_path = '/api/v1/currencies/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+
301
+ # header parameters
302
+ header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+
306
+ # form parameters
307
+ form_params = opts[:form_params] || {}
308
+
309
+ # http body (model)
310
+ post_body = opts[:debug_body]
311
+
312
+ # return_type
313
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
314
+
315
+ # auth_names
316
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
317
+
318
+ new_options = opts.merge(
319
+ :operation => :"CurrenciesApi.get_currency",
320
+ :header_params => header_params,
321
+ :query_params => query_params,
322
+ :form_params => form_params,
323
+ :body => post_body,
324
+ :auth_names => auth_names,
325
+ :return_type => return_type
326
+ )
327
+
328
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug "API called: CurrenciesApi#get_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
331
+ end
332
+ return data, status_code, headers
333
+ end
334
+
335
+ # List all accounts with this currency.
336
+ # List all accounts with this currency.
337
+ # @param code [String] The currency code.
338
+ # @param [Hash] opts the optional parameters
339
+ # @option opts [Integer] :page Page number. The default pagination is 50.
340
+ # @option opts [String] :date A date formatted YYYY-MM-DD. When added to the request, Firefly III will show the account&#39;s balance on that day.
341
+ # @option opts [AccountTypeFilter] :type Optional filter on the account type(s) returned
342
+ # @return [AccountArray]
343
+ def list_account_by_currency(code, opts = {})
344
+ data, _status_code, _headers = list_account_by_currency_with_http_info(code, opts)
345
+ data
346
+ end
347
+
348
+ # List all accounts with this currency.
349
+ # List all accounts with this currency.
350
+ # @param code [String] The currency code.
351
+ # @param [Hash] opts the optional parameters
352
+ # @option opts [Integer] :page Page number. The default pagination is 50.
353
+ # @option opts [String] :date A date formatted YYYY-MM-DD. When added to the request, Firefly III will show the account&#39;s balance on that day.
354
+ # @option opts [AccountTypeFilter] :type Optional filter on the account type(s) returned
355
+ # @return [Array<(AccountArray, Integer, Hash)>] AccountArray data, response status code and response headers
356
+ def list_account_by_currency_with_http_info(code, opts = {})
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_account_by_currency ...'
359
+ end
360
+ # verify the required parameter 'code' is set
361
+ if @api_client.config.client_side_validation && code.nil?
362
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_account_by_currency"
363
+ end
364
+ # resource path
365
+ local_var_path = '/api/v1/currencies/{code}/accounts'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
366
+
367
+ # query parameters
368
+ query_params = opts[:query_params] || {}
369
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
370
+ query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
371
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
372
+
373
+ # header parameters
374
+ header_params = opts[:header_params] || {}
375
+ # HTTP header 'Accept' (if needed)
376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
377
+
378
+ # form parameters
379
+ form_params = opts[:form_params] || {}
380
+
381
+ # http body (model)
382
+ post_body = opts[:debug_body]
383
+
384
+ # return_type
385
+ return_type = opts[:debug_return_type] || 'AccountArray'
386
+
387
+ # auth_names
388
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
389
+
390
+ new_options = opts.merge(
391
+ :operation => :"CurrenciesApi.list_account_by_currency",
392
+ :header_params => header_params,
393
+ :query_params => query_params,
394
+ :form_params => form_params,
395
+ :body => post_body,
396
+ :auth_names => auth_names,
397
+ :return_type => return_type
398
+ )
399
+
400
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_account_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
403
+ end
404
+ return data, status_code, headers
405
+ end
406
+
407
+ # List all available budgets with this currency.
408
+ # List all available budgets with this currency.
409
+ # @param code [String] The currency code.
410
+ # @param [Hash] opts the optional parameters
411
+ # @option opts [Integer] :page Page number. The default pagination is 50
412
+ # @return [AvailableBudgetArray]
413
+ def list_available_budget_by_currency(code, opts = {})
414
+ data, _status_code, _headers = list_available_budget_by_currency_with_http_info(code, opts)
415
+ data
416
+ end
417
+
418
+ # List all available budgets with this currency.
419
+ # List all available budgets with this currency.
420
+ # @param code [String] The currency code.
421
+ # @param [Hash] opts the optional parameters
422
+ # @option opts [Integer] :page Page number. The default pagination is 50
423
+ # @return [Array<(AvailableBudgetArray, Integer, Hash)>] AvailableBudgetArray data, response status code and response headers
424
+ def list_available_budget_by_currency_with_http_info(code, opts = {})
425
+ if @api_client.config.debugging
426
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_available_budget_by_currency ...'
427
+ end
428
+ # verify the required parameter 'code' is set
429
+ if @api_client.config.client_side_validation && code.nil?
430
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_available_budget_by_currency"
431
+ end
432
+ # resource path
433
+ local_var_path = '/api/v1/currencies/{code}/available_budgets'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
434
+
435
+ # query parameters
436
+ query_params = opts[:query_params] || {}
437
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
438
+
439
+ # header parameters
440
+ header_params = opts[:header_params] || {}
441
+ # HTTP header 'Accept' (if needed)
442
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
443
+
444
+ # form parameters
445
+ form_params = opts[:form_params] || {}
446
+
447
+ # http body (model)
448
+ post_body = opts[:debug_body]
449
+
450
+ # return_type
451
+ return_type = opts[:debug_return_type] || 'AvailableBudgetArray'
452
+
453
+ # auth_names
454
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
455
+
456
+ new_options = opts.merge(
457
+ :operation => :"CurrenciesApi.list_available_budget_by_currency",
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => return_type
464
+ )
465
+
466
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_available_budget_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
472
+
473
+ # List all bills with this currency.
474
+ # List all bills with this currency.
475
+ # @param code [String] The currency code.
476
+ # @param [Hash] opts the optional parameters
477
+ # @option opts [Integer] :page Page number. The default pagination is 50.
478
+ # @return [BillArray]
479
+ def list_bill_by_currency(code, opts = {})
480
+ data, _status_code, _headers = list_bill_by_currency_with_http_info(code, opts)
481
+ data
482
+ end
483
+
484
+ # List all bills with this currency.
485
+ # List all bills with this currency.
486
+ # @param code [String] The currency code.
487
+ # @param [Hash] opts the optional parameters
488
+ # @option opts [Integer] :page Page number. The default pagination is 50.
489
+ # @return [Array<(BillArray, Integer, Hash)>] BillArray data, response status code and response headers
490
+ def list_bill_by_currency_with_http_info(code, opts = {})
491
+ if @api_client.config.debugging
492
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_bill_by_currency ...'
493
+ end
494
+ # verify the required parameter 'code' is set
495
+ if @api_client.config.client_side_validation && code.nil?
496
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_bill_by_currency"
497
+ end
498
+ # resource path
499
+ local_var_path = '/api/v1/currencies/{code}/bills'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
500
+
501
+ # query parameters
502
+ query_params = opts[:query_params] || {}
503
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
504
+
505
+ # header parameters
506
+ header_params = opts[:header_params] || {}
507
+ # HTTP header 'Accept' (if needed)
508
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
509
+
510
+ # form parameters
511
+ form_params = opts[:form_params] || {}
512
+
513
+ # http body (model)
514
+ post_body = opts[:debug_body]
515
+
516
+ # return_type
517
+ return_type = opts[:debug_return_type] || 'BillArray'
518
+
519
+ # auth_names
520
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
521
+
522
+ new_options = opts.merge(
523
+ :operation => :"CurrenciesApi.list_bill_by_currency",
524
+ :header_params => header_params,
525
+ :query_params => query_params,
526
+ :form_params => form_params,
527
+ :body => post_body,
528
+ :auth_names => auth_names,
529
+ :return_type => return_type
530
+ )
531
+
532
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
533
+ if @api_client.config.debugging
534
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_bill_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
535
+ end
536
+ return data, status_code, headers
537
+ end
538
+
539
+ # List all budget limits with this currency
540
+ # List all budget limits with this currency
541
+ # @param code [String] The currency code.
542
+ # @param [Hash] opts the optional parameters
543
+ # @option opts [Integer] :page Page number. The default pagination is 50.
544
+ # @option opts [Date] :start Start date for the budget limit list.
545
+ # @option opts [Date] :_end End date for the budget limit list.
546
+ # @return [BudgetLimitArray]
547
+ def list_budget_limit_by_currency(code, opts = {})
548
+ data, _status_code, _headers = list_budget_limit_by_currency_with_http_info(code, opts)
549
+ data
550
+ end
551
+
552
+ # List all budget limits with this currency
553
+ # List all budget limits with this currency
554
+ # @param code [String] The currency code.
555
+ # @param [Hash] opts the optional parameters
556
+ # @option opts [Integer] :page Page number. The default pagination is 50.
557
+ # @option opts [Date] :start Start date for the budget limit list.
558
+ # @option opts [Date] :_end End date for the budget limit list.
559
+ # @return [Array<(BudgetLimitArray, Integer, Hash)>] BudgetLimitArray data, response status code and response headers
560
+ def list_budget_limit_by_currency_with_http_info(code, opts = {})
561
+ if @api_client.config.debugging
562
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_budget_limit_by_currency ...'
563
+ end
564
+ # verify the required parameter 'code' is set
565
+ if @api_client.config.client_side_validation && code.nil?
566
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_budget_limit_by_currency"
567
+ end
568
+ # resource path
569
+ local_var_path = '/api/v1/currencies/{code}/budget_limits'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
570
+
571
+ # query parameters
572
+ query_params = opts[:query_params] || {}
573
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
574
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
575
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
576
+
577
+ # header parameters
578
+ header_params = opts[:header_params] || {}
579
+ # HTTP header 'Accept' (if needed)
580
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
581
+
582
+ # form parameters
583
+ form_params = opts[:form_params] || {}
584
+
585
+ # http body (model)
586
+ post_body = opts[:debug_body]
587
+
588
+ # return_type
589
+ return_type = opts[:debug_return_type] || 'BudgetLimitArray'
590
+
591
+ # auth_names
592
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
593
+
594
+ new_options = opts.merge(
595
+ :operation => :"CurrenciesApi.list_budget_limit_by_currency",
596
+ :header_params => header_params,
597
+ :query_params => query_params,
598
+ :form_params => form_params,
599
+ :body => post_body,
600
+ :auth_names => auth_names,
601
+ :return_type => return_type
602
+ )
603
+
604
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
605
+ if @api_client.config.debugging
606
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_budget_limit_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
607
+ end
608
+ return data, status_code, headers
609
+ end
610
+
611
+ # List all currencies.
612
+ # List all currencies.
613
+ # @param [Hash] opts the optional parameters
614
+ # @option opts [Integer] :page Page number. The default pagination is 50.
615
+ # @return [CurrencyArray]
616
+ def list_currency(opts = {})
617
+ data, _status_code, _headers = list_currency_with_http_info(opts)
618
+ data
619
+ end
620
+
621
+ # List all currencies.
622
+ # List all currencies.
623
+ # @param [Hash] opts the optional parameters
624
+ # @option opts [Integer] :page Page number. The default pagination is 50.
625
+ # @return [Array<(CurrencyArray, Integer, Hash)>] CurrencyArray data, response status code and response headers
626
+ def list_currency_with_http_info(opts = {})
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_currency ...'
629
+ end
630
+ # resource path
631
+ local_var_path = '/api/v1/currencies'
632
+
633
+ # query parameters
634
+ query_params = opts[:query_params] || {}
635
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
636
+
637
+ # header parameters
638
+ header_params = opts[:header_params] || {}
639
+ # HTTP header 'Accept' (if needed)
640
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
641
+
642
+ # form parameters
643
+ form_params = opts[:form_params] || {}
644
+
645
+ # http body (model)
646
+ post_body = opts[:debug_body]
647
+
648
+ # return_type
649
+ return_type = opts[:debug_return_type] || 'CurrencyArray'
650
+
651
+ # auth_names
652
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
653
+
654
+ new_options = opts.merge(
655
+ :operation => :"CurrenciesApi.list_currency",
656
+ :header_params => header_params,
657
+ :query_params => query_params,
658
+ :form_params => form_params,
659
+ :body => post_body,
660
+ :auth_names => auth_names,
661
+ :return_type => return_type
662
+ )
663
+
664
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
665
+ if @api_client.config.debugging
666
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
667
+ end
668
+ return data, status_code, headers
669
+ end
670
+
671
+ # List all known exchange rates with (from or to) this currency.
672
+ # List all known exchange rates.
673
+ # @param code [String] The currency code.
674
+ # @param [Hash] opts the optional parameters
675
+ # @option opts [Integer] :page Page number. The default pagination is 50.
676
+ # @option opts [Date] :date The date of which you want to know the exchange rate
677
+ # @option opts [Date] :start Use this instead of the date parameter to search for a range of currency exchange values.
678
+ # @option opts [Date] :_end Use this instead of the date parameter to search for a range of currency exchange values.
679
+ # @return [ExchangeRateArray]
680
+ def list_exchange_rate_by_currency(code, opts = {})
681
+ data, _status_code, _headers = list_exchange_rate_by_currency_with_http_info(code, opts)
682
+ data
683
+ end
684
+
685
+ # List all known exchange rates with (from or to) this currency.
686
+ # List all known exchange rates.
687
+ # @param code [String] The currency code.
688
+ # @param [Hash] opts the optional parameters
689
+ # @option opts [Integer] :page Page number. The default pagination is 50.
690
+ # @option opts [Date] :date The date of which you want to know the exchange rate
691
+ # @option opts [Date] :start Use this instead of the date parameter to search for a range of currency exchange values.
692
+ # @option opts [Date] :_end Use this instead of the date parameter to search for a range of currency exchange values.
693
+ # @return [Array<(ExchangeRateArray, Integer, Hash)>] ExchangeRateArray data, response status code and response headers
694
+ def list_exchange_rate_by_currency_with_http_info(code, opts = {})
695
+ if @api_client.config.debugging
696
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_exchange_rate_by_currency ...'
697
+ end
698
+ # verify the required parameter 'code' is set
699
+ if @api_client.config.client_side_validation && code.nil?
700
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_exchange_rate_by_currency"
701
+ end
702
+ # resource path
703
+ local_var_path = '/api/v1/currencies/{code}/cer'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
704
+
705
+ # query parameters
706
+ query_params = opts[:query_params] || {}
707
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
708
+ query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
709
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
710
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
711
+
712
+ # header parameters
713
+ header_params = opts[:header_params] || {}
714
+ # HTTP header 'Accept' (if needed)
715
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
716
+
717
+ # form parameters
718
+ form_params = opts[:form_params] || {}
719
+
720
+ # http body (model)
721
+ post_body = opts[:debug_body]
722
+
723
+ # return_type
724
+ return_type = opts[:debug_return_type] || 'ExchangeRateArray'
725
+
726
+ # auth_names
727
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
728
+
729
+ new_options = opts.merge(
730
+ :operation => :"CurrenciesApi.list_exchange_rate_by_currency",
731
+ :header_params => header_params,
732
+ :query_params => query_params,
733
+ :form_params => form_params,
734
+ :body => post_body,
735
+ :auth_names => auth_names,
736
+ :return_type => return_type
737
+ )
738
+
739
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
740
+ if @api_client.config.debugging
741
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_exchange_rate_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
742
+ end
743
+ return data, status_code, headers
744
+ end
745
+
746
+ # List all recurring transactions with this currency.
747
+ # List all recurring transactions with this currency.
748
+ # @param code [String] The currency code.
749
+ # @param [Hash] opts the optional parameters
750
+ # @option opts [Integer] :page Page number. The default pagination is 50.
751
+ # @return [RecurrenceArray]
752
+ def list_recurrence_by_currency(code, opts = {})
753
+ data, _status_code, _headers = list_recurrence_by_currency_with_http_info(code, opts)
754
+ data
755
+ end
756
+
757
+ # List all recurring transactions with this currency.
758
+ # List all recurring transactions with this currency.
759
+ # @param code [String] The currency code.
760
+ # @param [Hash] opts the optional parameters
761
+ # @option opts [Integer] :page Page number. The default pagination is 50.
762
+ # @return [Array<(RecurrenceArray, Integer, Hash)>] RecurrenceArray data, response status code and response headers
763
+ def list_recurrence_by_currency_with_http_info(code, opts = {})
764
+ if @api_client.config.debugging
765
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_recurrence_by_currency ...'
766
+ end
767
+ # verify the required parameter 'code' is set
768
+ if @api_client.config.client_side_validation && code.nil?
769
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_recurrence_by_currency"
770
+ end
771
+ # resource path
772
+ local_var_path = '/api/v1/currencies/{code}/recurrences'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
773
+
774
+ # query parameters
775
+ query_params = opts[:query_params] || {}
776
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
777
+
778
+ # header parameters
779
+ header_params = opts[:header_params] || {}
780
+ # HTTP header 'Accept' (if needed)
781
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
782
+
783
+ # form parameters
784
+ form_params = opts[:form_params] || {}
785
+
786
+ # http body (model)
787
+ post_body = opts[:debug_body]
788
+
789
+ # return_type
790
+ return_type = opts[:debug_return_type] || 'RecurrenceArray'
791
+
792
+ # auth_names
793
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
794
+
795
+ new_options = opts.merge(
796
+ :operation => :"CurrenciesApi.list_recurrence_by_currency",
797
+ :header_params => header_params,
798
+ :query_params => query_params,
799
+ :form_params => form_params,
800
+ :body => post_body,
801
+ :auth_names => auth_names,
802
+ :return_type => return_type
803
+ )
804
+
805
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
806
+ if @api_client.config.debugging
807
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_recurrence_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
808
+ end
809
+ return data, status_code, headers
810
+ end
811
+
812
+ # List all rules with this currency.
813
+ # List all rules with this currency.
814
+ # @param code [String] The currency code.
815
+ # @param [Hash] opts the optional parameters
816
+ # @option opts [Integer] :page Page number. The default pagination per 50.
817
+ # @return [RuleArray]
818
+ def list_rule_by_currency(code, opts = {})
819
+ data, _status_code, _headers = list_rule_by_currency_with_http_info(code, opts)
820
+ data
821
+ end
822
+
823
+ # List all rules with this currency.
824
+ # List all rules with this currency.
825
+ # @param code [String] The currency code.
826
+ # @param [Hash] opts the optional parameters
827
+ # @option opts [Integer] :page Page number. The default pagination per 50.
828
+ # @return [Array<(RuleArray, Integer, Hash)>] RuleArray data, response status code and response headers
829
+ def list_rule_by_currency_with_http_info(code, opts = {})
830
+ if @api_client.config.debugging
831
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_rule_by_currency ...'
832
+ end
833
+ # verify the required parameter 'code' is set
834
+ if @api_client.config.client_side_validation && code.nil?
835
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_rule_by_currency"
836
+ end
837
+ # resource path
838
+ local_var_path = '/api/v1/currencies/{code}/rules'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
839
+
840
+ # query parameters
841
+ query_params = opts[:query_params] || {}
842
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
843
+
844
+ # header parameters
845
+ header_params = opts[:header_params] || {}
846
+ # HTTP header 'Accept' (if needed)
847
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
848
+
849
+ # form parameters
850
+ form_params = opts[:form_params] || {}
851
+
852
+ # http body (model)
853
+ post_body = opts[:debug_body]
854
+
855
+ # return_type
856
+ return_type = opts[:debug_return_type] || 'RuleArray'
857
+
858
+ # auth_names
859
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
860
+
861
+ new_options = opts.merge(
862
+ :operation => :"CurrenciesApi.list_rule_by_currency",
863
+ :header_params => header_params,
864
+ :query_params => query_params,
865
+ :form_params => form_params,
866
+ :body => post_body,
867
+ :auth_names => auth_names,
868
+ :return_type => return_type
869
+ )
870
+
871
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
872
+ if @api_client.config.debugging
873
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_rule_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
874
+ end
875
+ return data, status_code, headers
876
+ end
877
+
878
+ # List all transactions with this currency.
879
+ # List all transactions with this currency.
880
+ # @param code [String] The currency code.
881
+ # @param [Hash] opts the optional parameters
882
+ # @option opts [Integer] :page Page number. The default pagination is per 50.
883
+ # @option opts [Date] :start_date A date formatted YYYY-MM-DD, to limit the list of transactions.
884
+ # @option opts [Date] :end_date A date formatted YYYY-MM-DD, to limit the list of transactions.
885
+ # @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned
886
+ # @return [TransactionArray]
887
+ def list_transaction_by_currency(code, opts = {})
888
+ data, _status_code, _headers = list_transaction_by_currency_with_http_info(code, opts)
889
+ data
890
+ end
891
+
892
+ # List all transactions with this currency.
893
+ # List all transactions with this currency.
894
+ # @param code [String] The currency code.
895
+ # @param [Hash] opts the optional parameters
896
+ # @option opts [Integer] :page Page number. The default pagination is per 50.
897
+ # @option opts [Date] :start_date A date formatted YYYY-MM-DD, to limit the list of transactions.
898
+ # @option opts [Date] :end_date A date formatted YYYY-MM-DD, to limit the list of transactions.
899
+ # @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned
900
+ # @return [Array<(TransactionArray, Integer, Hash)>] TransactionArray data, response status code and response headers
901
+ def list_transaction_by_currency_with_http_info(code, opts = {})
902
+ if @api_client.config.debugging
903
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.list_transaction_by_currency ...'
904
+ end
905
+ # verify the required parameter 'code' is set
906
+ if @api_client.config.client_side_validation && code.nil?
907
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.list_transaction_by_currency"
908
+ end
909
+ # resource path
910
+ local_var_path = '/api/v1/currencies/{code}/transactions'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
911
+
912
+ # query parameters
913
+ query_params = opts[:query_params] || {}
914
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
915
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
916
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
917
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
918
+
919
+ # header parameters
920
+ header_params = opts[:header_params] || {}
921
+ # HTTP header 'Accept' (if needed)
922
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
923
+
924
+ # form parameters
925
+ form_params = opts[:form_params] || {}
926
+
927
+ # http body (model)
928
+ post_body = opts[:debug_body]
929
+
930
+ # return_type
931
+ return_type = opts[:debug_return_type] || 'TransactionArray'
932
+
933
+ # auth_names
934
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
935
+
936
+ new_options = opts.merge(
937
+ :operation => :"CurrenciesApi.list_transaction_by_currency",
938
+ :header_params => header_params,
939
+ :query_params => query_params,
940
+ :form_params => form_params,
941
+ :body => post_body,
942
+ :auth_names => auth_names,
943
+ :return_type => return_type
944
+ )
945
+
946
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
947
+ if @api_client.config.debugging
948
+ @api_client.config.logger.debug "API called: CurrenciesApi#list_transaction_by_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
949
+ end
950
+ return data, status_code, headers
951
+ end
952
+
953
+ # Store a new currency
954
+ # Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters.
955
+ # @param currency [Currency] JSON array or key&#x3D;value pairs with the necessary currency information. See the model for the exact specifications.
956
+ # @param [Hash] opts the optional parameters
957
+ # @return [CurrencySingle]
958
+ def store_currency(currency, opts = {})
959
+ data, _status_code, _headers = store_currency_with_http_info(currency, opts)
960
+ data
961
+ end
962
+
963
+ # Store a new currency
964
+ # Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters.
965
+ # @param currency [Currency] JSON array or key&#x3D;value pairs with the necessary currency information. See the model for the exact specifications.
966
+ # @param [Hash] opts the optional parameters
967
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
968
+ def store_currency_with_http_info(currency, opts = {})
969
+ if @api_client.config.debugging
970
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.store_currency ...'
971
+ end
972
+ # verify the required parameter 'currency' is set
973
+ if @api_client.config.client_side_validation && currency.nil?
974
+ fail ArgumentError, "Missing the required parameter 'currency' when calling CurrenciesApi.store_currency"
975
+ end
976
+ # resource path
977
+ local_var_path = '/api/v1/currencies'
978
+
979
+ # query parameters
980
+ query_params = opts[:query_params] || {}
981
+
982
+ # header parameters
983
+ header_params = opts[:header_params] || {}
984
+ # HTTP header 'Accept' (if needed)
985
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
986
+ # HTTP header 'Content-Type'
987
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
988
+
989
+ # form parameters
990
+ form_params = opts[:form_params] || {}
991
+
992
+ # http body (model)
993
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(currency)
994
+
995
+ # return_type
996
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
997
+
998
+ # auth_names
999
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
1000
+
1001
+ new_options = opts.merge(
1002
+ :operation => :"CurrenciesApi.store_currency",
1003
+ :header_params => header_params,
1004
+ :query_params => query_params,
1005
+ :form_params => form_params,
1006
+ :body => post_body,
1007
+ :auth_names => auth_names,
1008
+ :return_type => return_type
1009
+ )
1010
+
1011
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1012
+ if @api_client.config.debugging
1013
+ @api_client.config.logger.debug "API called: CurrenciesApi#store_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1014
+ end
1015
+ return data, status_code, headers
1016
+ end
1017
+
1018
+ # Update existing currency.
1019
+ # Update existing currency.
1020
+ # @param code [String] The currency code.
1021
+ # @param currency [Currency] JSON array with updated currency information. See the model for the exact specifications.
1022
+ # @param [Hash] opts the optional parameters
1023
+ # @return [CurrencySingle]
1024
+ def update_currency(code, currency, opts = {})
1025
+ data, _status_code, _headers = update_currency_with_http_info(code, currency, opts)
1026
+ data
1027
+ end
1028
+
1029
+ # Update existing currency.
1030
+ # Update existing currency.
1031
+ # @param code [String] The currency code.
1032
+ # @param currency [Currency] JSON array with updated currency information. See the model for the exact specifications.
1033
+ # @param [Hash] opts the optional parameters
1034
+ # @return [Array<(CurrencySingle, Integer, Hash)>] CurrencySingle data, response status code and response headers
1035
+ def update_currency_with_http_info(code, currency, opts = {})
1036
+ if @api_client.config.debugging
1037
+ @api_client.config.logger.debug 'Calling API: CurrenciesApi.update_currency ...'
1038
+ end
1039
+ # verify the required parameter 'code' is set
1040
+ if @api_client.config.client_side_validation && code.nil?
1041
+ fail ArgumentError, "Missing the required parameter 'code' when calling CurrenciesApi.update_currency"
1042
+ end
1043
+ # verify the required parameter 'currency' is set
1044
+ if @api_client.config.client_side_validation && currency.nil?
1045
+ fail ArgumentError, "Missing the required parameter 'currency' when calling CurrenciesApi.update_currency"
1046
+ end
1047
+ # resource path
1048
+ local_var_path = '/api/v1/currencies/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
1049
+
1050
+ # query parameters
1051
+ query_params = opts[:query_params] || {}
1052
+
1053
+ # header parameters
1054
+ header_params = opts[:header_params] || {}
1055
+ # HTTP header 'Accept' (if needed)
1056
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1057
+ # HTTP header 'Content-Type'
1058
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1059
+
1060
+ # form parameters
1061
+ form_params = opts[:form_params] || {}
1062
+
1063
+ # http body (model)
1064
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(currency)
1065
+
1066
+ # return_type
1067
+ return_type = opts[:debug_return_type] || 'CurrencySingle'
1068
+
1069
+ # auth_names
1070
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
1071
+
1072
+ new_options = opts.merge(
1073
+ :operation => :"CurrenciesApi.update_currency",
1074
+ :header_params => header_params,
1075
+ :query_params => query_params,
1076
+ :form_params => form_params,
1077
+ :body => post_body,
1078
+ :auth_names => auth_names,
1079
+ :return_type => return_type
1080
+ )
1081
+
1082
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1083
+ if @api_client.config.debugging
1084
+ @api_client.config.logger.debug "API called: CurrenciesApi#update_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1085
+ end
1086
+ return data, status_code, headers
1087
+ end
1088
+ end
1089
+ end