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,119 @@
|
|
|
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
|
+
# ContactGroup Model.
|
|
8
|
+
class ContactGroup < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The Name of the contact group. Required when creating a new contact group
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# The Status of a contact group. To delete a contact group update the status
|
|
17
|
+
# to DELETED. Only contact groups with a status of ACTIVE are returned on
|
|
18
|
+
# GETs.
|
|
19
|
+
# @return [Status1]
|
|
20
|
+
attr_accessor :status
|
|
21
|
+
|
|
22
|
+
# The Xero identifier for an contact group – specified as a string following
|
|
23
|
+
# the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
24
|
+
# @return [UUID | String]
|
|
25
|
+
attr_accessor :contact_group_id
|
|
26
|
+
|
|
27
|
+
# The ContactID and Name of Contacts in a contact group. Returned on GETs
|
|
28
|
+
# when the ContactGroupID is supplied in the URL.
|
|
29
|
+
# @return [Array[Contact]]
|
|
30
|
+
attr_accessor :contacts
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['name'] = 'Name'
|
|
36
|
+
@_hash['status'] = 'Status'
|
|
37
|
+
@_hash['contact_group_id'] = 'ContactGroupID'
|
|
38
|
+
@_hash['contacts'] = 'Contacts'
|
|
39
|
+
@_hash
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for optional fields
|
|
43
|
+
def self.optionals
|
|
44
|
+
%w[
|
|
45
|
+
name
|
|
46
|
+
status
|
|
47
|
+
contact_group_id
|
|
48
|
+
contacts
|
|
49
|
+
]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for nullable fields
|
|
53
|
+
def self.nullables
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(name: SKIP, status: SKIP, contact_group_id: SKIP,
|
|
58
|
+
contacts: SKIP, additional_properties: nil)
|
|
59
|
+
# Add additional model properties to the instance
|
|
60
|
+
additional_properties = {} if additional_properties.nil?
|
|
61
|
+
|
|
62
|
+
@name = name unless name == SKIP
|
|
63
|
+
@status = status unless status == SKIP
|
|
64
|
+
@contact_group_id = contact_group_id unless contact_group_id == SKIP
|
|
65
|
+
@contacts = contacts unless contacts == SKIP
|
|
66
|
+
@additional_properties = additional_properties
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Creates an instance of the object from a hash.
|
|
70
|
+
def self.from_hash(hash)
|
|
71
|
+
return nil unless hash
|
|
72
|
+
|
|
73
|
+
# Extract variables from the hash.
|
|
74
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
75
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
76
|
+
contact_group_id =
|
|
77
|
+
hash.key?('ContactGroupID') ? hash['ContactGroupID'] : SKIP
|
|
78
|
+
# Parameter is an array, so we need to iterate through it
|
|
79
|
+
contacts = nil
|
|
80
|
+
unless hash['Contacts'].nil?
|
|
81
|
+
contacts = []
|
|
82
|
+
hash['Contacts'].each do |structure|
|
|
83
|
+
contacts << (Contact.from_hash(structure) if structure)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
contacts = SKIP unless hash.key?('Contacts')
|
|
88
|
+
|
|
89
|
+
# Create a new hash for additional properties, removing known properties.
|
|
90
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
91
|
+
|
|
92
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
93
|
+
new_hash, proc { |value| value }
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Create object from extracted values.
|
|
97
|
+
ContactGroup.new(name: name,
|
|
98
|
+
status: status,
|
|
99
|
+
contact_group_id: contact_group_id,
|
|
100
|
+
contacts: contacts,
|
|
101
|
+
additional_properties: additional_properties)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Provides a human-readable string representation of the object.
|
|
105
|
+
def to_s
|
|
106
|
+
class_name = self.class.name.split('::').last
|
|
107
|
+
"<#{class_name} name: #{@name}, status: #{@status}, contact_group_id: #{@contact_group_id},"\
|
|
108
|
+
" contacts: #{@contacts}, additional_properties: #{@additional_properties}>"
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
112
|
+
def inspect
|
|
113
|
+
class_name = self.class.name.split('::').last
|
|
114
|
+
"<#{class_name} name: #{@name.inspect}, status: #{@status.inspect}, contact_group_id:"\
|
|
115
|
+
" #{@contact_group_id.inspect}, contacts: #{@contacts.inspect}, additional_properties:"\
|
|
116
|
+
" #{@additional_properties}>"
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
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
|
+
# ContactGroups Model.
|
|
8
|
+
class ContactGroups < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[ContactGroup]]
|
|
14
|
+
attr_accessor :contact_groups
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['contact_groups'] = 'ContactGroups'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
contact_groups
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(contact_groups: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@contact_groups = contact_groups unless contact_groups == 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
|
+
contact_groups = nil
|
|
50
|
+
unless hash['ContactGroups'].nil?
|
|
51
|
+
contact_groups = []
|
|
52
|
+
hash['ContactGroups'].each do |structure|
|
|
53
|
+
contact_groups << (ContactGroup.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
contact_groups = SKIP unless hash.key?('ContactGroups')
|
|
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
|
+
ContactGroups.new(contact_groups: contact_groups,
|
|
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} contact_groups: #{@contact_groups}, 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} contact_groups: #{@contact_groups.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
# ContactPerson Model.
|
|
8
|
+
class ContactPerson < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# First name of person
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :first_name
|
|
15
|
+
|
|
16
|
+
# Last name of person
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :last_name
|
|
19
|
+
|
|
20
|
+
# Email address of person
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :email_address
|
|
23
|
+
|
|
24
|
+
# boolean to indicate whether contact should be included on emails with
|
|
25
|
+
# invoices etc.
|
|
26
|
+
# @return [TrueClass | FalseClass]
|
|
27
|
+
attr_accessor :include_in_emails
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['first_name'] = 'FirstName'
|
|
33
|
+
@_hash['last_name'] = 'LastName'
|
|
34
|
+
@_hash['email_address'] = 'EmailAddress'
|
|
35
|
+
@_hash['include_in_emails'] = 'IncludeInEmails'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
first_name
|
|
43
|
+
last_name
|
|
44
|
+
email_address
|
|
45
|
+
include_in_emails
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(first_name: SKIP, last_name: SKIP, email_address: SKIP,
|
|
55
|
+
include_in_emails: SKIP, additional_properties: nil)
|
|
56
|
+
# Add additional model properties to the instance
|
|
57
|
+
additional_properties = {} if additional_properties.nil?
|
|
58
|
+
|
|
59
|
+
@first_name = first_name unless first_name == SKIP
|
|
60
|
+
@last_name = last_name unless last_name == SKIP
|
|
61
|
+
@email_address = email_address unless email_address == SKIP
|
|
62
|
+
@include_in_emails = include_in_emails unless include_in_emails == SKIP
|
|
63
|
+
@additional_properties = additional_properties
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Creates an instance of the object from a hash.
|
|
67
|
+
def self.from_hash(hash)
|
|
68
|
+
return nil unless hash
|
|
69
|
+
|
|
70
|
+
# Extract variables from the hash.
|
|
71
|
+
first_name = hash.key?('FirstName') ? hash['FirstName'] : SKIP
|
|
72
|
+
last_name = hash.key?('LastName') ? hash['LastName'] : SKIP
|
|
73
|
+
email_address = hash.key?('EmailAddress') ? hash['EmailAddress'] : SKIP
|
|
74
|
+
include_in_emails =
|
|
75
|
+
hash.key?('IncludeInEmails') ? hash['IncludeInEmails'] : SKIP
|
|
76
|
+
|
|
77
|
+
# Create a new hash for additional properties, removing known properties.
|
|
78
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
79
|
+
|
|
80
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
81
|
+
new_hash, proc { |value| value }
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Create object from extracted values.
|
|
85
|
+
ContactPerson.new(first_name: first_name,
|
|
86
|
+
last_name: last_name,
|
|
87
|
+
email_address: email_address,
|
|
88
|
+
include_in_emails: include_in_emails,
|
|
89
|
+
additional_properties: additional_properties)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a human-readable string representation of the object.
|
|
93
|
+
def to_s
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, email_address:"\
|
|
96
|
+
" #{@email_address}, include_in_emails: #{@include_in_emails}, additional_properties:"\
|
|
97
|
+
" #{@additional_properties}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
|
|
104
|
+
" email_address: #{@email_address.inspect}, include_in_emails:"\
|
|
105
|
+
" #{@include_in_emails.inspect}, additional_properties: #{@additional_properties}>"
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
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
|
+
# Current status of a contact – see contact status types
|
|
8
|
+
class ContactStatus
|
|
9
|
+
CONTACT_STATUS = [
|
|
10
|
+
# TODO: Write general description for ACTIVE
|
|
11
|
+
ACTIVE = 'ACTIVE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ARCHIVED
|
|
14
|
+
ARCHIVED = 'ARCHIVED'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for GDPRREQUEST
|
|
17
|
+
GDPRREQUEST = 'GDPRREQUEST'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
CONTACT_STATUS.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = ACTIVE)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'active' then ACTIVE
|
|
33
|
+
when 'archived' then ARCHIVED
|
|
34
|
+
when 'gdprrequest' then GDPRREQUEST
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
# Contacts Model.
|
|
8
|
+
class Contacts < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Pagination]
|
|
14
|
+
attr_accessor :pagination
|
|
15
|
+
|
|
16
|
+
# Displays array of warning messages from the API
|
|
17
|
+
# @return [Array[ValidationError]]
|
|
18
|
+
attr_accessor :warnings
|
|
19
|
+
|
|
20
|
+
# Displays array of warning messages from the API
|
|
21
|
+
# @return [Array[Contact]]
|
|
22
|
+
attr_accessor :contacts
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['pagination'] = 'pagination'
|
|
28
|
+
@_hash['warnings'] = 'Warnings'
|
|
29
|
+
@_hash['contacts'] = 'Contacts'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
pagination
|
|
37
|
+
warnings
|
|
38
|
+
contacts
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(pagination: SKIP, warnings: SKIP, contacts: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@pagination = pagination unless pagination == SKIP
|
|
53
|
+
@warnings = warnings unless warnings == SKIP
|
|
54
|
+
@contacts = contacts unless contacts == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
pagination = Pagination.from_hash(hash['pagination']) if hash['pagination']
|
|
64
|
+
# Parameter is an array, so we need to iterate through it
|
|
65
|
+
warnings = nil
|
|
66
|
+
unless hash['Warnings'].nil?
|
|
67
|
+
warnings = []
|
|
68
|
+
hash['Warnings'].each do |structure|
|
|
69
|
+
warnings << (ValidationError.from_hash(structure) if structure)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
warnings = SKIP unless hash.key?('Warnings')
|
|
74
|
+
# Parameter is an array, so we need to iterate through it
|
|
75
|
+
contacts = nil
|
|
76
|
+
unless hash['Contacts'].nil?
|
|
77
|
+
contacts = []
|
|
78
|
+
hash['Contacts'].each do |structure|
|
|
79
|
+
contacts << (Contact.from_hash(structure) if structure)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
contacts = SKIP unless hash.key?('Contacts')
|
|
84
|
+
|
|
85
|
+
# Create a new hash for additional properties, removing known properties.
|
|
86
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
87
|
+
|
|
88
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
89
|
+
new_hash, proc { |value| value }
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Create object from extracted values.
|
|
93
|
+
Contacts.new(pagination: pagination,
|
|
94
|
+
warnings: warnings,
|
|
95
|
+
contacts: contacts,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a human-readable string representation of the object.
|
|
100
|
+
def to_s
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} pagination: #{@pagination}, warnings: #{@warnings}, contacts: #{@contacts},"\
|
|
103
|
+
" additional_properties: #{@additional_properties}>"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
107
|
+
def inspect
|
|
108
|
+
class_name = self.class.name.split('::').last
|
|
109
|
+
"<#{class_name} pagination: #{@pagination.inspect}, warnings: #{@warnings.inspect},"\
|
|
110
|
+
" contacts: #{@contacts.inspect}, additional_properties: #{@additional_properties}>"
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
# Balance supplied for each account that has a value as at the conversion
|
|
8
|
+
# date.
|
|
9
|
+
class ConversionBalances < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The account code for a account
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_code
|
|
16
|
+
|
|
17
|
+
# The opening balances of the account. Debits are positive, credits are
|
|
18
|
+
# negative values
|
|
19
|
+
# @return [Float]
|
|
20
|
+
attr_accessor :balance
|
|
21
|
+
|
|
22
|
+
# The opening balances of the account. Debits are positive, credits are
|
|
23
|
+
# negative values
|
|
24
|
+
# @return [Array[BalanceDetails]]
|
|
25
|
+
attr_accessor :balance_details
|
|
26
|
+
|
|
27
|
+
# A mapping from model property names to API property names.
|
|
28
|
+
def self.names
|
|
29
|
+
@_hash = {} if @_hash.nil?
|
|
30
|
+
@_hash['account_code'] = 'AccountCode'
|
|
31
|
+
@_hash['balance'] = 'Balance'
|
|
32
|
+
@_hash['balance_details'] = 'BalanceDetails'
|
|
33
|
+
@_hash
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for optional fields
|
|
37
|
+
def self.optionals
|
|
38
|
+
%w[
|
|
39
|
+
account_code
|
|
40
|
+
balance
|
|
41
|
+
balance_details
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for nullable fields
|
|
46
|
+
def self.nullables
|
|
47
|
+
[]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def initialize(account_code: SKIP, balance: SKIP, balance_details: SKIP,
|
|
51
|
+
additional_properties: nil)
|
|
52
|
+
# Add additional model properties to the instance
|
|
53
|
+
additional_properties = {} if additional_properties.nil?
|
|
54
|
+
|
|
55
|
+
@account_code = account_code unless account_code == SKIP
|
|
56
|
+
@balance = balance unless balance == SKIP
|
|
57
|
+
@balance_details = balance_details unless balance_details == SKIP
|
|
58
|
+
@additional_properties = additional_properties
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Creates an instance of the object from a hash.
|
|
62
|
+
def self.from_hash(hash)
|
|
63
|
+
return nil unless hash
|
|
64
|
+
|
|
65
|
+
# Extract variables from the hash.
|
|
66
|
+
account_code = hash.key?('AccountCode') ? hash['AccountCode'] : SKIP
|
|
67
|
+
balance = hash.key?('Balance') ? hash['Balance'] : SKIP
|
|
68
|
+
# Parameter is an array, so we need to iterate through it
|
|
69
|
+
balance_details = nil
|
|
70
|
+
unless hash['BalanceDetails'].nil?
|
|
71
|
+
balance_details = []
|
|
72
|
+
hash['BalanceDetails'].each do |structure|
|
|
73
|
+
balance_details << (BalanceDetails.from_hash(structure) if structure)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
balance_details = SKIP unless hash.key?('BalanceDetails')
|
|
78
|
+
|
|
79
|
+
# Create a new hash for additional properties, removing known properties.
|
|
80
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
81
|
+
|
|
82
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
83
|
+
new_hash, proc { |value| value }
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
# Create object from extracted values.
|
|
87
|
+
ConversionBalances.new(account_code: account_code,
|
|
88
|
+
balance: balance,
|
|
89
|
+
balance_details: balance_details,
|
|
90
|
+
additional_properties: additional_properties)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a human-readable string representation of the object.
|
|
94
|
+
def to_s
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} account_code: #{@account_code}, balance: #{@balance}, balance_details:"\
|
|
97
|
+
" #{@balance_details}, additional_properties: #{@additional_properties}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} account_code: #{@account_code.inspect}, balance: #{@balance.inspect},"\
|
|
104
|
+
" balance_details: #{@balance_details.inspect}, additional_properties:"\
|
|
105
|
+
" #{@additional_properties}>"
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
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 date when the organisation starts using Xero
|
|
8
|
+
class ConversionDate < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The month the organisation starts using Xero. Value is an integer between
|
|
13
|
+
# 1 and 12
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :month
|
|
16
|
+
|
|
17
|
+
# The year the organisation starts using Xero. Value is an integer greater
|
|
18
|
+
# than 2006
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :year
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['month'] = 'Month'
|
|
26
|
+
@_hash['year'] = 'Year'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
%w[
|
|
33
|
+
month
|
|
34
|
+
year
|
|
35
|
+
]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(month: SKIP, year: SKIP, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@month = month unless month == SKIP
|
|
48
|
+
@year = year unless year == SKIP
|
|
49
|
+
@additional_properties = additional_properties
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Creates an instance of the object from a hash.
|
|
53
|
+
def self.from_hash(hash)
|
|
54
|
+
return nil unless hash
|
|
55
|
+
|
|
56
|
+
# Extract variables from the hash.
|
|
57
|
+
month = hash.key?('Month') ? hash['Month'] : SKIP
|
|
58
|
+
year = hash.key?('Year') ? hash['Year'] : SKIP
|
|
59
|
+
|
|
60
|
+
# Create a new hash for additional properties, removing known properties.
|
|
61
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
new_hash, proc { |value| value }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Create object from extracted values.
|
|
68
|
+
ConversionDate.new(month: month,
|
|
69
|
+
year: year,
|
|
70
|
+
additional_properties: additional_properties)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a human-readable string representation of the object.
|
|
74
|
+
def to_s
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} month: #{@month}, year: #{@year}, additional_properties:"\
|
|
77
|
+
" #{@additional_properties}>"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
81
|
+
def inspect
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} month: #{@month.inspect}, year: #{@year.inspect}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|