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,213 @@
|
|
|
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
|
+
# TaxRate Model.
|
|
8
|
+
class TaxRate < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Name of tax rate
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# The tax type
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :tax_type
|
|
19
|
+
|
|
20
|
+
# See TaxComponents
|
|
21
|
+
# @return [Array[TaxComponent]]
|
|
22
|
+
attr_accessor :tax_components
|
|
23
|
+
|
|
24
|
+
# See Status Codes
|
|
25
|
+
# @return [Status19]
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# See ReportTaxTypes
|
|
29
|
+
# @return [ReportTaxType]
|
|
30
|
+
attr_accessor :report_tax_type
|
|
31
|
+
|
|
32
|
+
# Boolean to describe if tax rate can be used for asset accounts i.e.
|
|
33
|
+
# true,false
|
|
34
|
+
# @return [TrueClass | FalseClass]
|
|
35
|
+
attr_accessor :can_apply_to_assets
|
|
36
|
+
|
|
37
|
+
# Boolean to describe if tax rate can be used for equity accounts i.e
|
|
38
|
+
# true,false
|
|
39
|
+
# @return [TrueClass | FalseClass]
|
|
40
|
+
attr_accessor :can_apply_to_equity
|
|
41
|
+
|
|
42
|
+
# Boolean to describe if tax rate can be used for expense accounts i.e.
|
|
43
|
+
# true,false
|
|
44
|
+
# @return [TrueClass | FalseClass]
|
|
45
|
+
attr_accessor :can_apply_to_expenses
|
|
46
|
+
|
|
47
|
+
# Boolean to describe if tax rate can be used for liability accounts i.e.
|
|
48
|
+
# true,false
|
|
49
|
+
# @return [TrueClass | FalseClass]
|
|
50
|
+
attr_accessor :can_apply_to_liabilities
|
|
51
|
+
|
|
52
|
+
# Boolean to describe if tax rate can be used for revenue accounts i.e.
|
|
53
|
+
# true,false
|
|
54
|
+
# @return [TrueClass | FalseClass]
|
|
55
|
+
attr_accessor :can_apply_to_revenue
|
|
56
|
+
|
|
57
|
+
# Tax Rate (decimal to 4dp) e.g 12.5000
|
|
58
|
+
# @return [Float]
|
|
59
|
+
attr_accessor :display_tax_rate
|
|
60
|
+
|
|
61
|
+
# Effective Tax Rate (decimal to 4dp) e.g 12.5000
|
|
62
|
+
# @return [Float]
|
|
63
|
+
attr_accessor :effective_rate
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['name'] = 'Name'
|
|
69
|
+
@_hash['tax_type'] = 'TaxType'
|
|
70
|
+
@_hash['tax_components'] = 'TaxComponents'
|
|
71
|
+
@_hash['status'] = 'Status'
|
|
72
|
+
@_hash['report_tax_type'] = 'ReportTaxType'
|
|
73
|
+
@_hash['can_apply_to_assets'] = 'CanApplyToAssets'
|
|
74
|
+
@_hash['can_apply_to_equity'] = 'CanApplyToEquity'
|
|
75
|
+
@_hash['can_apply_to_expenses'] = 'CanApplyToExpenses'
|
|
76
|
+
@_hash['can_apply_to_liabilities'] = 'CanApplyToLiabilities'
|
|
77
|
+
@_hash['can_apply_to_revenue'] = 'CanApplyToRevenue'
|
|
78
|
+
@_hash['display_tax_rate'] = 'DisplayTaxRate'
|
|
79
|
+
@_hash['effective_rate'] = 'EffectiveRate'
|
|
80
|
+
@_hash
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for optional fields
|
|
84
|
+
def self.optionals
|
|
85
|
+
%w[
|
|
86
|
+
name
|
|
87
|
+
tax_type
|
|
88
|
+
tax_components
|
|
89
|
+
status
|
|
90
|
+
report_tax_type
|
|
91
|
+
can_apply_to_assets
|
|
92
|
+
can_apply_to_equity
|
|
93
|
+
can_apply_to_expenses
|
|
94
|
+
can_apply_to_liabilities
|
|
95
|
+
can_apply_to_revenue
|
|
96
|
+
display_tax_rate
|
|
97
|
+
effective_rate
|
|
98
|
+
]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# An array for nullable fields
|
|
102
|
+
def self.nullables
|
|
103
|
+
[]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def initialize(name: SKIP, tax_type: SKIP, tax_components: SKIP,
|
|
107
|
+
status: SKIP, report_tax_type: SKIP,
|
|
108
|
+
can_apply_to_assets: SKIP, can_apply_to_equity: SKIP,
|
|
109
|
+
can_apply_to_expenses: SKIP, can_apply_to_liabilities: SKIP,
|
|
110
|
+
can_apply_to_revenue: SKIP, display_tax_rate: SKIP,
|
|
111
|
+
effective_rate: SKIP, additional_properties: nil)
|
|
112
|
+
# Add additional model properties to the instance
|
|
113
|
+
additional_properties = {} if additional_properties.nil?
|
|
114
|
+
|
|
115
|
+
@name = name unless name == SKIP
|
|
116
|
+
@tax_type = tax_type unless tax_type == SKIP
|
|
117
|
+
@tax_components = tax_components unless tax_components == SKIP
|
|
118
|
+
@status = status unless status == SKIP
|
|
119
|
+
@report_tax_type = report_tax_type unless report_tax_type == SKIP
|
|
120
|
+
@can_apply_to_assets = can_apply_to_assets unless can_apply_to_assets == SKIP
|
|
121
|
+
@can_apply_to_equity = can_apply_to_equity unless can_apply_to_equity == SKIP
|
|
122
|
+
@can_apply_to_expenses = can_apply_to_expenses unless can_apply_to_expenses == SKIP
|
|
123
|
+
@can_apply_to_liabilities = can_apply_to_liabilities unless can_apply_to_liabilities == SKIP
|
|
124
|
+
@can_apply_to_revenue = can_apply_to_revenue unless can_apply_to_revenue == SKIP
|
|
125
|
+
@display_tax_rate = display_tax_rate unless display_tax_rate == SKIP
|
|
126
|
+
@effective_rate = effective_rate unless effective_rate == SKIP
|
|
127
|
+
@additional_properties = additional_properties
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Creates an instance of the object from a hash.
|
|
131
|
+
def self.from_hash(hash)
|
|
132
|
+
return nil unless hash
|
|
133
|
+
|
|
134
|
+
# Extract variables from the hash.
|
|
135
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
136
|
+
tax_type = hash.key?('TaxType') ? hash['TaxType'] : SKIP
|
|
137
|
+
# Parameter is an array, so we need to iterate through it
|
|
138
|
+
tax_components = nil
|
|
139
|
+
unless hash['TaxComponents'].nil?
|
|
140
|
+
tax_components = []
|
|
141
|
+
hash['TaxComponents'].each do |structure|
|
|
142
|
+
tax_components << (TaxComponent.from_hash(structure) if structure)
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
tax_components = SKIP unless hash.key?('TaxComponents')
|
|
147
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
148
|
+
report_tax_type =
|
|
149
|
+
hash.key?('ReportTaxType') ? hash['ReportTaxType'] : SKIP
|
|
150
|
+
can_apply_to_assets =
|
|
151
|
+
hash.key?('CanApplyToAssets') ? hash['CanApplyToAssets'] : SKIP
|
|
152
|
+
can_apply_to_equity =
|
|
153
|
+
hash.key?('CanApplyToEquity') ? hash['CanApplyToEquity'] : SKIP
|
|
154
|
+
can_apply_to_expenses =
|
|
155
|
+
hash.key?('CanApplyToExpenses') ? hash['CanApplyToExpenses'] : SKIP
|
|
156
|
+
can_apply_to_liabilities =
|
|
157
|
+
hash.key?('CanApplyToLiabilities') ? hash['CanApplyToLiabilities'] : SKIP
|
|
158
|
+
can_apply_to_revenue =
|
|
159
|
+
hash.key?('CanApplyToRevenue') ? hash['CanApplyToRevenue'] : SKIP
|
|
160
|
+
display_tax_rate =
|
|
161
|
+
hash.key?('DisplayTaxRate') ? hash['DisplayTaxRate'] : SKIP
|
|
162
|
+
effective_rate = hash.key?('EffectiveRate') ? hash['EffectiveRate'] : SKIP
|
|
163
|
+
|
|
164
|
+
# Create a new hash for additional properties, removing known properties.
|
|
165
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
166
|
+
|
|
167
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
168
|
+
new_hash, proc { |value| value }
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
# Create object from extracted values.
|
|
172
|
+
TaxRate.new(name: name,
|
|
173
|
+
tax_type: tax_type,
|
|
174
|
+
tax_components: tax_components,
|
|
175
|
+
status: status,
|
|
176
|
+
report_tax_type: report_tax_type,
|
|
177
|
+
can_apply_to_assets: can_apply_to_assets,
|
|
178
|
+
can_apply_to_equity: can_apply_to_equity,
|
|
179
|
+
can_apply_to_expenses: can_apply_to_expenses,
|
|
180
|
+
can_apply_to_liabilities: can_apply_to_liabilities,
|
|
181
|
+
can_apply_to_revenue: can_apply_to_revenue,
|
|
182
|
+
display_tax_rate: display_tax_rate,
|
|
183
|
+
effective_rate: effective_rate,
|
|
184
|
+
additional_properties: additional_properties)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Provides a human-readable string representation of the object.
|
|
188
|
+
def to_s
|
|
189
|
+
class_name = self.class.name.split('::').last
|
|
190
|
+
"<#{class_name} name: #{@name}, tax_type: #{@tax_type}, tax_components: #{@tax_components},"\
|
|
191
|
+
" status: #{@status}, report_tax_type: #{@report_tax_type}, can_apply_to_assets:"\
|
|
192
|
+
" #{@can_apply_to_assets}, can_apply_to_equity: #{@can_apply_to_equity},"\
|
|
193
|
+
" can_apply_to_expenses: #{@can_apply_to_expenses}, can_apply_to_liabilities:"\
|
|
194
|
+
" #{@can_apply_to_liabilities}, can_apply_to_revenue: #{@can_apply_to_revenue},"\
|
|
195
|
+
" display_tax_rate: #{@display_tax_rate}, effective_rate: #{@effective_rate},"\
|
|
196
|
+
" additional_properties: #{@additional_properties}>"
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
200
|
+
def inspect
|
|
201
|
+
class_name = self.class.name.split('::').last
|
|
202
|
+
"<#{class_name} name: #{@name.inspect}, tax_type: #{@tax_type.inspect}, tax_components:"\
|
|
203
|
+
" #{@tax_components.inspect}, status: #{@status.inspect}, report_tax_type:"\
|
|
204
|
+
" #{@report_tax_type.inspect}, can_apply_to_assets: #{@can_apply_to_assets.inspect},"\
|
|
205
|
+
" can_apply_to_equity: #{@can_apply_to_equity.inspect}, can_apply_to_expenses:"\
|
|
206
|
+
" #{@can_apply_to_expenses.inspect}, can_apply_to_liabilities:"\
|
|
207
|
+
" #{@can_apply_to_liabilities.inspect}, can_apply_to_revenue:"\
|
|
208
|
+
" #{@can_apply_to_revenue.inspect}, display_tax_rate: #{@display_tax_rate.inspect},"\
|
|
209
|
+
" effective_rate: #{@effective_rate.inspect}, additional_properties:"\
|
|
210
|
+
" #{@additional_properties}>"
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
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
|
+
# TaxRates Model.
|
|
8
|
+
class TaxRates < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[TaxRate]]
|
|
14
|
+
attr_accessor :tax_rates
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['tax_rates'] = 'TaxRates'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
tax_rates
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(tax_rates: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@tax_rates = tax_rates unless tax_rates == 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
|
+
tax_rates = nil
|
|
50
|
+
unless hash['TaxRates'].nil?
|
|
51
|
+
tax_rates = []
|
|
52
|
+
hash['TaxRates'].each do |structure|
|
|
53
|
+
tax_rates << (TaxRate.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
tax_rates = SKIP unless hash.key?('TaxRates')
|
|
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
|
+
TaxRates.new(tax_rates: tax_rates,
|
|
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} tax_rates: #{@tax_rates}, 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} tax_rates: #{@tax_rates.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|