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,546 @@
|
|
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 TransactionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a transaction.
|
23
|
+
# Delete a transaction.
|
24
|
+
# @param id [Integer] The ID of the transaction.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def delete_transaction(id, opts = {})
|
28
|
+
delete_transaction_with_http_info(id, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a transaction.
|
33
|
+
# Delete a transaction.
|
34
|
+
# @param id [Integer] The ID of the transaction.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def delete_transaction_with_http_info(id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.delete_transaction ...'
|
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 TransactionsApi.delete_transaction"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/v1/transactions/{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 => :"TransactionsApi.delete_transaction",
|
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: TransactionsApi#delete_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get a single transaction.
|
84
|
+
# Get a single transaction.
|
85
|
+
# @param id [Integer] The ID of the transaction.
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [TransactionSingle]
|
88
|
+
def get_transaction(id, opts = {})
|
89
|
+
data, _status_code, _headers = get_transaction_with_http_info(id, opts)
|
90
|
+
data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Get a single transaction.
|
94
|
+
# Get a single transaction.
|
95
|
+
# @param id [Integer] The ID of the transaction.
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Array<(TransactionSingle, Integer, Hash)>] TransactionSingle data, response status code and response headers
|
98
|
+
def get_transaction_with_http_info(id, opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transaction ...'
|
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 TransactionsApi.get_transaction"
|
105
|
+
end
|
106
|
+
# resource path
|
107
|
+
local_var_path = '/api/v1/transactions/{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] || 'TransactionSingle'
|
125
|
+
|
126
|
+
# auth_names
|
127
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
128
|
+
|
129
|
+
new_options = opts.merge(
|
130
|
+
:operation => :"TransactionsApi.get_transaction",
|
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: TransactionsApi#get_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Get a single transaction, based on one of the underlying transaction journals.
|
147
|
+
# Get a single transaction by underlying journal.
|
148
|
+
# @param id [Integer] The ID of the transaction journal.
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [TransactionSingle]
|
151
|
+
def get_transaction_by_journal(id, opts = {})
|
152
|
+
data, _status_code, _headers = get_transaction_by_journal_with_http_info(id, opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# Get a single transaction, based on one of the underlying transaction journals.
|
157
|
+
# Get a single transaction by underlying journal.
|
158
|
+
# @param id [Integer] The ID of the transaction journal.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Array<(TransactionSingle, Integer, Hash)>] TransactionSingle data, response status code and response headers
|
161
|
+
def get_transaction_by_journal_with_http_info(id, opts = {})
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transaction_by_journal ...'
|
164
|
+
end
|
165
|
+
# verify the required parameter 'id' is set
|
166
|
+
if @api_client.config.client_side_validation && id.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_transaction_by_journal"
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = '/api/v1/transaction-journals/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = opts[:query_params] || {}
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = opts[:header_params] || {}
|
177
|
+
# HTTP header 'Accept' (if needed)
|
178
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = opts[:form_params] || {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = opts[:debug_body]
|
185
|
+
|
186
|
+
# return_type
|
187
|
+
return_type = opts[:debug_return_type] || 'TransactionSingle'
|
188
|
+
|
189
|
+
# auth_names
|
190
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
191
|
+
|
192
|
+
new_options = opts.merge(
|
193
|
+
:operation => :"TransactionsApi.get_transaction_by_journal",
|
194
|
+
:header_params => header_params,
|
195
|
+
:query_params => query_params,
|
196
|
+
:form_params => form_params,
|
197
|
+
:body => post_body,
|
198
|
+
:auth_names => auth_names,
|
199
|
+
:return_type => return_type
|
200
|
+
)
|
201
|
+
|
202
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
203
|
+
if @api_client.config.debugging
|
204
|
+
@api_client.config.logger.debug "API called: TransactionsApi#get_transaction_by_journal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
205
|
+
end
|
206
|
+
return data, status_code, headers
|
207
|
+
end
|
208
|
+
|
209
|
+
# Lists all attachments.
|
210
|
+
# Lists all attachments.
|
211
|
+
# @param id [Integer] The ID of the transaction.
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
214
|
+
# @return [AttachmentArray]
|
215
|
+
def list_attachment_by_transaction(id, opts = {})
|
216
|
+
data, _status_code, _headers = list_attachment_by_transaction_with_http_info(id, opts)
|
217
|
+
data
|
218
|
+
end
|
219
|
+
|
220
|
+
# Lists all attachments.
|
221
|
+
# Lists all attachments.
|
222
|
+
# @param id [Integer] The ID of the transaction.
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
225
|
+
# @return [Array<(AttachmentArray, Integer, Hash)>] AttachmentArray data, response status code and response headers
|
226
|
+
def list_attachment_by_transaction_with_http_info(id, opts = {})
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.list_attachment_by_transaction ...'
|
229
|
+
end
|
230
|
+
# verify the required parameter 'id' is set
|
231
|
+
if @api_client.config.client_side_validation && id.nil?
|
232
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.list_attachment_by_transaction"
|
233
|
+
end
|
234
|
+
# resource path
|
235
|
+
local_var_path = '/api/v1/transactions/{id}/attachments'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
236
|
+
|
237
|
+
# query parameters
|
238
|
+
query_params = opts[:query_params] || {}
|
239
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
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
|
+
|
246
|
+
# form parameters
|
247
|
+
form_params = opts[:form_params] || {}
|
248
|
+
|
249
|
+
# http body (model)
|
250
|
+
post_body = opts[:debug_body]
|
251
|
+
|
252
|
+
# return_type
|
253
|
+
return_type = opts[:debug_return_type] || 'AttachmentArray'
|
254
|
+
|
255
|
+
# auth_names
|
256
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
257
|
+
|
258
|
+
new_options = opts.merge(
|
259
|
+
:operation => :"TransactionsApi.list_attachment_by_transaction",
|
260
|
+
:header_params => header_params,
|
261
|
+
:query_params => query_params,
|
262
|
+
:form_params => form_params,
|
263
|
+
:body => post_body,
|
264
|
+
:auth_names => auth_names,
|
265
|
+
:return_type => return_type
|
266
|
+
)
|
267
|
+
|
268
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
269
|
+
if @api_client.config.debugging
|
270
|
+
@api_client.config.logger.debug "API called: TransactionsApi#list_attachment_by_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
271
|
+
end
|
272
|
+
return data, status_code, headers
|
273
|
+
end
|
274
|
+
|
275
|
+
# Lists all piggy bank events.
|
276
|
+
# Lists all piggy bank events.
|
277
|
+
# @param id [Integer] The ID of the transaction.
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
280
|
+
# @return [PiggyBankEventArray]
|
281
|
+
def list_event_by_transaction(id, opts = {})
|
282
|
+
data, _status_code, _headers = list_event_by_transaction_with_http_info(id, opts)
|
283
|
+
data
|
284
|
+
end
|
285
|
+
|
286
|
+
# Lists all piggy bank events.
|
287
|
+
# Lists all piggy bank events.
|
288
|
+
# @param id [Integer] The ID of the transaction.
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
291
|
+
# @return [Array<(PiggyBankEventArray, Integer, Hash)>] PiggyBankEventArray data, response status code and response headers
|
292
|
+
def list_event_by_transaction_with_http_info(id, opts = {})
|
293
|
+
if @api_client.config.debugging
|
294
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.list_event_by_transaction ...'
|
295
|
+
end
|
296
|
+
# verify the required parameter 'id' is set
|
297
|
+
if @api_client.config.client_side_validation && id.nil?
|
298
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.list_event_by_transaction"
|
299
|
+
end
|
300
|
+
# resource path
|
301
|
+
local_var_path = '/api/v1/transactions/{id}/piggy_bank_events'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
302
|
+
|
303
|
+
# query parameters
|
304
|
+
query_params = opts[:query_params] || {}
|
305
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
306
|
+
|
307
|
+
# header parameters
|
308
|
+
header_params = opts[:header_params] || {}
|
309
|
+
# HTTP header 'Accept' (if needed)
|
310
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
311
|
+
|
312
|
+
# form parameters
|
313
|
+
form_params = opts[:form_params] || {}
|
314
|
+
|
315
|
+
# http body (model)
|
316
|
+
post_body = opts[:debug_body]
|
317
|
+
|
318
|
+
# return_type
|
319
|
+
return_type = opts[:debug_return_type] || 'PiggyBankEventArray'
|
320
|
+
|
321
|
+
# auth_names
|
322
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
323
|
+
|
324
|
+
new_options = opts.merge(
|
325
|
+
:operation => :"TransactionsApi.list_event_by_transaction",
|
326
|
+
:header_params => header_params,
|
327
|
+
:query_params => query_params,
|
328
|
+
:form_params => form_params,
|
329
|
+
:body => post_body,
|
330
|
+
:auth_names => auth_names,
|
331
|
+
:return_type => return_type
|
332
|
+
)
|
333
|
+
|
334
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
335
|
+
if @api_client.config.debugging
|
336
|
+
@api_client.config.logger.debug "API called: TransactionsApi#list_event_by_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
337
|
+
end
|
338
|
+
return data, status_code, headers
|
339
|
+
end
|
340
|
+
|
341
|
+
# List all the user's transactions.
|
342
|
+
# List all the user's transactions.
|
343
|
+
# @param [Hash] opts the optional parameters
|
344
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
345
|
+
# @option opts [Date] :start A date formatted YYYY-MM-DD. This is the start date of the selected range (inclusive).
|
346
|
+
# @option opts [Date] :_end A date formatted YYYY-MM-DD. This is the end date of the selected range (inclusive).
|
347
|
+
# @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned.
|
348
|
+
# @return [TransactionArray]
|
349
|
+
def list_transaction(opts = {})
|
350
|
+
data, _status_code, _headers = list_transaction_with_http_info(opts)
|
351
|
+
data
|
352
|
+
end
|
353
|
+
|
354
|
+
# List all the user's transactions.
|
355
|
+
# List all the user's transactions.
|
356
|
+
# @param [Hash] opts the optional parameters
|
357
|
+
# @option opts [Integer] :page Page number. The default pagination is 50.
|
358
|
+
# @option opts [Date] :start A date formatted YYYY-MM-DD. This is the start date of the selected range (inclusive).
|
359
|
+
# @option opts [Date] :_end A date formatted YYYY-MM-DD. This is the end date of the selected range (inclusive).
|
360
|
+
# @option opts [TransactionTypeFilter] :type Optional filter on the transaction type(s) returned.
|
361
|
+
# @return [Array<(TransactionArray, Integer, Hash)>] TransactionArray data, response status code and response headers
|
362
|
+
def list_transaction_with_http_info(opts = {})
|
363
|
+
if @api_client.config.debugging
|
364
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.list_transaction ...'
|
365
|
+
end
|
366
|
+
# resource path
|
367
|
+
local_var_path = '/api/v1/transactions'
|
368
|
+
|
369
|
+
# query parameters
|
370
|
+
query_params = opts[:query_params] || {}
|
371
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
372
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
373
|
+
query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil?
|
374
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
375
|
+
|
376
|
+
# header parameters
|
377
|
+
header_params = opts[:header_params] || {}
|
378
|
+
# HTTP header 'Accept' (if needed)
|
379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
380
|
+
|
381
|
+
# form parameters
|
382
|
+
form_params = opts[:form_params] || {}
|
383
|
+
|
384
|
+
# http body (model)
|
385
|
+
post_body = opts[:debug_body]
|
386
|
+
|
387
|
+
# return_type
|
388
|
+
return_type = opts[:debug_return_type] || 'TransactionArray'
|
389
|
+
|
390
|
+
# auth_names
|
391
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
392
|
+
|
393
|
+
new_options = opts.merge(
|
394
|
+
:operation => :"TransactionsApi.list_transaction",
|
395
|
+
:header_params => header_params,
|
396
|
+
:query_params => query_params,
|
397
|
+
:form_params => form_params,
|
398
|
+
:body => post_body,
|
399
|
+
:auth_names => auth_names,
|
400
|
+
:return_type => return_type
|
401
|
+
)
|
402
|
+
|
403
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
404
|
+
if @api_client.config.debugging
|
405
|
+
@api_client.config.logger.debug "API called: TransactionsApi#list_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
406
|
+
end
|
407
|
+
return data, status_code, headers
|
408
|
+
end
|
409
|
+
|
410
|
+
# Store a new transaction
|
411
|
+
# Creates a new transaction. The data required can be submitted as a JSON body or as a list of parameters.
|
412
|
+
# @param transaction [Transaction] JSON array or key=value pairs with the necessary transaction information. See the model for the exact specifications.
|
413
|
+
# @param [Hash] opts the optional parameters
|
414
|
+
# @return [TransactionSingle]
|
415
|
+
def store_transaction(transaction, opts = {})
|
416
|
+
data, _status_code, _headers = store_transaction_with_http_info(transaction, opts)
|
417
|
+
data
|
418
|
+
end
|
419
|
+
|
420
|
+
# Store a new transaction
|
421
|
+
# Creates a new transaction. The data required can be submitted as a JSON body or as a list of parameters.
|
422
|
+
# @param transaction [Transaction] JSON array or key=value pairs with the necessary transaction information. See the model for the exact specifications.
|
423
|
+
# @param [Hash] opts the optional parameters
|
424
|
+
# @return [Array<(TransactionSingle, Integer, Hash)>] TransactionSingle data, response status code and response headers
|
425
|
+
def store_transaction_with_http_info(transaction, opts = {})
|
426
|
+
if @api_client.config.debugging
|
427
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.store_transaction ...'
|
428
|
+
end
|
429
|
+
# verify the required parameter 'transaction' is set
|
430
|
+
if @api_client.config.client_side_validation && transaction.nil?
|
431
|
+
fail ArgumentError, "Missing the required parameter 'transaction' when calling TransactionsApi.store_transaction"
|
432
|
+
end
|
433
|
+
# resource path
|
434
|
+
local_var_path = '/api/v1/transactions'
|
435
|
+
|
436
|
+
# query parameters
|
437
|
+
query_params = opts[:query_params] || {}
|
438
|
+
|
439
|
+
# header parameters
|
440
|
+
header_params = opts[:header_params] || {}
|
441
|
+
# HTTP header 'Accept' (if needed)
|
442
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
443
|
+
# HTTP header 'Content-Type'
|
444
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
|
445
|
+
|
446
|
+
# form parameters
|
447
|
+
form_params = opts[:form_params] || {}
|
448
|
+
|
449
|
+
# http body (model)
|
450
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(transaction)
|
451
|
+
|
452
|
+
# return_type
|
453
|
+
return_type = opts[:debug_return_type] || 'TransactionSingle'
|
454
|
+
|
455
|
+
# auth_names
|
456
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
457
|
+
|
458
|
+
new_options = opts.merge(
|
459
|
+
:operation => :"TransactionsApi.store_transaction",
|
460
|
+
:header_params => header_params,
|
461
|
+
:query_params => query_params,
|
462
|
+
:form_params => form_params,
|
463
|
+
:body => post_body,
|
464
|
+
:auth_names => auth_names,
|
465
|
+
:return_type => return_type
|
466
|
+
)
|
467
|
+
|
468
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
469
|
+
if @api_client.config.debugging
|
470
|
+
@api_client.config.logger.debug "API called: TransactionsApi#store_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
471
|
+
end
|
472
|
+
return data, status_code, headers
|
473
|
+
end
|
474
|
+
|
475
|
+
# Update existing transaction.
|
476
|
+
# Update an existing transaction.
|
477
|
+
# @param id [Integer] The ID of the transaction.
|
478
|
+
# @param transaction [Transaction] JSON array with updated transaction information. See the model for the exact specifications.
|
479
|
+
# @param [Hash] opts the optional parameters
|
480
|
+
# @return [TransactionSingle]
|
481
|
+
def update_transaction(id, transaction, opts = {})
|
482
|
+
data, _status_code, _headers = update_transaction_with_http_info(id, transaction, opts)
|
483
|
+
data
|
484
|
+
end
|
485
|
+
|
486
|
+
# Update existing transaction.
|
487
|
+
# Update an existing transaction.
|
488
|
+
# @param id [Integer] The ID of the transaction.
|
489
|
+
# @param transaction [Transaction] JSON array with updated transaction information. See the model for the exact specifications.
|
490
|
+
# @param [Hash] opts the optional parameters
|
491
|
+
# @return [Array<(TransactionSingle, Integer, Hash)>] TransactionSingle data, response status code and response headers
|
492
|
+
def update_transaction_with_http_info(id, transaction, opts = {})
|
493
|
+
if @api_client.config.debugging
|
494
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.update_transaction ...'
|
495
|
+
end
|
496
|
+
# verify the required parameter 'id' is set
|
497
|
+
if @api_client.config.client_side_validation && id.nil?
|
498
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.update_transaction"
|
499
|
+
end
|
500
|
+
# verify the required parameter 'transaction' is set
|
501
|
+
if @api_client.config.client_side_validation && transaction.nil?
|
502
|
+
fail ArgumentError, "Missing the required parameter 'transaction' when calling TransactionsApi.update_transaction"
|
503
|
+
end
|
504
|
+
# resource path
|
505
|
+
local_var_path = '/api/v1/transactions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
506
|
+
|
507
|
+
# query parameters
|
508
|
+
query_params = opts[:query_params] || {}
|
509
|
+
|
510
|
+
# header parameters
|
511
|
+
header_params = opts[:header_params] || {}
|
512
|
+
# HTTP header 'Accept' (if needed)
|
513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
514
|
+
# HTTP header 'Content-Type'
|
515
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
|
516
|
+
|
517
|
+
# form parameters
|
518
|
+
form_params = opts[:form_params] || {}
|
519
|
+
|
520
|
+
# http body (model)
|
521
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(transaction)
|
522
|
+
|
523
|
+
# return_type
|
524
|
+
return_type = opts[:debug_return_type] || 'TransactionSingle'
|
525
|
+
|
526
|
+
# auth_names
|
527
|
+
auth_names = opts[:debug_auth_names] || ['firefly_iii_auth']
|
528
|
+
|
529
|
+
new_options = opts.merge(
|
530
|
+
:operation => :"TransactionsApi.update_transaction",
|
531
|
+
:header_params => header_params,
|
532
|
+
:query_params => query_params,
|
533
|
+
:form_params => form_params,
|
534
|
+
:body => post_body,
|
535
|
+
:auth_names => auth_names,
|
536
|
+
:return_type => return_type
|
537
|
+
)
|
538
|
+
|
539
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
540
|
+
if @api_client.config.debugging
|
541
|
+
@api_client.config.logger.debug "API called: TransactionsApi#update_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
542
|
+
end
|
543
|
+
return data, status_code, headers
|
544
|
+
end
|
545
|
+
end
|
546
|
+
end
|