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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +349 -0
- data/Rakefile +10 -0
- data/docs/AboutApi.md +143 -0
- data/docs/Account.md +70 -0
- data/docs/AccountArray.md +20 -0
- data/docs/AccountRead.md +22 -0
- data/docs/AccountSingle.md +18 -0
- data/docs/AccountTypeFilter.md +15 -0
- data/docs/AccountTypeProperty.md +15 -0
- data/docs/AccountsApi.md +531 -0
- data/docs/Attachment.md +44 -0
- data/docs/AttachmentArray.md +20 -0
- data/docs/AttachmentRead.md +24 -0
- data/docs/AttachmentSingle.md +18 -0
- data/docs/AttachmentsApi.md +510 -0
- data/docs/AvailableBudget.md +38 -0
- data/docs/AvailableBudgetArray.md +20 -0
- data/docs/AvailableBudgetRead.md +22 -0
- data/docs/AvailableBudgetSingle.md +18 -0
- data/docs/AvailableBudgetsApi.md +369 -0
- data/docs/BasicSummaryEntry.md +36 -0
- data/docs/Bill.md +50 -0
- data/docs/BillArray.md +20 -0
- data/docs/BillPaidDates.md +22 -0
- data/docs/BillRead.md +22 -0
- data/docs/BillSingle.md +18 -0
- data/docs/BillsApi.md +600 -0
- data/docs/Budget.md +28 -0
- data/docs/BudgetArray.md +20 -0
- data/docs/BudgetLimit.md +38 -0
- data/docs/BudgetLimitArray.md +20 -0
- data/docs/BudgetLimitRead.md +22 -0
- data/docs/BudgetLimitSingle.md +18 -0
- data/docs/BudgetRead.md +22 -0
- data/docs/BudgetSingle.md +18 -0
- data/docs/BudgetSpent.md +26 -0
- data/docs/BudgetsApi.md +897 -0
- data/docs/CategoriesApi.md +446 -0
- data/docs/Category.md +26 -0
- data/docs/CategoryArray.md +20 -0
- data/docs/CategoryEarned.md +30 -0
- data/docs/CategoryRead.md +22 -0
- data/docs/CategorySingle.md +18 -0
- data/docs/CategorySpent.md +30 -0
- data/docs/ChartDataPoint.md +18 -0
- data/docs/ChartDataSet.md +32 -0
- data/docs/ChartsApi.md +374 -0
- data/docs/ConfigurationApi.md +148 -0
- data/docs/ConfigurationUpdate.md +18 -0
- data/docs/CurrenciesApi.md +1198 -0
- data/docs/Currency.md +32 -0
- data/docs/CurrencyArray.md +22 -0
- data/docs/CurrencyExchangeRatesApi.md +86 -0
- data/docs/CurrencyRead.md +22 -0
- data/docs/CurrencySingle.md +18 -0
- data/docs/ExchangeRate.md +22 -0
- data/docs/ExchangeRateArray.md +22 -0
- data/docs/ExchangeRateAttributes.md +44 -0
- data/docs/ImportApi.md +232 -0
- data/docs/ImportJob.md +22 -0
- data/docs/ImportJobArray.md +22 -0
- data/docs/ImportJobAttributes.md +42 -0
- data/docs/ImportJobSingle.md +18 -0
- data/docs/LinkType.md +26 -0
- data/docs/LinkTypeArray.md +22 -0
- data/docs/LinkTypeRead.md +24 -0
- data/docs/LinkTypeSingle.md +18 -0
- data/docs/LinksApi.md +804 -0
- data/docs/Meta.md +18 -0
- data/docs/MetaPagination.md +26 -0
- data/docs/ObjectLink.md +20 -0
- data/docs/ObjectLink0.md +20 -0
- data/docs/PageLink.md +22 -0
- data/docs/PiggyBank.md +54 -0
- data/docs/PiggyBankArray.md +22 -0
- data/docs/PiggyBankEvent.md +24 -0
- data/docs/PiggyBankEventArray.md +22 -0
- data/docs/PiggyBankEventAttributes.md +34 -0
- data/docs/PiggyBankRead.md +24 -0
- data/docs/PiggyBankSingle.md +18 -0
- data/docs/PiggyBanksApi.md +440 -0
- data/docs/Preference.md +24 -0
- data/docs/PreferenceArray.md +22 -0
- data/docs/PreferenceRead.md +22 -0
- data/docs/PreferenceSingle.md +18 -0
- data/docs/PreferencesApi.md +224 -0
- data/docs/Recurrence.md +45 -0
- data/docs/RecurrenceArray.md +22 -0
- data/docs/RecurrenceRead.md +24 -0
- data/docs/RecurrenceRepetition.md +34 -0
- data/docs/RecurrenceSingle.md +18 -0
- data/docs/RecurrenceTransaction.md +68 -0
- data/docs/RecurrencesApi.md +513 -0
- data/docs/Rule.md +42 -0
- data/docs/RuleAction.md +32 -0
- data/docs/RuleArray.md +22 -0
- data/docs/RuleGroup.md +28 -0
- data/docs/RuleGroupArray.md +22 -0
- data/docs/RuleGroupRead.md +24 -0
- data/docs/RuleGroupSingle.md +18 -0
- data/docs/RuleGroupsApi.md +603 -0
- data/docs/RuleRead.md +24 -0
- data/docs/RuleSingle.md +18 -0
- data/docs/RuleTrigger.md +32 -0
- data/docs/RulesApi.md +528 -0
- data/docs/SummaryApi.md +84 -0
- data/docs/SystemConfiguration.md +18 -0
- data/docs/SystemConfigurationData.md +24 -0
- data/docs/SystemInfo.md +18 -0
- data/docs/SystemInfoData.md +26 -0
- data/docs/TagArray.md +22 -0
- data/docs/TagCloud.md +18 -0
- data/docs/TagCloudTag.md +24 -0
- data/docs/TagModel.md +34 -0
- data/docs/TagRead.md +24 -0
- data/docs/TagSingle.md +18 -0
- data/docs/TagsApi.md +523 -0
- data/docs/Transaction.md +26 -0
- data/docs/TransactionArray.md +22 -0
- data/docs/TransactionLink.md +30 -0
- data/docs/TransactionLinkArray.md +22 -0
- data/docs/TransactionLinkRead.md +24 -0
- data/docs/TransactionLinkSingle.md +18 -0
- data/docs/TransactionRead.md +24 -0
- data/docs/TransactionSingle.md +18 -0
- data/docs/TransactionSplit.md +128 -0
- data/docs/TransactionTypeFilter.md +15 -0
- data/docs/TransactionsApi.md +592 -0
- data/docs/User.md +28 -0
- data/docs/UserArray.md +22 -0
- data/docs/UserRead.md +24 -0
- data/docs/UserSingle.md +18 -0
- data/docs/UsersApi.md +365 -0
- data/docs/ValidationError.md +20 -0
- data/docs/ValidationErrorErrors.md +20 -0
- data/firefly-iii-client.gemspec +39 -0
- data/git_push.sh +58 -0
- data/lib/firefly_iii_client.rb +172 -0
- data/lib/firefly_iii_client/api/about_api.rb +136 -0
- data/lib/firefly_iii_client/api/accounts_api.rb +495 -0
- data/lib/firefly_iii_client/api/attachments_api.rb +470 -0
- data/lib/firefly_iii_client/api/available_budgets_api.rb +348 -0
- data/lib/firefly_iii_client/api/bills_api.rb +555 -0
- data/lib/firefly_iii_client/api/budgets_api.rb +866 -0
- data/lib/firefly_iii_client/api/categories_api.rb +417 -0
- data/lib/firefly_iii_client/api/charts_api.rb +383 -0
- data/lib/firefly_iii_client/api/configuration_api.rb +156 -0
- data/lib/firefly_iii_client/api/currencies_api.rb +1089 -0
- data/lib/firefly_iii_client/api/currency_exchange_rates_api.rb +91 -0
- data/lib/firefly_iii_client/api/import_api.rb +220 -0
- data/lib/firefly_iii_client/api/links_api.rb +737 -0
- data/lib/firefly_iii_client/api/piggy_banks_api.rb +408 -0
- data/lib/firefly_iii_client/api/preferences_api.rb +216 -0
- data/lib/firefly_iii_client/api/recurrences_api.rb +472 -0
- data/lib/firefly_iii_client/api/rule_groups_api.rb +559 -0
- data/lib/firefly_iii_client/api/rules_api.rb +493 -0
- data/lib/firefly_iii_client/api/summary_api.rb +96 -0
- data/lib/firefly_iii_client/api/tags_api.rb +491 -0
- data/lib/firefly_iii_client/api/transactions_api.rb +546 -0
- data/lib/firefly_iii_client/api/users_api.rb +342 -0
- data/lib/firefly_iii_client/api_client.rb +390 -0
- data/lib/firefly_iii_client/api_error.rb +57 -0
- data/lib/firefly_iii_client/configuration.rb +277 -0
- data/lib/firefly_iii_client/models/account.rb +564 -0
- data/lib/firefly_iii_client/models/account_array.rb +229 -0
- data/lib/firefly_iii_client/models/account_read.rb +237 -0
- data/lib/firefly_iii_client/models/account_single.rb +218 -0
- data/lib/firefly_iii_client/models/account_type_filter.rb +56 -0
- data/lib/firefly_iii_client/models/account_type_property.rb +47 -0
- data/lib/firefly_iii_client/models/attachment.rb +401 -0
- data/lib/firefly_iii_client/models/attachment_array.rb +229 -0
- data/lib/firefly_iii_client/models/attachment_read.rb +246 -0
- data/lib/firefly_iii_client/models/attachment_single.rb +218 -0
- data/lib/firefly_iii_client/models/available_budget.rb +331 -0
- data/lib/firefly_iii_client/models/available_budget_array.rb +229 -0
- data/lib/firefly_iii_client/models/available_budget_read.rb +237 -0
- data/lib/firefly_iii_client/models/available_budget_single.rb +218 -0
- data/lib/firefly_iii_client/models/basic_summary_entry.rb +307 -0
- data/lib/firefly_iii_client/models/bill.rb +433 -0
- data/lib/firefly_iii_client/models/bill_array.rb +229 -0
- data/lib/firefly_iii_client/models/bill_paid_dates.rb +239 -0
- data/lib/firefly_iii_client/models/bill_read.rb +237 -0
- data/lib/firefly_iii_client/models/bill_single.rb +218 -0
- data/lib/firefly_iii_client/models/budget.rb +271 -0
- data/lib/firefly_iii_client/models/budget_array.rb +229 -0
- data/lib/firefly_iii_client/models/budget_limit.rb +335 -0
- data/lib/firefly_iii_client/models/budget_limit_array.rb +229 -0
- data/lib/firefly_iii_client/models/budget_limit_read.rb +237 -0
- data/lib/firefly_iii_client/models/budget_limit_single.rb +218 -0
- data/lib/firefly_iii_client/models/budget_read.rb +237 -0
- data/lib/firefly_iii_client/models/budget_single.rb +218 -0
- data/lib/firefly_iii_client/models/budget_spent.rb +256 -0
- data/lib/firefly_iii_client/models/category.rb +263 -0
- data/lib/firefly_iii_client/models/category_array.rb +229 -0
- data/lib/firefly_iii_client/models/category_earned.rb +274 -0
- data/lib/firefly_iii_client/models/category_read.rb +237 -0
- data/lib/firefly_iii_client/models/category_single.rb +218 -0
- data/lib/firefly_iii_client/models/category_spent.rb +274 -0
- data/lib/firefly_iii_client/models/chart_data_point.rb +219 -0
- data/lib/firefly_iii_client/models/chart_data_set.rb +289 -0
- data/lib/firefly_iii_client/models/configuration_update.rb +224 -0
- data/lib/firefly_iii_client/models/currency.rb +299 -0
- data/lib/firefly_iii_client/models/currency_array.rb +238 -0
- data/lib/firefly_iii_client/models/currency_read.rb +237 -0
- data/lib/firefly_iii_client/models/currency_single.rb +218 -0
- data/lib/firefly_iii_client/models/exchange_rate.rb +237 -0
- data/lib/firefly_iii_client/models/exchange_rate_array.rb +238 -0
- data/lib/firefly_iii_client/models/exchange_rate_attributes.rb +336 -0
- data/lib/firefly_iii_client/models/import_job.rb +237 -0
- data/lib/firefly_iii_client/models/import_job_array.rb +238 -0
- data/lib/firefly_iii_client/models/import_job_attributes.rb +337 -0
- data/lib/firefly_iii_client/models/import_job_single.rb +218 -0
- data/lib/firefly_iii_client/models/link_type.rb +260 -0
- data/lib/firefly_iii_client/models/link_type_array.rb +238 -0
- data/lib/firefly_iii_client/models/link_type_read.rb +246 -0
- data/lib/firefly_iii_client/models/link_type_single.rb +218 -0
- data/lib/firefly_iii_client/models/meta.rb +218 -0
- data/lib/firefly_iii_client/models/meta_pagination.rb +254 -0
- data/lib/firefly_iii_client/models/object_link.rb +227 -0
- data/lib/firefly_iii_client/models/object_link0.rb +227 -0
- data/lib/firefly_iii_client/models/page_link.rb +236 -0
- data/lib/firefly_iii_client/models/piggy_bank.rb +400 -0
- data/lib/firefly_iii_client/models/piggy_bank_array.rb +238 -0
- data/lib/firefly_iii_client/models/piggy_bank_event.rb +246 -0
- data/lib/firefly_iii_client/models/piggy_bank_event_array.rb +238 -0
- data/lib/firefly_iii_client/models/piggy_bank_event_attributes.rb +291 -0
- data/lib/firefly_iii_client/models/piggy_bank_read.rb +246 -0
- data/lib/firefly_iii_client/models/piggy_bank_single.rb +218 -0
- data/lib/firefly_iii_client/models/preference.rb +251 -0
- data/lib/firefly_iii_client/models/preference_array.rb +238 -0
- data/lib/firefly_iii_client/models/preference_read.rb +237 -0
- data/lib/firefly_iii_client/models/preference_single.rb +218 -0
- data/lib/firefly_iii_client/models/recurrence.rb +395 -0
- data/lib/firefly_iii_client/models/recurrence_array.rb +238 -0
- data/lib/firefly_iii_client/models/recurrence_read.rb +246 -0
- data/lib/firefly_iii_client/models/recurrence_repetition.rb +342 -0
- data/lib/firefly_iii_client/models/recurrence_single.rb +218 -0
- data/lib/firefly_iii_client/models/recurrence_transaction.rb +483 -0
- data/lib/firefly_iii_client/models/rule.rb +395 -0
- data/lib/firefly_iii_client/models/rule_action.rb +326 -0
- data/lib/firefly_iii_client/models/rule_array.rb +238 -0
- data/lib/firefly_iii_client/models/rule_group.rb +268 -0
- data/lib/firefly_iii_client/models/rule_group_array.rb +238 -0
- data/lib/firefly_iii_client/models/rule_group_read.rb +246 -0
- data/lib/firefly_iii_client/models/rule_group_single.rb +218 -0
- data/lib/firefly_iii_client/models/rule_read.rb +246 -0
- data/lib/firefly_iii_client/models/rule_single.rb +218 -0
- data/lib/firefly_iii_client/models/rule_trigger.rb +330 -0
- data/lib/firefly_iii_client/models/system_configuration.rb +218 -0
- data/lib/firefly_iii_client/models/system_configuration_data.rb +248 -0
- data/lib/firefly_iii_client/models/system_info.rb +223 -0
- data/lib/firefly_iii_client/models/system_info_data.rb +279 -0
- data/lib/firefly_iii_client/models/tag_array.rb +238 -0
- data/lib/firefly_iii_client/models/tag_cloud.rb +220 -0
- data/lib/firefly_iii_client/models/tag_cloud_tag.rb +249 -0
- data/lib/firefly_iii_client/models/tag_model.rb +295 -0
- data/lib/firefly_iii_client/models/tag_read.rb +246 -0
- data/lib/firefly_iii_client/models/tag_single.rb +218 -0
- data/lib/firefly_iii_client/models/transaction.rb +263 -0
- data/lib/firefly_iii_client/models/transaction_array.rb +238 -0
- data/lib/firefly_iii_client/models/transaction_link.rb +292 -0
- data/lib/firefly_iii_client/models/transaction_link_array.rb +238 -0
- data/lib/firefly_iii_client/models/transaction_link_read.rb +246 -0
- data/lib/firefly_iii_client/models/transaction_link_single.rb +218 -0
- data/lib/firefly_iii_client/models/transaction_read.rb +246 -0
- data/lib/firefly_iii_client/models/transaction_single.rb +218 -0
- data/lib/firefly_iii_client/models/transaction_split.rb +850 -0
- data/lib/firefly_iii_client/models/transaction_type_filter.rb +49 -0
- data/lib/firefly_iii_client/models/user.rb +320 -0
- data/lib/firefly_iii_client/models/user_array.rb +238 -0
- data/lib/firefly_iii_client/models/user_read.rb +246 -0
- data/lib/firefly_iii_client/models/user_single.rb +218 -0
- data/lib/firefly_iii_client/models/validation_error.rb +227 -0
- data/lib/firefly_iii_client/models/validation_error_errors.rb +231 -0
- data/lib/firefly_iii_client/version.rb +15 -0
- data/spec/api/about_api_spec.rb +57 -0
- data/spec/api/accounts_api_spec.rb +129 -0
- data/spec/api/attachments_api_spec.rb +121 -0
- data/spec/api/available_budgets_api_spec.rb +98 -0
- data/spec/api/bills_api_spec.rb +140 -0
- data/spec/api/budgets_api_spec.rb +194 -0
- data/spec/api/categories_api_spec.rb +112 -0
- data/spec/api/charts_api_spec.rb +101 -0
- data/spec/api/configuration_api_spec.rb +59 -0
- data/spec/api/currencies_api_spec.rb +246 -0
- data/spec/api/currency_exchange_rates_api_spec.rb +50 -0
- data/spec/api/import_api_spec.rb +75 -0
- data/spec/api/links_api_spec.rb +173 -0
- data/spec/api/piggy_banks_api_spec.rb +109 -0
- data/spec/api/preferences_api_spec.rb +72 -0
- data/spec/api/recurrences_api_spec.rb +123 -0
- data/spec/api/rule_groups_api_spec.rb +142 -0
- data/spec/api/rules_api_spec.rb +129 -0
- data/spec/api/summary_api_spec.rb +49 -0
- data/spec/api/tags_api_spec.rb +126 -0
- data/spec/api/transactions_api_spec.rb +137 -0
- data/spec/api/users_api_spec.rb +96 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_array_spec.rb +40 -0
- data/spec/models/account_read_spec.rb +46 -0
- data/spec/models/account_single_spec.rb +34 -0
- data/spec/models/account_spec.rb +210 -0
- data/spec/models/account_type_filter_spec.rb +28 -0
- data/spec/models/account_type_property_spec.rb +28 -0
- data/spec/models/attachment_array_spec.rb +40 -0
- data/spec/models/attachment_read_spec.rb +52 -0
- data/spec/models/attachment_single_spec.rb +34 -0
- data/spec/models/attachment_spec.rb +120 -0
- data/spec/models/available_budget_array_spec.rb +40 -0
- data/spec/models/available_budget_read_spec.rb +46 -0
- data/spec/models/available_budget_single_spec.rb +34 -0
- data/spec/models/available_budget_spec.rb +94 -0
- data/spec/models/basic_summary_entry_spec.rb +88 -0
- data/spec/models/bill_array_spec.rb +40 -0
- data/spec/models/bill_paid_dates_spec.rb +46 -0
- data/spec/models/bill_read_spec.rb +46 -0
- data/spec/models/bill_single_spec.rb +34 -0
- data/spec/models/bill_spec.rb +134 -0
- data/spec/models/budget_array_spec.rb +40 -0
- data/spec/models/budget_limit_array_spec.rb +40 -0
- data/spec/models/budget_limit_read_spec.rb +46 -0
- data/spec/models/budget_limit_single_spec.rb +34 -0
- data/spec/models/budget_limit_spec.rb +94 -0
- data/spec/models/budget_read_spec.rb +46 -0
- data/spec/models/budget_single_spec.rb +34 -0
- data/spec/models/budget_spec.rb +64 -0
- data/spec/models/budget_spent_spec.rb +58 -0
- data/spec/models/category_array_spec.rb +40 -0
- data/spec/models/category_earned_spec.rb +70 -0
- data/spec/models/category_read_spec.rb +46 -0
- data/spec/models/category_single_spec.rb +34 -0
- data/spec/models/category_spec.rb +58 -0
- data/spec/models/category_spent_spec.rb +70 -0
- data/spec/models/chart_data_point_spec.rb +34 -0
- data/spec/models/chart_data_set_spec.rb +76 -0
- data/spec/models/configuration_update_spec.rb +34 -0
- data/spec/models/currency_array_spec.rb +46 -0
- data/spec/models/currency_read_spec.rb +46 -0
- data/spec/models/currency_single_spec.rb +34 -0
- data/spec/models/currency_spec.rb +76 -0
- data/spec/models/exchange_rate_array_spec.rb +46 -0
- data/spec/models/exchange_rate_attributes_spec.rb +112 -0
- data/spec/models/exchange_rate_spec.rb +46 -0
- data/spec/models/import_job_array_spec.rb +46 -0
- data/spec/models/import_job_attributes_spec.rb +106 -0
- data/spec/models/import_job_single_spec.rb +34 -0
- data/spec/models/import_job_spec.rb +46 -0
- data/spec/models/link_type_array_spec.rb +46 -0
- data/spec/models/link_type_read_spec.rb +52 -0
- data/spec/models/link_type_single_spec.rb +34 -0
- data/spec/models/link_type_spec.rb +52 -0
- data/spec/models/meta_pagination_spec.rb +58 -0
- data/spec/models/meta_spec.rb +34 -0
- data/spec/models/object_link0_spec.rb +40 -0
- data/spec/models/object_link_spec.rb +40 -0
- data/spec/models/page_link_spec.rb +46 -0
- data/spec/models/piggy_bank_array_spec.rb +46 -0
- data/spec/models/piggy_bank_event_array_spec.rb +46 -0
- data/spec/models/piggy_bank_event_attributes_spec.rb +82 -0
- data/spec/models/piggy_bank_event_spec.rb +52 -0
- data/spec/models/piggy_bank_read_spec.rb +52 -0
- data/spec/models/piggy_bank_single_spec.rb +34 -0
- data/spec/models/piggy_bank_spec.rb +142 -0
- data/spec/models/preference_array_spec.rb +46 -0
- data/spec/models/preference_read_spec.rb +46 -0
- data/spec/models/preference_single_spec.rb +34 -0
- data/spec/models/preference_spec.rb +52 -0
- data/spec/models/recurrence_array_spec.rb +46 -0
- data/spec/models/recurrence_read_spec.rb +52 -0
- data/spec/models/recurrence_repetition_spec.rb +86 -0
- data/spec/models/recurrence_single_spec.rb +34 -0
- data/spec/models/recurrence_spec.rb +116 -0
- data/spec/models/recurrence_transaction_spec.rb +184 -0
- data/spec/models/rule_action_spec.rb +80 -0
- data/spec/models/rule_array_spec.rb +46 -0
- data/spec/models/rule_group_array_spec.rb +46 -0
- data/spec/models/rule_group_read_spec.rb +52 -0
- data/spec/models/rule_group_single_spec.rb +34 -0
- data/spec/models/rule_group_spec.rb +64 -0
- data/spec/models/rule_read_spec.rb +52 -0
- data/spec/models/rule_single_spec.rb +34 -0
- data/spec/models/rule_spec.rb +110 -0
- data/spec/models/rule_trigger_spec.rb +80 -0
- data/spec/models/system_configuration_data_spec.rb +52 -0
- data/spec/models/system_configuration_spec.rb +34 -0
- data/spec/models/system_info_data_spec.rb +58 -0
- data/spec/models/system_info_spec.rb +34 -0
- data/spec/models/tag_array_spec.rb +46 -0
- data/spec/models/tag_cloud_spec.rb +34 -0
- data/spec/models/tag_cloud_tag_spec.rb +52 -0
- data/spec/models/tag_model_spec.rb +76 -0
- data/spec/models/tag_read_spec.rb +52 -0
- data/spec/models/tag_single_spec.rb +34 -0
- data/spec/models/transaction_array_spec.rb +46 -0
- data/spec/models/transaction_link_array_spec.rb +46 -0
- data/spec/models/transaction_link_read_spec.rb +52 -0
- data/spec/models/transaction_link_single_spec.rb +34 -0
- data/spec/models/transaction_link_spec.rb +70 -0
- data/spec/models/transaction_read_spec.rb +52 -0
- data/spec/models/transaction_single_spec.rb +34 -0
- data/spec/models/transaction_spec.rb +58 -0
- data/spec/models/transaction_split_spec.rb +368 -0
- data/spec/models/transaction_type_filter_spec.rb +28 -0
- data/spec/models/user_array_spec.rb +46 -0
- data/spec/models/user_read_spec.rb +52 -0
- data/spec/models/user_single_spec.rb +34 -0
- data/spec/models/user_spec.rb +72 -0
- data/spec/models/validation_error_errors_spec.rb +40 -0
- data/spec/models/validation_error_spec.rb +40 -0
- data/spec/spec_helper.rb +111 -0
- metadata +495 -0
@@ -0,0 +1,96 @@
|
|
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 SummaryApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Returns basic sums of the users data.
|
23
|
+
# Returns basic sums of the users data, like the net worth, spent and earned amounts. It is multi-currency, and is in Firefly III to populate the dashboard.
|
24
|
+
# @param start [Date] A date formatted YYYY-MM-DD.
|
25
|
+
# @param _end [Date] A date formatted YYYY-MM-DD.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :currency_code A currency code like EUR or USD, to filter the result.
|
28
|
+
# @return [Array<BasicSummaryEntry>]
|
29
|
+
def get_basic_summary(start, _end, opts = {})
|
30
|
+
data, _status_code, _headers = get_basic_summary_with_http_info(start, _end, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns basic sums of the users data.
|
35
|
+
# Returns basic sums of the users data, like the net worth, spent and earned amounts. It is multi-currency, and is in Firefly III to populate the dashboard.
|
36
|
+
# @param start [Date] A date formatted YYYY-MM-DD.
|
37
|
+
# @param _end [Date] A date formatted YYYY-MM-DD.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :currency_code A currency code like EUR or USD, to filter the result.
|
40
|
+
# @return [Array<(Array<BasicSummaryEntry>, Integer, Hash)>] Array<BasicSummaryEntry> data, response status code and response headers
|
41
|
+
def get_basic_summary_with_http_info(start, _end, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: SummaryApi.get_basic_summary ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'start' is set
|
46
|
+
if @api_client.config.client_side_validation && start.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'start' when calling SummaryApi.get_basic_summary"
|
48
|
+
end
|
49
|
+
# verify the required parameter '_end' is set
|
50
|
+
if @api_client.config.client_side_validation && _end.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter '_end' when calling SummaryApi.get_basic_summary"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/api/v1/summary/basic'
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
query_params[:'start'] = start
|
59
|
+
query_params[:'end'] = _end
|
60
|
+
query_params[:'currency_code'] = opts[:'currency_code'] if !opts[:'currency_code'].nil?
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = opts[:header_params] || {}
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = opts[:form_params] || {}
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = opts[:debug_body]
|
72
|
+
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:debug_return_type] || 'Array<BasicSummaryEntry>'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"SummaryApi.get_basic_summary",
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: SummaryApi#get_basic_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,491 @@
|
|
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 TagsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete an tag.
|
23
|
+
# Delete an tag.
|
24
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def delete_tag(tag, opts = {})
|
28
|
+
delete_tag_with_http_info(tag, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete an tag.
|
33
|
+
# Delete an tag.
|
34
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def delete_tag_with_http_info(tag, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.delete_tag ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'tag' is set
|
42
|
+
if @api_client.config.client_side_validation && tag.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling TagsApi.delete_tag"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/v1/tags/{tag}'.sub('{' + 'tag' + '}', CGI.escape(tag.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 => :"TagsApi.delete_tag",
|
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: TagsApi#delete_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get a single tag.
|
84
|
+
# Get a single tag.
|
85
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [Integer] :page Page number
|
88
|
+
# @return [TagSingle]
|
89
|
+
def get_tag(tag, opts = {})
|
90
|
+
data, _status_code, _headers = get_tag_with_http_info(tag, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Get a single tag.
|
95
|
+
# Get a single tag.
|
96
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Integer] :page Page number
|
99
|
+
# @return [Array<(TagSingle, Integer, Hash)>] TagSingle data, response status code and response headers
|
100
|
+
def get_tag_with_http_info(tag, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.get_tag ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'tag' is set
|
105
|
+
if @api_client.config.client_side_validation && tag.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling TagsApi.get_tag"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/api/v1/tags/{tag}'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = opts[:form_params] || {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = opts[:debug_body]
|
125
|
+
|
126
|
+
# return_type
|
127
|
+
return_type = opts[:debug_return_type] || 'TagSingle'
|
128
|
+
|
129
|
+
# auth_names
|
130
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
131
|
+
|
132
|
+
new_options = opts.merge(
|
133
|
+
:operation => :"TagsApi.get_tag",
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns a basic tag cloud.
|
150
|
+
# Returns a list of tags, which can be used to draw a basic tag cloud.
|
151
|
+
# @param start [Date] A date formatted YYYY-MM-DD.
|
152
|
+
# @param _end [Date] A date formatted YYYY-MM-DD.
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [TagCloud]
|
155
|
+
def get_tag_cloud(start, _end, opts = {})
|
156
|
+
data, _status_code, _headers = get_tag_cloud_with_http_info(start, _end, opts)
|
157
|
+
data
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns a basic tag cloud.
|
161
|
+
# Returns a list of tags, which can be used to draw a basic tag cloud.
|
162
|
+
# @param start [Date] A date formatted YYYY-MM-DD.
|
163
|
+
# @param _end [Date] A date formatted YYYY-MM-DD.
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @return [Array<(TagCloud, Integer, Hash)>] TagCloud data, response status code and response headers
|
166
|
+
def get_tag_cloud_with_http_info(start, _end, opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.get_tag_cloud ...'
|
169
|
+
end
|
170
|
+
# verify the required parameter 'start' is set
|
171
|
+
if @api_client.config.client_side_validation && start.nil?
|
172
|
+
fail ArgumentError, "Missing the required parameter 'start' when calling TagsApi.get_tag_cloud"
|
173
|
+
end
|
174
|
+
# verify the required parameter '_end' is set
|
175
|
+
if @api_client.config.client_side_validation && _end.nil?
|
176
|
+
fail ArgumentError, "Missing the required parameter '_end' when calling TagsApi.get_tag_cloud"
|
177
|
+
end
|
178
|
+
# resource path
|
179
|
+
local_var_path = '/api/v1/tag-cloud'
|
180
|
+
|
181
|
+
# query parameters
|
182
|
+
query_params = opts[:query_params] || {}
|
183
|
+
query_params[:'start'] = start
|
184
|
+
query_params[:'end'] = _end
|
185
|
+
|
186
|
+
# header parameters
|
187
|
+
header_params = opts[:header_params] || {}
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
190
|
+
|
191
|
+
# form parameters
|
192
|
+
form_params = opts[:form_params] || {}
|
193
|
+
|
194
|
+
# http body (model)
|
195
|
+
post_body = opts[:debug_body]
|
196
|
+
|
197
|
+
# return_type
|
198
|
+
return_type = opts[:debug_return_type] || 'TagCloud'
|
199
|
+
|
200
|
+
# auth_names
|
201
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
202
|
+
|
203
|
+
new_options = opts.merge(
|
204
|
+
:operation => :"TagsApi.get_tag_cloud",
|
205
|
+
:header_params => header_params,
|
206
|
+
:query_params => query_params,
|
207
|
+
:form_params => form_params,
|
208
|
+
:body => post_body,
|
209
|
+
:auth_names => auth_names,
|
210
|
+
:return_type => return_type
|
211
|
+
)
|
212
|
+
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tag_cloud\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
216
|
+
end
|
217
|
+
return data, status_code, headers
|
218
|
+
end
|
219
|
+
|
220
|
+
# List all tags.
|
221
|
+
# List all of the user's tags.
|
222
|
+
# @param [Hash] opts the optional parameters
|
223
|
+
# @option opts [Integer] :page Page number
|
224
|
+
# @return [TagArray]
|
225
|
+
def list_tag(opts = {})
|
226
|
+
data, _status_code, _headers = list_tag_with_http_info(opts)
|
227
|
+
data
|
228
|
+
end
|
229
|
+
|
230
|
+
# List all tags.
|
231
|
+
# List all of the user's tags.
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @option opts [Integer] :page Page number
|
234
|
+
# @return [Array<(TagArray, Integer, Hash)>] TagArray data, response status code and response headers
|
235
|
+
def list_tag_with_http_info(opts = {})
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.list_tag ...'
|
238
|
+
end
|
239
|
+
# resource path
|
240
|
+
local_var_path = '/api/v1/tags'
|
241
|
+
|
242
|
+
# query parameters
|
243
|
+
query_params = opts[:query_params] || {}
|
244
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
245
|
+
|
246
|
+
# header parameters
|
247
|
+
header_params = opts[:header_params] || {}
|
248
|
+
# HTTP header 'Accept' (if needed)
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
|
251
|
+
# form parameters
|
252
|
+
form_params = opts[:form_params] || {}
|
253
|
+
|
254
|
+
# http body (model)
|
255
|
+
post_body = opts[:debug_body]
|
256
|
+
|
257
|
+
# return_type
|
258
|
+
return_type = opts[:debug_return_type] || 'TagArray'
|
259
|
+
|
260
|
+
# auth_names
|
261
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
262
|
+
|
263
|
+
new_options = opts.merge(
|
264
|
+
:operation => :"TagsApi.list_tag",
|
265
|
+
:header_params => header_params,
|
266
|
+
:query_params => query_params,
|
267
|
+
:form_params => form_params,
|
268
|
+
:body => post_body,
|
269
|
+
:auth_names => auth_names,
|
270
|
+
:return_type => return_type
|
271
|
+
)
|
272
|
+
|
273
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: TagsApi#list_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
|
280
|
+
# List all transactions with this tag.
|
281
|
+
# List all transactions with this tag.
|
282
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
285
|
+
# @option opts [Date] :start A date formatted YYYY-MM-DD. This is the start date of the selected range (inclusive).
|
286
|
+
# @option opts [Date] :_end A date formatted YYYY-MM-DD. This is the end date of the selected range (inclusive).
|
287
|
+
# @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned.
|
288
|
+
# @return [TransactionArray]
|
289
|
+
def list_transaction_by_tag(tag, opts = {})
|
290
|
+
data, _status_code, _headers = list_transaction_by_tag_with_http_info(tag, opts)
|
291
|
+
data
|
292
|
+
end
|
293
|
+
|
294
|
+
# List all transactions with this tag.
|
295
|
+
# List all transactions with this tag.
|
296
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
297
|
+
# @param [Hash] opts the optional parameters
|
298
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
299
|
+
# @option opts [Date] :start A date formatted YYYY-MM-DD. This is the start date of the selected range (inclusive).
|
300
|
+
# @option opts [Date] :_end A date formatted YYYY-MM-DD. This is the end date of the selected range (inclusive).
|
301
|
+
# @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned.
|
302
|
+
# @return [Array<(TransactionArray, Integer, Hash)>] TransactionArray data, response status code and response headers
|
303
|
+
def list_transaction_by_tag_with_http_info(tag, opts = {})
|
304
|
+
if @api_client.config.debugging
|
305
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.list_transaction_by_tag ...'
|
306
|
+
end
|
307
|
+
# verify the required parameter 'tag' is set
|
308
|
+
if @api_client.config.client_side_validation && tag.nil?
|
309
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling TagsApi.list_transaction_by_tag"
|
310
|
+
end
|
311
|
+
# resource path
|
312
|
+
local_var_path = '/api/v1/tags/{tag}/transactions'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
313
|
+
|
314
|
+
# query parameters
|
315
|
+
query_params = opts[:query_params] || {}
|
316
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
317
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
318
|
+
query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
|
319
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = opts[:header_params] || {}
|
323
|
+
# HTTP header 'Accept' (if needed)
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
325
|
+
|
326
|
+
# form parameters
|
327
|
+
form_params = opts[:form_params] || {}
|
328
|
+
|
329
|
+
# http body (model)
|
330
|
+
post_body = opts[:debug_body]
|
331
|
+
|
332
|
+
# return_type
|
333
|
+
return_type = opts[:debug_return_type] || 'TransactionArray'
|
334
|
+
|
335
|
+
# auth_names
|
336
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
337
|
+
|
338
|
+
new_options = opts.merge(
|
339
|
+
:operation => :"TagsApi.list_transaction_by_tag",
|
340
|
+
:header_params => header_params,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body,
|
344
|
+
:auth_names => auth_names,
|
345
|
+
:return_type => return_type
|
346
|
+
)
|
347
|
+
|
348
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug "API called: TagsApi#list_transaction_by_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
return data, status_code, headers
|
353
|
+
end
|
354
|
+
|
355
|
+
# Store a new tag
|
356
|
+
# Creates a new tag. The data required can be submitted as a JSON body or as a list of parameters.
|
357
|
+
# @param tag_model [TagModel] JSON array or key=value pairs with the necessary tag information. See the model for the exact specifications.
|
358
|
+
# @param [Hash] opts the optional parameters
|
359
|
+
# @return [TagSingle]
|
360
|
+
def store_tag(tag_model, opts = {})
|
361
|
+
data, _status_code, _headers = store_tag_with_http_info(tag_model, opts)
|
362
|
+
data
|
363
|
+
end
|
364
|
+
|
365
|
+
# Store a new tag
|
366
|
+
# Creates a new tag. The data required can be submitted as a JSON body or as a list of parameters.
|
367
|
+
# @param tag_model [TagModel] JSON array or key=value pairs with the necessary tag information. See the model for the exact specifications.
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @return [Array<(TagSingle, Integer, Hash)>] TagSingle data, response status code and response headers
|
370
|
+
def store_tag_with_http_info(tag_model, opts = {})
|
371
|
+
if @api_client.config.debugging
|
372
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.store_tag ...'
|
373
|
+
end
|
374
|
+
# verify the required parameter 'tag_model' is set
|
375
|
+
if @api_client.config.client_side_validation && tag_model.nil?
|
376
|
+
fail ArgumentError, "Missing the required parameter 'tag_model' when calling TagsApi.store_tag"
|
377
|
+
end
|
378
|
+
# resource path
|
379
|
+
local_var_path = '/api/v1/tags'
|
380
|
+
|
381
|
+
# query parameters
|
382
|
+
query_params = opts[:query_params] || {}
|
383
|
+
|
384
|
+
# header parameters
|
385
|
+
header_params = opts[:header_params] || {}
|
386
|
+
# HTTP header 'Accept' (if needed)
|
387
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
388
|
+
# HTTP header 'Content-Type'
|
389
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
|
390
|
+
|
391
|
+
# form parameters
|
392
|
+
form_params = opts[:form_params] || {}
|
393
|
+
|
394
|
+
# http body (model)
|
395
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_model)
|
396
|
+
|
397
|
+
# return_type
|
398
|
+
return_type = opts[:debug_return_type] || 'TagSingle'
|
399
|
+
|
400
|
+
# auth_names
|
401
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
402
|
+
|
403
|
+
new_options = opts.merge(
|
404
|
+
:operation => :"TagsApi.store_tag",
|
405
|
+
:header_params => header_params,
|
406
|
+
:query_params => query_params,
|
407
|
+
:form_params => form_params,
|
408
|
+
:body => post_body,
|
409
|
+
:auth_names => auth_names,
|
410
|
+
:return_type => return_type
|
411
|
+
)
|
412
|
+
|
413
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
414
|
+
if @api_client.config.debugging
|
415
|
+
@api_client.config.logger.debug "API called: TagsApi#store_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
416
|
+
end
|
417
|
+
return data, status_code, headers
|
418
|
+
end
|
419
|
+
|
420
|
+
# Update existing tag.
|
421
|
+
# Update existing tag.
|
422
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
423
|
+
# @param tag_model [TagModel] JSON array with updated tag information. See the model for the exact specifications.
|
424
|
+
# @param [Hash] opts the optional parameters
|
425
|
+
# @return [TagSingle]
|
426
|
+
def update_tag(tag, tag_model, opts = {})
|
427
|
+
data, _status_code, _headers = update_tag_with_http_info(tag, tag_model, opts)
|
428
|
+
data
|
429
|
+
end
|
430
|
+
|
431
|
+
# Update existing tag.
|
432
|
+
# Update existing tag.
|
433
|
+
# @param tag [String] Either the tag itself or the tag ID.
|
434
|
+
# @param tag_model [TagModel] JSON array with updated tag information. See the model for the exact specifications.
|
435
|
+
# @param [Hash] opts the optional parameters
|
436
|
+
# @return [Array<(TagSingle, Integer, Hash)>] TagSingle data, response status code and response headers
|
437
|
+
def update_tag_with_http_info(tag, tag_model, opts = {})
|
438
|
+
if @api_client.config.debugging
|
439
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.update_tag ...'
|
440
|
+
end
|
441
|
+
# verify the required parameter 'tag' is set
|
442
|
+
if @api_client.config.client_side_validation && tag.nil?
|
443
|
+
fail ArgumentError, "Missing the required parameter 'tag' when calling TagsApi.update_tag"
|
444
|
+
end
|
445
|
+
# verify the required parameter 'tag_model' is set
|
446
|
+
if @api_client.config.client_side_validation && tag_model.nil?
|
447
|
+
fail ArgumentError, "Missing the required parameter 'tag_model' when calling TagsApi.update_tag"
|
448
|
+
end
|
449
|
+
# resource path
|
450
|
+
local_var_path = '/api/v1/tags/{tag}'.sub('{' + 'tag' + '}', CGI.escape(tag.to_s))
|
451
|
+
|
452
|
+
# query parameters
|
453
|
+
query_params = opts[:query_params] || {}
|
454
|
+
|
455
|
+
# header parameters
|
456
|
+
header_params = opts[:header_params] || {}
|
457
|
+
# HTTP header 'Accept' (if needed)
|
458
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
459
|
+
# HTTP header 'Content-Type'
|
460
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
|
461
|
+
|
462
|
+
# form parameters
|
463
|
+
form_params = opts[:form_params] || {}
|
464
|
+
|
465
|
+
# http body (model)
|
466
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_model)
|
467
|
+
|
468
|
+
# return_type
|
469
|
+
return_type = opts[:debug_return_type] || 'TagSingle'
|
470
|
+
|
471
|
+
# auth_names
|
472
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
473
|
+
|
474
|
+
new_options = opts.merge(
|
475
|
+
:operation => :"TagsApi.update_tag",
|
476
|
+
:header_params => header_params,
|
477
|
+
:query_params => query_params,
|
478
|
+
:form_params => form_params,
|
479
|
+
:body => post_body,
|
480
|
+
:auth_names => auth_names,
|
481
|
+
:return_type => return_type
|
482
|
+
)
|
483
|
+
|
484
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug "API called: TagsApi#update_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
487
|
+
end
|
488
|
+
return data, status_code, headers
|
489
|
+
end
|
490
|
+
end
|
491
|
+
end
|