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,290 @@
|
|
|
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
|
+
# RepeatingInvoice Model.
|
|
8
|
+
class RepeatingInvoice < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# See Invoice Types
|
|
13
|
+
# @return [Type10]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# See Invoice Types
|
|
17
|
+
# @return [Contact]
|
|
18
|
+
attr_accessor :contact
|
|
19
|
+
|
|
20
|
+
# See Invoice Types
|
|
21
|
+
# @return [Schedule]
|
|
22
|
+
attr_accessor :schedule
|
|
23
|
+
|
|
24
|
+
# See LineItems
|
|
25
|
+
# @return [Array[LineItem]]
|
|
26
|
+
attr_accessor :line_items
|
|
27
|
+
|
|
28
|
+
# Line amounts are exclusive of tax by default if you don’t specify this
|
|
29
|
+
# element. See Line Amount Types
|
|
30
|
+
# @return [LineAmountTypes]
|
|
31
|
+
attr_accessor :line_amount_types
|
|
32
|
+
|
|
33
|
+
# ACCREC only – additional reference number
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :reference
|
|
36
|
+
|
|
37
|
+
# See BrandingThemes
|
|
38
|
+
# @return [UUID | String]
|
|
39
|
+
attr_accessor :branding_theme_id
|
|
40
|
+
|
|
41
|
+
# 3 letter alpha code for the currency – see list of currency codes
|
|
42
|
+
# @return [CurrencyCode]
|
|
43
|
+
attr_accessor :currency_code
|
|
44
|
+
|
|
45
|
+
# One of the following - DRAFT or AUTHORISED – See Invoice Status Codes
|
|
46
|
+
# @return [Status18]
|
|
47
|
+
attr_accessor :status
|
|
48
|
+
|
|
49
|
+
# Total of invoice excluding taxes
|
|
50
|
+
# @return [Float]
|
|
51
|
+
attr_accessor :sub_total
|
|
52
|
+
|
|
53
|
+
# Total tax on invoice
|
|
54
|
+
# @return [Float]
|
|
55
|
+
attr_accessor :total_tax
|
|
56
|
+
|
|
57
|
+
# Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)
|
|
58
|
+
# @return [Float]
|
|
59
|
+
attr_accessor :total
|
|
60
|
+
|
|
61
|
+
# Xero generated unique identifier for repeating invoice template
|
|
62
|
+
# @return [UUID | String]
|
|
63
|
+
attr_accessor :repeating_invoice_id
|
|
64
|
+
|
|
65
|
+
# Xero generated unique identifier for repeating invoice template
|
|
66
|
+
# @return [UUID | String]
|
|
67
|
+
attr_accessor :id
|
|
68
|
+
|
|
69
|
+
# Boolean to indicate if an invoice has an attachment
|
|
70
|
+
# @return [TrueClass | FalseClass]
|
|
71
|
+
attr_accessor :has_attachments
|
|
72
|
+
|
|
73
|
+
# Displays array of attachments from the API
|
|
74
|
+
# @return [Array[Attachment]]
|
|
75
|
+
attr_accessor :attachments
|
|
76
|
+
|
|
77
|
+
# Boolean to indicate whether the invoice has been approved for sending
|
|
78
|
+
# @return [TrueClass | FalseClass]
|
|
79
|
+
attr_accessor :approved_for_sending
|
|
80
|
+
|
|
81
|
+
# Boolean to indicate whether a copy is sent to sender's email
|
|
82
|
+
# @return [TrueClass | FalseClass]
|
|
83
|
+
attr_accessor :send_copy
|
|
84
|
+
|
|
85
|
+
# Boolean to indicate whether the invoice in the Xero app displays as "sent"
|
|
86
|
+
# @return [TrueClass | FalseClass]
|
|
87
|
+
attr_accessor :mark_as_sent
|
|
88
|
+
|
|
89
|
+
# Boolean to indicate whether to include PDF attachment
|
|
90
|
+
# @return [TrueClass | FalseClass]
|
|
91
|
+
attr_accessor :include_pdf
|
|
92
|
+
|
|
93
|
+
# A mapping from model property names to API property names.
|
|
94
|
+
def self.names
|
|
95
|
+
@_hash = {} if @_hash.nil?
|
|
96
|
+
@_hash['type'] = 'Type'
|
|
97
|
+
@_hash['contact'] = 'Contact'
|
|
98
|
+
@_hash['schedule'] = 'Schedule'
|
|
99
|
+
@_hash['line_items'] = 'LineItems'
|
|
100
|
+
@_hash['line_amount_types'] = 'LineAmountTypes'
|
|
101
|
+
@_hash['reference'] = 'Reference'
|
|
102
|
+
@_hash['branding_theme_id'] = 'BrandingThemeID'
|
|
103
|
+
@_hash['currency_code'] = 'CurrencyCode'
|
|
104
|
+
@_hash['status'] = 'Status'
|
|
105
|
+
@_hash['sub_total'] = 'SubTotal'
|
|
106
|
+
@_hash['total_tax'] = 'TotalTax'
|
|
107
|
+
@_hash['total'] = 'Total'
|
|
108
|
+
@_hash['repeating_invoice_id'] = 'RepeatingInvoiceID'
|
|
109
|
+
@_hash['id'] = 'ID'
|
|
110
|
+
@_hash['has_attachments'] = 'HasAttachments'
|
|
111
|
+
@_hash['attachments'] = 'Attachments'
|
|
112
|
+
@_hash['approved_for_sending'] = 'ApprovedForSending'
|
|
113
|
+
@_hash['send_copy'] = 'SendCopy'
|
|
114
|
+
@_hash['mark_as_sent'] = 'MarkAsSent'
|
|
115
|
+
@_hash['include_pdf'] = 'IncludePDF'
|
|
116
|
+
@_hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# An array for optional fields
|
|
120
|
+
def self.optionals
|
|
121
|
+
%w[
|
|
122
|
+
type
|
|
123
|
+
contact
|
|
124
|
+
schedule
|
|
125
|
+
line_items
|
|
126
|
+
line_amount_types
|
|
127
|
+
reference
|
|
128
|
+
branding_theme_id
|
|
129
|
+
currency_code
|
|
130
|
+
status
|
|
131
|
+
sub_total
|
|
132
|
+
total_tax
|
|
133
|
+
total
|
|
134
|
+
repeating_invoice_id
|
|
135
|
+
id
|
|
136
|
+
has_attachments
|
|
137
|
+
attachments
|
|
138
|
+
approved_for_sending
|
|
139
|
+
send_copy
|
|
140
|
+
mark_as_sent
|
|
141
|
+
include_pdf
|
|
142
|
+
]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# An array for nullable fields
|
|
146
|
+
def self.nullables
|
|
147
|
+
[]
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def initialize(type: SKIP, contact: SKIP, schedule: SKIP, line_items: SKIP,
|
|
151
|
+
line_amount_types: SKIP, reference: SKIP,
|
|
152
|
+
branding_theme_id: SKIP, currency_code: SKIP, status: SKIP,
|
|
153
|
+
sub_total: SKIP, total_tax: SKIP, total: SKIP,
|
|
154
|
+
repeating_invoice_id: SKIP, id: SKIP, has_attachments: false,
|
|
155
|
+
attachments: SKIP, approved_for_sending: false,
|
|
156
|
+
send_copy: false, mark_as_sent: false, include_pdf: false,
|
|
157
|
+
additional_properties: nil)
|
|
158
|
+
# Add additional model properties to the instance
|
|
159
|
+
additional_properties = {} if additional_properties.nil?
|
|
160
|
+
|
|
161
|
+
@type = type unless type == SKIP
|
|
162
|
+
@contact = contact unless contact == SKIP
|
|
163
|
+
@schedule = schedule unless schedule == SKIP
|
|
164
|
+
@line_items = line_items unless line_items == SKIP
|
|
165
|
+
@line_amount_types = line_amount_types unless line_amount_types == SKIP
|
|
166
|
+
@reference = reference unless reference == SKIP
|
|
167
|
+
@branding_theme_id = branding_theme_id unless branding_theme_id == SKIP
|
|
168
|
+
@currency_code = currency_code unless currency_code == SKIP
|
|
169
|
+
@status = status unless status == SKIP
|
|
170
|
+
@sub_total = sub_total unless sub_total == SKIP
|
|
171
|
+
@total_tax = total_tax unless total_tax == SKIP
|
|
172
|
+
@total = total unless total == SKIP
|
|
173
|
+
@repeating_invoice_id = repeating_invoice_id unless repeating_invoice_id == SKIP
|
|
174
|
+
@id = id unless id == SKIP
|
|
175
|
+
@has_attachments = has_attachments unless has_attachments == SKIP
|
|
176
|
+
@attachments = attachments unless attachments == SKIP
|
|
177
|
+
@approved_for_sending = approved_for_sending unless approved_for_sending == SKIP
|
|
178
|
+
@send_copy = send_copy unless send_copy == SKIP
|
|
179
|
+
@mark_as_sent = mark_as_sent unless mark_as_sent == SKIP
|
|
180
|
+
@include_pdf = include_pdf unless include_pdf == SKIP
|
|
181
|
+
@additional_properties = additional_properties
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Creates an instance of the object from a hash.
|
|
185
|
+
def self.from_hash(hash)
|
|
186
|
+
return nil unless hash
|
|
187
|
+
|
|
188
|
+
# Extract variables from the hash.
|
|
189
|
+
type = hash.key?('Type') ? hash['Type'] : SKIP
|
|
190
|
+
contact = Contact.from_hash(hash['Contact']) if hash['Contact']
|
|
191
|
+
schedule = Schedule.from_hash(hash['Schedule']) if hash['Schedule']
|
|
192
|
+
# Parameter is an array, so we need to iterate through it
|
|
193
|
+
line_items = nil
|
|
194
|
+
unless hash['LineItems'].nil?
|
|
195
|
+
line_items = []
|
|
196
|
+
hash['LineItems'].each do |structure|
|
|
197
|
+
line_items << (LineItem.from_hash(structure) if structure)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
line_items = SKIP unless hash.key?('LineItems')
|
|
202
|
+
line_amount_types =
|
|
203
|
+
hash.key?('LineAmountTypes') ? hash['LineAmountTypes'] : SKIP
|
|
204
|
+
reference = hash.key?('Reference') ? hash['Reference'] : SKIP
|
|
205
|
+
branding_theme_id =
|
|
206
|
+
hash.key?('BrandingThemeID') ? hash['BrandingThemeID'] : SKIP
|
|
207
|
+
currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
|
|
208
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
209
|
+
sub_total = hash.key?('SubTotal') ? hash['SubTotal'] : SKIP
|
|
210
|
+
total_tax = hash.key?('TotalTax') ? hash['TotalTax'] : SKIP
|
|
211
|
+
total = hash.key?('Total') ? hash['Total'] : SKIP
|
|
212
|
+
repeating_invoice_id =
|
|
213
|
+
hash.key?('RepeatingInvoiceID') ? hash['RepeatingInvoiceID'] : SKIP
|
|
214
|
+
id = hash.key?('ID') ? hash['ID'] : SKIP
|
|
215
|
+
has_attachments = hash['HasAttachments'] ||= false
|
|
216
|
+
# Parameter is an array, so we need to iterate through it
|
|
217
|
+
attachments = nil
|
|
218
|
+
unless hash['Attachments'].nil?
|
|
219
|
+
attachments = []
|
|
220
|
+
hash['Attachments'].each do |structure|
|
|
221
|
+
attachments << (Attachment.from_hash(structure) if structure)
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
attachments = SKIP unless hash.key?('Attachments')
|
|
226
|
+
approved_for_sending = hash['ApprovedForSending'] ||= false
|
|
227
|
+
send_copy = hash['SendCopy'] ||= false
|
|
228
|
+
mark_as_sent = hash['MarkAsSent'] ||= false
|
|
229
|
+
include_pdf = hash['IncludePDF'] ||= false
|
|
230
|
+
|
|
231
|
+
# Create a new hash for additional properties, removing known properties.
|
|
232
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
233
|
+
|
|
234
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
235
|
+
new_hash, proc { |value| value }
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
# Create object from extracted values.
|
|
239
|
+
RepeatingInvoice.new(type: type,
|
|
240
|
+
contact: contact,
|
|
241
|
+
schedule: schedule,
|
|
242
|
+
line_items: line_items,
|
|
243
|
+
line_amount_types: line_amount_types,
|
|
244
|
+
reference: reference,
|
|
245
|
+
branding_theme_id: branding_theme_id,
|
|
246
|
+
currency_code: currency_code,
|
|
247
|
+
status: status,
|
|
248
|
+
sub_total: sub_total,
|
|
249
|
+
total_tax: total_tax,
|
|
250
|
+
total: total,
|
|
251
|
+
repeating_invoice_id: repeating_invoice_id,
|
|
252
|
+
id: id,
|
|
253
|
+
has_attachments: has_attachments,
|
|
254
|
+
attachments: attachments,
|
|
255
|
+
approved_for_sending: approved_for_sending,
|
|
256
|
+
send_copy: send_copy,
|
|
257
|
+
mark_as_sent: mark_as_sent,
|
|
258
|
+
include_pdf: include_pdf,
|
|
259
|
+
additional_properties: additional_properties)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Provides a human-readable string representation of the object.
|
|
263
|
+
def to_s
|
|
264
|
+
class_name = self.class.name.split('::').last
|
|
265
|
+
"<#{class_name} type: #{@type}, contact: #{@contact}, schedule: #{@schedule}, line_items:"\
|
|
266
|
+
" #{@line_items}, line_amount_types: #{@line_amount_types}, reference: #{@reference},"\
|
|
267
|
+
" branding_theme_id: #{@branding_theme_id}, currency_code: #{@currency_code}, status:"\
|
|
268
|
+
" #{@status}, sub_total: #{@sub_total}, total_tax: #{@total_tax}, total: #{@total},"\
|
|
269
|
+
" repeating_invoice_id: #{@repeating_invoice_id}, id: #{@id}, has_attachments:"\
|
|
270
|
+
" #{@has_attachments}, attachments: #{@attachments}, approved_for_sending:"\
|
|
271
|
+
" #{@approved_for_sending}, send_copy: #{@send_copy}, mark_as_sent: #{@mark_as_sent},"\
|
|
272
|
+
" include_pdf: #{@include_pdf}, additional_properties: #{@additional_properties}>"
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
276
|
+
def inspect
|
|
277
|
+
class_name = self.class.name.split('::').last
|
|
278
|
+
"<#{class_name} type: #{@type.inspect}, contact: #{@contact.inspect}, schedule:"\
|
|
279
|
+
" #{@schedule.inspect}, line_items: #{@line_items.inspect}, line_amount_types:"\
|
|
280
|
+
" #{@line_amount_types.inspect}, reference: #{@reference.inspect}, branding_theme_id:"\
|
|
281
|
+
" #{@branding_theme_id.inspect}, currency_code: #{@currency_code.inspect}, status:"\
|
|
282
|
+
" #{@status.inspect}, sub_total: #{@sub_total.inspect}, total_tax: #{@total_tax.inspect},"\
|
|
283
|
+
" total: #{@total.inspect}, repeating_invoice_id: #{@repeating_invoice_id.inspect}, id:"\
|
|
284
|
+
" #{@id.inspect}, has_attachments: #{@has_attachments.inspect}, attachments:"\
|
|
285
|
+
" #{@attachments.inspect}, approved_for_sending: #{@approved_for_sending.inspect},"\
|
|
286
|
+
" send_copy: #{@send_copy.inspect}, mark_as_sent: #{@mark_as_sent.inspect}, include_pdf:"\
|
|
287
|
+
" #{@include_pdf.inspect}, additional_properties: #{@additional_properties}>"
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
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
|
+
# RepeatingInvoices Model.
|
|
8
|
+
class RepeatingInvoices < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[RepeatingInvoice]]
|
|
14
|
+
attr_accessor :repeating_invoices
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['repeating_invoices'] = 'RepeatingInvoices'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
repeating_invoices
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(repeating_invoices: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@repeating_invoices = repeating_invoices unless repeating_invoices == 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
|
+
repeating_invoices = nil
|
|
50
|
+
unless hash['RepeatingInvoices'].nil?
|
|
51
|
+
repeating_invoices = []
|
|
52
|
+
hash['RepeatingInvoices'].each do |structure|
|
|
53
|
+
repeating_invoices << (RepeatingInvoice.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
repeating_invoices = SKIP unless hash.key?('RepeatingInvoices')
|
|
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
|
+
RepeatingInvoices.new(repeating_invoices: repeating_invoices,
|
|
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} repeating_invoices: #{@repeating_invoices}, 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} repeating_invoices: #{@repeating_invoices.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
# Report Model.
|
|
8
|
+
class Report < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# See Prepayment Types
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :report_name
|
|
15
|
+
|
|
16
|
+
# See Prepayment Types
|
|
17
|
+
# @return [ReportType]
|
|
18
|
+
attr_accessor :report_type
|
|
19
|
+
|
|
20
|
+
# See Prepayment Types
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :report_title
|
|
23
|
+
|
|
24
|
+
# Date of report
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :report_date
|
|
27
|
+
|
|
28
|
+
# Updated Date
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :updated_date_utc
|
|
31
|
+
|
|
32
|
+
# Updated Date
|
|
33
|
+
# @return [Array[TenNinetyNineContact]]
|
|
34
|
+
attr_accessor :contacts
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['report_name'] = 'ReportName'
|
|
40
|
+
@_hash['report_type'] = 'ReportType'
|
|
41
|
+
@_hash['report_title'] = 'ReportTitle'
|
|
42
|
+
@_hash['report_date'] = 'ReportDate'
|
|
43
|
+
@_hash['updated_date_utc'] = 'UpdatedDateUTC'
|
|
44
|
+
@_hash['contacts'] = 'Contacts'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
report_name
|
|
52
|
+
report_type
|
|
53
|
+
report_title
|
|
54
|
+
report_date
|
|
55
|
+
updated_date_utc
|
|
56
|
+
contacts
|
|
57
|
+
]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# An array for nullable fields
|
|
61
|
+
def self.nullables
|
|
62
|
+
[]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def initialize(report_name: SKIP, report_type: SKIP, report_title: SKIP,
|
|
66
|
+
report_date: SKIP, updated_date_utc: SKIP, contacts: SKIP,
|
|
67
|
+
additional_properties: nil)
|
|
68
|
+
# Add additional model properties to the instance
|
|
69
|
+
additional_properties = {} if additional_properties.nil?
|
|
70
|
+
|
|
71
|
+
@report_name = report_name unless report_name == SKIP
|
|
72
|
+
@report_type = report_type unless report_type == SKIP
|
|
73
|
+
@report_title = report_title unless report_title == SKIP
|
|
74
|
+
@report_date = report_date unless report_date == SKIP
|
|
75
|
+
@updated_date_utc = updated_date_utc unless updated_date_utc == SKIP
|
|
76
|
+
@contacts = contacts unless contacts == SKIP
|
|
77
|
+
@additional_properties = additional_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Creates an instance of the object from a hash.
|
|
81
|
+
def self.from_hash(hash)
|
|
82
|
+
return nil unless hash
|
|
83
|
+
|
|
84
|
+
# Extract variables from the hash.
|
|
85
|
+
report_name = hash.key?('ReportName') ? hash['ReportName'] : SKIP
|
|
86
|
+
report_type = hash.key?('ReportType') ? hash['ReportType'] : SKIP
|
|
87
|
+
report_title = hash.key?('ReportTitle') ? hash['ReportTitle'] : SKIP
|
|
88
|
+
report_date = hash.key?('ReportDate') ? hash['ReportDate'] : SKIP
|
|
89
|
+
updated_date_utc =
|
|
90
|
+
hash.key?('UpdatedDateUTC') ? hash['UpdatedDateUTC'] : SKIP
|
|
91
|
+
# Parameter is an array, so we need to iterate through it
|
|
92
|
+
contacts = nil
|
|
93
|
+
unless hash['Contacts'].nil?
|
|
94
|
+
contacts = []
|
|
95
|
+
hash['Contacts'].each do |structure|
|
|
96
|
+
contacts << (TenNinetyNineContact.from_hash(structure) if structure)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
contacts = SKIP unless hash.key?('Contacts')
|
|
101
|
+
|
|
102
|
+
# Create a new hash for additional properties, removing known properties.
|
|
103
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
104
|
+
|
|
105
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
106
|
+
new_hash, proc { |value| value }
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# Create object from extracted values.
|
|
110
|
+
Report.new(report_name: report_name,
|
|
111
|
+
report_type: report_type,
|
|
112
|
+
report_title: report_title,
|
|
113
|
+
report_date: report_date,
|
|
114
|
+
updated_date_utc: updated_date_utc,
|
|
115
|
+
contacts: contacts,
|
|
116
|
+
additional_properties: additional_properties)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Provides a human-readable string representation of the object.
|
|
120
|
+
def to_s
|
|
121
|
+
class_name = self.class.name.split('::').last
|
|
122
|
+
"<#{class_name} report_name: #{@report_name}, report_type: #{@report_type}, report_title:"\
|
|
123
|
+
" #{@report_title}, report_date: #{@report_date}, updated_date_utc: #{@updated_date_utc},"\
|
|
124
|
+
" contacts: #{@contacts}, additional_properties: #{@additional_properties}>"
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
128
|
+
def inspect
|
|
129
|
+
class_name = self.class.name.split('::').last
|
|
130
|
+
"<#{class_name} report_name: #{@report_name.inspect}, report_type: #{@report_type.inspect},"\
|
|
131
|
+
" report_title: #{@report_title.inspect}, report_date: #{@report_date.inspect},"\
|
|
132
|
+
" updated_date_utc: #{@updated_date_utc.inspect}, contacts: #{@contacts.inspect},"\
|
|
133
|
+
" additional_properties: #{@additional_properties}>"
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
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
|
+
# ReportAttribute Model.
|
|
8
|
+
class ReportAttribute < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :value
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['id'] = 'Id'
|
|
24
|
+
@_hash['value'] = 'Value'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
id
|
|
32
|
+
value
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(id: SKIP, value: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@id = id unless id == SKIP
|
|
46
|
+
@value = value unless value == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
id = hash.key?('Id') ? hash['Id'] : SKIP
|
|
56
|
+
value = hash.key?('Value') ? hash['Value'] : SKIP
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
ReportAttribute.new(id: id,
|
|
67
|
+
value: value,
|
|
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} id: #{@id}, value: #{@value}, 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} id: #{@id.inspect}, value: #{@value.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
# ReportCell Model.
|
|
8
|
+
class ReportCell < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :value
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Array[ReportAttribute]]
|
|
18
|
+
attr_accessor :attributes
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['value'] = 'Value'
|
|
24
|
+
@_hash['attributes'] = 'Attributes'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
value
|
|
32
|
+
attributes
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(value: SKIP, attributes: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@value = value unless value == SKIP
|
|
46
|
+
@attributes = attributes unless attributes == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
value = hash.key?('Value') ? hash['Value'] : SKIP
|
|
56
|
+
# Parameter is an array, so we need to iterate through it
|
|
57
|
+
attributes = nil
|
|
58
|
+
unless hash['Attributes'].nil?
|
|
59
|
+
attributes = []
|
|
60
|
+
hash['Attributes'].each do |structure|
|
|
61
|
+
attributes << (ReportAttribute.from_hash(structure) if structure)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
attributes = SKIP unless hash.key?('Attributes')
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
ReportCell.new(value: value,
|
|
76
|
+
attributes: attributes,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} value: #{@value}, attributes: #{@attributes}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} value: #{@value.inspect}, attributes: #{@attributes.inspect},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|