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
data/docs/Attachment.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# OpenapiClient::Attachment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created_at** | **Time** | | [optional][readonly] |
|
8
|
+
| **updated_at** | **Time** | | [optional][readonly] |
|
9
|
+
| **filename** | **String** | | |
|
10
|
+
| **attachable_type** | **String** | The object class to which the attachment must be linked. | [optional][readonly] |
|
11
|
+
| **model** | **String** | The object class to which the attachment must be linked. | |
|
12
|
+
| **attachable_id** | **Integer** | ID of the model this attachment is linked to. | [optional][readonly] |
|
13
|
+
| **model_id** | **Integer** | ID of the model this attachment is linked to. | |
|
14
|
+
| **md5** | **String** | MD5 hash of the file for basic duplicate detection. | [optional] |
|
15
|
+
| **download_uri** | **String** | | [optional] |
|
16
|
+
| **upload_uri** | **String** | | [optional] |
|
17
|
+
| **title** | **String** | | [optional] |
|
18
|
+
| **notes** | **String** | | [optional] |
|
19
|
+
| **mime** | **String** | | [optional][readonly] |
|
20
|
+
| **size** | **Integer** | | [optional][readonly] |
|
21
|
+
|
22
|
+
## Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'firefly_iii_client'
|
26
|
+
|
27
|
+
instance = FireflyIIIClient::Attachment.new(
|
28
|
+
created_at: 2018 - 09 - 17 T12 : 46 : 47 + 01 : 00,
|
29
|
+
updated_at : 2018 - 09 - 17 T12 : 46 : 47 + 01 : 00,
|
30
|
+
filename : file.pdf,
|
31
|
+
attachable_type : Bill,
|
32
|
+
model : Bill,
|
33
|
+
attachable_id : 134,
|
34
|
+
model_id : 134,
|
35
|
+
md5 : 0 c3f95f34370baa88f9fd9a671fea305,
|
36
|
+
download_uri : https : // demo.firefly - iii.org / api / v1 / attachments / 191 / download,
|
37
|
+
upload_uri : https : // demo.firefly - iii.org / api / v1 / attachments / 191 / download,
|
38
|
+
title : Some PDF file,
|
39
|
+
notes: Some notes,
|
40
|
+
mime : application / pdf,
|
41
|
+
size : 48211
|
42
|
+
)
|
43
|
+
```
|
44
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::AttachmentArray
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data** | [**Array<AttachmentRead>**](AttachmentRead.md) | | [optional] |
|
8
|
+
| **meta** | [**Meta**](Meta.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'firefly_iii_client'
|
14
|
+
|
15
|
+
instance = FireflyIIIClient::AttachmentArray.new(
|
16
|
+
data: null,
|
17
|
+
meta: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# OpenapiClient::AttachmentRead
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **type** | **String** | Immutable value | [optional] |
|
8
|
+
| **id** | **Integer** | | [optional] |
|
9
|
+
| **attributes** | [**Attachment**](Attachment.md) | | [optional] |
|
10
|
+
| **links** | [**ObjectLink**](ObjectLink.md) | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'firefly_iii_client'
|
16
|
+
|
17
|
+
instance = FireflyIIIClient::AttachmentRead.new(
|
18
|
+
type: attachments,
|
19
|
+
id: 2,
|
20
|
+
attributes: null,
|
21
|
+
links: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# OpenapiClient::AttachmentSingle
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data** | [**AttachmentRead**](AttachmentRead.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'firefly_iii_client'
|
13
|
+
|
14
|
+
instance = FireflyIIIClient::AttachmentSingle.new(
|
15
|
+
data: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,510 @@
|
|
1
|
+
# OpenapiClient::AttachmentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://demo.firefly-iii.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**delete_attachment**](AttachmentsApi.md#delete_attachment) | **DELETE** /api/v1/attachments/{id} | Delete an attachment. |
|
8
|
+
| [**download_attachment**](AttachmentsApi.md#download_attachment) | **GET** /api/v1/attachments/{id}/download | Download a single attachment. |
|
9
|
+
| [**get_attachment**](AttachmentsApi.md#get_attachment) | **GET** /api/v1/attachments/{id} | Get a single attachment. |
|
10
|
+
| [**list_attachment**](AttachmentsApi.md#list_attachment) | **GET** /api/v1/attachments | List all attachments. |
|
11
|
+
| [**store_attachment**](AttachmentsApi.md#store_attachment) | **POST** /api/v1/attachments | Store a new attachment. |
|
12
|
+
| [**update_attachment**](AttachmentsApi.md#update_attachment) | **PUT** /api/v1/attachments/{id} | Update existing attachment. |
|
13
|
+
| [**upload_attachment**](AttachmentsApi.md#upload_attachment) | **POST** /api/v1/attachments/{id}/upload | Upload an attachment. |
|
14
|
+
|
15
|
+
|
16
|
+
## delete_attachment
|
17
|
+
|
18
|
+
> delete_attachment(id)
|
19
|
+
|
20
|
+
Delete an attachment.
|
21
|
+
|
22
|
+
With this endpoint you delete an attachment, including any stored file data.
|
23
|
+
|
24
|
+
### Examples
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'time'
|
28
|
+
require 'firefly_iii_client'
|
29
|
+
# setup authorization
|
30
|
+
FireflyIIIClient.configure do |config|
|
31
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
32
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
36
|
+
id = 1 # Integer | The ID of the single.
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Delete an attachment.
|
40
|
+
api_instance.delete_attachment(id)
|
41
|
+
rescue FireflyIIIClient::ApiError => e
|
42
|
+
puts "Error when calling AttachmentsApi->delete_attachment: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Using the delete_attachment_with_http_info variant
|
47
|
+
|
48
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
49
|
+
|
50
|
+
> <Array(nil, Integer, Hash)> delete_attachment_with_http_info(id)
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
|
54
|
+
begin
|
55
|
+
# Delete an attachment.
|
56
|
+
data, status_code, headers = api_instance.delete_attachment_with_http_info(id)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => nil
|
60
|
+
rescue FireflyIIIClient::ApiError => e
|
61
|
+
puts "Error when calling AttachmentsApi->delete_attachment_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **id** | **Integer** | The ID of the single. | |
|
70
|
+
|
71
|
+
### Return type
|
72
|
+
|
73
|
+
nil (empty response body)
|
74
|
+
|
75
|
+
### Authorization
|
76
|
+
|
77
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
78
|
+
|
79
|
+
### HTTP request headers
|
80
|
+
|
81
|
+
- **Content-Type**: Not defined
|
82
|
+
- **Accept**: Not defined
|
83
|
+
|
84
|
+
|
85
|
+
## download_attachment
|
86
|
+
|
87
|
+
> File download_attachment(id)
|
88
|
+
|
89
|
+
Download a single attachment.
|
90
|
+
|
91
|
+
This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
|
92
|
+
|
93
|
+
### Examples
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
require 'time'
|
97
|
+
require 'firefly_iii_client'
|
98
|
+
# setup authorization
|
99
|
+
FireflyIIIClient.configure do |config|
|
100
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
101
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
102
|
+
end
|
103
|
+
|
104
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
105
|
+
id = 1 # Integer | The ID of the attachment.
|
106
|
+
|
107
|
+
begin
|
108
|
+
# Download a single attachment.
|
109
|
+
result = api_instance.download_attachment(id)
|
110
|
+
p result
|
111
|
+
rescue FireflyIIIClient::ApiError => e
|
112
|
+
puts "Error when calling AttachmentsApi->download_attachment: #{e}"
|
113
|
+
end
|
114
|
+
```
|
115
|
+
|
116
|
+
#### Using the download_attachment_with_http_info variant
|
117
|
+
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
119
|
+
|
120
|
+
> <Array(File, Integer, Hash)> download_attachment_with_http_info(id)
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
|
124
|
+
begin
|
125
|
+
# Download a single attachment.
|
126
|
+
data, status_code, headers = api_instance.download_attachment_with_http_info(id)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => File
|
130
|
+
rescue FireflyIIIClient::ApiError => e
|
131
|
+
puts "Error when calling AttachmentsApi->download_attachment_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Parameters
|
136
|
+
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **id** | **Integer** | The ID of the attachment. | |
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
**File**
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: Not defined
|
152
|
+
- **Accept**: application/octet-stream
|
153
|
+
|
154
|
+
|
155
|
+
## get_attachment
|
156
|
+
|
157
|
+
> <AttachmentSingle> get_attachment(id)
|
158
|
+
|
159
|
+
Get a single attachment.
|
160
|
+
|
161
|
+
Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
|
162
|
+
|
163
|
+
### Examples
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
require 'time'
|
167
|
+
require 'firefly_iii_client'
|
168
|
+
# setup authorization
|
169
|
+
FireflyIIIClient.configure do |config|
|
170
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
171
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
172
|
+
end
|
173
|
+
|
174
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
175
|
+
id = 1 # Integer | The ID of the attachment.
|
176
|
+
|
177
|
+
begin
|
178
|
+
# Get a single attachment.
|
179
|
+
result = api_instance.get_attachment(id)
|
180
|
+
p result
|
181
|
+
rescue FireflyIIIClient::ApiError => e
|
182
|
+
puts "Error when calling AttachmentsApi->get_attachment: #{e}"
|
183
|
+
end
|
184
|
+
```
|
185
|
+
|
186
|
+
#### Using the get_attachment_with_http_info variant
|
187
|
+
|
188
|
+
This returns an Array which contains the response data, status code and headers.
|
189
|
+
|
190
|
+
> <Array(<AttachmentSingle>, Integer, Hash)> get_attachment_with_http_info(id)
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
|
194
|
+
begin
|
195
|
+
# Get a single attachment.
|
196
|
+
data, status_code, headers = api_instance.get_attachment_with_http_info(id)
|
197
|
+
p status_code # => 2xx
|
198
|
+
p headers # => { ... }
|
199
|
+
p data # => <AttachmentSingle>
|
200
|
+
rescue FireflyIIIClient::ApiError => e
|
201
|
+
puts "Error when calling AttachmentsApi->get_attachment_with_http_info: #{e}"
|
202
|
+
end
|
203
|
+
```
|
204
|
+
|
205
|
+
### Parameters
|
206
|
+
|
207
|
+
| Name | Type | Description | Notes |
|
208
|
+
| ---- | ---- | ----------- | ----- |
|
209
|
+
| **id** | **Integer** | The ID of the attachment. | |
|
210
|
+
|
211
|
+
### Return type
|
212
|
+
|
213
|
+
[**AttachmentSingle**](AttachmentSingle.md)
|
214
|
+
|
215
|
+
### Authorization
|
216
|
+
|
217
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
218
|
+
|
219
|
+
### HTTP request headers
|
220
|
+
|
221
|
+
- **Content-Type**: Not defined
|
222
|
+
- **Accept**: application/json
|
223
|
+
|
224
|
+
|
225
|
+
## list_attachment
|
226
|
+
|
227
|
+
> <AttachmentArray> list_attachment(opts)
|
228
|
+
|
229
|
+
List all attachments.
|
230
|
+
|
231
|
+
This endpoint lists all attachments.
|
232
|
+
|
233
|
+
### Examples
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
require 'time'
|
237
|
+
require 'firefly_iii_client'
|
238
|
+
# setup authorization
|
239
|
+
FireflyIIIClient.configure do |config|
|
240
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
241
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
242
|
+
end
|
243
|
+
|
244
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
245
|
+
opts = {
|
246
|
+
page: 1 # Integer | Page number. The default pagination is 50.
|
247
|
+
}
|
248
|
+
|
249
|
+
begin
|
250
|
+
# List all attachments.
|
251
|
+
result = api_instance.list_attachment(opts)
|
252
|
+
p result
|
253
|
+
rescue FireflyIIIClient::ApiError => e
|
254
|
+
puts "Error when calling AttachmentsApi->list_attachment: #{e}"
|
255
|
+
end
|
256
|
+
```
|
257
|
+
|
258
|
+
#### Using the list_attachment_with_http_info variant
|
259
|
+
|
260
|
+
This returns an Array which contains the response data, status code and headers.
|
261
|
+
|
262
|
+
> <Array(<AttachmentArray>, Integer, Hash)> list_attachment_with_http_info(opts)
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
|
266
|
+
begin
|
267
|
+
# List all attachments.
|
268
|
+
data, status_code, headers = api_instance.list_attachment_with_http_info(opts)
|
269
|
+
p status_code # => 2xx
|
270
|
+
p headers # => { ... }
|
271
|
+
p data # => <AttachmentArray>
|
272
|
+
rescue FireflyIIIClient::ApiError => e
|
273
|
+
puts "Error when calling AttachmentsApi->list_attachment_with_http_info: #{e}"
|
274
|
+
end
|
275
|
+
```
|
276
|
+
|
277
|
+
### Parameters
|
278
|
+
|
279
|
+
| Name | Type | Description | Notes |
|
280
|
+
| ---- | ---- | ----------- | ----- |
|
281
|
+
| **page** | **Integer** | Page number. The default pagination is 50. | [optional] |
|
282
|
+
|
283
|
+
### Return type
|
284
|
+
|
285
|
+
[**AttachmentArray**](AttachmentArray.md)
|
286
|
+
|
287
|
+
### Authorization
|
288
|
+
|
289
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
290
|
+
|
291
|
+
### HTTP request headers
|
292
|
+
|
293
|
+
- **Content-Type**: Not defined
|
294
|
+
- **Accept**: application/json
|
295
|
+
|
296
|
+
|
297
|
+
## store_attachment
|
298
|
+
|
299
|
+
> <AttachmentSingle> store_attachment(attachment)
|
300
|
+
|
301
|
+
Store a new attachment.
|
302
|
+
|
303
|
+
Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
|
304
|
+
|
305
|
+
### Examples
|
306
|
+
|
307
|
+
```ruby
|
308
|
+
require 'time'
|
309
|
+
require 'firefly_iii_client'
|
310
|
+
# setup authorization
|
311
|
+
FireflyIIIClient.configure do |config|
|
312
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
313
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
317
|
+
attachment = FireflyIIIClient::Attachment.new({ filename: 'file.pdf', model: 'Bill', model_id: 134 }) # Attachment | JSON array or key=value pairs with the necessary attachment information. See the model for the exact specifications.
|
318
|
+
|
319
|
+
begin
|
320
|
+
# Store a new attachment.
|
321
|
+
result = api_instance.store_attachment(attachment)
|
322
|
+
p result
|
323
|
+
rescue FireflyIIIClient::ApiError => e
|
324
|
+
puts "Error when calling AttachmentsApi->store_attachment: #{e}"
|
325
|
+
end
|
326
|
+
```
|
327
|
+
|
328
|
+
#### Using the store_attachment_with_http_info variant
|
329
|
+
|
330
|
+
This returns an Array which contains the response data, status code and headers.
|
331
|
+
|
332
|
+
> <Array(<AttachmentSingle>, Integer, Hash)> store_attachment_with_http_info(attachment)
|
333
|
+
|
334
|
+
```ruby
|
335
|
+
|
336
|
+
begin
|
337
|
+
# Store a new attachment.
|
338
|
+
data, status_code, headers = api_instance.store_attachment_with_http_info(attachment)
|
339
|
+
p status_code # => 2xx
|
340
|
+
p headers # => { ... }
|
341
|
+
p data # => <AttachmentSingle>
|
342
|
+
rescue FireflyIIIClient::ApiError => e
|
343
|
+
puts "Error when calling AttachmentsApi->store_attachment_with_http_info: #{e}"
|
344
|
+
end
|
345
|
+
```
|
346
|
+
|
347
|
+
### Parameters
|
348
|
+
|
349
|
+
| Name | Type | Description | Notes |
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
351
|
+
| **attachment** | [**Attachment**](Attachment.md) | JSON array or key=value pairs with the necessary attachment information. See the model for the exact specifications. | |
|
352
|
+
|
353
|
+
### Return type
|
354
|
+
|
355
|
+
[**AttachmentSingle**](AttachmentSingle.md)
|
356
|
+
|
357
|
+
### Authorization
|
358
|
+
|
359
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
360
|
+
|
361
|
+
### HTTP request headers
|
362
|
+
|
363
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
364
|
+
- **Accept**: application/json
|
365
|
+
|
366
|
+
|
367
|
+
## update_attachment
|
368
|
+
|
369
|
+
> <AttachmentSingle> update_attachment(id, attachment)
|
370
|
+
|
371
|
+
Update existing attachment.
|
372
|
+
|
373
|
+
Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
|
374
|
+
|
375
|
+
### Examples
|
376
|
+
|
377
|
+
```ruby
|
378
|
+
require 'time'
|
379
|
+
require 'firefly_iii_client'
|
380
|
+
# setup authorization
|
381
|
+
FireflyIIIClient.configure do |config|
|
382
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
383
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
384
|
+
end
|
385
|
+
|
386
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
387
|
+
id = 1 # Integer | The ID of the attachment.
|
388
|
+
attachment = FireflyIIIClient::Attachment.new({ filename: 'file.pdf', model: 'Bill', model_id: 134 }) # Attachment | JSON array with updated attachment information. See the model for the exact specifications.
|
389
|
+
|
390
|
+
begin
|
391
|
+
# Update existing attachment.
|
392
|
+
result = api_instance.update_attachment(id, attachment)
|
393
|
+
p result
|
394
|
+
rescue FireflyIIIClient::ApiError => e
|
395
|
+
puts "Error when calling AttachmentsApi->update_attachment: #{e}"
|
396
|
+
end
|
397
|
+
```
|
398
|
+
|
399
|
+
#### Using the update_attachment_with_http_info variant
|
400
|
+
|
401
|
+
This returns an Array which contains the response data, status code and headers.
|
402
|
+
|
403
|
+
> <Array(<AttachmentSingle>, Integer, Hash)> update_attachment_with_http_info(id, attachment)
|
404
|
+
|
405
|
+
```ruby
|
406
|
+
|
407
|
+
begin
|
408
|
+
# Update existing attachment.
|
409
|
+
data, status_code, headers = api_instance.update_attachment_with_http_info(id, attachment)
|
410
|
+
p status_code # => 2xx
|
411
|
+
p headers # => { ... }
|
412
|
+
p data # => <AttachmentSingle>
|
413
|
+
rescue FireflyIIIClient::ApiError => e
|
414
|
+
puts "Error when calling AttachmentsApi->update_attachment_with_http_info: #{e}"
|
415
|
+
end
|
416
|
+
```
|
417
|
+
|
418
|
+
### Parameters
|
419
|
+
|
420
|
+
| Name | Type | Description | Notes |
|
421
|
+
| ---- | ---- | ----------- | ----- |
|
422
|
+
| **id** | **Integer** | The ID of the attachment. | |
|
423
|
+
| **attachment** | [**Attachment**](Attachment.md) | JSON array with updated attachment information. See the model for the exact specifications. | |
|
424
|
+
|
425
|
+
### Return type
|
426
|
+
|
427
|
+
[**AttachmentSingle**](AttachmentSingle.md)
|
428
|
+
|
429
|
+
### Authorization
|
430
|
+
|
431
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
432
|
+
|
433
|
+
### HTTP request headers
|
434
|
+
|
435
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
436
|
+
- **Accept**: application/json
|
437
|
+
|
438
|
+
|
439
|
+
## upload_attachment
|
440
|
+
|
441
|
+
> upload_attachment(id, opts)
|
442
|
+
|
443
|
+
Upload an attachment.
|
444
|
+
|
445
|
+
Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
|
446
|
+
|
447
|
+
### Examples
|
448
|
+
|
449
|
+
```ruby
|
450
|
+
require 'time'
|
451
|
+
require 'firefly_iii_client'
|
452
|
+
# setup authorization
|
453
|
+
FireflyIIIClient.configure do |config|
|
454
|
+
# Configure OAuth2 access token for authorization: firefly_iii_auth
|
455
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
456
|
+
end
|
457
|
+
|
458
|
+
api_instance = FireflyIIIClient::AttachmentsApi.new
|
459
|
+
id = 1 # Integer | The ID of the attachment.
|
460
|
+
opts = {
|
461
|
+
body: File.new('/path/to/some/file') # File |
|
462
|
+
}
|
463
|
+
|
464
|
+
begin
|
465
|
+
# Upload an attachment.
|
466
|
+
api_instance.upload_attachment(id, opts)
|
467
|
+
rescue FireflyIIIClient::ApiError => e
|
468
|
+
puts "Error when calling AttachmentsApi->upload_attachment: #{e}"
|
469
|
+
end
|
470
|
+
```
|
471
|
+
|
472
|
+
#### Using the upload_attachment_with_http_info variant
|
473
|
+
|
474
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
475
|
+
|
476
|
+
> <Array(nil, Integer, Hash)> upload_attachment_with_http_info(id, opts)
|
477
|
+
|
478
|
+
```ruby
|
479
|
+
|
480
|
+
begin
|
481
|
+
# Upload an attachment.
|
482
|
+
data, status_code, headers = api_instance.upload_attachment_with_http_info(id, opts)
|
483
|
+
p status_code # => 2xx
|
484
|
+
p headers # => { ... }
|
485
|
+
p data # => nil
|
486
|
+
rescue FireflyIIIClient::ApiError => e
|
487
|
+
puts "Error when calling AttachmentsApi->upload_attachment_with_http_info: #{e}"
|
488
|
+
end
|
489
|
+
```
|
490
|
+
|
491
|
+
### Parameters
|
492
|
+
|
493
|
+
| Name | Type | Description | Notes |
|
494
|
+
| ---- | ---- | ----------- | ----- |
|
495
|
+
| **id** | **Integer** | The ID of the attachment. | |
|
496
|
+
| **body** | **File** | | [optional] |
|
497
|
+
|
498
|
+
### Return type
|
499
|
+
|
500
|
+
nil (empty response body)
|
501
|
+
|
502
|
+
### Authorization
|
503
|
+
|
504
|
+
[firefly_iii_auth](../README.md#firefly_iii_auth)
|
505
|
+
|
506
|
+
### HTTP request headers
|
507
|
+
|
508
|
+
- **Content-Type**: application/octet-stream
|
509
|
+
- **Accept**: Not defined
|
510
|
+
|