Xero.Types (Xero v1.0.0)

Copy Markdown View Source

Xero API type constants, status codes, and helper functions.

Covers all enumerations referenced in the Xero API documentation for all 13 APIs (Accounting, Assets, Bank Feeds, Files, Finance, Projects, Payroll AU/NZ/UK, Practice Manager, App Store, eInvoicing).

Usage

Xero.Types.invoice_statuses()
#=> ["DRAFT", "SUBMITTED", "DELETED", "AUTHORISED", "PAID", "VOIDED"]

Xero.Types.valid_invoice_status?("AUTHORISED")
#=> true

Xero.Types.tax_types_for_region(:au)
#=> ["OUTPUT", "INPUT", ...]

Summary

Functions

Returns tax types for the given region atom (:au | :nz | :uk | :us).

Returns true if the string is a valid Xero account type.

Returns true if the string is a valid Xero asset status.

Returns true if the string is a valid Xero contact status.

Returns true if the string is a valid depreciation method.

Returns true if the string is a valid Xero invoice status.

Returns true if the string is a valid project status.

Returns true if the string is a valid Xero purchase order status.

Returns true if the string is a valid Xero quote status.

Functions

account_classes()

account_statuses()

account_types()

address_types()

asset_statuses()

averaging_methods()

bank_account_types()

bank_transaction_statuses()

bank_transaction_types()

contact_statuses()

credit_debit_indicators()

credit_note_statuses()

credit_note_types()

depreciation_calc_methods()

depreciation_methods()

disposal_types()

einvoicing_directions()

einvoicing_document_statuses()

employment_types()

feed_account_types()

invoice_statuses()

invoice_types()

journal_source_types()

line_amount_types()

linked_transaction_source_types()

linked_transaction_statuses()

linked_transaction_types()

manual_journal_statuses()

organisation_class_types()

organisation_types()

organisation_version_types()

overpayment_types()

payment_statuses()

payment_term_types()

payment_terms()

payment_types()

payrun_statuses()

phone_types()

pm_job_priorities()

pm_job_statuses()

prepayment_types()

project_statuses()

purchase_order_statuses()

quote_statuses()

subscription_statuses()

system_accounts()

task_charge_types()

tax_types_au()

tax_types_for_region(arg1)

@spec tax_types_for_region(atom()) :: [String.t()]

Returns tax types for the given region atom (:au | :nz | :uk | :us).

tax_types_nz()

tax_types_uk()

tax_types_us()

timesheet_statuses()

valid_account_type?(t)

@spec valid_account_type?(String.t()) :: boolean()

Returns true if the string is a valid Xero account type.

valid_asset_status?(s)

@spec valid_asset_status?(String.t()) :: boolean()

Returns true if the string is a valid Xero asset status.

valid_contact_status?(s)

@spec valid_contact_status?(String.t()) :: boolean()

Returns true if the string is a valid Xero contact status.

valid_depreciation_method?(m)

@spec valid_depreciation_method?(String.t()) :: boolean()

Returns true if the string is a valid depreciation method.

valid_invoice_status?(s)

@spec valid_invoice_status?(String.t()) :: boolean()

Returns true if the string is a valid Xero invoice status.

valid_project_status?(s)

@spec valid_project_status?(String.t()) :: boolean()

Returns true if the string is a valid project status.

valid_purchase_order_status?(s)

@spec valid_purchase_order_status?(String.t()) :: boolean()

Returns true if the string is a valid Xero purchase order status.

valid_quote_status?(s)

@spec valid_quote_status?(String.t()) :: boolean()

Returns true if the string is a valid Xero quote status.