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,48 @@
|
|
|
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
|
+
# The type of the jurisdiction
|
|
8
|
+
class Type2
|
|
9
|
+
TYPE2 = [
|
|
10
|
+
# TODO: Write general description for ENUM_SYSGSTUSCOUNTRY
|
|
11
|
+
ENUM_SYSGSTUSCOUNTRY = 'SYSGST/USCOUNTRY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ENUM_SYSGSTUSSTATE
|
|
14
|
+
ENUM_SYSGSTUSSTATE = 'SYSGST/USSTATE'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ENUM_SYSGSTUSCOUNTY
|
|
17
|
+
ENUM_SYSGSTUSCOUNTY = 'SYSGST/USCOUNTY'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for ENUM_SYSGSTUSCITY
|
|
20
|
+
ENUM_SYSGSTUSCITY = 'SYSGST/USCITY'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ENUM_SYSGSTUSSPECIAL
|
|
23
|
+
ENUM_SYSGSTUSSPECIAL = 'SYSGST/USSPECIAL'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
TYPE2.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = ENUM_SYSGSTUSCOUNTRY)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'enum_sysgstuscountry' then ENUM_SYSGSTUSCOUNTRY
|
|
39
|
+
when 'enum_sysgstusstate' then ENUM_SYSGSTUSSTATE
|
|
40
|
+
when 'enum_sysgstuscounty' then ENUM_SYSGSTUSCOUNTY
|
|
41
|
+
when 'enum_sysgstuscity' then ENUM_SYSGSTUSCITY
|
|
42
|
+
when 'enum_sysgstusspecial' then ENUM_SYSGSTUSSPECIAL
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
# See Invoice Types
|
|
8
|
+
class Type3
|
|
9
|
+
TYPE3 = [
|
|
10
|
+
# TODO: Write general description for ACCPAY
|
|
11
|
+
ACCPAY = 'ACCPAY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ACCPAYCREDIT
|
|
14
|
+
ACCPAYCREDIT = 'ACCPAYCREDIT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for APOVERPAYMENT
|
|
17
|
+
APOVERPAYMENT = 'APOVERPAYMENT'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for APPREPAYMENT
|
|
20
|
+
APPREPAYMENT = 'APPREPAYMENT'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ACCREC
|
|
23
|
+
ACCREC = 'ACCREC'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for ACCRECCREDIT
|
|
26
|
+
ACCRECCREDIT = 'ACCRECCREDIT'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for AROVERPAYMENT
|
|
29
|
+
AROVERPAYMENT = 'AROVERPAYMENT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for ARPREPAYMENT
|
|
32
|
+
ARPREPAYMENT = 'ARPREPAYMENT'.freeze
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.validate(value)
|
|
36
|
+
return false if value.nil?
|
|
37
|
+
|
|
38
|
+
TYPE3.include?(value)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = ACCPAY)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'accpay' then ACCPAY
|
|
48
|
+
when 'accpaycredit' then ACCPAYCREDIT
|
|
49
|
+
when 'apoverpayment' then APOVERPAYMENT
|
|
50
|
+
when 'apprepayment' then APPREPAYMENT
|
|
51
|
+
when 'accrec' then ACCREC
|
|
52
|
+
when 'accreccredit' then ACCRECCREDIT
|
|
53
|
+
when 'aroverpayment' then AROVERPAYMENT
|
|
54
|
+
when 'arprepayment' then ARPREPAYMENT
|
|
55
|
+
else
|
|
56
|
+
default_value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
# See Prepayment Types
|
|
8
|
+
class Type4
|
|
9
|
+
TYPE4 = [
|
|
10
|
+
# TODO: Write general description for RECEIVEPREPAYMENT
|
|
11
|
+
RECEIVEPREPAYMENT = 'RECEIVE-PREPAYMENT'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SPENDPREPAYMENT
|
|
14
|
+
SPENDPREPAYMENT = 'SPEND-PREPAYMENT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ARPREPAYMENT
|
|
17
|
+
ARPREPAYMENT = 'ARPREPAYMENT'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for APPREPAYMENT
|
|
20
|
+
APPREPAYMENT = 'APPREPAYMENT'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
TYPE4.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = RECEIVEPREPAYMENT)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'receiveprepayment' then RECEIVEPREPAYMENT
|
|
36
|
+
when 'spendprepayment' then SPENDPREPAYMENT
|
|
37
|
+
when 'arprepayment' then ARPREPAYMENT
|
|
38
|
+
when 'apprepayment' then APPREPAYMENT
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
# See Overpayment Types
|
|
8
|
+
class Type5
|
|
9
|
+
TYPE5 = [
|
|
10
|
+
# TODO: Write general description for RECEIVEOVERPAYMENT
|
|
11
|
+
RECEIVEOVERPAYMENT = 'RECEIVE-OVERPAYMENT'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SPENDOVERPAYMENT
|
|
14
|
+
SPENDOVERPAYMENT = 'SPEND-OVERPAYMENT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for AROVERPAYMENT
|
|
17
|
+
AROVERPAYMENT = 'AROVERPAYMENT'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
TYPE5.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = RECEIVEOVERPAYMENT)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'receiveoverpayment' then RECEIVEOVERPAYMENT
|
|
33
|
+
when 'spendoverpayment' then SPENDOVERPAYMENT
|
|
34
|
+
when 'aroverpayment' then AROVERPAYMENT
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# See Credit Note Types
|
|
8
|
+
class Type6
|
|
9
|
+
TYPE6 = [
|
|
10
|
+
# TODO: Write general description for ACCPAYCREDIT
|
|
11
|
+
ACCPAYCREDIT = 'ACCPAYCREDIT'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ACCRECCREDIT
|
|
14
|
+
ACCRECCREDIT = 'ACCRECCREDIT'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE6.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ACCPAYCREDIT)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'accpaycredit' then ACCPAYCREDIT
|
|
30
|
+
when 'accreccredit' then ACCRECCREDIT
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# PAYBATCH for bill payments or RECBATCH for sales invoice payments
|
|
8
|
+
# (read-only)
|
|
9
|
+
class Type7
|
|
10
|
+
TYPE7 = [
|
|
11
|
+
# TODO: Write general description for PAYBATCH
|
|
12
|
+
PAYBATCH = 'PAYBATCH'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for RECBATCH
|
|
15
|
+
RECBATCH = 'RECBATCH'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
TYPE7.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = PAYBATCH)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'paybatch' then PAYBATCH
|
|
31
|
+
when 'recbatch' then RECBATCH
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# Type of Budget. OVERALL or TRACKING
|
|
8
|
+
class Type8
|
|
9
|
+
TYPE8 = [
|
|
10
|
+
# TODO: Write general description for OVERALL
|
|
11
|
+
OVERALL = 'OVERALL'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for TRACKING
|
|
14
|
+
TRACKING = 'TRACKING'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE8.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = OVERALL)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'overall' then OVERALL
|
|
30
|
+
when 'tracking' then TRACKING
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
# This will always be BILLABLEEXPENSE. More types may be added in future.
|
|
8
|
+
class Type9
|
|
9
|
+
TYPE9 = [
|
|
10
|
+
# TODO: Write general description for BILLABLEEXPENSE
|
|
11
|
+
BILLABLEEXPENSE = 'BILLABLEEXPENSE'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
TYPE9.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = BILLABLEEXPENSE)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# One of the following - WEEKLY or MONTHLY
|
|
8
|
+
class Unit
|
|
9
|
+
UNIT = [
|
|
10
|
+
# TODO: Write general description for WEEKLY
|
|
11
|
+
WEEKLY = 'WEEKLY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for MONTHLY
|
|
14
|
+
MONTHLY = 'MONTHLY'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
UNIT.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = WEEKLY)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'weekly' then WEEKLY
|
|
30
|
+
when 'monthly' then MONTHLY
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
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 Model.
|
|
8
|
+
class User < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Xero identifier
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :user_id
|
|
15
|
+
|
|
16
|
+
# Email address of user
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :email_address
|
|
19
|
+
|
|
20
|
+
# First name of user
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :first_name
|
|
23
|
+
|
|
24
|
+
# Last name of user
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :last_name
|
|
27
|
+
|
|
28
|
+
# Timestamp of last change to user
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :updated_date_utc
|
|
31
|
+
|
|
32
|
+
# Boolean to indicate if user is the subscriber
|
|
33
|
+
# @return [TrueClass | FalseClass]
|
|
34
|
+
attr_accessor :is_subscriber
|
|
35
|
+
|
|
36
|
+
# User role that defines permissions in Xero and via API (READONLY,
|
|
37
|
+
# INVOICEONLY, STANDARD, FINANCIALADVISER, etc)
|
|
38
|
+
# @return [OrganisationRole]
|
|
39
|
+
attr_accessor :organisation_role
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['user_id'] = 'UserID'
|
|
45
|
+
@_hash['email_address'] = 'EmailAddress'
|
|
46
|
+
@_hash['first_name'] = 'FirstName'
|
|
47
|
+
@_hash['last_name'] = 'LastName'
|
|
48
|
+
@_hash['updated_date_utc'] = 'UpdatedDateUTC'
|
|
49
|
+
@_hash['is_subscriber'] = 'IsSubscriber'
|
|
50
|
+
@_hash['organisation_role'] = 'OrganisationRole'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
%w[
|
|
57
|
+
user_id
|
|
58
|
+
email_address
|
|
59
|
+
first_name
|
|
60
|
+
last_name
|
|
61
|
+
updated_date_utc
|
|
62
|
+
is_subscriber
|
|
63
|
+
organisation_role
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# An array for nullable fields
|
|
68
|
+
def self.nullables
|
|
69
|
+
[]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def initialize(user_id: SKIP, email_address: SKIP, first_name: SKIP,
|
|
73
|
+
last_name: SKIP, updated_date_utc: SKIP, is_subscriber: SKIP,
|
|
74
|
+
organisation_role: SKIP, additional_properties: nil)
|
|
75
|
+
# Add additional model properties to the instance
|
|
76
|
+
additional_properties = {} if additional_properties.nil?
|
|
77
|
+
|
|
78
|
+
@user_id = user_id unless user_id == SKIP
|
|
79
|
+
@email_address = email_address unless email_address == SKIP
|
|
80
|
+
@first_name = first_name unless first_name == SKIP
|
|
81
|
+
@last_name = last_name unless last_name == SKIP
|
|
82
|
+
@updated_date_utc = updated_date_utc unless updated_date_utc == SKIP
|
|
83
|
+
@is_subscriber = is_subscriber unless is_subscriber == SKIP
|
|
84
|
+
@organisation_role = organisation_role unless organisation_role == SKIP
|
|
85
|
+
@additional_properties = additional_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Creates an instance of the object from a hash.
|
|
89
|
+
def self.from_hash(hash)
|
|
90
|
+
return nil unless hash
|
|
91
|
+
|
|
92
|
+
# Extract variables from the hash.
|
|
93
|
+
user_id = hash.key?('UserID') ? hash['UserID'] : SKIP
|
|
94
|
+
email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP
|
|
95
|
+
first_name = hash.key?('FirstName') ? hash['FirstName'] : SKIP
|
|
96
|
+
last_name = hash.key?('LastName') ? hash['LastName'] : SKIP
|
|
97
|
+
updated_date_utc =
|
|
98
|
+
hash.key?('UpdatedDateUTC') ? hash['UpdatedDateUTC'] : SKIP
|
|
99
|
+
is_subscriber = hash.key?('IsSubscriber') ? hash['IsSubscriber'] : SKIP
|
|
100
|
+
organisation_role =
|
|
101
|
+
hash.key?('OrganisationRole') ? hash['OrganisationRole'] : SKIP
|
|
102
|
+
|
|
103
|
+
# Create a new hash for additional properties, removing known properties.
|
|
104
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
105
|
+
|
|
106
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
107
|
+
new_hash, proc { |value| value }
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
# Create object from extracted values.
|
|
111
|
+
User.new(user_id: user_id,
|
|
112
|
+
email_address: email_address,
|
|
113
|
+
first_name: first_name,
|
|
114
|
+
last_name: last_name,
|
|
115
|
+
updated_date_utc: updated_date_utc,
|
|
116
|
+
is_subscriber: is_subscriber,
|
|
117
|
+
organisation_role: organisation_role,
|
|
118
|
+
additional_properties: additional_properties)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Provides a human-readable string representation of the object.
|
|
122
|
+
def to_s
|
|
123
|
+
class_name = self.class.name.split('::').last
|
|
124
|
+
"<#{class_name} user_id: #{@user_id}, email_address: #{@email_address}, first_name:"\
|
|
125
|
+
" #{@first_name}, last_name: #{@last_name}, updated_date_utc: #{@updated_date_utc},"\
|
|
126
|
+
" is_subscriber: #{@is_subscriber}, organisation_role: #{@organisation_role},"\
|
|
127
|
+
" additional_properties: #{@additional_properties}>"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
131
|
+
def inspect
|
|
132
|
+
class_name = self.class.name.split('::').last
|
|
133
|
+
"<#{class_name} user_id: #{@user_id.inspect}, email_address: #{@email_address.inspect},"\
|
|
134
|
+
" first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect}, updated_date_utc:"\
|
|
135
|
+
" #{@updated_date_utc.inspect}, is_subscriber: #{@is_subscriber.inspect}, organisation_role:"\
|
|
136
|
+
" #{@organisation_role.inspect}, additional_properties: #{@additional_properties}>"
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
# Users Model.
|
|
8
|
+
class Users < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[User]]
|
|
14
|
+
attr_accessor :users
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['users'] = 'Users'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
users
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(users: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@users = users unless users == 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
|
+
users = nil
|
|
50
|
+
unless hash['Users'].nil?
|
|
51
|
+
users = []
|
|
52
|
+
hash['Users'].each do |structure|
|
|
53
|
+
users << (User.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
users = SKIP unless hash.key?('Users')
|
|
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
|
+
Users.new(users: users,
|
|
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} users: #{@users}, additional_properties: #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
78
|
+
def inspect
|
|
79
|
+
class_name = self.class.name.split('::').last
|
|
80
|
+
"<#{class_name} users: #{@users.inspect}, additional_properties:"\
|
|
81
|
+
" #{@additional_properties}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
# ValidationError Model.
|
|
8
|
+
class ValidationError < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Validation error message
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :message
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['message'] = 'Message'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
message
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(message: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@message = message unless message == 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
|
+
message = hash.key?('Message') ? hash['Message'] : SKIP
|
|
49
|
+
|
|
50
|
+
# Create a new hash for additional properties, removing known properties.
|
|
51
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
52
|
+
|
|
53
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
54
|
+
new_hash, proc { |value| value }
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Create object from extracted values.
|
|
58
|
+
ValidationError.new(message: message,
|
|
59
|
+
additional_properties: additional_properties)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a human-readable string representation of the object.
|
|
63
|
+
def to_s
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} message: #{@message}, additional_properties: #{@additional_properties}>"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
69
|
+
def inspect
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} message: #{@message.inspect}, additional_properties:"\
|
|
72
|
+
" #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|