xero-apimatic-sdk 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/LICENSE +28 -0
- data/README.md +175 -0
- data/bin/console +15 -0
- data/lib/xero_ap_is/api_helper.rb +10 -0
- data/lib/xero_ap_is/apis/accounting_api.rb +8328 -0
- data/lib/xero_ap_is/apis/asset_api.rb +210 -0
- data/lib/xero_ap_is/apis/bank_feeds_api.rb +268 -0
- data/lib/xero_ap_is/apis/base_api.rb +67 -0
- data/lib/xero_ap_is/apis/identity_api.rb +51 -0
- data/lib/xero_ap_is/apis/oauth_authorization_api.rb +87 -0
- data/lib/xero_ap_is/apis/project_api.rb +662 -0
- data/lib/xero_ap_is/client.rb +110 -0
- data/lib/xero_ap_is/configuration.rb +196 -0
- data/lib/xero_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/xero_ap_is/exceptions/asset_types400_error_exception.rb +72 -0
- data/lib/xero_ap_is/exceptions/assets400_error_exception.rb +72 -0
- data/lib/xero_ap_is/exceptions/error_error1_exception.rb +63 -0
- data/lib/xero_ap_is/exceptions/error_error2_exception.rb +51 -0
- data/lib/xero_ap_is/exceptions/error_exception.rb +72 -0
- data/lib/xero_ap_is/exceptions/feed_connections_error_exception.rb +60 -0
- data/lib/xero_ap_is/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/xero_ap_is/exceptions/statements_error_exception.rb +60 -0
- data/lib/xero_ap_is/http/api_response.rb +19 -0
- data/lib/xero_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/xero_ap_is/http/auth/oauth_2.rb +161 -0
- data/lib/xero_ap_is/http/http_call_back.rb +10 -0
- data/lib/xero_ap_is/http/http_method_enum.rb +10 -0
- data/lib/xero_ap_is/http/http_request.rb +10 -0
- data/lib/xero_ap_is/http/http_response.rb +10 -0
- data/lib/xero_ap_is/http/proxy_settings.rb +22 -0
- data/lib/xero_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/xero_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/xero_ap_is/models/access_token.rb +116 -0
- data/lib/xero_ap_is/models/account.rb +300 -0
- data/lib/xero_ap_is/models/account_type.rb +100 -0
- data/lib/xero_ap_is/models/account_type1.rb +37 -0
- data/lib/xero_ap_is/models/accounts.rb +84 -0
- data/lib/xero_ap_is/models/accounts_payable.rb +85 -0
- data/lib/xero_ap_is/models/accounts_receivable.rb +85 -0
- data/lib/xero_ap_is/models/action.rb +85 -0
- data/lib/xero_ap_is/models/actions.rb +84 -0
- data/lib/xero_ap_is/models/address.rb +167 -0
- data/lib/xero_ap_is/models/address_for_organisation.rb +167 -0
- data/lib/xero_ap_is/models/address_type.rb +40 -0
- data/lib/xero_ap_is/models/address_type1.rb +36 -0
- data/lib/xero_ap_is/models/allocation.rb +174 -0
- data/lib/xero_ap_is/models/allocations.rb +85 -0
- data/lib/xero_ap_is/models/amount.rb +85 -0
- data/lib/xero_ap_is/models/asset.rb +249 -0
- data/lib/xero_ap_is/models/asset_status.rb +40 -0
- data/lib/xero_ap_is/models/asset_status_query_param.rb +40 -0
- data/lib/xero_ap_is/models/asset_type.rb +154 -0
- data/lib/xero_ap_is/models/assets.rb +94 -0
- data/lib/xero_ap_is/models/attachment.rb +126 -0
- data/lib/xero_ap_is/models/attachments.rb +85 -0
- data/lib/xero_ap_is/models/averaging_method.rb +36 -0
- data/lib/xero_ap_is/models/balance_details.rb +98 -0
- data/lib/xero_ap_is/models/balances.rb +89 -0
- data/lib/xero_ap_is/models/bank_account_type.rb +44 -0
- data/lib/xero_ap_is/models/bank_transaction.rb +319 -0
- data/lib/xero_ap_is/models/bank_transactions.rb +114 -0
- data/lib/xero_ap_is/models/bank_transfer.rb +224 -0
- data/lib/xero_ap_is/models/bank_transfers.rb +85 -0
- data/lib/xero_ap_is/models/base_model.rb +110 -0
- data/lib/xero_ap_is/models/batch_payment.rb +275 -0
- data/lib/xero_ap_is/models/batch_payment_delete.rb +84 -0
- data/lib/xero_ap_is/models/batch_payment_delete_by_url_param.rb +73 -0
- data/lib/xero_ap_is/models/batch_payment_details.rb +128 -0
- data/lib/xero_ap_is/models/batch_payments.rb +85 -0
- data/lib/xero_ap_is/models/bill.rb +85 -0
- data/lib/xero_ap_is/models/book_depreciation_detail.rb +243 -0
- data/lib/xero_ap_is/models/book_depreciation_setting.rb +170 -0
- data/lib/xero_ap_is/models/branding_theme.rb +129 -0
- data/lib/xero_ap_is/models/branding_themes.rb +85 -0
- data/lib/xero_ap_is/models/budget.rb +145 -0
- data/lib/xero_ap_is/models/budget_balance.rb +105 -0
- data/lib/xero_ap_is/models/budget_line.rb +105 -0
- data/lib/xero_ap_is/models/budgets.rb +84 -0
- data/lib/xero_ap_is/models/charge_type.rb +42 -0
- data/lib/xero_ap_is/models/cis_org_setting.rb +105 -0
- data/lib/xero_ap_is/models/cis_org_settings.rb +85 -0
- data/lib/xero_ap_is/models/cis_setting.rb +86 -0
- data/lib/xero_ap_is/models/cis_settings.rb +85 -0
- data/lib/xero_ap_is/models/class1.rb +113 -0
- data/lib/xero_ap_is/models/connection.rb +155 -0
- data/lib/xero_ap_is/models/contact.rb +661 -0
- data/lib/xero_ap_is/models/contact_group.rb +119 -0
- data/lib/xero_ap_is/models/contact_groups.rb +85 -0
- data/lib/xero_ap_is/models/contact_person.rb +108 -0
- data/lib/xero_ap_is/models/contact_status.rb +40 -0
- data/lib/xero_ap_is/models/contacts.rb +113 -0
- data/lib/xero_ap_is/models/conversion_balances.rb +108 -0
- data/lib/xero_ap_is/models/conversion_date.rb +87 -0
- data/lib/xero_ap_is/models/country_code.rb +990 -0
- data/lib/xero_ap_is/models/credit_debit_indicator.rb +37 -0
- data/lib/xero_ap_is/models/credit_note.rb +453 -0
- data/lib/xero_ap_is/models/credit_notes.rb +113 -0
- data/lib/xero_ap_is/models/currencies.rb +85 -0
- data/lib/xero_ap_is/models/currency.rb +85 -0
- data/lib/xero_ap_is/models/currency_code.rb +700 -0
- data/lib/xero_ap_is/models/currency_code1.rb +680 -0
- data/lib/xero_ap_is/models/depreciation_calculation_method.rb +40 -0
- data/lib/xero_ap_is/models/depreciation_method.rb +52 -0
- data/lib/xero_ap_is/models/due_date_type.rb +52 -0
- data/lib/xero_ap_is/models/edition.rb +38 -0
- data/lib/xero_ap_is/models/element.rb +160 -0
- data/lib/xero_ap_is/models/employee.rb +160 -0
- data/lib/xero_ap_is/models/employees.rb +85 -0
- data/lib/xero_ap_is/models/end_balance.rb +89 -0
- data/lib/xero_ap_is/models/error1.rb +138 -0
- data/lib/xero_ap_is/models/error2.rb +106 -0
- data/lib/xero_ap_is/models/error3.rb +85 -0
- data/lib/xero_ap_is/models/expense_claim.rb +209 -0
- data/lib/xero_ap_is/models/expense_claims.rb +85 -0
- data/lib/xero_ap_is/models/external_link.rb +95 -0
- data/lib/xero_ap_is/models/federal_tax_classification.rb +56 -0
- data/lib/xero_ap_is/models/feed_connection.rb +177 -0
- data/lib/xero_ap_is/models/feed_connections.rb +94 -0
- data/lib/xero_ap_is/models/field_validation_errors_element.rb +127 -0
- data/lib/xero_ap_is/models/history_record.rb +105 -0
- data/lib/xero_ap_is/models/history_records.rb +85 -0
- data/lib/xero_ap_is/models/import_summary.rb +87 -0
- data/lib/xero_ap_is/models/import_summary_accounts.rb +154 -0
- data/lib/xero_ap_is/models/import_summary_object.rb +76 -0
- data/lib/xero_ap_is/models/import_summary_organisation.rb +75 -0
- data/lib/xero_ap_is/models/invoice.rb +586 -0
- data/lib/xero_ap_is/models/invoice_address.rb +158 -0
- data/lib/xero_ap_is/models/invoice_address_type.rb +37 -0
- data/lib/xero_ap_is/models/invoice_reminder.rb +75 -0
- data/lib/xero_ap_is/models/invoice_reminders.rb +85 -0
- data/lib/xero_ap_is/models/invoices.rb +113 -0
- data/lib/xero_ap_is/models/item.rb +259 -0
- data/lib/xero_ap_is/models/items.rb +84 -0
- data/lib/xero_ap_is/models/journal.rb +157 -0
- data/lib/xero_ap_is/models/journal_line.rb +201 -0
- data/lib/xero_ap_is/models/journals.rb +103 -0
- data/lib/xero_ap_is/models/line_amount_types.rb +41 -0
- data/lib/xero_ap_is/models/line_item.rb +287 -0
- data/lib/xero_ap_is/models/line_item_item.rb +95 -0
- data/lib/xero_ap_is/models/line_item_tracking.rb +108 -0
- data/lib/xero_ap_is/models/link_type.rb +48 -0
- data/lib/xero_ap_is/models/linked_transaction.rb +215 -0
- data/lib/xero_ap_is/models/linked_transactions.rb +85 -0
- data/lib/xero_ap_is/models/manual_journal.rb +255 -0
- data/lib/xero_ap_is/models/manual_journal_line.rb +156 -0
- data/lib/xero_ap_is/models/manual_journals.rb +114 -0
- data/lib/xero_ap_is/models/mclass.rb +48 -0
- data/lib/xero_ap_is/models/oauth_provider_error.rb +62 -0
- data/lib/xero_ap_is/models/oauth_scope_oauth_2.rb +113 -0
- data/lib/xero_ap_is/models/oauth_token.rb +96 -0
- data/lib/xero_ap_is/models/online_invoice.rb +77 -0
- data/lib/xero_ap_is/models/online_invoices.rb +85 -0
- data/lib/xero_ap_is/models/order_by.rb +56 -0
- data/lib/xero_ap_is/models/organisation.rb +467 -0
- data/lib/xero_ap_is/models/organisation_entity_type.rb +80 -0
- data/lib/xero_ap_is/models/organisation_role.rb +61 -0
- data/lib/xero_ap_is/models/organisation_type.rb +80 -0
- data/lib/xero_ap_is/models/organisations.rb +85 -0
- data/lib/xero_ap_is/models/overpayment.rb +309 -0
- data/lib/xero_ap_is/models/overpayments.rb +113 -0
- data/lib/xero_ap_is/models/pagination.rb +105 -0
- data/lib/xero_ap_is/models/payment.rb +381 -0
- data/lib/xero_ap_is/models/payment_delete.rb +73 -0
- data/lib/xero_ap_is/models/payment_service.rb +143 -0
- data/lib/xero_ap_is/models/payment_services.rb +85 -0
- data/lib/xero_ap_is/models/payment_term.rb +85 -0
- data/lib/xero_ap_is/models/payment_term_type.rb +44 -0
- data/lib/xero_ap_is/models/payment_type.rb +60 -0
- data/lib/xero_ap_is/models/payments.rb +113 -0
- data/lib/xero_ap_is/models/phone.rb +108 -0
- data/lib/xero_ap_is/models/phone_type.rb +48 -0
- data/lib/xero_ap_is/models/prepayment.rb +309 -0
- data/lib/xero_ap_is/models/prepayments.rb +113 -0
- data/lib/xero_ap_is/models/project.rb +328 -0
- data/lib/xero_ap_is/models/project_create_or_update.rb +115 -0
- data/lib/xero_ap_is/models/project_patch.rb +73 -0
- data/lib/xero_ap_is/models/project_status.rb +36 -0
- data/lib/xero_ap_is/models/project_user.rb +95 -0
- data/lib/xero_ap_is/models/project_users.rb +94 -0
- data/lib/xero_ap_is/models/projects.rb +94 -0
- data/lib/xero_ap_is/models/purchase.rb +112 -0
- data/lib/xero_ap_is/models/purchase_order.rb +408 -0
- data/lib/xero_ap_is/models/purchase_orders.rb +114 -0
- data/lib/xero_ap_is/models/purchases_default_line_amount_type.rb +42 -0
- data/lib/xero_ap_is/models/quote.rb +338 -0
- data/lib/xero_ap_is/models/quote_line_amount_types.rb +41 -0
- data/lib/xero_ap_is/models/quote_status_codes.rb +52 -0
- data/lib/xero_ap_is/models/quotes.rb +84 -0
- data/lib/xero_ap_is/models/receipt.rb +287 -0
- data/lib/xero_ap_is/models/receipts.rb +84 -0
- data/lib/xero_ap_is/models/refresh_token.rb +106 -0
- data/lib/xero_ap_is/models/repeating_invoice.rb +290 -0
- data/lib/xero_ap_is/models/repeating_invoices.rb +85 -0
- data/lib/xero_ap_is/models/report.rb +136 -0
- data/lib/xero_ap_is/models/report_attribute.rb +85 -0
- data/lib/xero_ap_is/models/report_cell.rb +94 -0
- data/lib/xero_ap_is/models/report_fields.rb +95 -0
- data/lib/xero_ap_is/models/report_row.rb +104 -0
- data/lib/xero_ap_is/models/report_rows.rb +123 -0
- data/lib/xero_ap_is/models/report_tax_type.rb +424 -0
- data/lib/xero_ap_is/models/report_type.rb +26 -0
- data/lib/xero_ap_is/models/report_with_row.rb +176 -0
- data/lib/xero_ap_is/models/report_with_rows.rb +84 -0
- data/lib/xero_ap_is/models/reports.rb +84 -0
- data/lib/xero_ap_is/models/request_empty.rb +75 -0
- data/lib/xero_ap_is/models/resource_validation_errors_element.rb +116 -0
- data/lib/xero_ap_is/models/row_type.rb +44 -0
- data/lib/xero_ap_is/models/sales_default_line_amount_type.rb +42 -0
- data/lib/xero_ap_is/models/sales_tax_basis.rb +60 -0
- data/lib/xero_ap_is/models/sales_tax_period.rb +88 -0
- data/lib/xero_ap_is/models/sales_tracking_category.rb +89 -0
- data/lib/xero_ap_is/models/schedule.rb +140 -0
- data/lib/xero_ap_is/models/setting.rb +175 -0
- data/lib/xero_ap_is/models/setup.rb +117 -0
- data/lib/xero_ap_is/models/sort_direction.rb +36 -0
- data/lib/xero_ap_is/models/source_transaction_type_code.rb +38 -0
- data/lib/xero_ap_is/models/source_type.rb +128 -0
- data/lib/xero_ap_is/models/start_balance.rb +88 -0
- data/lib/xero_ap_is/models/statement.rb +194 -0
- data/lib/xero_ap_is/models/statement_line.rb +162 -0
- data/lib/xero_ap_is/models/statements.rb +94 -0
- data/lib/xero_ap_is/models/status.rb +41 -0
- data/lib/xero_ap_is/models/status1.rb +38 -0
- data/lib/xero_ap_is/models/status10.rb +40 -0
- data/lib/xero_ap_is/models/status11.rb +44 -0
- data/lib/xero_ap_is/models/status110.rb +40 -0
- data/lib/xero_ap_is/models/status111.rb +43 -0
- data/lib/xero_ap_is/models/status12.rb +48 -0
- data/lib/xero_ap_is/models/status13.rb +48 -0
- data/lib/xero_ap_is/models/status14.rb +52 -0
- data/lib/xero_ap_is/models/status15.rb +48 -0
- data/lib/xero_ap_is/models/status16.rb +36 -0
- data/lib/xero_ap_is/models/status17.rb +48 -0
- data/lib/xero_ap_is/models/status18.rb +40 -0
- data/lib/xero_ap_is/models/status19.rb +44 -0
- data/lib/xero_ap_is/models/status2.rb +40 -0
- data/lib/xero_ap_is/models/status20.rb +48 -0
- data/lib/xero_ap_is/models/status21.rb +36 -0
- data/lib/xero_ap_is/models/status22.rb +44 -0
- data/lib/xero_ap_is/models/status3.rb +52 -0
- data/lib/xero_ap_is/models/status4.rb +40 -0
- data/lib/xero_ap_is/models/status5.rb +40 -0
- data/lib/xero_ap_is/models/status6.rb +52 -0
- data/lib/xero_ap_is/models/status7.rb +36 -0
- data/lib/xero_ap_is/models/status8.rb +37 -0
- data/lib/xero_ap_is/models/status9.rb +40 -0
- data/lib/xero_ap_is/models/system_account.rb +110 -0
- data/lib/xero_ap_is/models/task.rb +234 -0
- data/lib/xero_ap_is/models/task_create_or_update.rb +105 -0
- data/lib/xero_ap_is/models/tasks.rb +94 -0
- data/lib/xero_ap_is/models/tax_breakdown_component.rb +172 -0
- data/lib/xero_ap_is/models/tax_component.rb +108 -0
- data/lib/xero_ap_is/models/tax_number_type.rb +45 -0
- data/lib/xero_ap_is/models/tax_rate.rb +213 -0
- data/lib/xero_ap_is/models/tax_rates.rb +85 -0
- data/lib/xero_ap_is/models/tax_type.rb +520 -0
- data/lib/xero_ap_is/models/taxability.rb +48 -0
- data/lib/xero_ap_is/models/ten_ninety_nine_contact.rb +318 -0
- data/lib/xero_ap_is/models/time_entries.rb +94 -0
- data/lib/xero_ap_is/models/time_entry.rb +179 -0
- data/lib/xero_ap_is/models/time_entry_create_or_update.rb +120 -0
- data/lib/xero_ap_is/models/time_zone.rb +592 -0
- data/lib/xero_ap_is/models/timeframe.rb +40 -0
- data/lib/xero_ap_is/models/tracking_categories.rb +85 -0
- data/lib/xero_ap_is/models/tracking_category.rb +140 -0
- data/lib/xero_ap_is/models/tracking_option.rb +109 -0
- data/lib/xero_ap_is/models/tracking_options.rb +84 -0
- data/lib/xero_ap_is/models/type.rb +60 -0
- data/lib/xero_ap_is/models/type1.rb +26 -0
- data/lib/xero_ap_is/models/type10.rb +36 -0
- data/lib/xero_ap_is/models/type11.rb +114 -0
- data/lib/xero_ap_is/models/type2.rb +48 -0
- data/lib/xero_ap_is/models/type3.rb +60 -0
- data/lib/xero_ap_is/models/type4.rb +44 -0
- data/lib/xero_ap_is/models/type5.rb +40 -0
- data/lib/xero_ap_is/models/type6.rb +36 -0
- data/lib/xero_ap_is/models/type7.rb +37 -0
- data/lib/xero_ap_is/models/type8.rb +36 -0
- data/lib/xero_ap_is/models/type9.rb +26 -0
- data/lib/xero_ap_is/models/unit.rb +36 -0
- data/lib/xero_ap_is/models/user.rb +139 -0
- data/lib/xero_ap_is/models/users.rb +84 -0
- data/lib/xero_ap_is/models/validation_error.rb +75 -0
- data/lib/xero_ap_is/models/version.rb +68 -0
- data/lib/xero_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/xero_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/xero_ap_is.rb +309 -0
- metadata +372 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# BookDepreciationDetail Model.
|
|
8
|
+
class BookDepreciationDetail < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# When an asset is disposed, this will be the sell price minus the purchase
|
|
13
|
+
# price if a profit was made.
|
|
14
|
+
# @return [Float]
|
|
15
|
+
attr_accessor :current_capital_gain
|
|
16
|
+
|
|
17
|
+
# When an asset is disposed, this will be the lowest one of sell price or
|
|
18
|
+
# purchase price, minus the current book value.
|
|
19
|
+
# @return [Float]
|
|
20
|
+
attr_accessor :current_gain_loss
|
|
21
|
+
|
|
22
|
+
# YYYY-MM-DD
|
|
23
|
+
# @return [Date]
|
|
24
|
+
attr_accessor :depreciation_start_date
|
|
25
|
+
|
|
26
|
+
# The value of the asset you want to depreciate, if this is less than the
|
|
27
|
+
# cost of the asset.
|
|
28
|
+
# @return [Float]
|
|
29
|
+
attr_accessor :cost_limit
|
|
30
|
+
|
|
31
|
+
# The value of the asset remaining when you've fully depreciated it.
|
|
32
|
+
# @return [Float]
|
|
33
|
+
attr_accessor :residual_value
|
|
34
|
+
|
|
35
|
+
# All depreciation prior to the current financial year.
|
|
36
|
+
# @return [Float]
|
|
37
|
+
attr_accessor :prior_accum_depreciation_amount
|
|
38
|
+
|
|
39
|
+
# All depreciation occurring in the current financial year.
|
|
40
|
+
# @return [Float]
|
|
41
|
+
attr_accessor :current_accum_depreciation_amount
|
|
42
|
+
|
|
43
|
+
# (New Zealand Orgs Only) The portion of capital gain realised from the
|
|
44
|
+
# disposal of a fixed asset that is attributable to its business use.
|
|
45
|
+
# @return [Float]
|
|
46
|
+
attr_accessor :business_use_capital_gain
|
|
47
|
+
|
|
48
|
+
# (New Zealand Orgs Only) Represents the gain or loss from the disposal of
|
|
49
|
+
# the business use portion of a fixed asset. This value records the
|
|
50
|
+
# financial result (profit or loss) related specifically to the asset’s
|
|
51
|
+
# business use.
|
|
52
|
+
# @return [Float]
|
|
53
|
+
attr_accessor :business_use_current_gain_loss
|
|
54
|
+
|
|
55
|
+
# (New Zealand Orgs Only) The portion of capital gain realised from the
|
|
56
|
+
# disposal of a fixed asset that is attributable to its private
|
|
57
|
+
# (non-business) use.
|
|
58
|
+
# @return [Float]
|
|
59
|
+
attr_accessor :private_use_capital_gain
|
|
60
|
+
|
|
61
|
+
# (New Zealand Orgs Only) Represents the gain or loss from the disposal of
|
|
62
|
+
# the private use portion of a fixed asset. This value records the financial
|
|
63
|
+
# result (profit or loss) related specifically to the asset’s private use.
|
|
64
|
+
# @return [Float]
|
|
65
|
+
attr_accessor :private_use_current_gain_loss
|
|
66
|
+
|
|
67
|
+
# (New Zealand Orgs Only) The Investment Boost deduction percentage.
|
|
68
|
+
# @return [Float]
|
|
69
|
+
attr_accessor :initial_deduction_percentage
|
|
70
|
+
|
|
71
|
+
# A mapping from model property names to API property names.
|
|
72
|
+
def self.names
|
|
73
|
+
@_hash = {} if @_hash.nil?
|
|
74
|
+
@_hash['current_capital_gain'] = 'currentCapitalGain'
|
|
75
|
+
@_hash['current_gain_loss'] = 'currentGainLoss'
|
|
76
|
+
@_hash['depreciation_start_date'] = 'depreciationStartDate'
|
|
77
|
+
@_hash['cost_limit'] = 'costLimit'
|
|
78
|
+
@_hash['residual_value'] = 'residualValue'
|
|
79
|
+
@_hash['prior_accum_depreciation_amount'] =
|
|
80
|
+
'priorAccumDepreciationAmount'
|
|
81
|
+
@_hash['current_accum_depreciation_amount'] =
|
|
82
|
+
'currentAccumDepreciationAmount'
|
|
83
|
+
@_hash['business_use_capital_gain'] = 'businessUseCapitalGain'
|
|
84
|
+
@_hash['business_use_current_gain_loss'] = 'businessUseCurrentGainLoss'
|
|
85
|
+
@_hash['private_use_capital_gain'] = 'privateUseCapitalGain'
|
|
86
|
+
@_hash['private_use_current_gain_loss'] = 'privateUseCurrentGainLoss'
|
|
87
|
+
@_hash['initial_deduction_percentage'] = 'initialDeductionPercentage'
|
|
88
|
+
@_hash
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# An array for optional fields
|
|
92
|
+
def self.optionals
|
|
93
|
+
%w[
|
|
94
|
+
current_capital_gain
|
|
95
|
+
current_gain_loss
|
|
96
|
+
depreciation_start_date
|
|
97
|
+
cost_limit
|
|
98
|
+
residual_value
|
|
99
|
+
prior_accum_depreciation_amount
|
|
100
|
+
current_accum_depreciation_amount
|
|
101
|
+
business_use_capital_gain
|
|
102
|
+
business_use_current_gain_loss
|
|
103
|
+
private_use_capital_gain
|
|
104
|
+
private_use_current_gain_loss
|
|
105
|
+
initial_deduction_percentage
|
|
106
|
+
]
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# An array for nullable fields
|
|
110
|
+
def self.nullables
|
|
111
|
+
[]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def initialize(current_capital_gain: SKIP, current_gain_loss: SKIP,
|
|
115
|
+
depreciation_start_date: SKIP, cost_limit: SKIP,
|
|
116
|
+
residual_value: SKIP, prior_accum_depreciation_amount: SKIP,
|
|
117
|
+
current_accum_depreciation_amount: SKIP,
|
|
118
|
+
business_use_capital_gain: SKIP,
|
|
119
|
+
business_use_current_gain_loss: SKIP,
|
|
120
|
+
private_use_capital_gain: SKIP,
|
|
121
|
+
private_use_current_gain_loss: SKIP,
|
|
122
|
+
initial_deduction_percentage: SKIP,
|
|
123
|
+
additional_properties: nil)
|
|
124
|
+
# Add additional model properties to the instance
|
|
125
|
+
additional_properties = {} if additional_properties.nil?
|
|
126
|
+
|
|
127
|
+
@current_capital_gain = current_capital_gain unless current_capital_gain == SKIP
|
|
128
|
+
@current_gain_loss = current_gain_loss unless current_gain_loss == SKIP
|
|
129
|
+
@depreciation_start_date = depreciation_start_date unless depreciation_start_date == SKIP
|
|
130
|
+
@cost_limit = cost_limit unless cost_limit == SKIP
|
|
131
|
+
@residual_value = residual_value unless residual_value == SKIP
|
|
132
|
+
unless prior_accum_depreciation_amount == SKIP
|
|
133
|
+
@prior_accum_depreciation_amount =
|
|
134
|
+
prior_accum_depreciation_amount
|
|
135
|
+
end
|
|
136
|
+
unless current_accum_depreciation_amount == SKIP
|
|
137
|
+
@current_accum_depreciation_amount =
|
|
138
|
+
current_accum_depreciation_amount
|
|
139
|
+
end
|
|
140
|
+
unless business_use_capital_gain == SKIP
|
|
141
|
+
@business_use_capital_gain =
|
|
142
|
+
business_use_capital_gain
|
|
143
|
+
end
|
|
144
|
+
unless business_use_current_gain_loss == SKIP
|
|
145
|
+
@business_use_current_gain_loss =
|
|
146
|
+
business_use_current_gain_loss
|
|
147
|
+
end
|
|
148
|
+
@private_use_capital_gain = private_use_capital_gain unless private_use_capital_gain == SKIP
|
|
149
|
+
unless private_use_current_gain_loss == SKIP
|
|
150
|
+
@private_use_current_gain_loss =
|
|
151
|
+
private_use_current_gain_loss
|
|
152
|
+
end
|
|
153
|
+
unless initial_deduction_percentage == SKIP
|
|
154
|
+
@initial_deduction_percentage =
|
|
155
|
+
initial_deduction_percentage
|
|
156
|
+
end
|
|
157
|
+
@additional_properties = additional_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Creates an instance of the object from a hash.
|
|
161
|
+
def self.from_hash(hash)
|
|
162
|
+
return nil unless hash
|
|
163
|
+
|
|
164
|
+
# Extract variables from the hash.
|
|
165
|
+
current_capital_gain =
|
|
166
|
+
hash.key?('currentCapitalGain') ? hash['currentCapitalGain'] : SKIP
|
|
167
|
+
current_gain_loss =
|
|
168
|
+
hash.key?('currentGainLoss') ? hash['currentGainLoss'] : SKIP
|
|
169
|
+
depreciation_start_date =
|
|
170
|
+
hash.key?('depreciationStartDate') ? hash['depreciationStartDate'] : SKIP
|
|
171
|
+
cost_limit = hash.key?('costLimit') ? hash['costLimit'] : SKIP
|
|
172
|
+
residual_value = hash.key?('residualValue') ? hash['residualValue'] : SKIP
|
|
173
|
+
prior_accum_depreciation_amount =
|
|
174
|
+
hash.key?('priorAccumDepreciationAmount') ? hash['priorAccumDepreciationAmount'] : SKIP
|
|
175
|
+
current_accum_depreciation_amount =
|
|
176
|
+
hash.key?('currentAccumDepreciationAmount') ? hash['currentAccumDepreciationAmount'] : SKIP
|
|
177
|
+
business_use_capital_gain =
|
|
178
|
+
hash.key?('businessUseCapitalGain') ? hash['businessUseCapitalGain'] : SKIP
|
|
179
|
+
business_use_current_gain_loss =
|
|
180
|
+
hash.key?('businessUseCurrentGainLoss') ? hash['businessUseCurrentGainLoss'] : SKIP
|
|
181
|
+
private_use_capital_gain =
|
|
182
|
+
hash.key?('privateUseCapitalGain') ? hash['privateUseCapitalGain'] : SKIP
|
|
183
|
+
private_use_current_gain_loss =
|
|
184
|
+
hash.key?('privateUseCurrentGainLoss') ? hash['privateUseCurrentGainLoss'] : SKIP
|
|
185
|
+
initial_deduction_percentage =
|
|
186
|
+
hash.key?('initialDeductionPercentage') ? hash['initialDeductionPercentage'] : SKIP
|
|
187
|
+
|
|
188
|
+
# Create a new hash for additional properties, removing known properties.
|
|
189
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
190
|
+
|
|
191
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
192
|
+
new_hash, proc { |value| value }
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# Create object from extracted values.
|
|
196
|
+
BookDepreciationDetail.new(current_capital_gain: current_capital_gain,
|
|
197
|
+
current_gain_loss: current_gain_loss,
|
|
198
|
+
depreciation_start_date: depreciation_start_date,
|
|
199
|
+
cost_limit: cost_limit,
|
|
200
|
+
residual_value: residual_value,
|
|
201
|
+
prior_accum_depreciation_amount: prior_accum_depreciation_amount,
|
|
202
|
+
current_accum_depreciation_amount: current_accum_depreciation_amount,
|
|
203
|
+
business_use_capital_gain: business_use_capital_gain,
|
|
204
|
+
business_use_current_gain_loss: business_use_current_gain_loss,
|
|
205
|
+
private_use_capital_gain: private_use_capital_gain,
|
|
206
|
+
private_use_current_gain_loss: private_use_current_gain_loss,
|
|
207
|
+
initial_deduction_percentage: initial_deduction_percentage,
|
|
208
|
+
additional_properties: additional_properties)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Provides a human-readable string representation of the object.
|
|
212
|
+
def to_s
|
|
213
|
+
class_name = self.class.name.split('::').last
|
|
214
|
+
"<#{class_name} current_capital_gain: #{@current_capital_gain}, current_gain_loss:"\
|
|
215
|
+
" #{@current_gain_loss}, depreciation_start_date: #{@depreciation_start_date}, cost_limit:"\
|
|
216
|
+
" #{@cost_limit}, residual_value: #{@residual_value}, prior_accum_depreciation_amount:"\
|
|
217
|
+
" #{@prior_accum_depreciation_amount}, current_accum_depreciation_amount:"\
|
|
218
|
+
" #{@current_accum_depreciation_amount}, business_use_capital_gain:"\
|
|
219
|
+
" #{@business_use_capital_gain}, business_use_current_gain_loss:"\
|
|
220
|
+
" #{@business_use_current_gain_loss}, private_use_capital_gain:"\
|
|
221
|
+
" #{@private_use_capital_gain}, private_use_current_gain_loss:"\
|
|
222
|
+
" #{@private_use_current_gain_loss}, initial_deduction_percentage:"\
|
|
223
|
+
" #{@initial_deduction_percentage}, additional_properties: #{@additional_properties}>"
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
227
|
+
def inspect
|
|
228
|
+
class_name = self.class.name.split('::').last
|
|
229
|
+
"<#{class_name} current_capital_gain: #{@current_capital_gain.inspect}, current_gain_loss:"\
|
|
230
|
+
" #{@current_gain_loss.inspect}, depreciation_start_date:"\
|
|
231
|
+
" #{@depreciation_start_date.inspect}, cost_limit: #{@cost_limit.inspect}, residual_value:"\
|
|
232
|
+
" #{@residual_value.inspect}, prior_accum_depreciation_amount:"\
|
|
233
|
+
" #{@prior_accum_depreciation_amount.inspect}, current_accum_depreciation_amount:"\
|
|
234
|
+
" #{@current_accum_depreciation_amount.inspect}, business_use_capital_gain:"\
|
|
235
|
+
" #{@business_use_capital_gain.inspect}, business_use_current_gain_loss:"\
|
|
236
|
+
" #{@business_use_current_gain_loss.inspect}, private_use_capital_gain:"\
|
|
237
|
+
" #{@private_use_capital_gain.inspect}, private_use_current_gain_loss:"\
|
|
238
|
+
" #{@private_use_current_gain_loss.inspect}, initial_deduction_percentage:"\
|
|
239
|
+
" #{@initial_deduction_percentage.inspect}, additional_properties:"\
|
|
240
|
+
" #{@additional_properties}>"
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# BookDepreciationSetting Model.
|
|
8
|
+
class BookDepreciationSetting < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The method of depreciation applied to this asset. See Depreciation Methods
|
|
13
|
+
# @return [DepreciationMethod]
|
|
14
|
+
attr_accessor :depreciation_method
|
|
15
|
+
|
|
16
|
+
# The method of averaging applied to this asset. See Averaging Methods
|
|
17
|
+
# @return [AveragingMethod]
|
|
18
|
+
attr_accessor :averaging_method
|
|
19
|
+
|
|
20
|
+
# The rate of depreciation (e.g. 0.05)
|
|
21
|
+
# @return [Float]
|
|
22
|
+
attr_accessor :depreciation_rate
|
|
23
|
+
|
|
24
|
+
# Effective life of the asset in years (e.g. 5)
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :effective_life_years
|
|
27
|
+
|
|
28
|
+
# See Depreciation Calculation Methods
|
|
29
|
+
# @return [DepreciationCalculationMethod]
|
|
30
|
+
attr_accessor :depreciation_calculation_method
|
|
31
|
+
|
|
32
|
+
# Unique Xero identifier for the depreciable object
|
|
33
|
+
# @return [UUID | String]
|
|
34
|
+
attr_accessor :depreciable_object_id
|
|
35
|
+
|
|
36
|
+
# The type of asset object
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :depreciable_object_type
|
|
39
|
+
|
|
40
|
+
# Unique Xero identifier for the effective date change
|
|
41
|
+
# @return [UUID | String]
|
|
42
|
+
attr_accessor :book_effective_date_of_change_id
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['depreciation_method'] = 'depreciationMethod'
|
|
48
|
+
@_hash['averaging_method'] = 'averagingMethod'
|
|
49
|
+
@_hash['depreciation_rate'] = 'depreciationRate'
|
|
50
|
+
@_hash['effective_life_years'] = 'effectiveLifeYears'
|
|
51
|
+
@_hash['depreciation_calculation_method'] =
|
|
52
|
+
'depreciationCalculationMethod'
|
|
53
|
+
@_hash['depreciable_object_id'] = 'depreciableObjectId'
|
|
54
|
+
@_hash['depreciable_object_type'] = 'depreciableObjectType'
|
|
55
|
+
@_hash['book_effective_date_of_change_id'] =
|
|
56
|
+
'bookEffectiveDateOfChangeId'
|
|
57
|
+
@_hash
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# An array for optional fields
|
|
61
|
+
def self.optionals
|
|
62
|
+
%w[
|
|
63
|
+
depreciation_method
|
|
64
|
+
averaging_method
|
|
65
|
+
depreciation_rate
|
|
66
|
+
effective_life_years
|
|
67
|
+
depreciation_calculation_method
|
|
68
|
+
depreciable_object_id
|
|
69
|
+
depreciable_object_type
|
|
70
|
+
book_effective_date_of_change_id
|
|
71
|
+
]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# An array for nullable fields
|
|
75
|
+
def self.nullables
|
|
76
|
+
[]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def initialize(depreciation_method: SKIP, averaging_method: SKIP,
|
|
80
|
+
depreciation_rate: SKIP, effective_life_years: SKIP,
|
|
81
|
+
depreciation_calculation_method: SKIP,
|
|
82
|
+
depreciable_object_id: SKIP, depreciable_object_type: SKIP,
|
|
83
|
+
book_effective_date_of_change_id: SKIP,
|
|
84
|
+
additional_properties: nil)
|
|
85
|
+
# Add additional model properties to the instance
|
|
86
|
+
additional_properties = {} if additional_properties.nil?
|
|
87
|
+
|
|
88
|
+
@depreciation_method = depreciation_method unless depreciation_method == SKIP
|
|
89
|
+
@averaging_method = averaging_method unless averaging_method == SKIP
|
|
90
|
+
@depreciation_rate = depreciation_rate unless depreciation_rate == SKIP
|
|
91
|
+
@effective_life_years = effective_life_years unless effective_life_years == SKIP
|
|
92
|
+
unless depreciation_calculation_method == SKIP
|
|
93
|
+
@depreciation_calculation_method =
|
|
94
|
+
depreciation_calculation_method
|
|
95
|
+
end
|
|
96
|
+
@depreciable_object_id = depreciable_object_id unless depreciable_object_id == SKIP
|
|
97
|
+
@depreciable_object_type = depreciable_object_type unless depreciable_object_type == SKIP
|
|
98
|
+
unless book_effective_date_of_change_id == SKIP
|
|
99
|
+
@book_effective_date_of_change_id =
|
|
100
|
+
book_effective_date_of_change_id
|
|
101
|
+
end
|
|
102
|
+
@additional_properties = additional_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Creates an instance of the object from a hash.
|
|
106
|
+
def self.from_hash(hash)
|
|
107
|
+
return nil unless hash
|
|
108
|
+
|
|
109
|
+
# Extract variables from the hash.
|
|
110
|
+
depreciation_method =
|
|
111
|
+
hash.key?('depreciationMethod') ? hash['depreciationMethod'] : SKIP
|
|
112
|
+
averaging_method =
|
|
113
|
+
hash.key?('averagingMethod') ? hash['averagingMethod'] : SKIP
|
|
114
|
+
depreciation_rate =
|
|
115
|
+
hash.key?('depreciationRate') ? hash['depreciationRate'] : SKIP
|
|
116
|
+
effective_life_years =
|
|
117
|
+
hash.key?('effectiveLifeYears') ? hash['effectiveLifeYears'] : SKIP
|
|
118
|
+
depreciation_calculation_method =
|
|
119
|
+
hash.key?('depreciationCalculationMethod') ? hash['depreciationCalculationMethod'] : SKIP
|
|
120
|
+
depreciable_object_id =
|
|
121
|
+
hash.key?('depreciableObjectId') ? hash['depreciableObjectId'] : SKIP
|
|
122
|
+
depreciable_object_type =
|
|
123
|
+
hash.key?('depreciableObjectType') ? hash['depreciableObjectType'] : SKIP
|
|
124
|
+
book_effective_date_of_change_id =
|
|
125
|
+
hash.key?('bookEffectiveDateOfChangeId') ? hash['bookEffectiveDateOfChangeId'] : SKIP
|
|
126
|
+
|
|
127
|
+
# Create a new hash for additional properties, removing known properties.
|
|
128
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
129
|
+
|
|
130
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
131
|
+
new_hash, proc { |value| value }
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
# Create object from extracted values.
|
|
135
|
+
BookDepreciationSetting.new(depreciation_method: depreciation_method,
|
|
136
|
+
averaging_method: averaging_method,
|
|
137
|
+
depreciation_rate: depreciation_rate,
|
|
138
|
+
effective_life_years: effective_life_years,
|
|
139
|
+
depreciation_calculation_method: depreciation_calculation_method,
|
|
140
|
+
depreciable_object_id: depreciable_object_id,
|
|
141
|
+
depreciable_object_type: depreciable_object_type,
|
|
142
|
+
book_effective_date_of_change_id: book_effective_date_of_change_id,
|
|
143
|
+
additional_properties: additional_properties)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Provides a human-readable string representation of the object.
|
|
147
|
+
def to_s
|
|
148
|
+
class_name = self.class.name.split('::').last
|
|
149
|
+
"<#{class_name} depreciation_method: #{@depreciation_method}, averaging_method:"\
|
|
150
|
+
" #{@averaging_method}, depreciation_rate: #{@depreciation_rate}, effective_life_years:"\
|
|
151
|
+
" #{@effective_life_years}, depreciation_calculation_method:"\
|
|
152
|
+
" #{@depreciation_calculation_method}, depreciable_object_id: #{@depreciable_object_id},"\
|
|
153
|
+
" depreciable_object_type: #{@depreciable_object_type}, book_effective_date_of_change_id:"\
|
|
154
|
+
" #{@book_effective_date_of_change_id}, additional_properties: #{@additional_properties}>"
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
158
|
+
def inspect
|
|
159
|
+
class_name = self.class.name.split('::').last
|
|
160
|
+
"<#{class_name} depreciation_method: #{@depreciation_method.inspect}, averaging_method:"\
|
|
161
|
+
" #{@averaging_method.inspect}, depreciation_rate: #{@depreciation_rate.inspect},"\
|
|
162
|
+
" effective_life_years: #{@effective_life_years.inspect}, depreciation_calculation_method:"\
|
|
163
|
+
" #{@depreciation_calculation_method.inspect}, depreciable_object_id:"\
|
|
164
|
+
" #{@depreciable_object_id.inspect}, depreciable_object_type:"\
|
|
165
|
+
" #{@depreciable_object_type.inspect}, book_effective_date_of_change_id:"\
|
|
166
|
+
" #{@book_effective_date_of_change_id.inspect}, additional_properties:"\
|
|
167
|
+
" #{@additional_properties}>"
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# BrandingTheme Model.
|
|
8
|
+
class BrandingTheme < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Xero identifier
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :branding_theme_id
|
|
15
|
+
|
|
16
|
+
# Name of branding theme
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
# The location of the image file used as the logo on this branding theme
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :logo_url
|
|
23
|
+
|
|
24
|
+
# Always INVOICE
|
|
25
|
+
# @return [Type1]
|
|
26
|
+
attr_accessor :type
|
|
27
|
+
|
|
28
|
+
# Integer – ranked order of branding theme. The default branding theme has a
|
|
29
|
+
# value of 0
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
attr_accessor :sort_order
|
|
32
|
+
|
|
33
|
+
# UTC timestamp of creation date of branding theme
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :created_date_utc
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['branding_theme_id'] = 'BrandingThemeID'
|
|
41
|
+
@_hash['name'] = 'Name'
|
|
42
|
+
@_hash['logo_url'] = 'LogoUrl'
|
|
43
|
+
@_hash['type'] = 'Type'
|
|
44
|
+
@_hash['sort_order'] = 'SortOrder'
|
|
45
|
+
@_hash['created_date_utc'] = 'CreatedDateUTC'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
branding_theme_id
|
|
53
|
+
name
|
|
54
|
+
logo_url
|
|
55
|
+
type
|
|
56
|
+
sort_order
|
|
57
|
+
created_date_utc
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(branding_theme_id: SKIP, name: SKIP, logo_url: SKIP,
|
|
67
|
+
type: SKIP, sort_order: SKIP, created_date_utc: SKIP,
|
|
68
|
+
additional_properties: nil)
|
|
69
|
+
# Add additional model properties to the instance
|
|
70
|
+
additional_properties = {} if additional_properties.nil?
|
|
71
|
+
|
|
72
|
+
@branding_theme_id = branding_theme_id unless branding_theme_id == SKIP
|
|
73
|
+
@name = name unless name == SKIP
|
|
74
|
+
@logo_url = logo_url unless logo_url == SKIP
|
|
75
|
+
@type = type unless type == SKIP
|
|
76
|
+
@sort_order = sort_order unless sort_order == SKIP
|
|
77
|
+
@created_date_utc = created_date_utc unless created_date_utc == SKIP
|
|
78
|
+
@additional_properties = additional_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Creates an instance of the object from a hash.
|
|
82
|
+
def self.from_hash(hash)
|
|
83
|
+
return nil unless hash
|
|
84
|
+
|
|
85
|
+
# Extract variables from the hash.
|
|
86
|
+
branding_theme_id =
|
|
87
|
+
hash.key?('BrandingThemeID') ? hash['BrandingThemeID'] : SKIP
|
|
88
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
89
|
+
logo_url = hash.key?('LogoUrl') ? hash['LogoUrl'] : SKIP
|
|
90
|
+
type = hash.key?('Type') ? hash['Type'] : SKIP
|
|
91
|
+
sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
|
|
92
|
+
created_date_utc =
|
|
93
|
+
hash.key?('CreatedDateUTC') ? hash['CreatedDateUTC'] : SKIP
|
|
94
|
+
|
|
95
|
+
# Create a new hash for additional properties, removing known properties.
|
|
96
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
97
|
+
|
|
98
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
99
|
+
new_hash, proc { |value| value }
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Create object from extracted values.
|
|
103
|
+
BrandingTheme.new(branding_theme_id: branding_theme_id,
|
|
104
|
+
name: name,
|
|
105
|
+
logo_url: logo_url,
|
|
106
|
+
type: type,
|
|
107
|
+
sort_order: sort_order,
|
|
108
|
+
created_date_utc: created_date_utc,
|
|
109
|
+
additional_properties: additional_properties)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a human-readable string representation of the object.
|
|
113
|
+
def to_s
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} branding_theme_id: #{@branding_theme_id}, name: #{@name}, logo_url:"\
|
|
116
|
+
" #{@logo_url}, type: #{@type}, sort_order: #{@sort_order}, created_date_utc:"\
|
|
117
|
+
" #{@created_date_utc}, additional_properties: #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
121
|
+
def inspect
|
|
122
|
+
class_name = self.class.name.split('::').last
|
|
123
|
+
"<#{class_name} branding_theme_id: #{@branding_theme_id.inspect}, name: #{@name.inspect},"\
|
|
124
|
+
" logo_url: #{@logo_url.inspect}, type: #{@type.inspect}, sort_order:"\
|
|
125
|
+
" #{@sort_order.inspect}, created_date_utc: #{@created_date_utc.inspect},"\
|
|
126
|
+
" additional_properties: #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# BrandingThemes Model.
|
|
8
|
+
class BrandingThemes < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[BrandingTheme]]
|
|
14
|
+
attr_accessor :branding_themes
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['branding_themes'] = 'BrandingThemes'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
branding_themes
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(branding_themes: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@branding_themes = branding_themes unless branding_themes == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
# Parameter is an array, so we need to iterate through it
|
|
49
|
+
branding_themes = nil
|
|
50
|
+
unless hash['BrandingThemes'].nil?
|
|
51
|
+
branding_themes = []
|
|
52
|
+
hash['BrandingThemes'].each do |structure|
|
|
53
|
+
branding_themes << (BrandingTheme.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
branding_themes = SKIP unless hash.key?('BrandingThemes')
|
|
58
|
+
|
|
59
|
+
# Create a new hash for additional properties, removing known properties.
|
|
60
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
61
|
+
|
|
62
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
63
|
+
new_hash, proc { |value| value }
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Create object from extracted values.
|
|
67
|
+
BrandingThemes.new(branding_themes: branding_themes,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} branding_themes: #{@branding_themes}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} branding_themes: #{@branding_themes.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|