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,467 @@
|
|
|
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
|
+
# Organisation Model.
|
|
8
|
+
class Organisation < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique Xero identifier
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :organisation_id
|
|
15
|
+
|
|
16
|
+
# Display a unique key used for Xero-to-Xero transactions
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :api_key
|
|
19
|
+
|
|
20
|
+
# Display name of organisation shown in Xero
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Organisation name shown on Reports
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :legal_name
|
|
27
|
+
|
|
28
|
+
# Boolean to describe if organisation is registered with a local tax
|
|
29
|
+
# authority i.e. true, false
|
|
30
|
+
# @return [TrueClass | FalseClass]
|
|
31
|
+
attr_accessor :pays_tax
|
|
32
|
+
|
|
33
|
+
# See Version Types
|
|
34
|
+
# @return [Version]
|
|
35
|
+
attr_accessor :version
|
|
36
|
+
|
|
37
|
+
# Organisation Type
|
|
38
|
+
# @return [OrganisationType]
|
|
39
|
+
attr_accessor :organisation_type
|
|
40
|
+
|
|
41
|
+
# 3 letter alpha code for the currency – see list of currency codes
|
|
42
|
+
# @return [CurrencyCode]
|
|
43
|
+
attr_accessor :base_currency
|
|
44
|
+
|
|
45
|
+
# 3 letter alpha code for the currency – see list of currency codes
|
|
46
|
+
# @return [CountryCode]
|
|
47
|
+
attr_accessor :country_code
|
|
48
|
+
|
|
49
|
+
# Boolean to describe if organisation is a demo company.
|
|
50
|
+
# @return [TrueClass | FalseClass]
|
|
51
|
+
attr_accessor :is_demo_company
|
|
52
|
+
|
|
53
|
+
# Will be set to ACTIVE if you can connect to organisation via the Xero API
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :organisation_status
|
|
56
|
+
|
|
57
|
+
# Shows for New Zealand, Australian and UK organisations
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :registration_number
|
|
60
|
+
|
|
61
|
+
# Shown if set. US Only.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :employer_identification_number
|
|
64
|
+
|
|
65
|
+
# Shown if set. Displays in the Xero UI as Tax File Number (AU), GST Number
|
|
66
|
+
# (NZ), VAT Number (UK) and Tax ID Number (US & Global).
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :tax_number
|
|
69
|
+
|
|
70
|
+
# Calendar day e.g. 0-31
|
|
71
|
+
# @return [Integer]
|
|
72
|
+
attr_accessor :financial_year_end_day
|
|
73
|
+
|
|
74
|
+
# Calendar Month e.g. 1-12
|
|
75
|
+
# @return [Integer]
|
|
76
|
+
attr_accessor :financial_year_end_month
|
|
77
|
+
|
|
78
|
+
# The accounting basis used for tax returns. See Sales Tax Basis
|
|
79
|
+
# @return [SalesTaxBasis]
|
|
80
|
+
attr_accessor :sales_tax_basis
|
|
81
|
+
|
|
82
|
+
# The frequency with which tax returns are processed. See Sales Tax Period
|
|
83
|
+
# @return [SalesTaxPeriod]
|
|
84
|
+
attr_accessor :sales_tax_period
|
|
85
|
+
|
|
86
|
+
# The default for LineAmountTypes on sales transactions
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :default_sales_tax
|
|
89
|
+
|
|
90
|
+
# The default for LineAmountTypes on purchase transactions
|
|
91
|
+
# @return [String]
|
|
92
|
+
attr_accessor :default_purchases_tax
|
|
93
|
+
|
|
94
|
+
# Shown if set. See lock dates
|
|
95
|
+
# @return [String]
|
|
96
|
+
attr_accessor :period_lock_date
|
|
97
|
+
|
|
98
|
+
# Shown if set. See lock dates
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :end_of_year_lock_date
|
|
101
|
+
|
|
102
|
+
# Timestamp when the organisation was created in Xero
|
|
103
|
+
# @return [String]
|
|
104
|
+
attr_accessor :created_date_utc
|
|
105
|
+
|
|
106
|
+
# Timezone specifications
|
|
107
|
+
# @return [TimeZone]
|
|
108
|
+
attr_accessor :timezone
|
|
109
|
+
|
|
110
|
+
# Organisation Entity Type
|
|
111
|
+
# @return [OrganisationEntityType]
|
|
112
|
+
attr_accessor :organisation_entity_type
|
|
113
|
+
|
|
114
|
+
# A unique identifier for the organisation. Potential uses.
|
|
115
|
+
# @return [String]
|
|
116
|
+
attr_accessor :short_code
|
|
117
|
+
|
|
118
|
+
# Organisation Classes describe which plan the Xero organisation is on (e.g.
|
|
119
|
+
# DEMO, TRIAL, PREMIUM)
|
|
120
|
+
# @return [Class1]
|
|
121
|
+
attr_accessor :mclass
|
|
122
|
+
|
|
123
|
+
# BUSINESS or PARTNER. Partner edition organisations are sold exclusively
|
|
124
|
+
# through accounting partners and have restricted functionality (e.g. no
|
|
125
|
+
# access to invoicing)
|
|
126
|
+
# @return [Edition]
|
|
127
|
+
attr_accessor :edition
|
|
128
|
+
|
|
129
|
+
# Description of business type as defined in Organisation settings
|
|
130
|
+
# @return [String]
|
|
131
|
+
attr_accessor :line_of_business
|
|
132
|
+
|
|
133
|
+
# Address details for organisation – see Addresses
|
|
134
|
+
# @return [Array[AddressForOrganisation]]
|
|
135
|
+
attr_accessor :addresses
|
|
136
|
+
|
|
137
|
+
# Phones details for organisation – see Phones
|
|
138
|
+
# @return [Array[Phone]]
|
|
139
|
+
attr_accessor :phones
|
|
140
|
+
|
|
141
|
+
# Organisation profile links for popular services such as Facebook,Twitter,
|
|
142
|
+
# GooglePlus and LinkedIn. You can also add link to your website here. Shown
|
|
143
|
+
# if Organisation settings is updated in Xero. See ExternalLinks below
|
|
144
|
+
# @return [Array[ExternalLink]]
|
|
145
|
+
attr_accessor :external_links
|
|
146
|
+
|
|
147
|
+
# Organisation profile links for popular services such as Facebook,Twitter,
|
|
148
|
+
# GooglePlus and LinkedIn. You can also add link to your website here. Shown
|
|
149
|
+
# if Organisation settings is updated in Xero. See ExternalLinks below
|
|
150
|
+
# @return [PaymentTerm]
|
|
151
|
+
attr_accessor :payment_terms
|
|
152
|
+
|
|
153
|
+
# A mapping from model property names to API property names.
|
|
154
|
+
def self.names
|
|
155
|
+
@_hash = {} if @_hash.nil?
|
|
156
|
+
@_hash['organisation_id'] = 'OrganisationID'
|
|
157
|
+
@_hash['api_key'] = 'APIKey'
|
|
158
|
+
@_hash['name'] = 'Name'
|
|
159
|
+
@_hash['legal_name'] = 'LegalName'
|
|
160
|
+
@_hash['pays_tax'] = 'PaysTax'
|
|
161
|
+
@_hash['version'] = 'Version'
|
|
162
|
+
@_hash['organisation_type'] = 'OrganisationType'
|
|
163
|
+
@_hash['base_currency'] = 'BaseCurrency'
|
|
164
|
+
@_hash['country_code'] = 'CountryCode'
|
|
165
|
+
@_hash['is_demo_company'] = 'IsDemoCompany'
|
|
166
|
+
@_hash['organisation_status'] = 'OrganisationStatus'
|
|
167
|
+
@_hash['registration_number'] = 'RegistrationNumber'
|
|
168
|
+
@_hash['employer_identification_number'] =
|
|
169
|
+
'EmployerIdentificationNumber'
|
|
170
|
+
@_hash['tax_number'] = 'TaxNumber'
|
|
171
|
+
@_hash['financial_year_end_day'] = 'FinancialYearEndDay'
|
|
172
|
+
@_hash['financial_year_end_month'] = 'FinancialYearEndMonth'
|
|
173
|
+
@_hash['sales_tax_basis'] = 'SalesTaxBasis'
|
|
174
|
+
@_hash['sales_tax_period'] = 'SalesTaxPeriod'
|
|
175
|
+
@_hash['default_sales_tax'] = 'DefaultSalesTax'
|
|
176
|
+
@_hash['default_purchases_tax'] = 'DefaultPurchasesTax'
|
|
177
|
+
@_hash['period_lock_date'] = 'PeriodLockDate'
|
|
178
|
+
@_hash['end_of_year_lock_date'] = 'EndOfYearLockDate'
|
|
179
|
+
@_hash['created_date_utc'] = 'CreatedDateUTC'
|
|
180
|
+
@_hash['timezone'] = 'Timezone'
|
|
181
|
+
@_hash['organisation_entity_type'] = 'OrganisationEntityType'
|
|
182
|
+
@_hash['short_code'] = 'ShortCode'
|
|
183
|
+
@_hash['mclass'] = 'Class'
|
|
184
|
+
@_hash['edition'] = 'Edition'
|
|
185
|
+
@_hash['line_of_business'] = 'LineOfBusiness'
|
|
186
|
+
@_hash['addresses'] = 'Addresses'
|
|
187
|
+
@_hash['phones'] = 'Phones'
|
|
188
|
+
@_hash['external_links'] = 'ExternalLinks'
|
|
189
|
+
@_hash['payment_terms'] = 'PaymentTerms'
|
|
190
|
+
@_hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# An array for optional fields
|
|
194
|
+
def self.optionals
|
|
195
|
+
%w[
|
|
196
|
+
organisation_id
|
|
197
|
+
api_key
|
|
198
|
+
name
|
|
199
|
+
legal_name
|
|
200
|
+
pays_tax
|
|
201
|
+
version
|
|
202
|
+
organisation_type
|
|
203
|
+
base_currency
|
|
204
|
+
country_code
|
|
205
|
+
is_demo_company
|
|
206
|
+
organisation_status
|
|
207
|
+
registration_number
|
|
208
|
+
employer_identification_number
|
|
209
|
+
tax_number
|
|
210
|
+
financial_year_end_day
|
|
211
|
+
financial_year_end_month
|
|
212
|
+
sales_tax_basis
|
|
213
|
+
sales_tax_period
|
|
214
|
+
default_sales_tax
|
|
215
|
+
default_purchases_tax
|
|
216
|
+
period_lock_date
|
|
217
|
+
end_of_year_lock_date
|
|
218
|
+
created_date_utc
|
|
219
|
+
timezone
|
|
220
|
+
organisation_entity_type
|
|
221
|
+
short_code
|
|
222
|
+
mclass
|
|
223
|
+
edition
|
|
224
|
+
line_of_business
|
|
225
|
+
addresses
|
|
226
|
+
phones
|
|
227
|
+
external_links
|
|
228
|
+
payment_terms
|
|
229
|
+
]
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# An array for nullable fields
|
|
233
|
+
def self.nullables
|
|
234
|
+
[]
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def initialize(organisation_id: SKIP, api_key: SKIP, name: SKIP,
|
|
238
|
+
legal_name: SKIP, pays_tax: SKIP, version: SKIP,
|
|
239
|
+
organisation_type: SKIP, base_currency: SKIP,
|
|
240
|
+
country_code: SKIP, is_demo_company: SKIP,
|
|
241
|
+
organisation_status: SKIP, registration_number: SKIP,
|
|
242
|
+
employer_identification_number: SKIP, tax_number: SKIP,
|
|
243
|
+
financial_year_end_day: SKIP, financial_year_end_month: SKIP,
|
|
244
|
+
sales_tax_basis: SKIP, sales_tax_period: SKIP,
|
|
245
|
+
default_sales_tax: SKIP, default_purchases_tax: SKIP,
|
|
246
|
+
period_lock_date: SKIP, end_of_year_lock_date: SKIP,
|
|
247
|
+
created_date_utc: SKIP, timezone: SKIP,
|
|
248
|
+
organisation_entity_type: SKIP, short_code: SKIP,
|
|
249
|
+
mclass: SKIP, edition: SKIP, line_of_business: SKIP,
|
|
250
|
+
addresses: SKIP, phones: SKIP, external_links: SKIP,
|
|
251
|
+
payment_terms: SKIP, additional_properties: nil)
|
|
252
|
+
# Add additional model properties to the instance
|
|
253
|
+
additional_properties = {} if additional_properties.nil?
|
|
254
|
+
|
|
255
|
+
@organisation_id = organisation_id unless organisation_id == SKIP
|
|
256
|
+
@api_key = api_key unless api_key == SKIP
|
|
257
|
+
@name = name unless name == SKIP
|
|
258
|
+
@legal_name = legal_name unless legal_name == SKIP
|
|
259
|
+
@pays_tax = pays_tax unless pays_tax == SKIP
|
|
260
|
+
@version = version unless version == SKIP
|
|
261
|
+
@organisation_type = organisation_type unless organisation_type == SKIP
|
|
262
|
+
@base_currency = base_currency unless base_currency == SKIP
|
|
263
|
+
@country_code = country_code unless country_code == SKIP
|
|
264
|
+
@is_demo_company = is_demo_company unless is_demo_company == SKIP
|
|
265
|
+
@organisation_status = organisation_status unless organisation_status == SKIP
|
|
266
|
+
@registration_number = registration_number unless registration_number == SKIP
|
|
267
|
+
unless employer_identification_number == SKIP
|
|
268
|
+
@employer_identification_number =
|
|
269
|
+
employer_identification_number
|
|
270
|
+
end
|
|
271
|
+
@tax_number = tax_number unless tax_number == SKIP
|
|
272
|
+
@financial_year_end_day = financial_year_end_day unless financial_year_end_day == SKIP
|
|
273
|
+
@financial_year_end_month = financial_year_end_month unless financial_year_end_month == SKIP
|
|
274
|
+
@sales_tax_basis = sales_tax_basis unless sales_tax_basis == SKIP
|
|
275
|
+
@sales_tax_period = sales_tax_period unless sales_tax_period == SKIP
|
|
276
|
+
@default_sales_tax = default_sales_tax unless default_sales_tax == SKIP
|
|
277
|
+
@default_purchases_tax = default_purchases_tax unless default_purchases_tax == SKIP
|
|
278
|
+
@period_lock_date = period_lock_date unless period_lock_date == SKIP
|
|
279
|
+
@end_of_year_lock_date = end_of_year_lock_date unless end_of_year_lock_date == SKIP
|
|
280
|
+
@created_date_utc = created_date_utc unless created_date_utc == SKIP
|
|
281
|
+
@timezone = timezone unless timezone == SKIP
|
|
282
|
+
@organisation_entity_type = organisation_entity_type unless organisation_entity_type == SKIP
|
|
283
|
+
@short_code = short_code unless short_code == SKIP
|
|
284
|
+
@mclass = mclass unless mclass == SKIP
|
|
285
|
+
@edition = edition unless edition == SKIP
|
|
286
|
+
@line_of_business = line_of_business unless line_of_business == SKIP
|
|
287
|
+
@addresses = addresses unless addresses == SKIP
|
|
288
|
+
@phones = phones unless phones == SKIP
|
|
289
|
+
@external_links = external_links unless external_links == SKIP
|
|
290
|
+
@payment_terms = payment_terms unless payment_terms == SKIP
|
|
291
|
+
@additional_properties = additional_properties
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Creates an instance of the object from a hash.
|
|
295
|
+
def self.from_hash(hash)
|
|
296
|
+
return nil unless hash
|
|
297
|
+
|
|
298
|
+
# Extract variables from the hash.
|
|
299
|
+
organisation_id =
|
|
300
|
+
hash.key?('OrganisationID') ? hash['OrganisationID'] : SKIP
|
|
301
|
+
api_key = hash.key?('APIKey') ? hash['APIKey'] : SKIP
|
|
302
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
303
|
+
legal_name = hash.key?('LegalName') ? hash['LegalName'] : SKIP
|
|
304
|
+
pays_tax = hash.key?('PaysTax') ? hash['PaysTax'] : SKIP
|
|
305
|
+
version = hash.key?('Version') ? hash['Version'] : SKIP
|
|
306
|
+
organisation_type =
|
|
307
|
+
hash.key?('OrganisationType') ? hash['OrganisationType'] : SKIP
|
|
308
|
+
base_currency = hash.key?('BaseCurrency') ? hash['BaseCurrency'] : SKIP
|
|
309
|
+
country_code = hash.key?('CountryCode') ? hash['CountryCode'] : SKIP
|
|
310
|
+
is_demo_company =
|
|
311
|
+
hash.key?('IsDemoCompany') ? hash['IsDemoCompany'] : SKIP
|
|
312
|
+
organisation_status =
|
|
313
|
+
hash.key?('OrganisationStatus') ? hash['OrganisationStatus'] : SKIP
|
|
314
|
+
registration_number =
|
|
315
|
+
hash.key?('RegistrationNumber') ? hash['RegistrationNumber'] : SKIP
|
|
316
|
+
employer_identification_number =
|
|
317
|
+
hash.key?('EmployerIdentificationNumber') ? hash['EmployerIdentificationNumber'] : SKIP
|
|
318
|
+
tax_number = hash.key?('TaxNumber') ? hash['TaxNumber'] : SKIP
|
|
319
|
+
financial_year_end_day =
|
|
320
|
+
hash.key?('FinancialYearEndDay') ? hash['FinancialYearEndDay'] : SKIP
|
|
321
|
+
financial_year_end_month =
|
|
322
|
+
hash.key?('FinancialYearEndMonth') ? hash['FinancialYearEndMonth'] : SKIP
|
|
323
|
+
sales_tax_basis =
|
|
324
|
+
hash.key?('SalesTaxBasis') ? hash['SalesTaxBasis'] : SKIP
|
|
325
|
+
sales_tax_period =
|
|
326
|
+
hash.key?('SalesTaxPeriod') ? hash['SalesTaxPeriod'] : SKIP
|
|
327
|
+
default_sales_tax =
|
|
328
|
+
hash.key?('DefaultSalesTax') ? hash['DefaultSalesTax'] : SKIP
|
|
329
|
+
default_purchases_tax =
|
|
330
|
+
hash.key?('DefaultPurchasesTax') ? hash['DefaultPurchasesTax'] : SKIP
|
|
331
|
+
period_lock_date =
|
|
332
|
+
hash.key?('PeriodLockDate') ? hash['PeriodLockDate'] : SKIP
|
|
333
|
+
end_of_year_lock_date =
|
|
334
|
+
hash.key?('EndOfYearLockDate') ? hash['EndOfYearLockDate'] : SKIP
|
|
335
|
+
created_date_utc =
|
|
336
|
+
hash.key?('CreatedDateUTC') ? hash['CreatedDateUTC'] : SKIP
|
|
337
|
+
timezone = hash.key?('Timezone') ? hash['Timezone'] : SKIP
|
|
338
|
+
organisation_entity_type =
|
|
339
|
+
hash.key?('OrganisationEntityType') ? hash['OrganisationEntityType'] : SKIP
|
|
340
|
+
short_code = hash.key?('ShortCode') ? hash['ShortCode'] : SKIP
|
|
341
|
+
mclass = hash.key?('Class') ? hash['Class'] : SKIP
|
|
342
|
+
edition = hash.key?('Edition') ? hash['Edition'] : SKIP
|
|
343
|
+
line_of_business =
|
|
344
|
+
hash.key?('LineOfBusiness') ? hash['LineOfBusiness'] : SKIP
|
|
345
|
+
# Parameter is an array, so we need to iterate through it
|
|
346
|
+
addresses = nil
|
|
347
|
+
unless hash['Addresses'].nil?
|
|
348
|
+
addresses = []
|
|
349
|
+
hash['Addresses'].each do |structure|
|
|
350
|
+
addresses << (AddressForOrganisation.from_hash(structure) if structure)
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
addresses = SKIP unless hash.key?('Addresses')
|
|
355
|
+
# Parameter is an array, so we need to iterate through it
|
|
356
|
+
phones = nil
|
|
357
|
+
unless hash['Phones'].nil?
|
|
358
|
+
phones = []
|
|
359
|
+
hash['Phones'].each do |structure|
|
|
360
|
+
phones << (Phone.from_hash(structure) if structure)
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
phones = SKIP unless hash.key?('Phones')
|
|
365
|
+
# Parameter is an array, so we need to iterate through it
|
|
366
|
+
external_links = nil
|
|
367
|
+
unless hash['ExternalLinks'].nil?
|
|
368
|
+
external_links = []
|
|
369
|
+
hash['ExternalLinks'].each do |structure|
|
|
370
|
+
external_links << (ExternalLink.from_hash(structure) if structure)
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
external_links = SKIP unless hash.key?('ExternalLinks')
|
|
375
|
+
payment_terms = PaymentTerm.from_hash(hash['PaymentTerms']) if hash['PaymentTerms']
|
|
376
|
+
|
|
377
|
+
# Create a new hash for additional properties, removing known properties.
|
|
378
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
379
|
+
|
|
380
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
381
|
+
new_hash, proc { |value| value }
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
# Create object from extracted values.
|
|
385
|
+
Organisation.new(organisation_id: organisation_id,
|
|
386
|
+
api_key: api_key,
|
|
387
|
+
name: name,
|
|
388
|
+
legal_name: legal_name,
|
|
389
|
+
pays_tax: pays_tax,
|
|
390
|
+
version: version,
|
|
391
|
+
organisation_type: organisation_type,
|
|
392
|
+
base_currency: base_currency,
|
|
393
|
+
country_code: country_code,
|
|
394
|
+
is_demo_company: is_demo_company,
|
|
395
|
+
organisation_status: organisation_status,
|
|
396
|
+
registration_number: registration_number,
|
|
397
|
+
employer_identification_number: employer_identification_number,
|
|
398
|
+
tax_number: tax_number,
|
|
399
|
+
financial_year_end_day: financial_year_end_day,
|
|
400
|
+
financial_year_end_month: financial_year_end_month,
|
|
401
|
+
sales_tax_basis: sales_tax_basis,
|
|
402
|
+
sales_tax_period: sales_tax_period,
|
|
403
|
+
default_sales_tax: default_sales_tax,
|
|
404
|
+
default_purchases_tax: default_purchases_tax,
|
|
405
|
+
period_lock_date: period_lock_date,
|
|
406
|
+
end_of_year_lock_date: end_of_year_lock_date,
|
|
407
|
+
created_date_utc: created_date_utc,
|
|
408
|
+
timezone: timezone,
|
|
409
|
+
organisation_entity_type: organisation_entity_type,
|
|
410
|
+
short_code: short_code,
|
|
411
|
+
mclass: mclass,
|
|
412
|
+
edition: edition,
|
|
413
|
+
line_of_business: line_of_business,
|
|
414
|
+
addresses: addresses,
|
|
415
|
+
phones: phones,
|
|
416
|
+
external_links: external_links,
|
|
417
|
+
payment_terms: payment_terms,
|
|
418
|
+
additional_properties: additional_properties)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Provides a human-readable string representation of the object.
|
|
422
|
+
def to_s
|
|
423
|
+
class_name = self.class.name.split('::').last
|
|
424
|
+
"<#{class_name} organisation_id: #{@organisation_id}, api_key: #{@api_key}, name: #{@name},"\
|
|
425
|
+
" legal_name: #{@legal_name}, pays_tax: #{@pays_tax}, version: #{@version},"\
|
|
426
|
+
" organisation_type: #{@organisation_type}, base_currency: #{@base_currency}, country_code:"\
|
|
427
|
+
" #{@country_code}, is_demo_company: #{@is_demo_company}, organisation_status:"\
|
|
428
|
+
" #{@organisation_status}, registration_number: #{@registration_number},"\
|
|
429
|
+
" employer_identification_number: #{@employer_identification_number}, tax_number:"\
|
|
430
|
+
" #{@tax_number}, financial_year_end_day: #{@financial_year_end_day},"\
|
|
431
|
+
" financial_year_end_month: #{@financial_year_end_month}, sales_tax_basis:"\
|
|
432
|
+
" #{@sales_tax_basis}, sales_tax_period: #{@sales_tax_period}, default_sales_tax:"\
|
|
433
|
+
" #{@default_sales_tax}, default_purchases_tax: #{@default_purchases_tax}, period_lock_date:"\
|
|
434
|
+
" #{@period_lock_date}, end_of_year_lock_date: #{@end_of_year_lock_date}, created_date_utc:"\
|
|
435
|
+
" #{@created_date_utc}, timezone: #{@timezone}, organisation_entity_type:"\
|
|
436
|
+
" #{@organisation_entity_type}, short_code: #{@short_code}, mclass: #{@mclass}, edition:"\
|
|
437
|
+
" #{@edition}, line_of_business: #{@line_of_business}, addresses: #{@addresses}, phones:"\
|
|
438
|
+
" #{@phones}, external_links: #{@external_links}, payment_terms: #{@payment_terms},"\
|
|
439
|
+
" additional_properties: #{@additional_properties}>"
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
443
|
+
def inspect
|
|
444
|
+
class_name = self.class.name.split('::').last
|
|
445
|
+
"<#{class_name} organisation_id: #{@organisation_id.inspect}, api_key: #{@api_key.inspect},"\
|
|
446
|
+
" name: #{@name.inspect}, legal_name: #{@legal_name.inspect}, pays_tax:"\
|
|
447
|
+
" #{@pays_tax.inspect}, version: #{@version.inspect}, organisation_type:"\
|
|
448
|
+
" #{@organisation_type.inspect}, base_currency: #{@base_currency.inspect}, country_code:"\
|
|
449
|
+
" #{@country_code.inspect}, is_demo_company: #{@is_demo_company.inspect},"\
|
|
450
|
+
" organisation_status: #{@organisation_status.inspect}, registration_number:"\
|
|
451
|
+
" #{@registration_number.inspect}, employer_identification_number:"\
|
|
452
|
+
" #{@employer_identification_number.inspect}, tax_number: #{@tax_number.inspect},"\
|
|
453
|
+
" financial_year_end_day: #{@financial_year_end_day.inspect}, financial_year_end_month:"\
|
|
454
|
+
" #{@financial_year_end_month.inspect}, sales_tax_basis: #{@sales_tax_basis.inspect},"\
|
|
455
|
+
" sales_tax_period: #{@sales_tax_period.inspect}, default_sales_tax:"\
|
|
456
|
+
" #{@default_sales_tax.inspect}, default_purchases_tax: #{@default_purchases_tax.inspect},"\
|
|
457
|
+
" period_lock_date: #{@period_lock_date.inspect}, end_of_year_lock_date:"\
|
|
458
|
+
" #{@end_of_year_lock_date.inspect}, created_date_utc: #{@created_date_utc.inspect},"\
|
|
459
|
+
" timezone: #{@timezone.inspect}, organisation_entity_type:"\
|
|
460
|
+
" #{@organisation_entity_type.inspect}, short_code: #{@short_code.inspect}, mclass:"\
|
|
461
|
+
" #{@mclass.inspect}, edition: #{@edition.inspect}, line_of_business:"\
|
|
462
|
+
" #{@line_of_business.inspect}, addresses: #{@addresses.inspect}, phones:"\
|
|
463
|
+
" #{@phones.inspect}, external_links: #{@external_links.inspect}, payment_terms:"\
|
|
464
|
+
" #{@payment_terms.inspect}, additional_properties: #{@additional_properties}>"
|
|
465
|
+
end
|
|
466
|
+
end
|
|
467
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Organisation Entity Type
|
|
8
|
+
class OrganisationEntityType
|
|
9
|
+
ORGANISATION_ENTITY_TYPE = [
|
|
10
|
+
# TODO: Write general description for ACCOUNTING_PRACTICE
|
|
11
|
+
ACCOUNTING_PRACTICE = 'ACCOUNTING_PRACTICE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for COMPANY
|
|
14
|
+
COMPANY = 'COMPANY'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for CHARITY
|
|
17
|
+
CHARITY = 'CHARITY'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for CLUB_OR_SOCIETY
|
|
20
|
+
CLUB_OR_SOCIETY = 'CLUB_OR_SOCIETY'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for INDIVIDUAL
|
|
23
|
+
INDIVIDUAL = 'INDIVIDUAL'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for LOOK_THROUGH_COMPANY
|
|
26
|
+
LOOK_THROUGH_COMPANY = 'LOOK_THROUGH_COMPANY'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for NOT_FOR_PROFIT
|
|
29
|
+
NOT_FOR_PROFIT = 'NOT_FOR_PROFIT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for PARTNERSHIP
|
|
32
|
+
PARTNERSHIP = 'PARTNERSHIP'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for S_CORPORATION
|
|
35
|
+
S_CORPORATION = 'S_CORPORATION'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for SELF_MANAGED_SUPERANNUATION_FUND
|
|
38
|
+
SELF_MANAGED_SUPERANNUATION_FUND = 'SELF_MANAGED_SUPERANNUATION_FUND'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for SOLE_TRADER
|
|
41
|
+
SOLE_TRADER = 'SOLE_TRADER'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for SUPERANNUATION_FUND
|
|
44
|
+
SUPERANNUATION_FUND = 'SUPERANNUATION_FUND'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for TRUST
|
|
47
|
+
TRUST = 'TRUST'.freeze
|
|
48
|
+
].freeze
|
|
49
|
+
|
|
50
|
+
def self.validate(value)
|
|
51
|
+
return false if value.nil?
|
|
52
|
+
|
|
53
|
+
ORGANISATION_ENTITY_TYPE.include?(value)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.from_value(value, default_value = ACCOUNTING_PRACTICE)
|
|
57
|
+
return default_value if value.nil?
|
|
58
|
+
|
|
59
|
+
str = value.to_s.strip
|
|
60
|
+
|
|
61
|
+
case str.downcase
|
|
62
|
+
when 'accounting_practice' then ACCOUNTING_PRACTICE
|
|
63
|
+
when 'company' then COMPANY
|
|
64
|
+
when 'charity' then CHARITY
|
|
65
|
+
when 'club_or_society' then CLUB_OR_SOCIETY
|
|
66
|
+
when 'individual' then INDIVIDUAL
|
|
67
|
+
when 'look_through_company' then LOOK_THROUGH_COMPANY
|
|
68
|
+
when 'not_for_profit' then NOT_FOR_PROFIT
|
|
69
|
+
when 'partnership' then PARTNERSHIP
|
|
70
|
+
when 's_corporation' then S_CORPORATION
|
|
71
|
+
when 'self_managed_superannuation_fund' then SELF_MANAGED_SUPERANNUATION_FUND
|
|
72
|
+
when 'sole_trader' then SOLE_TRADER
|
|
73
|
+
when 'superannuation_fund' then SUPERANNUATION_FUND
|
|
74
|
+
when 'trust' then TRUST
|
|
75
|
+
else
|
|
76
|
+
default_value
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
# User role that defines permissions in Xero and via API (READONLY,
|
|
8
|
+
# INVOICEONLY, STANDARD, FINANCIALADVISER, etc)
|
|
9
|
+
class OrganisationRole
|
|
10
|
+
ORGANISATION_ROLE = [
|
|
11
|
+
# TODO: Write general description for READONLY
|
|
12
|
+
READONLY = 'READONLY'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for INVOICEONLY
|
|
15
|
+
INVOICEONLY = 'INVOICEONLY'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for STANDARD
|
|
18
|
+
STANDARD = 'STANDARD'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for FINANCIALADVISER
|
|
21
|
+
FINANCIALADVISER = 'FINANCIALADVISER'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for MANAGEDCLIENT
|
|
24
|
+
MANAGEDCLIENT = 'MANAGEDCLIENT'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for CASHBOOKCLIENT
|
|
27
|
+
CASHBOOKCLIENT = 'CASHBOOKCLIENT'.freeze,
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for UNKNOWN
|
|
30
|
+
UNKNOWN = 'UNKNOWN'.freeze,
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for REMOVED
|
|
33
|
+
REMOVED = 'REMOVED'.freeze
|
|
34
|
+
].freeze
|
|
35
|
+
|
|
36
|
+
def self.validate(value)
|
|
37
|
+
return false if value.nil?
|
|
38
|
+
|
|
39
|
+
ORGANISATION_ROLE.include?(value)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.from_value(value, default_value = READONLY)
|
|
43
|
+
return default_value if value.nil?
|
|
44
|
+
|
|
45
|
+
str = value.to_s.strip
|
|
46
|
+
|
|
47
|
+
case str.downcase
|
|
48
|
+
when 'readonly' then READONLY
|
|
49
|
+
when 'invoiceonly' then INVOICEONLY
|
|
50
|
+
when 'standard' then STANDARD
|
|
51
|
+
when 'financialadviser' then FINANCIALADVISER
|
|
52
|
+
when 'managedclient' then MANAGEDCLIENT
|
|
53
|
+
when 'cashbookclient' then CASHBOOKCLIENT
|
|
54
|
+
when 'unknown' then UNKNOWN
|
|
55
|
+
when 'removed' then REMOVED
|
|
56
|
+
else
|
|
57
|
+
default_value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Organisation Type
|
|
8
|
+
class OrganisationType
|
|
9
|
+
ORGANISATION_TYPE = [
|
|
10
|
+
# TODO: Write general description for ACCOUNTING_PRACTICE
|
|
11
|
+
ACCOUNTING_PRACTICE = 'ACCOUNTING_PRACTICE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for COMPANY
|
|
14
|
+
COMPANY = 'COMPANY'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for CHARITY
|
|
17
|
+
CHARITY = 'CHARITY'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for CLUB_OR_SOCIETY
|
|
20
|
+
CLUB_OR_SOCIETY = 'CLUB_OR_SOCIETY'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for INDIVIDUAL
|
|
23
|
+
INDIVIDUAL = 'INDIVIDUAL'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for LOOK_THROUGH_COMPANY
|
|
26
|
+
LOOK_THROUGH_COMPANY = 'LOOK_THROUGH_COMPANY'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for NOT_FOR_PROFIT
|
|
29
|
+
NOT_FOR_PROFIT = 'NOT_FOR_PROFIT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for PARTNERSHIP
|
|
32
|
+
PARTNERSHIP = 'PARTNERSHIP'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for S_CORPORATION
|
|
35
|
+
S_CORPORATION = 'S_CORPORATION'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for SELF_MANAGED_SUPERANNUATION_FUND
|
|
38
|
+
SELF_MANAGED_SUPERANNUATION_FUND = 'SELF_MANAGED_SUPERANNUATION_FUND'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for SOLE_TRADER
|
|
41
|
+
SOLE_TRADER = 'SOLE_TRADER'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for SUPERANNUATION_FUND
|
|
44
|
+
SUPERANNUATION_FUND = 'SUPERANNUATION_FUND'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for TRUST
|
|
47
|
+
TRUST = 'TRUST'.freeze
|
|
48
|
+
].freeze
|
|
49
|
+
|
|
50
|
+
def self.validate(value)
|
|
51
|
+
return false if value.nil?
|
|
52
|
+
|
|
53
|
+
ORGANISATION_TYPE.include?(value)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.from_value(value, default_value = ACCOUNTING_PRACTICE)
|
|
57
|
+
return default_value if value.nil?
|
|
58
|
+
|
|
59
|
+
str = value.to_s.strip
|
|
60
|
+
|
|
61
|
+
case str.downcase
|
|
62
|
+
when 'accounting_practice' then ACCOUNTING_PRACTICE
|
|
63
|
+
when 'company' then COMPANY
|
|
64
|
+
when 'charity' then CHARITY
|
|
65
|
+
when 'club_or_society' then CLUB_OR_SOCIETY
|
|
66
|
+
when 'individual' then INDIVIDUAL
|
|
67
|
+
when 'look_through_company' then LOOK_THROUGH_COMPANY
|
|
68
|
+
when 'not_for_profit' then NOT_FOR_PROFIT
|
|
69
|
+
when 'partnership' then PARTNERSHIP
|
|
70
|
+
when 's_corporation' then S_CORPORATION
|
|
71
|
+
when 'self_managed_superannuation_fund' then SELF_MANAGED_SUPERANNUATION_FUND
|
|
72
|
+
when 'sole_trader' then SOLE_TRADER
|
|
73
|
+
when 'superannuation_fund' then SUPERANNUATION_FUND
|
|
74
|
+
when 'trust' then TRUST
|
|
75
|
+
else
|
|
76
|
+
default_value
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|