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,586 @@
|
|
|
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
|
+
# Invoice Model.
|
|
8
|
+
class Invoice < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# See Invoice Types
|
|
13
|
+
# @return [Type3]
|
|
14
|
+
attr_accessor :type
|
|
15
|
+
|
|
16
|
+
# See Invoice Types
|
|
17
|
+
# @return [Contact]
|
|
18
|
+
attr_accessor :contact
|
|
19
|
+
|
|
20
|
+
# See LineItems
|
|
21
|
+
# @return [Array[LineItem]]
|
|
22
|
+
attr_accessor :line_items
|
|
23
|
+
|
|
24
|
+
# Date invoice was issued – YYYY-MM-DD. If the Date element is not specified
|
|
25
|
+
# it will default to the current date based on the timezone setting of the
|
|
26
|
+
# organisation
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :date
|
|
29
|
+
|
|
30
|
+
# Date invoice is due – YYYY-MM-DD
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :due_date
|
|
33
|
+
|
|
34
|
+
# Line amounts are exclusive of tax by default if you don’t specify this
|
|
35
|
+
# element. See Line Amount Types
|
|
36
|
+
# @return [LineAmountTypes]
|
|
37
|
+
attr_accessor :line_amount_types
|
|
38
|
+
|
|
39
|
+
# ACCREC – Unique alpha numeric code identifying invoice (when missing will
|
|
40
|
+
# auto-generate from your Organisation Invoice Settings) (max length = 255)
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :invoice_number
|
|
43
|
+
|
|
44
|
+
# ACCREC only – additional reference number
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :reference
|
|
47
|
+
|
|
48
|
+
# See BrandingThemes
|
|
49
|
+
# @return [UUID | String]
|
|
50
|
+
attr_accessor :branding_theme_id
|
|
51
|
+
|
|
52
|
+
# URL link to a source document – shown as “Go to [appName]” in the Xero app
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :url
|
|
55
|
+
|
|
56
|
+
# 3 letter alpha code for the currency – see list of currency codes
|
|
57
|
+
# @return [CurrencyCode]
|
|
58
|
+
attr_accessor :currency_code
|
|
59
|
+
|
|
60
|
+
# The currency rate for a multicurrency invoice. If no rate is specified,
|
|
61
|
+
# the XE.com day rate is used. (max length = [18].[6])
|
|
62
|
+
# @return [Float]
|
|
63
|
+
attr_accessor :currency_rate
|
|
64
|
+
|
|
65
|
+
# See Invoice Status Codes
|
|
66
|
+
# @return [Status3]
|
|
67
|
+
attr_accessor :status
|
|
68
|
+
|
|
69
|
+
# Boolean to set whether the invoice in the Xero app should be marked as
|
|
70
|
+
# “sent”. This can be set only on invoices that have been approved
|
|
71
|
+
# @return [TrueClass | FalseClass]
|
|
72
|
+
attr_accessor :sent_to_contact
|
|
73
|
+
|
|
74
|
+
# Shown on sales invoices (Accounts Receivable) when this has been set
|
|
75
|
+
# @return [String]
|
|
76
|
+
attr_accessor :expected_payment_date
|
|
77
|
+
|
|
78
|
+
# Shown on bills (Accounts Payable) when this has been set
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :planned_payment_date
|
|
81
|
+
|
|
82
|
+
# CIS deduction for UK contractors
|
|
83
|
+
# @return [Float]
|
|
84
|
+
attr_accessor :cis_deduction
|
|
85
|
+
|
|
86
|
+
# CIS Deduction rate for the organisation
|
|
87
|
+
# @return [Float]
|
|
88
|
+
attr_accessor :cis_rate
|
|
89
|
+
|
|
90
|
+
# Total of invoice excluding taxes
|
|
91
|
+
# @return [Float]
|
|
92
|
+
attr_accessor :sub_total
|
|
93
|
+
|
|
94
|
+
# Total tax on invoice
|
|
95
|
+
# @return [Float]
|
|
96
|
+
attr_accessor :total_tax
|
|
97
|
+
|
|
98
|
+
# Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be
|
|
99
|
+
# ignored if it doesn’t equal the sum of the LineAmounts
|
|
100
|
+
# @return [Float]
|
|
101
|
+
attr_accessor :total
|
|
102
|
+
|
|
103
|
+
# Total of discounts applied on the invoice line items
|
|
104
|
+
# @return [Float]
|
|
105
|
+
attr_accessor :total_discount
|
|
106
|
+
|
|
107
|
+
# Xero generated unique identifier for invoice
|
|
108
|
+
# @return [UUID | String]
|
|
109
|
+
attr_accessor :invoice_id
|
|
110
|
+
|
|
111
|
+
# Xero generated unique identifier for repeating invoices
|
|
112
|
+
# @return [UUID | String]
|
|
113
|
+
attr_accessor :repeating_invoice_id
|
|
114
|
+
|
|
115
|
+
# boolean to indicate if an invoice has an attachment
|
|
116
|
+
# @return [TrueClass | FalseClass]
|
|
117
|
+
attr_accessor :has_attachments
|
|
118
|
+
|
|
119
|
+
# boolean to indicate if an invoice has a discount
|
|
120
|
+
# @return [TrueClass | FalseClass]
|
|
121
|
+
attr_accessor :is_discounted
|
|
122
|
+
|
|
123
|
+
# See Payments
|
|
124
|
+
# @return [Array[Payment]]
|
|
125
|
+
attr_accessor :payments
|
|
126
|
+
|
|
127
|
+
# See Prepayments
|
|
128
|
+
# @return [Array[Prepayment]]
|
|
129
|
+
attr_accessor :prepayments
|
|
130
|
+
|
|
131
|
+
# See Overpayments
|
|
132
|
+
# @return [Array[Overpayment]]
|
|
133
|
+
attr_accessor :overpayments
|
|
134
|
+
|
|
135
|
+
# Amount remaining to be paid on invoice
|
|
136
|
+
# @return [Float]
|
|
137
|
+
attr_accessor :amount_due
|
|
138
|
+
|
|
139
|
+
# Sum of payments received for invoice
|
|
140
|
+
# @return [Float]
|
|
141
|
+
attr_accessor :amount_paid
|
|
142
|
+
|
|
143
|
+
# The date the invoice was fully paid. Only returned on fully paid invoices
|
|
144
|
+
# @return [String]
|
|
145
|
+
attr_accessor :fully_paid_on_date
|
|
146
|
+
|
|
147
|
+
# Sum of all credit notes, over-payments and pre-payments applied to invoice
|
|
148
|
+
# @return [Float]
|
|
149
|
+
attr_accessor :amount_credited
|
|
150
|
+
|
|
151
|
+
# Last modified date UTC format
|
|
152
|
+
# @return [String]
|
|
153
|
+
attr_accessor :updated_date_utc
|
|
154
|
+
|
|
155
|
+
# Details of credit notes that have been applied to an invoice
|
|
156
|
+
# @return [Array[CreditNote]]
|
|
157
|
+
attr_accessor :credit_notes
|
|
158
|
+
|
|
159
|
+
# Displays array of attachments from the API
|
|
160
|
+
# @return [Array[Attachment]]
|
|
161
|
+
attr_accessor :attachments
|
|
162
|
+
|
|
163
|
+
# A boolean to indicate if a invoice has an validation errors
|
|
164
|
+
# @return [TrueClass | FalseClass]
|
|
165
|
+
attr_accessor :has_errors
|
|
166
|
+
|
|
167
|
+
# A string to indicate if a invoice status
|
|
168
|
+
# @return [String]
|
|
169
|
+
attr_accessor :status_attribute_string
|
|
170
|
+
|
|
171
|
+
# Displays array of validation error messages from the API
|
|
172
|
+
# @return [Array[ValidationError]]
|
|
173
|
+
attr_accessor :validation_errors
|
|
174
|
+
|
|
175
|
+
# Displays array of warning messages from the API
|
|
176
|
+
# @return [Array[ValidationError]]
|
|
177
|
+
attr_accessor :warnings
|
|
178
|
+
|
|
179
|
+
# An array of addresses used to auto calculate sales tax
|
|
180
|
+
# @return [Array[InvoiceAddress]]
|
|
181
|
+
attr_accessor :invoice_addresses
|
|
182
|
+
|
|
183
|
+
# A mapping from model property names to API property names.
|
|
184
|
+
def self.names
|
|
185
|
+
@_hash = {} if @_hash.nil?
|
|
186
|
+
@_hash['type'] = 'Type'
|
|
187
|
+
@_hash['contact'] = 'Contact'
|
|
188
|
+
@_hash['line_items'] = 'LineItems'
|
|
189
|
+
@_hash['date'] = 'Date'
|
|
190
|
+
@_hash['due_date'] = 'DueDate'
|
|
191
|
+
@_hash['line_amount_types'] = 'LineAmountTypes'
|
|
192
|
+
@_hash['invoice_number'] = 'InvoiceNumber'
|
|
193
|
+
@_hash['reference'] = 'Reference'
|
|
194
|
+
@_hash['branding_theme_id'] = 'BrandingThemeID'
|
|
195
|
+
@_hash['url'] = 'Url'
|
|
196
|
+
@_hash['currency_code'] = 'CurrencyCode'
|
|
197
|
+
@_hash['currency_rate'] = 'CurrencyRate'
|
|
198
|
+
@_hash['status'] = 'Status'
|
|
199
|
+
@_hash['sent_to_contact'] = 'SentToContact'
|
|
200
|
+
@_hash['expected_payment_date'] = 'ExpectedPaymentDate'
|
|
201
|
+
@_hash['planned_payment_date'] = 'PlannedPaymentDate'
|
|
202
|
+
@_hash['cis_deduction'] = 'CISDeduction'
|
|
203
|
+
@_hash['cis_rate'] = 'CISRate'
|
|
204
|
+
@_hash['sub_total'] = 'SubTotal'
|
|
205
|
+
@_hash['total_tax'] = 'TotalTax'
|
|
206
|
+
@_hash['total'] = 'Total'
|
|
207
|
+
@_hash['total_discount'] = 'TotalDiscount'
|
|
208
|
+
@_hash['invoice_id'] = 'InvoiceID'
|
|
209
|
+
@_hash['repeating_invoice_id'] = 'RepeatingInvoiceID'
|
|
210
|
+
@_hash['has_attachments'] = 'HasAttachments'
|
|
211
|
+
@_hash['is_discounted'] = 'IsDiscounted'
|
|
212
|
+
@_hash['payments'] = 'Payments'
|
|
213
|
+
@_hash['prepayments'] = 'Prepayments'
|
|
214
|
+
@_hash['overpayments'] = 'Overpayments'
|
|
215
|
+
@_hash['amount_due'] = 'AmountDue'
|
|
216
|
+
@_hash['amount_paid'] = 'AmountPaid'
|
|
217
|
+
@_hash['fully_paid_on_date'] = 'FullyPaidOnDate'
|
|
218
|
+
@_hash['amount_credited'] = 'AmountCredited'
|
|
219
|
+
@_hash['updated_date_utc'] = 'UpdatedDateUTC'
|
|
220
|
+
@_hash['credit_notes'] = 'CreditNotes'
|
|
221
|
+
@_hash['attachments'] = 'Attachments'
|
|
222
|
+
@_hash['has_errors'] = 'HasErrors'
|
|
223
|
+
@_hash['status_attribute_string'] = 'StatusAttributeString'
|
|
224
|
+
@_hash['validation_errors'] = 'ValidationErrors'
|
|
225
|
+
@_hash['warnings'] = 'Warnings'
|
|
226
|
+
@_hash['invoice_addresses'] = 'InvoiceAddresses'
|
|
227
|
+
@_hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# An array for optional fields
|
|
231
|
+
def self.optionals
|
|
232
|
+
%w[
|
|
233
|
+
type
|
|
234
|
+
contact
|
|
235
|
+
line_items
|
|
236
|
+
date
|
|
237
|
+
due_date
|
|
238
|
+
line_amount_types
|
|
239
|
+
invoice_number
|
|
240
|
+
reference
|
|
241
|
+
branding_theme_id
|
|
242
|
+
url
|
|
243
|
+
currency_code
|
|
244
|
+
currency_rate
|
|
245
|
+
status
|
|
246
|
+
sent_to_contact
|
|
247
|
+
expected_payment_date
|
|
248
|
+
planned_payment_date
|
|
249
|
+
cis_deduction
|
|
250
|
+
cis_rate
|
|
251
|
+
sub_total
|
|
252
|
+
total_tax
|
|
253
|
+
total
|
|
254
|
+
total_discount
|
|
255
|
+
invoice_id
|
|
256
|
+
repeating_invoice_id
|
|
257
|
+
has_attachments
|
|
258
|
+
is_discounted
|
|
259
|
+
payments
|
|
260
|
+
prepayments
|
|
261
|
+
overpayments
|
|
262
|
+
amount_due
|
|
263
|
+
amount_paid
|
|
264
|
+
fully_paid_on_date
|
|
265
|
+
amount_credited
|
|
266
|
+
updated_date_utc
|
|
267
|
+
credit_notes
|
|
268
|
+
attachments
|
|
269
|
+
has_errors
|
|
270
|
+
status_attribute_string
|
|
271
|
+
validation_errors
|
|
272
|
+
warnings
|
|
273
|
+
invoice_addresses
|
|
274
|
+
]
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# An array for nullable fields
|
|
278
|
+
def self.nullables
|
|
279
|
+
[]
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
def initialize(type: SKIP, contact: SKIP, line_items: SKIP, date: SKIP,
|
|
283
|
+
due_date: SKIP, line_amount_types: SKIP,
|
|
284
|
+
invoice_number: SKIP, reference: SKIP,
|
|
285
|
+
branding_theme_id: SKIP, url: SKIP, currency_code: SKIP,
|
|
286
|
+
currency_rate: SKIP, status: SKIP, sent_to_contact: SKIP,
|
|
287
|
+
expected_payment_date: SKIP, planned_payment_date: SKIP,
|
|
288
|
+
cis_deduction: SKIP, cis_rate: SKIP, sub_total: SKIP,
|
|
289
|
+
total_tax: SKIP, total: SKIP, total_discount: SKIP,
|
|
290
|
+
invoice_id: SKIP, repeating_invoice_id: SKIP,
|
|
291
|
+
has_attachments: false, is_discounted: SKIP, payments: SKIP,
|
|
292
|
+
prepayments: SKIP, overpayments: SKIP, amount_due: SKIP,
|
|
293
|
+
amount_paid: SKIP, fully_paid_on_date: SKIP,
|
|
294
|
+
amount_credited: SKIP, updated_date_utc: SKIP,
|
|
295
|
+
credit_notes: SKIP, attachments: SKIP, has_errors: false,
|
|
296
|
+
status_attribute_string: SKIP, validation_errors: SKIP,
|
|
297
|
+
warnings: SKIP, invoice_addresses: SKIP,
|
|
298
|
+
additional_properties: nil)
|
|
299
|
+
# Add additional model properties to the instance
|
|
300
|
+
additional_properties = {} if additional_properties.nil?
|
|
301
|
+
|
|
302
|
+
@type = type unless type == SKIP
|
|
303
|
+
@contact = contact unless contact == SKIP
|
|
304
|
+
@line_items = line_items unless line_items == SKIP
|
|
305
|
+
@date = date unless date == SKIP
|
|
306
|
+
@due_date = due_date unless due_date == SKIP
|
|
307
|
+
@line_amount_types = line_amount_types unless line_amount_types == SKIP
|
|
308
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
309
|
+
@reference = reference unless reference == SKIP
|
|
310
|
+
@branding_theme_id = branding_theme_id unless branding_theme_id == SKIP
|
|
311
|
+
@url = url unless url == SKIP
|
|
312
|
+
@currency_code = currency_code unless currency_code == SKIP
|
|
313
|
+
@currency_rate = currency_rate unless currency_rate == SKIP
|
|
314
|
+
@status = status unless status == SKIP
|
|
315
|
+
@sent_to_contact = sent_to_contact unless sent_to_contact == SKIP
|
|
316
|
+
@expected_payment_date = expected_payment_date unless expected_payment_date == SKIP
|
|
317
|
+
@planned_payment_date = planned_payment_date unless planned_payment_date == SKIP
|
|
318
|
+
@cis_deduction = cis_deduction unless cis_deduction == SKIP
|
|
319
|
+
@cis_rate = cis_rate unless cis_rate == SKIP
|
|
320
|
+
@sub_total = sub_total unless sub_total == SKIP
|
|
321
|
+
@total_tax = total_tax unless total_tax == SKIP
|
|
322
|
+
@total = total unless total == SKIP
|
|
323
|
+
@total_discount = total_discount unless total_discount == SKIP
|
|
324
|
+
@invoice_id = invoice_id unless invoice_id == SKIP
|
|
325
|
+
@repeating_invoice_id = repeating_invoice_id unless repeating_invoice_id == SKIP
|
|
326
|
+
@has_attachments = has_attachments unless has_attachments == SKIP
|
|
327
|
+
@is_discounted = is_discounted unless is_discounted == SKIP
|
|
328
|
+
@payments = payments unless payments == SKIP
|
|
329
|
+
@prepayments = prepayments unless prepayments == SKIP
|
|
330
|
+
@overpayments = overpayments unless overpayments == SKIP
|
|
331
|
+
@amount_due = amount_due unless amount_due == SKIP
|
|
332
|
+
@amount_paid = amount_paid unless amount_paid == SKIP
|
|
333
|
+
@fully_paid_on_date = fully_paid_on_date unless fully_paid_on_date == SKIP
|
|
334
|
+
@amount_credited = amount_credited unless amount_credited == SKIP
|
|
335
|
+
@updated_date_utc = updated_date_utc unless updated_date_utc == SKIP
|
|
336
|
+
@credit_notes = credit_notes unless credit_notes == SKIP
|
|
337
|
+
@attachments = attachments unless attachments == SKIP
|
|
338
|
+
@has_errors = has_errors unless has_errors == SKIP
|
|
339
|
+
@status_attribute_string = status_attribute_string unless status_attribute_string == SKIP
|
|
340
|
+
@validation_errors = validation_errors unless validation_errors == SKIP
|
|
341
|
+
@warnings = warnings unless warnings == SKIP
|
|
342
|
+
@invoice_addresses = invoice_addresses unless invoice_addresses == SKIP
|
|
343
|
+
@additional_properties = additional_properties
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Creates an instance of the object from a hash.
|
|
347
|
+
def self.from_hash(hash)
|
|
348
|
+
return nil unless hash
|
|
349
|
+
|
|
350
|
+
# Extract variables from the hash.
|
|
351
|
+
type = hash.key?('Type') ? hash['Type'] : SKIP
|
|
352
|
+
contact = Contact.from_hash(hash['Contact']) if hash['Contact']
|
|
353
|
+
# Parameter is an array, so we need to iterate through it
|
|
354
|
+
line_items = nil
|
|
355
|
+
unless hash['LineItems'].nil?
|
|
356
|
+
line_items = []
|
|
357
|
+
hash['LineItems'].each do |structure|
|
|
358
|
+
line_items << (LineItem.from_hash(structure) if structure)
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
line_items = SKIP unless hash.key?('LineItems')
|
|
363
|
+
date = hash.key?('Date') ? hash['Date'] : SKIP
|
|
364
|
+
due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP
|
|
365
|
+
line_amount_types =
|
|
366
|
+
hash.key?('LineAmountTypes') ? hash['LineAmountTypes'] : SKIP
|
|
367
|
+
invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
|
|
368
|
+
reference = hash.key?('Reference') ? hash['Reference'] : SKIP
|
|
369
|
+
branding_theme_id =
|
|
370
|
+
hash.key?('BrandingThemeID') ? hash['BrandingThemeID'] : SKIP
|
|
371
|
+
url = hash.key?('Url') ? hash['Url'] : SKIP
|
|
372
|
+
currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
|
|
373
|
+
currency_rate = hash.key?('CurrencyRate') ? hash['CurrencyRate'] : SKIP
|
|
374
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
375
|
+
sent_to_contact =
|
|
376
|
+
hash.key?('SentToContact') ? hash['SentToContact'] : SKIP
|
|
377
|
+
expected_payment_date =
|
|
378
|
+
hash.key?('ExpectedPaymentDate') ? hash['ExpectedPaymentDate'] : SKIP
|
|
379
|
+
planned_payment_date =
|
|
380
|
+
hash.key?('PlannedPaymentDate') ? hash['PlannedPaymentDate'] : SKIP
|
|
381
|
+
cis_deduction = hash.key?('CISDeduction') ? hash['CISDeduction'] : SKIP
|
|
382
|
+
cis_rate = hash.key?('CISRate') ? hash['CISRate'] : SKIP
|
|
383
|
+
sub_total = hash.key?('SubTotal') ? hash['SubTotal'] : SKIP
|
|
384
|
+
total_tax = hash.key?('TotalTax') ? hash['TotalTax'] : SKIP
|
|
385
|
+
total = hash.key?('Total') ? hash['Total'] : SKIP
|
|
386
|
+
total_discount = hash.key?('TotalDiscount') ? hash['TotalDiscount'] : SKIP
|
|
387
|
+
invoice_id = hash.key?('InvoiceID') ? hash['InvoiceID'] : SKIP
|
|
388
|
+
repeating_invoice_id =
|
|
389
|
+
hash.key?('RepeatingInvoiceID') ? hash['RepeatingInvoiceID'] : SKIP
|
|
390
|
+
has_attachments = hash['HasAttachments'] ||= false
|
|
391
|
+
is_discounted = hash.key?('IsDiscounted') ? hash['IsDiscounted'] : SKIP
|
|
392
|
+
# Parameter is an array, so we need to iterate through it
|
|
393
|
+
payments = nil
|
|
394
|
+
unless hash['Payments'].nil?
|
|
395
|
+
payments = []
|
|
396
|
+
hash['Payments'].each do |structure|
|
|
397
|
+
payments << (Payment.from_hash(structure) if structure)
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
payments = SKIP unless hash.key?('Payments')
|
|
402
|
+
# Parameter is an array, so we need to iterate through it
|
|
403
|
+
prepayments = nil
|
|
404
|
+
unless hash['Prepayments'].nil?
|
|
405
|
+
prepayments = []
|
|
406
|
+
hash['Prepayments'].each do |structure|
|
|
407
|
+
prepayments << (Prepayment.from_hash(structure) if structure)
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
prepayments = SKIP unless hash.key?('Prepayments')
|
|
412
|
+
# Parameter is an array, so we need to iterate through it
|
|
413
|
+
overpayments = nil
|
|
414
|
+
unless hash['Overpayments'].nil?
|
|
415
|
+
overpayments = []
|
|
416
|
+
hash['Overpayments'].each do |structure|
|
|
417
|
+
overpayments << (Overpayment.from_hash(structure) if structure)
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
overpayments = SKIP unless hash.key?('Overpayments')
|
|
422
|
+
amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP
|
|
423
|
+
amount_paid = hash.key?('AmountPaid') ? hash['AmountPaid'] : SKIP
|
|
424
|
+
fully_paid_on_date =
|
|
425
|
+
hash.key?('FullyPaidOnDate') ? hash['FullyPaidOnDate'] : SKIP
|
|
426
|
+
amount_credited =
|
|
427
|
+
hash.key?('AmountCredited') ? hash['AmountCredited'] : SKIP
|
|
428
|
+
updated_date_utc =
|
|
429
|
+
hash.key?('UpdatedDateUTC') ? hash['UpdatedDateUTC'] : SKIP
|
|
430
|
+
# Parameter is an array, so we need to iterate through it
|
|
431
|
+
credit_notes = nil
|
|
432
|
+
unless hash['CreditNotes'].nil?
|
|
433
|
+
credit_notes = []
|
|
434
|
+
hash['CreditNotes'].each do |structure|
|
|
435
|
+
credit_notes << (CreditNote.from_hash(structure) if structure)
|
|
436
|
+
end
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
credit_notes = SKIP unless hash.key?('CreditNotes')
|
|
440
|
+
# Parameter is an array, so we need to iterate through it
|
|
441
|
+
attachments = nil
|
|
442
|
+
unless hash['Attachments'].nil?
|
|
443
|
+
attachments = []
|
|
444
|
+
hash['Attachments'].each do |structure|
|
|
445
|
+
attachments << (Attachment.from_hash(structure) if structure)
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
attachments = SKIP unless hash.key?('Attachments')
|
|
450
|
+
has_errors = hash['HasErrors'] ||= false
|
|
451
|
+
status_attribute_string =
|
|
452
|
+
hash.key?('StatusAttributeString') ? hash['StatusAttributeString'] : SKIP
|
|
453
|
+
# Parameter is an array, so we need to iterate through it
|
|
454
|
+
validation_errors = nil
|
|
455
|
+
unless hash['ValidationErrors'].nil?
|
|
456
|
+
validation_errors = []
|
|
457
|
+
hash['ValidationErrors'].each do |structure|
|
|
458
|
+
validation_errors << (ValidationError.from_hash(structure) if structure)
|
|
459
|
+
end
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
validation_errors = SKIP unless hash.key?('ValidationErrors')
|
|
463
|
+
# Parameter is an array, so we need to iterate through it
|
|
464
|
+
warnings = nil
|
|
465
|
+
unless hash['Warnings'].nil?
|
|
466
|
+
warnings = []
|
|
467
|
+
hash['Warnings'].each do |structure|
|
|
468
|
+
warnings << (ValidationError.from_hash(structure) if structure)
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
warnings = SKIP unless hash.key?('Warnings')
|
|
473
|
+
# Parameter is an array, so we need to iterate through it
|
|
474
|
+
invoice_addresses = nil
|
|
475
|
+
unless hash['InvoiceAddresses'].nil?
|
|
476
|
+
invoice_addresses = []
|
|
477
|
+
hash['InvoiceAddresses'].each do |structure|
|
|
478
|
+
invoice_addresses << (InvoiceAddress.from_hash(structure) if structure)
|
|
479
|
+
end
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
invoice_addresses = SKIP unless hash.key?('InvoiceAddresses')
|
|
483
|
+
|
|
484
|
+
# Create a new hash for additional properties, removing known properties.
|
|
485
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
486
|
+
|
|
487
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
488
|
+
new_hash, proc { |value| value }
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
# Create object from extracted values.
|
|
492
|
+
Invoice.new(type: type,
|
|
493
|
+
contact: contact,
|
|
494
|
+
line_items: line_items,
|
|
495
|
+
date: date,
|
|
496
|
+
due_date: due_date,
|
|
497
|
+
line_amount_types: line_amount_types,
|
|
498
|
+
invoice_number: invoice_number,
|
|
499
|
+
reference: reference,
|
|
500
|
+
branding_theme_id: branding_theme_id,
|
|
501
|
+
url: url,
|
|
502
|
+
currency_code: currency_code,
|
|
503
|
+
currency_rate: currency_rate,
|
|
504
|
+
status: status,
|
|
505
|
+
sent_to_contact: sent_to_contact,
|
|
506
|
+
expected_payment_date: expected_payment_date,
|
|
507
|
+
planned_payment_date: planned_payment_date,
|
|
508
|
+
cis_deduction: cis_deduction,
|
|
509
|
+
cis_rate: cis_rate,
|
|
510
|
+
sub_total: sub_total,
|
|
511
|
+
total_tax: total_tax,
|
|
512
|
+
total: total,
|
|
513
|
+
total_discount: total_discount,
|
|
514
|
+
invoice_id: invoice_id,
|
|
515
|
+
repeating_invoice_id: repeating_invoice_id,
|
|
516
|
+
has_attachments: has_attachments,
|
|
517
|
+
is_discounted: is_discounted,
|
|
518
|
+
payments: payments,
|
|
519
|
+
prepayments: prepayments,
|
|
520
|
+
overpayments: overpayments,
|
|
521
|
+
amount_due: amount_due,
|
|
522
|
+
amount_paid: amount_paid,
|
|
523
|
+
fully_paid_on_date: fully_paid_on_date,
|
|
524
|
+
amount_credited: amount_credited,
|
|
525
|
+
updated_date_utc: updated_date_utc,
|
|
526
|
+
credit_notes: credit_notes,
|
|
527
|
+
attachments: attachments,
|
|
528
|
+
has_errors: has_errors,
|
|
529
|
+
status_attribute_string: status_attribute_string,
|
|
530
|
+
validation_errors: validation_errors,
|
|
531
|
+
warnings: warnings,
|
|
532
|
+
invoice_addresses: invoice_addresses,
|
|
533
|
+
additional_properties: additional_properties)
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# Provides a human-readable string representation of the object.
|
|
537
|
+
def to_s
|
|
538
|
+
class_name = self.class.name.split('::').last
|
|
539
|
+
"<#{class_name} type: #{@type}, contact: #{@contact}, line_items: #{@line_items}, date:"\
|
|
540
|
+
" #{@date}, due_date: #{@due_date}, line_amount_types: #{@line_amount_types},"\
|
|
541
|
+
" invoice_number: #{@invoice_number}, reference: #{@reference}, branding_theme_id:"\
|
|
542
|
+
" #{@branding_theme_id}, url: #{@url}, currency_code: #{@currency_code}, currency_rate:"\
|
|
543
|
+
" #{@currency_rate}, status: #{@status}, sent_to_contact: #{@sent_to_contact},"\
|
|
544
|
+
" expected_payment_date: #{@expected_payment_date}, planned_payment_date:"\
|
|
545
|
+
" #{@planned_payment_date}, cis_deduction: #{@cis_deduction}, cis_rate: #{@cis_rate},"\
|
|
546
|
+
" sub_total: #{@sub_total}, total_tax: #{@total_tax}, total: #{@total}, total_discount:"\
|
|
547
|
+
" #{@total_discount}, invoice_id: #{@invoice_id}, repeating_invoice_id:"\
|
|
548
|
+
" #{@repeating_invoice_id}, has_attachments: #{@has_attachments}, is_discounted:"\
|
|
549
|
+
" #{@is_discounted}, payments: #{@payments}, prepayments: #{@prepayments}, overpayments:"\
|
|
550
|
+
" #{@overpayments}, amount_due: #{@amount_due}, amount_paid: #{@amount_paid},"\
|
|
551
|
+
" fully_paid_on_date: #{@fully_paid_on_date}, amount_credited: #{@amount_credited},"\
|
|
552
|
+
" updated_date_utc: #{@updated_date_utc}, credit_notes: #{@credit_notes}, attachments:"\
|
|
553
|
+
" #{@attachments}, has_errors: #{@has_errors}, status_attribute_string:"\
|
|
554
|
+
" #{@status_attribute_string}, validation_errors: #{@validation_errors}, warnings:"\
|
|
555
|
+
" #{@warnings}, invoice_addresses: #{@invoice_addresses}, additional_properties:"\
|
|
556
|
+
" #{@additional_properties}>"
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
560
|
+
def inspect
|
|
561
|
+
class_name = self.class.name.split('::').last
|
|
562
|
+
"<#{class_name} type: #{@type.inspect}, contact: #{@contact.inspect}, line_items:"\
|
|
563
|
+
" #{@line_items.inspect}, date: #{@date.inspect}, due_date: #{@due_date.inspect},"\
|
|
564
|
+
" line_amount_types: #{@line_amount_types.inspect}, invoice_number:"\
|
|
565
|
+
" #{@invoice_number.inspect}, reference: #{@reference.inspect}, branding_theme_id:"\
|
|
566
|
+
" #{@branding_theme_id.inspect}, url: #{@url.inspect}, currency_code:"\
|
|
567
|
+
" #{@currency_code.inspect}, currency_rate: #{@currency_rate.inspect}, status:"\
|
|
568
|
+
" #{@status.inspect}, sent_to_contact: #{@sent_to_contact.inspect}, expected_payment_date:"\
|
|
569
|
+
" #{@expected_payment_date.inspect}, planned_payment_date: #{@planned_payment_date.inspect},"\
|
|
570
|
+
" cis_deduction: #{@cis_deduction.inspect}, cis_rate: #{@cis_rate.inspect}, sub_total:"\
|
|
571
|
+
" #{@sub_total.inspect}, total_tax: #{@total_tax.inspect}, total: #{@total.inspect},"\
|
|
572
|
+
" total_discount: #{@total_discount.inspect}, invoice_id: #{@invoice_id.inspect},"\
|
|
573
|
+
" repeating_invoice_id: #{@repeating_invoice_id.inspect}, has_attachments:"\
|
|
574
|
+
" #{@has_attachments.inspect}, is_discounted: #{@is_discounted.inspect}, payments:"\
|
|
575
|
+
" #{@payments.inspect}, prepayments: #{@prepayments.inspect}, overpayments:"\
|
|
576
|
+
" #{@overpayments.inspect}, amount_due: #{@amount_due.inspect}, amount_paid:"\
|
|
577
|
+
" #{@amount_paid.inspect}, fully_paid_on_date: #{@fully_paid_on_date.inspect},"\
|
|
578
|
+
" amount_credited: #{@amount_credited.inspect}, updated_date_utc:"\
|
|
579
|
+
" #{@updated_date_utc.inspect}, credit_notes: #{@credit_notes.inspect}, attachments:"\
|
|
580
|
+
" #{@attachments.inspect}, has_errors: #{@has_errors.inspect}, status_attribute_string:"\
|
|
581
|
+
" #{@status_attribute_string.inspect}, validation_errors: #{@validation_errors.inspect},"\
|
|
582
|
+
" warnings: #{@warnings.inspect}, invoice_addresses: #{@invoice_addresses.inspect},"\
|
|
583
|
+
" additional_properties: #{@additional_properties}>"
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
end
|