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,348 @@
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 AvailableBudgetsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete an available budget.
23
+ # Delete an available budget. Not much more to say.
24
+ # @param id [Integer] The ID of the available budget.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def delete_available_budget(id, opts = {})
28
+ delete_available_budget_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete an available budget.
33
+ # Delete an available budget. Not much more to say.
34
+ # @param id [Integer] The ID of the available budget.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_available_budget_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AvailableBudgetsApi.delete_available_budget ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling AvailableBudgetsApi.delete_available_budget"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/available_budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"AvailableBudgetsApi.delete_available_budget",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: AvailableBudgetsApi#delete_available_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Get a single available budget.
84
+ # Get a single available budget, by ID.
85
+ # @param id [Integer] The ID of the available budget.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [AvailableBudgetSingle]
88
+ def get_available_budget(id, opts = {})
89
+ data, _status_code, _headers = get_available_budget_with_http_info(id, opts)
90
+ data
91
+ end
92
+
93
+ # Get a single available budget.
94
+ # Get a single available budget, by ID.
95
+ # @param id [Integer] The ID of the available budget.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(AvailableBudgetSingle, Integer, Hash)>] AvailableBudgetSingle data, response status code and response headers
98
+ def get_available_budget_with_http_info(id, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: AvailableBudgetsApi.get_available_budget ...'
101
+ end
102
+ # verify the required parameter 'id' is set
103
+ if @api_client.config.client_side_validation && id.nil?
104
+ fail ArgumentError, "Missing the required parameter 'id' when calling AvailableBudgetsApi.get_available_budget"
105
+ end
106
+ # resource path
107
+ local_var_path = '/api/v1/available_budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
108
+
109
+ # query parameters
110
+ query_params = opts[:query_params] || {}
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
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] || 'AvailableBudgetSingle'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"AvailableBudgetsApi.get_available_budget",
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(:GET, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: AvailableBudgetsApi#get_available_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # List all available budget amounts.
147
+ # Firefly III allows users to set the amount that is available to be budgeted in so-called \"available budgets\". For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [Integer] :page Page number. The default pagination is 50.
150
+ # @option opts [Date] :start A date formatted YYYY-MM-DD.
151
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD.
152
+ # @return [AvailableBudgetArray]
153
+ def list_available_budget(opts = {})
154
+ data, _status_code, _headers = list_available_budget_with_http_info(opts)
155
+ data
156
+ end
157
+
158
+ # List all available budget amounts.
159
+ # Firefly III allows users to set the amount that is available to be budgeted in so-called \&quot;available budgets\&quot;. For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
160
+ # @param [Hash] opts the optional parameters
161
+ # @option opts [Integer] :page Page number. The default pagination is 50.
162
+ # @option opts [Date] :start A date formatted YYYY-MM-DD.
163
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD.
164
+ # @return [Array<(AvailableBudgetArray, Integer, Hash)>] AvailableBudgetArray data, response status code and response headers
165
+ def list_available_budget_with_http_info(opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: AvailableBudgetsApi.list_available_budget ...'
168
+ end
169
+ # resource path
170
+ local_var_path = '/api/v1/available_budgets'
171
+
172
+ # query parameters
173
+ query_params = opts[:query_params] || {}
174
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
175
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
176
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
177
+
178
+ # header parameters
179
+ header_params = opts[:header_params] || {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:debug_body]
188
+
189
+ # return_type
190
+ return_type = opts[:debug_return_type] || 'AvailableBudgetArray'
191
+
192
+ # auth_names
193
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
194
+
195
+ new_options = opts.merge(
196
+ :operation => :"AvailableBudgetsApi.list_available_budget",
197
+ :header_params => header_params,
198
+ :query_params => query_params,
199
+ :form_params => form_params,
200
+ :body => post_body,
201
+ :auth_names => auth_names,
202
+ :return_type => return_type
203
+ )
204
+
205
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: AvailableBudgetsApi#list_available_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+
212
+ # Store a new available budget
213
+ # Creates a new available budget for a specified period. The data required can be submitted as a JSON body or as a list of parameters.
214
+ # @param available_budget [AvailableBudget] JSON array or key&#x3D;value pairs with the necessary available budget information. See the model for the exact specifications.
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [AvailableBudgetSingle]
217
+ def store_available_budget(available_budget, opts = {})
218
+ data, _status_code, _headers = store_available_budget_with_http_info(available_budget, opts)
219
+ data
220
+ end
221
+
222
+ # Store a new available budget
223
+ # Creates a new available budget for a specified period. The data required can be submitted as a JSON body or as a list of parameters.
224
+ # @param available_budget [AvailableBudget] JSON array or key&#x3D;value pairs with the necessary available budget information. See the model for the exact specifications.
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(AvailableBudgetSingle, Integer, Hash)>] AvailableBudgetSingle data, response status code and response headers
227
+ def store_available_budget_with_http_info(available_budget, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: AvailableBudgetsApi.store_available_budget ...'
230
+ end
231
+ # verify the required parameter 'available_budget' is set
232
+ if @api_client.config.client_side_validation && available_budget.nil?
233
+ fail ArgumentError, "Missing the required parameter 'available_budget' when calling AvailableBudgetsApi.store_available_budget"
234
+ end
235
+ # resource path
236
+ local_var_path = '/api/v1/available_budgets'
237
+
238
+ # query parameters
239
+ query_params = opts[:query_params] || {}
240
+
241
+ # header parameters
242
+ header_params = opts[:header_params] || {}
243
+ # HTTP header 'Accept' (if needed)
244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
245
+ # HTTP header 'Content-Type'
246
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
247
+
248
+ # form parameters
249
+ form_params = opts[:form_params] || {}
250
+
251
+ # http body (model)
252
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(available_budget)
253
+
254
+ # return_type
255
+ return_type = opts[:debug_return_type] || 'AvailableBudgetSingle'
256
+
257
+ # auth_names
258
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
259
+
260
+ new_options = opts.merge(
261
+ :operation => :"AvailableBudgetsApi.store_available_budget",
262
+ :header_params => header_params,
263
+ :query_params => query_params,
264
+ :form_params => form_params,
265
+ :body => post_body,
266
+ :auth_names => auth_names,
267
+ :return_type => return_type
268
+ )
269
+
270
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug "API called: AvailableBudgetsApi#store_available_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
273
+ end
274
+ return data, status_code, headers
275
+ end
276
+
277
+ # Update existing available budget, to change for example the date range of the amount or the amount itself.
278
+ # Update existing available budget.
279
+ # @param id [Integer] The ID of the object.X
280
+ # @param available_budget [AvailableBudget] JSON array or form value with updated available budget information. See the model for the exact specifications.
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [AvailableBudgetSingle]
283
+ def update_available_budget(id, available_budget, opts = {})
284
+ data, _status_code, _headers = update_available_budget_with_http_info(id, available_budget, opts)
285
+ data
286
+ end
287
+
288
+ # Update existing available budget, to change for example the date range of the amount or the amount itself.
289
+ # Update existing available budget.
290
+ # @param id [Integer] The ID of the object.X
291
+ # @param available_budget [AvailableBudget] JSON array or form value with updated available budget information. See the model for the exact specifications.
292
+ # @param [Hash] opts the optional parameters
293
+ # @return [Array<(AvailableBudgetSingle, Integer, Hash)>] AvailableBudgetSingle data, response status code and response headers
294
+ def update_available_budget_with_http_info(id, available_budget, opts = {})
295
+ if @api_client.config.debugging
296
+ @api_client.config.logger.debug 'Calling API: AvailableBudgetsApi.update_available_budget ...'
297
+ end
298
+ # verify the required parameter 'id' is set
299
+ if @api_client.config.client_side_validation && id.nil?
300
+ fail ArgumentError, "Missing the required parameter 'id' when calling AvailableBudgetsApi.update_available_budget"
301
+ end
302
+ # verify the required parameter 'available_budget' is set
303
+ if @api_client.config.client_side_validation && available_budget.nil?
304
+ fail ArgumentError, "Missing the required parameter 'available_budget' when calling AvailableBudgetsApi.update_available_budget"
305
+ end
306
+ # resource path
307
+ local_var_path = '/api/v1/available_budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
308
+
309
+ # query parameters
310
+ query_params = opts[:query_params] || {}
311
+
312
+ # header parameters
313
+ header_params = opts[:header_params] || {}
314
+ # HTTP header 'Accept' (if needed)
315
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
316
+ # HTTP header 'Content-Type'
317
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
318
+
319
+ # form parameters
320
+ form_params = opts[:form_params] || {}
321
+
322
+ # http body (model)
323
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(available_budget)
324
+
325
+ # return_type
326
+ return_type = opts[:debug_return_type] || 'AvailableBudgetSingle'
327
+
328
+ # auth_names
329
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
330
+
331
+ new_options = opts.merge(
332
+ :operation => :"AvailableBudgetsApi.update_available_budget",
333
+ :header_params => header_params,
334
+ :query_params => query_params,
335
+ :form_params => form_params,
336
+ :body => post_body,
337
+ :auth_names => auth_names,
338
+ :return_type => return_type
339
+ )
340
+
341
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "API called: AvailableBudgetsApi#update_available_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
344
+ end
345
+ return data, status_code, headers
346
+ end
347
+ end
348
+ end
@@ -0,0 +1,555 @@
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 BillsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a bill.
23
+ # Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
24
+ # @param id [Integer] The ID of the bill.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def delete_bill(id, opts = {})
28
+ delete_bill_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete a bill.
33
+ # Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
34
+ # @param id [Integer] The ID of the bill.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_bill_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: BillsApi.delete_bill ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.delete_bill"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/bills/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"BillsApi.delete_bill",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: BillsApi#delete_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Get a single bill.
84
+ # Get a single bill.
85
+ # @param id [Integer] The ID of the bill.
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [Date] :start A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates.
88
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates.
89
+ # @return [BillSingle]
90
+ def get_bill(id, opts = {})
91
+ data, _status_code, _headers = get_bill_with_http_info(id, opts)
92
+ data
93
+ end
94
+
95
+ # Get a single bill.
96
+ # Get a single bill.
97
+ # @param id [Integer] The ID of the bill.
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [Date] :start A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates.
100
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates.
101
+ # @return [Array<(BillSingle, Integer, Hash)>] BillSingle data, response status code and response headers
102
+ def get_bill_with_http_info(id, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: BillsApi.get_bill ...'
105
+ end
106
+ # verify the required parameter 'id' is set
107
+ if @api_client.config.client_side_validation && id.nil?
108
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.get_bill"
109
+ end
110
+ # resource path
111
+ local_var_path = '/api/v1/bills/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
116
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
122
+
123
+ # form parameters
124
+ form_params = opts[:form_params] || {}
125
+
126
+ # http body (model)
127
+ post_body = opts[:debug_body]
128
+
129
+ # return_type
130
+ return_type = opts[:debug_return_type] || 'BillSingle'
131
+
132
+ # auth_names
133
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
134
+
135
+ new_options = opts.merge(
136
+ :operation => :"BillsApi.get_bill",
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: BillsApi#get_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # List all attachments uploaded to the bill.
153
+ # This endpoint will list all attachments linked to the bill.
154
+ # @param id [Integer] The ID of the bill.
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [Integer] :page Page number. The default pagination is 50.
157
+ # @return [AttachmentArray]
158
+ def list_attachment_by_bill(id, opts = {})
159
+ data, _status_code, _headers = list_attachment_by_bill_with_http_info(id, opts)
160
+ data
161
+ end
162
+
163
+ # List all attachments uploaded to the bill.
164
+ # This endpoint will list all attachments linked to the bill.
165
+ # @param id [Integer] The ID of the bill.
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [Integer] :page Page number. The default pagination is 50.
168
+ # @return [Array<(AttachmentArray, Integer, Hash)>] AttachmentArray data, response status code and response headers
169
+ def list_attachment_by_bill_with_http_info(id, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: BillsApi.list_attachment_by_bill ...'
172
+ end
173
+ # verify the required parameter 'id' is set
174
+ if @api_client.config.client_side_validation && id.nil?
175
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.list_attachment_by_bill"
176
+ end
177
+ # resource path
178
+ local_var_path = '/api/v1/bills/{id}/attachments'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
183
+
184
+ # header parameters
185
+ header_params = opts[:header_params] || {}
186
+ # HTTP header 'Accept' (if needed)
187
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
188
+
189
+ # form parameters
190
+ form_params = opts[:form_params] || {}
191
+
192
+ # http body (model)
193
+ post_body = opts[:debug_body]
194
+
195
+ # return_type
196
+ return_type = opts[:debug_return_type] || 'AttachmentArray'
197
+
198
+ # auth_names
199
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
200
+
201
+ new_options = opts.merge(
202
+ :operation => :"BillsApi.list_attachment_by_bill",
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => return_type
209
+ )
210
+
211
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug "API called: BillsApi#list_attachment_by_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
214
+ end
215
+ return data, status_code, headers
216
+ end
217
+
218
+ # List all bills.
219
+ # This endpoint will list all the user's bills.
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [Integer] :page Page number. The default pagination is 50.
222
+ # @option opts [Date] :start A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates.
223
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates.
224
+ # @return [BillArray]
225
+ def list_bill(opts = {})
226
+ data, _status_code, _headers = list_bill_with_http_info(opts)
227
+ data
228
+ end
229
+
230
+ # List all bills.
231
+ # This endpoint will list all the user&#39;s bills.
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [Integer] :page Page number. The default pagination is 50.
234
+ # @option opts [Date] :start A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates.
235
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates.
236
+ # @return [Array<(BillArray, Integer, Hash)>] BillArray data, response status code and response headers
237
+ def list_bill_with_http_info(opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: BillsApi.list_bill ...'
240
+ end
241
+ # resource path
242
+ local_var_path = '/api/v1/bills'
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
247
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
248
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
249
+
250
+ # header parameters
251
+ header_params = opts[:header_params] || {}
252
+ # HTTP header 'Accept' (if needed)
253
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
254
+
255
+ # form parameters
256
+ form_params = opts[:form_params] || {}
257
+
258
+ # http body (model)
259
+ post_body = opts[:debug_body]
260
+
261
+ # return_type
262
+ return_type = opts[:debug_return_type] || 'BillArray'
263
+
264
+ # auth_names
265
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
266
+
267
+ new_options = opts.merge(
268
+ :operation => :"BillsApi.list_bill",
269
+ :header_params => header_params,
270
+ :query_params => query_params,
271
+ :form_params => form_params,
272
+ :body => post_body,
273
+ :auth_names => auth_names,
274
+ :return_type => return_type
275
+ )
276
+
277
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: BillsApi#list_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+
284
+ # List all rules associated with the bill.
285
+ # This endpoint will list all rules that have an action to set the bill to this bill.
286
+ # @param id [Integer] The ID of the bill.
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [RuleArray]
289
+ def list_rule_by_bill(id, opts = {})
290
+ data, _status_code, _headers = list_rule_by_bill_with_http_info(id, opts)
291
+ data
292
+ end
293
+
294
+ # List all rules associated with the bill.
295
+ # This endpoint will list all rules that have an action to set the bill to this bill.
296
+ # @param id [Integer] The ID of the bill.
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(RuleArray, Integer, Hash)>] RuleArray data, response status code and response headers
299
+ def list_rule_by_bill_with_http_info(id, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: BillsApi.list_rule_by_bill ...'
302
+ end
303
+ # verify the required parameter 'id' is set
304
+ if @api_client.config.client_side_validation && id.nil?
305
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.list_rule_by_bill"
306
+ end
307
+ # resource path
308
+ local_var_path = '/api/v1/bills/{id}/rules'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
309
+
310
+ # query parameters
311
+ query_params = opts[:query_params] || {}
312
+
313
+ # header parameters
314
+ header_params = opts[:header_params] || {}
315
+ # HTTP header 'Accept' (if needed)
316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
317
+
318
+ # form parameters
319
+ form_params = opts[:form_params] || {}
320
+
321
+ # http body (model)
322
+ post_body = opts[:debug_body]
323
+
324
+ # return_type
325
+ return_type = opts[:debug_return_type] || 'RuleArray'
326
+
327
+ # auth_names
328
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
329
+
330
+ new_options = opts.merge(
331
+ :operation => :"BillsApi.list_rule_by_bill",
332
+ :header_params => header_params,
333
+ :query_params => query_params,
334
+ :form_params => form_params,
335
+ :body => post_body,
336
+ :auth_names => auth_names,
337
+ :return_type => return_type
338
+ )
339
+
340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "API called: BillsApi#list_rule_by_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ end
344
+ return data, status_code, headers
345
+ end
346
+
347
+ # List all transactions associated with the bill.
348
+ # This endpoint will list all transactions linked to this bill.
349
+ # @param id [Integer] The ID of the bill.
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [Date] :start A date formatted YYYY-MM-DD.
352
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD.
353
+ # @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned
354
+ # @return [TransactionArray]
355
+ def list_transaction_by_bill(id, opts = {})
356
+ data, _status_code, _headers = list_transaction_by_bill_with_http_info(id, opts)
357
+ data
358
+ end
359
+
360
+ # List all transactions associated with the bill.
361
+ # This endpoint will list all transactions linked to this bill.
362
+ # @param id [Integer] The ID of the bill.
363
+ # @param [Hash] opts the optional parameters
364
+ # @option opts [Date] :start A date formatted YYYY-MM-DD.
365
+ # @option opts [Date] :_end A date formatted YYYY-MM-DD.
366
+ # @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned
367
+ # @return [Array<(TransactionArray, Integer, Hash)>] TransactionArray data, response status code and response headers
368
+ def list_transaction_by_bill_with_http_info(id, opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: BillsApi.list_transaction_by_bill ...'
371
+ end
372
+ # verify the required parameter 'id' is set
373
+ if @api_client.config.client_side_validation && id.nil?
374
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.list_transaction_by_bill"
375
+ end
376
+ # resource path
377
+ local_var_path = '/api/v1/bills/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
378
+
379
+ # query parameters
380
+ query_params = opts[:query_params] || {}
381
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
382
+ query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
383
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
384
+
385
+ # header parameters
386
+ header_params = opts[:header_params] || {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = opts[:form_params] || {}
392
+
393
+ # http body (model)
394
+ post_body = opts[:debug_body]
395
+
396
+ # return_type
397
+ return_type = opts[:debug_return_type] || 'TransactionArray'
398
+
399
+ # auth_names
400
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
401
+
402
+ new_options = opts.merge(
403
+ :operation => :"BillsApi.list_transaction_by_bill",
404
+ :header_params => header_params,
405
+ :query_params => query_params,
406
+ :form_params => form_params,
407
+ :body => post_body,
408
+ :auth_names => auth_names,
409
+ :return_type => return_type
410
+ )
411
+
412
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
413
+ if @api_client.config.debugging
414
+ @api_client.config.logger.debug "API called: BillsApi#list_transaction_by_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
415
+ end
416
+ return data, status_code, headers
417
+ end
418
+
419
+ # Store a new bill
420
+ # Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
421
+ # @param bill [Bill] JSON array or key&#x3D;value pairs with the necessary bill information. See the model for the exact specifications.
422
+ # @param [Hash] opts the optional parameters
423
+ # @return [BillSingle]
424
+ def store_bill(bill, opts = {})
425
+ data, _status_code, _headers = store_bill_with_http_info(bill, opts)
426
+ data
427
+ end
428
+
429
+ # Store a new bill
430
+ # Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
431
+ # @param bill [Bill] JSON array or key&#x3D;value pairs with the necessary bill information. See the model for the exact specifications.
432
+ # @param [Hash] opts the optional parameters
433
+ # @return [Array<(BillSingle, Integer, Hash)>] BillSingle data, response status code and response headers
434
+ def store_bill_with_http_info(bill, opts = {})
435
+ if @api_client.config.debugging
436
+ @api_client.config.logger.debug 'Calling API: BillsApi.store_bill ...'
437
+ end
438
+ # verify the required parameter 'bill' is set
439
+ if @api_client.config.client_side_validation && bill.nil?
440
+ fail ArgumentError, "Missing the required parameter 'bill' when calling BillsApi.store_bill"
441
+ end
442
+ # resource path
443
+ local_var_path = '/api/v1/bills'
444
+
445
+ # query parameters
446
+ query_params = opts[:query_params] || {}
447
+
448
+ # header parameters
449
+ header_params = opts[:header_params] || {}
450
+ # HTTP header 'Accept' (if needed)
451
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
452
+ # HTTP header 'Content-Type'
453
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
454
+
455
+ # form parameters
456
+ form_params = opts[:form_params] || {}
457
+
458
+ # http body (model)
459
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bill)
460
+
461
+ # return_type
462
+ return_type = opts[:debug_return_type] || 'BillSingle'
463
+
464
+ # auth_names
465
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
466
+
467
+ new_options = opts.merge(
468
+ :operation => :"BillsApi.store_bill",
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :form_params => form_params,
472
+ :body => post_body,
473
+ :auth_names => auth_names,
474
+ :return_type => return_type
475
+ )
476
+
477
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: BillsApi#store_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ # Update existing bill.
485
+ # Update existing bill.
486
+ # @param id [Integer] The ID of the bill.
487
+ # @param bill [Bill] JSON array or key&#x3D;value pairs with updated bill information. See the model for the exact specifications.
488
+ # @param [Hash] opts the optional parameters
489
+ # @return [BillSingle]
490
+ def update_bill(id, bill, opts = {})
491
+ data, _status_code, _headers = update_bill_with_http_info(id, bill, opts)
492
+ data
493
+ end
494
+
495
+ # Update existing bill.
496
+ # Update existing bill.
497
+ # @param id [Integer] The ID of the bill.
498
+ # @param bill [Bill] JSON array or key&#x3D;value pairs with updated bill information. See the model for the exact specifications.
499
+ # @param [Hash] opts the optional parameters
500
+ # @return [Array<(BillSingle, Integer, Hash)>] BillSingle data, response status code and response headers
501
+ def update_bill_with_http_info(id, bill, opts = {})
502
+ if @api_client.config.debugging
503
+ @api_client.config.logger.debug 'Calling API: BillsApi.update_bill ...'
504
+ end
505
+ # verify the required parameter 'id' is set
506
+ if @api_client.config.client_side_validation && id.nil?
507
+ fail ArgumentError, "Missing the required parameter 'id' when calling BillsApi.update_bill"
508
+ end
509
+ # verify the required parameter 'bill' is set
510
+ if @api_client.config.client_side_validation && bill.nil?
511
+ fail ArgumentError, "Missing the required parameter 'bill' when calling BillsApi.update_bill"
512
+ end
513
+ # resource path
514
+ local_var_path = '/api/v1/bills/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
515
+
516
+ # query parameters
517
+ query_params = opts[:query_params] || {}
518
+
519
+ # header parameters
520
+ header_params = opts[:header_params] || {}
521
+ # HTTP header 'Accept' (if needed)
522
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
523
+ # HTTP header 'Content-Type'
524
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
525
+
526
+ # form parameters
527
+ form_params = opts[:form_params] || {}
528
+
529
+ # http body (model)
530
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bill)
531
+
532
+ # return_type
533
+ return_type = opts[:debug_return_type] || 'BillSingle'
534
+
535
+ # auth_names
536
+ auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
537
+
538
+ new_options = opts.merge(
539
+ :operation => :"BillsApi.update_bill",
540
+ :header_params => header_params,
541
+ :query_params => query_params,
542
+ :form_params => form_params,
543
+ :body => post_body,
544
+ :auth_names => auth_names,
545
+ :return_type => return_type
546
+ )
547
+
548
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
549
+ if @api_client.config.debugging
550
+ @api_client.config.logger.debug "API called: BillsApi#update_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
551
+ end
552
+ return data, status_code, headers
553
+ end
554
+ end
555
+ end