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,218 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FireflyIIIClient
|
17
|
+
class RuleSingle
|
18
|
+
attr_accessor :data
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'data' => :'data'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'data' => :'RuleRead'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RuleSingle` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RuleSingle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'data')
|
61
|
+
self.data = attributes[:'data']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
data == o.data
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[data].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
112
|
+
self.send("#{key}=", nil)
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = FireflyIIIClient.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
@@ -0,0 +1,330 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FireflyIIIClient
|
17
|
+
class RuleTrigger
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :created_at
|
21
|
+
|
22
|
+
attr_accessor :updated_at
|
23
|
+
|
24
|
+
# The type of thing this trigger responds to. A limited set is possible
|
25
|
+
attr_accessor :type
|
26
|
+
|
27
|
+
# The accompanying value the trigger responds to. This value is often mandatory, but this depends on the trigger.
|
28
|
+
attr_accessor :value
|
29
|
+
|
30
|
+
# Order of the trigger
|
31
|
+
attr_accessor :order
|
32
|
+
|
33
|
+
# If the trigger is active.
|
34
|
+
attr_accessor :active
|
35
|
+
|
36
|
+
# When true, other triggers will not be checked if this trigger was triggered.
|
37
|
+
attr_accessor :stop_processing
|
38
|
+
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'id' => :'id',
|
65
|
+
:'created_at' => :'created_at',
|
66
|
+
:'updated_at' => :'updated_at',
|
67
|
+
:'type' => :'type',
|
68
|
+
:'value' => :'value',
|
69
|
+
:'order' => :'order',
|
70
|
+
:'active' => :'active',
|
71
|
+
:'stop_processing' => :'stop_processing'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute type mapping.
|
81
|
+
def self.openapi_types
|
82
|
+
{
|
83
|
+
:'id' => :'Integer',
|
84
|
+
:'created_at' => :'Time',
|
85
|
+
:'updated_at' => :'Time',
|
86
|
+
:'type' => :'String',
|
87
|
+
:'value' => :'String',
|
88
|
+
:'order' => :'Integer',
|
89
|
+
:'active' => :'Boolean',
|
90
|
+
:'stop_processing' => :'Boolean'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# List of attributes with nullable: true
|
95
|
+
def self.openapi_nullable
|
96
|
+
Set.new([
|
97
|
+
])
|
98
|
+
end
|
99
|
+
|
100
|
+
# Initializes the object
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
def initialize(attributes = {})
|
103
|
+
if (!attributes.is_a?(Hash))
|
104
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::RuleTrigger` initialize method"
|
105
|
+
end
|
106
|
+
|
107
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
109
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::RuleTrigger`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
111
|
+
end
|
112
|
+
h[k.to_sym] = v
|
113
|
+
}
|
114
|
+
|
115
|
+
if attributes.key?(:'id')
|
116
|
+
self.id = attributes[:'id']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'created_at')
|
120
|
+
self.created_at = attributes[:'created_at']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'updated_at')
|
124
|
+
self.updated_at = attributes[:'updated_at']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'type')
|
128
|
+
self.type = attributes[:'type']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'value')
|
132
|
+
self.value = attributes[:'value']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'order')
|
136
|
+
self.order = attributes[:'order']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'active')
|
140
|
+
self.active = attributes[:'active']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'stop_processing')
|
144
|
+
self.stop_processing = attributes[:'stop_processing']
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
149
|
+
# @return Array for valid properties with the reasons
|
150
|
+
def list_invalid_properties
|
151
|
+
invalid_properties = Array.new
|
152
|
+
if @type.nil?
|
153
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
154
|
+
end
|
155
|
+
|
156
|
+
if @value.nil?
|
157
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
158
|
+
end
|
159
|
+
|
160
|
+
invalid_properties
|
161
|
+
end
|
162
|
+
|
163
|
+
# Check to see if the all the properties in the model are valid
|
164
|
+
# @return true if the model is valid
|
165
|
+
def valid?
|
166
|
+
return false if @type.nil?
|
167
|
+
type_validator = EnumAttributeValidator.new('String', ["from_account_starts", "from_account_ends", "from_account_is", "from_account_contains", "to_account_starts", "to_account_ends", "to_account_is", "to_account_contains", "amount_less", "amount_exactly", "amount_more", "description_starts", "description_ends", "description_contains", "description_is", "transaction_type", "category_is", "budget_is", "tag_is", "currency_is", "has_attachments", "has_no_category", "has_any_category", "has_no_budget", "has_any_budget", "has_no_tag", "has_any_tag", "notes_contain", "notes_start", "notes_end", "notes_are", "no_notes", "any_notes"])
|
168
|
+
return false unless type_validator.valid?(@type)
|
169
|
+
return false if @value.nil?
|
170
|
+
true
|
171
|
+
end
|
172
|
+
|
173
|
+
# Custom attribute writer method checking allowed values (enum).
|
174
|
+
# @param [Object] type Object to be assigned
|
175
|
+
def type=(type)
|
176
|
+
validator = EnumAttributeValidator.new('String', ["from_account_starts", "from_account_ends", "from_account_is", "from_account_contains", "to_account_starts", "to_account_ends", "to_account_is", "to_account_contains", "amount_less", "amount_exactly", "amount_more", "description_starts", "description_ends", "description_contains", "description_is", "transaction_type", "category_is", "budget_is", "tag_is", "currency_is", "has_attachments", "has_no_category", "has_any_category", "has_no_budget", "has_any_budget", "has_no_tag", "has_any_tag", "notes_contain", "notes_start", "notes_end", "notes_are", "no_notes", "any_notes"])
|
177
|
+
unless validator.valid?(type)
|
178
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
179
|
+
end
|
180
|
+
@type = type
|
181
|
+
end
|
182
|
+
|
183
|
+
# Checks equality by comparing each attribute.
|
184
|
+
# @param [Object] Object to be compared
|
185
|
+
def ==(o)
|
186
|
+
return true if self.equal?(o)
|
187
|
+
self.class == o.class &&
|
188
|
+
id == o.id &&
|
189
|
+
created_at == o.created_at &&
|
190
|
+
updated_at == o.updated_at &&
|
191
|
+
type == o.type &&
|
192
|
+
value == o.value &&
|
193
|
+
order == o.order &&
|
194
|
+
active == o.active &&
|
195
|
+
stop_processing == o.stop_processing
|
196
|
+
end
|
197
|
+
|
198
|
+
# @see the `==` method
|
199
|
+
# @param [Object] Object to be compared
|
200
|
+
def eql?(o)
|
201
|
+
self == o
|
202
|
+
end
|
203
|
+
|
204
|
+
# Calculates hash code according to all attributes.
|
205
|
+
# @return [Integer] Hash code
|
206
|
+
def hash
|
207
|
+
[id, created_at, updated_at, type, value, order, active, stop_processing].hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Builds the object from hash
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
212
|
+
# @return [Object] Returns the model itself
|
213
|
+
def self.build_from_hash(attributes)
|
214
|
+
new.build_from_hash(attributes)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Builds the object from hash
|
218
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
219
|
+
# @return [Object] Returns the model itself
|
220
|
+
def build_from_hash(attributes)
|
221
|
+
return nil unless attributes.is_a?(Hash)
|
222
|
+
self.class.openapi_types.each_pair do |key, type|
|
223
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
224
|
+
self.send("#{key}=", nil)
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
226
|
+
# check to ensure the input is an array given that the attribute
|
227
|
+
# is documented as an array but the input is not
|
228
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
229
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
230
|
+
end
|
231
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
232
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
self
|
237
|
+
end
|
238
|
+
|
239
|
+
# Deserializes the data based on type
|
240
|
+
# @param string type Data type
|
241
|
+
# @param string value Value to be deserialized
|
242
|
+
# @return [Object] Deserialized data
|
243
|
+
def _deserialize(type, value)
|
244
|
+
case type.to_sym
|
245
|
+
when :Time
|
246
|
+
Time.parse(value)
|
247
|
+
when :Date
|
248
|
+
Date.parse(value)
|
249
|
+
when :String
|
250
|
+
value.to_s
|
251
|
+
when :Integer
|
252
|
+
value.to_i
|
253
|
+
when :Float
|
254
|
+
value.to_f
|
255
|
+
when :Boolean
|
256
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
257
|
+
true
|
258
|
+
else
|
259
|
+
false
|
260
|
+
end
|
261
|
+
when :Object
|
262
|
+
# generic object (usually a Hash), return directly
|
263
|
+
value
|
264
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
265
|
+
inner_type = Regexp.last_match[:inner_type]
|
266
|
+
value.map { |v| _deserialize(inner_type, v) }
|
267
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
268
|
+
k_type = Regexp.last_match[:k_type]
|
269
|
+
v_type = Regexp.last_match[:v_type]
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each do |k, v|
|
272
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
else # model
|
276
|
+
# models (e.g. Pet) or oneOf
|
277
|
+
klass = FireflyIIIClient.const_get(type)
|
278
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
# Returns the string representation of the object
|
283
|
+
# @return [String] String presentation of the object
|
284
|
+
def to_s
|
285
|
+
to_hash.to_s
|
286
|
+
end
|
287
|
+
|
288
|
+
# to_body is an alias to to_hash (backward compatibility)
|
289
|
+
# @return [Hash] Returns the object in the form of hash
|
290
|
+
def to_body
|
291
|
+
to_hash
|
292
|
+
end
|
293
|
+
|
294
|
+
# Returns the object in the form of hash
|
295
|
+
# @return [Hash] Returns the object in the form of hash
|
296
|
+
def to_hash
|
297
|
+
hash = {}
|
298
|
+
self.class.attribute_map.each_pair do |attr, param|
|
299
|
+
value = self.send(attr)
|
300
|
+
if value.nil?
|
301
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
302
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
303
|
+
end
|
304
|
+
|
305
|
+
hash[param] = _to_hash(value)
|
306
|
+
end
|
307
|
+
hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Outputs non-array value in the form of hash
|
311
|
+
# For object, use to_hash. Otherwise, just return the value
|
312
|
+
# @param [Object] value Any valid value
|
313
|
+
# @return [Hash] Returns the value in the form of hash
|
314
|
+
def _to_hash(value)
|
315
|
+
if value.is_a?(Array)
|
316
|
+
value.compact.map { |v| _to_hash(v) }
|
317
|
+
elsif value.is_a?(Hash)
|
318
|
+
{}.tap do |hash|
|
319
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
+
end
|
321
|
+
elsif value.respond_to? :to_hash
|
322
|
+
value.to_hash
|
323
|
+
else
|
324
|
+
value
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
329
|
+
|
330
|
+
end
|