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,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
|
+
# TrackingCategories Model.
|
|
8
|
+
class TrackingCategories < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[TrackingCategory]]
|
|
14
|
+
attr_accessor :tracking_categories
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['tracking_categories'] = 'TrackingCategories'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
tracking_categories
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(tracking_categories: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@tracking_categories = tracking_categories unless tracking_categories == 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
|
+
tracking_categories = nil
|
|
50
|
+
unless hash['TrackingCategories'].nil?
|
|
51
|
+
tracking_categories = []
|
|
52
|
+
hash['TrackingCategories'].each do |structure|
|
|
53
|
+
tracking_categories << (TrackingCategory.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
tracking_categories = SKIP unless hash.key?('TrackingCategories')
|
|
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
|
+
TrackingCategories.new(tracking_categories: tracking_categories,
|
|
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} tracking_categories: #{@tracking_categories}, 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} tracking_categories: #{@tracking_categories.inspect},"\
|
|
82
|
+
" additional_properties: #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
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
|
+
# TrackingCategory Model.
|
|
8
|
+
class TrackingCategory < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The Xero identifier for a tracking category e.g.
|
|
13
|
+
# 297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :tracking_category_id
|
|
16
|
+
|
|
17
|
+
# The Xero identifier for a tracking option e.g.
|
|
18
|
+
# dc54c220-0140-495a-b925-3246adc0075f
|
|
19
|
+
# @return [UUID | String]
|
|
20
|
+
attr_accessor :tracking_option_id
|
|
21
|
+
|
|
22
|
+
# The name of the tracking category e.g. Department, Region (max length =
|
|
23
|
+
# 100)
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The option name of the tracking option e.g. East, West (max length = 100)
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :option
|
|
30
|
+
|
|
31
|
+
# The status of a tracking category
|
|
32
|
+
# @return [Status9]
|
|
33
|
+
attr_accessor :status
|
|
34
|
+
|
|
35
|
+
# See Tracking Options
|
|
36
|
+
# @return [Array[TrackingOption]]
|
|
37
|
+
attr_accessor :options
|
|
38
|
+
|
|
39
|
+
# A mapping from model property names to API property names.
|
|
40
|
+
def self.names
|
|
41
|
+
@_hash = {} if @_hash.nil?
|
|
42
|
+
@_hash['tracking_category_id'] = 'TrackingCategoryID'
|
|
43
|
+
@_hash['tracking_option_id'] = 'TrackingOptionID'
|
|
44
|
+
@_hash['name'] = 'Name'
|
|
45
|
+
@_hash['option'] = 'Option'
|
|
46
|
+
@_hash['status'] = 'Status'
|
|
47
|
+
@_hash['options'] = 'Options'
|
|
48
|
+
@_hash
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# An array for optional fields
|
|
52
|
+
def self.optionals
|
|
53
|
+
%w[
|
|
54
|
+
tracking_category_id
|
|
55
|
+
tracking_option_id
|
|
56
|
+
name
|
|
57
|
+
option
|
|
58
|
+
status
|
|
59
|
+
options
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for nullable fields
|
|
64
|
+
def self.nullables
|
|
65
|
+
[]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def initialize(tracking_category_id: SKIP, tracking_option_id: SKIP,
|
|
69
|
+
name: SKIP, option: SKIP, status: SKIP, options: SKIP,
|
|
70
|
+
additional_properties: nil)
|
|
71
|
+
# Add additional model properties to the instance
|
|
72
|
+
additional_properties = {} if additional_properties.nil?
|
|
73
|
+
|
|
74
|
+
@tracking_category_id = tracking_category_id unless tracking_category_id == SKIP
|
|
75
|
+
@tracking_option_id = tracking_option_id unless tracking_option_id == SKIP
|
|
76
|
+
@name = name unless name == SKIP
|
|
77
|
+
@option = option unless option == SKIP
|
|
78
|
+
@status = status unless status == SKIP
|
|
79
|
+
@options = options unless options == SKIP
|
|
80
|
+
@additional_properties = additional_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Creates an instance of the object from a hash.
|
|
84
|
+
def self.from_hash(hash)
|
|
85
|
+
return nil unless hash
|
|
86
|
+
|
|
87
|
+
# Extract variables from the hash.
|
|
88
|
+
tracking_category_id =
|
|
89
|
+
hash.key?('TrackingCategoryID') ? hash['TrackingCategoryID'] : SKIP
|
|
90
|
+
tracking_option_id =
|
|
91
|
+
hash.key?('TrackingOptionID') ? hash['TrackingOptionID'] : SKIP
|
|
92
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
93
|
+
option = hash.key?('Option') ? hash['Option'] : SKIP
|
|
94
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
95
|
+
# Parameter is an array, so we need to iterate through it
|
|
96
|
+
options = nil
|
|
97
|
+
unless hash['Options'].nil?
|
|
98
|
+
options = []
|
|
99
|
+
hash['Options'].each do |structure|
|
|
100
|
+
options << (TrackingOption.from_hash(structure) if structure)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
options = SKIP unless hash.key?('Options')
|
|
105
|
+
|
|
106
|
+
# Create a new hash for additional properties, removing known properties.
|
|
107
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
108
|
+
|
|
109
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
110
|
+
new_hash, proc { |value| value }
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# Create object from extracted values.
|
|
114
|
+
TrackingCategory.new(tracking_category_id: tracking_category_id,
|
|
115
|
+
tracking_option_id: tracking_option_id,
|
|
116
|
+
name: name,
|
|
117
|
+
option: option,
|
|
118
|
+
status: status,
|
|
119
|
+
options: options,
|
|
120
|
+
additional_properties: additional_properties)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Provides a human-readable string representation of the object.
|
|
124
|
+
def to_s
|
|
125
|
+
class_name = self.class.name.split('::').last
|
|
126
|
+
"<#{class_name} tracking_category_id: #{@tracking_category_id}, tracking_option_id:"\
|
|
127
|
+
" #{@tracking_option_id}, name: #{@name}, option: #{@option}, status: #{@status}, options:"\
|
|
128
|
+
" #{@options}, additional_properties: #{@additional_properties}>"
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
132
|
+
def inspect
|
|
133
|
+
class_name = self.class.name.split('::').last
|
|
134
|
+
"<#{class_name} tracking_category_id: #{@tracking_category_id.inspect}, tracking_option_id:"\
|
|
135
|
+
" #{@tracking_option_id.inspect}, name: #{@name.inspect}, option: #{@option.inspect},"\
|
|
136
|
+
" status: #{@status.inspect}, options: #{@options.inspect}, additional_properties:"\
|
|
137
|
+
" #{@additional_properties}>"
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
# TrackingOption Model.
|
|
8
|
+
class TrackingOption < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The Xero identifier for a tracking option e.g.
|
|
13
|
+
# ae777a87-5ef3-4fa0-a4f0-d10e1f13073a
|
|
14
|
+
# @return [UUID | String]
|
|
15
|
+
attr_accessor :tracking_option_id
|
|
16
|
+
|
|
17
|
+
# The name of the tracking option e.g. Marketing, East (max length = 100)
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# The status of a tracking option
|
|
22
|
+
# @return [Status10]
|
|
23
|
+
attr_accessor :status
|
|
24
|
+
|
|
25
|
+
# Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
26
|
+
# @return [UUID | String]
|
|
27
|
+
attr_accessor :tracking_category_id
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['tracking_option_id'] = 'TrackingOptionID'
|
|
33
|
+
@_hash['name'] = 'Name'
|
|
34
|
+
@_hash['status'] = 'Status'
|
|
35
|
+
@_hash['tracking_category_id'] = 'TrackingCategoryID'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
tracking_option_id
|
|
43
|
+
name
|
|
44
|
+
status
|
|
45
|
+
tracking_category_id
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(tracking_option_id: SKIP, name: SKIP, status: SKIP,
|
|
55
|
+
tracking_category_id: SKIP, additional_properties: nil)
|
|
56
|
+
# Add additional model properties to the instance
|
|
57
|
+
additional_properties = {} if additional_properties.nil?
|
|
58
|
+
|
|
59
|
+
@tracking_option_id = tracking_option_id unless tracking_option_id == SKIP
|
|
60
|
+
@name = name unless name == SKIP
|
|
61
|
+
@status = status unless status == SKIP
|
|
62
|
+
@tracking_category_id = tracking_category_id unless tracking_category_id == 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
|
+
tracking_option_id =
|
|
72
|
+
hash.key?('TrackingOptionID') ? hash['TrackingOptionID'] : SKIP
|
|
73
|
+
name = hash.key?('Name') ? hash['Name'] : SKIP
|
|
74
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
75
|
+
tracking_category_id =
|
|
76
|
+
hash.key?('TrackingCategoryID') ? hash['TrackingCategoryID'] : SKIP
|
|
77
|
+
|
|
78
|
+
# Create a new hash for additional properties, removing known properties.
|
|
79
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
80
|
+
|
|
81
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
82
|
+
new_hash, proc { |value| value }
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Create object from extracted values.
|
|
86
|
+
TrackingOption.new(tracking_option_id: tracking_option_id,
|
|
87
|
+
name: name,
|
|
88
|
+
status: status,
|
|
89
|
+
tracking_category_id: tracking_category_id,
|
|
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} tracking_option_id: #{@tracking_option_id}, name: #{@name}, status:"\
|
|
97
|
+
" #{@status}, tracking_category_id: #{@tracking_category_id}, additional_properties:"\
|
|
98
|
+
" #{@additional_properties}>"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
102
|
+
def inspect
|
|
103
|
+
class_name = self.class.name.split('::').last
|
|
104
|
+
"<#{class_name} tracking_option_id: #{@tracking_option_id.inspect}, name: #{@name.inspect},"\
|
|
105
|
+
" status: #{@status.inspect}, tracking_category_id: #{@tracking_category_id.inspect},"\
|
|
106
|
+
" additional_properties: #{@additional_properties}>"
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# TrackingOptions Model.
|
|
8
|
+
class TrackingOptions < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[TrackingOption]]
|
|
14
|
+
attr_accessor :options
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['options'] = 'Options'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
options
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(options: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@options = options unless options == 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
|
+
options = nil
|
|
50
|
+
unless hash['Options'].nil?
|
|
51
|
+
options = []
|
|
52
|
+
hash['Options'].each do |structure|
|
|
53
|
+
options << (TrackingOption.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
options = SKIP unless hash.key?('Options')
|
|
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
|
+
TrackingOptions.new(options: options,
|
|
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} options: #{@options}, additional_properties: #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
78
|
+
def inspect
|
|
79
|
+
class_name = self.class.name.split('::').last
|
|
80
|
+
"<#{class_name} options: #{@options.inspect}, additional_properties:"\
|
|
81
|
+
" #{@additional_properties}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# See Bank Transaction Types
|
|
8
|
+
class Type
|
|
9
|
+
TYPE = [
|
|
10
|
+
# TODO: Write general description for RECEIVE
|
|
11
|
+
RECEIVE = 'RECEIVE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for RECEIVEOVERPAYMENT
|
|
14
|
+
RECEIVEOVERPAYMENT = 'RECEIVE-OVERPAYMENT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for RECEIVEPREPAYMENT
|
|
17
|
+
RECEIVEPREPAYMENT = 'RECEIVE-PREPAYMENT'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for SPEND
|
|
20
|
+
SPEND = 'SPEND'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for SPENDOVERPAYMENT
|
|
23
|
+
SPENDOVERPAYMENT = 'SPEND-OVERPAYMENT'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for SPENDPREPAYMENT
|
|
26
|
+
SPENDPREPAYMENT = 'SPEND-PREPAYMENT'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for RECEIVETRANSFER
|
|
29
|
+
RECEIVETRANSFER = 'RECEIVE-TRANSFER'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for SPENDTRANSFER
|
|
32
|
+
SPENDTRANSFER = 'SPEND-TRANSFER'.freeze
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.validate(value)
|
|
36
|
+
return false if value.nil?
|
|
37
|
+
|
|
38
|
+
TYPE.include?(value)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = RECEIVE)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'receive' then RECEIVE
|
|
48
|
+
when 'receiveoverpayment' then RECEIVEOVERPAYMENT
|
|
49
|
+
when 'receiveprepayment' then RECEIVEPREPAYMENT
|
|
50
|
+
when 'spend' then SPEND
|
|
51
|
+
when 'spendoverpayment' then SPENDOVERPAYMENT
|
|
52
|
+
when 'spendprepayment' then SPENDPREPAYMENT
|
|
53
|
+
when 'receivetransfer' then RECEIVETRANSFER
|
|
54
|
+
when 'spendtransfer' then SPENDTRANSFER
|
|
55
|
+
else
|
|
56
|
+
default_value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# Always INVOICE
|
|
8
|
+
class Type1
|
|
9
|
+
TYPE1 = [
|
|
10
|
+
# TODO: Write general description for INVOICE
|
|
11
|
+
INVOICE = 'INVOICE'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
TYPE1.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = INVOICE)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# See Invoice Types
|
|
8
|
+
class Type10
|
|
9
|
+
TYPE10 = [
|
|
10
|
+
# TODO: Write general description for ACCPAY
|
|
11
|
+
ACCPAY = 'ACCPAY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ACCREC
|
|
14
|
+
ACCREC = 'ACCREC'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE10.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ACCPAY)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'accpay' then ACCPAY
|
|
30
|
+
when 'accrec' then ACCREC
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
# Identifies the type of error.
|
|
8
|
+
class Type11
|
|
9
|
+
TYPE11 = [
|
|
10
|
+
# TODO: Write general description for INVALIDREQUEST
|
|
11
|
+
INVALIDREQUEST = 'invalid-request'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for INVALIDAPPLICATION
|
|
14
|
+
INVALIDAPPLICATION = 'invalid-application'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for INVALIDFEEDCONNECTION
|
|
17
|
+
INVALIDFEEDCONNECTION = 'invalid-feed-connection'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for DUPLICATESTATEMENT
|
|
20
|
+
DUPLICATESTATEMENT = 'duplicate-statement'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for INVALIDENDBALANCE
|
|
23
|
+
INVALIDENDBALANCE = 'invalid-end-balance'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for INVALIDSTARTANDENDDATE
|
|
26
|
+
INVALIDSTARTANDENDDATE = 'invalid-start-and-end-date'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for INVALIDSTARTDATE
|
|
29
|
+
INVALIDSTARTDATE = 'invalid-start-date'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for INTERNALERROR
|
|
32
|
+
INTERNALERROR = 'internal-error'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for
|
|
35
|
+
# FEEDALREADYCONNECTEDINCURRENTORGANISATION
|
|
36
|
+
FEEDALREADYCONNECTEDINCURRENTORGANISATION = 'feed-already-connected-in-current-organisation'.freeze,
|
|
37
|
+
|
|
38
|
+
# TODO: Write general description for INVALIDENDDATE
|
|
39
|
+
INVALIDENDDATE = 'invalid-end-date'.freeze,
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for STATEMENTNOTFOUND
|
|
42
|
+
STATEMENTNOTFOUND = 'statement-not-found'.freeze,
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for FEEDCONNECTEDINDIFFERENTORGANISATION
|
|
45
|
+
FEEDCONNECTEDINDIFFERENTORGANISATION = 'feed-connected-in-different-organisation'.freeze,
|
|
46
|
+
|
|
47
|
+
# TODO: Write general description for
|
|
48
|
+
# FEEDALREADYCONNECTEDINDIFFERENTORGANISATION
|
|
49
|
+
FEEDALREADYCONNECTEDINDIFFERENTORGANISATION = 'feed-already-connected-in-different-organisation'.freeze,
|
|
50
|
+
|
|
51
|
+
# TODO: Write general description for BANKFEEDNOTFOUND
|
|
52
|
+
BANKFEEDNOTFOUND = 'bank-feed-not-found'.freeze,
|
|
53
|
+
|
|
54
|
+
# TODO: Write general description for INVALIDCOUNTRYSPECIFIED
|
|
55
|
+
INVALIDCOUNTRYSPECIFIED = 'invalid-country-specified'.freeze,
|
|
56
|
+
|
|
57
|
+
# TODO: Write general description for INVALIDORGANISATIONBANKFEEDS
|
|
58
|
+
INVALIDORGANISATIONBANKFEEDS = 'invalid-organisation-bank-feeds'.freeze,
|
|
59
|
+
|
|
60
|
+
# TODO: Write general description for INVALIDORGANISATIONMULTICURRENCY
|
|
61
|
+
INVALIDORGANISATIONMULTICURRENCY = 'invalid-organisation-multi-currency'.freeze,
|
|
62
|
+
|
|
63
|
+
# TODO: Write general description for INVALIDFEEDCONNECTIONFORORGANISATION
|
|
64
|
+
INVALIDFEEDCONNECTIONFORORGANISATION = 'invalid-feed-connection-for-organisation'.freeze,
|
|
65
|
+
|
|
66
|
+
# TODO: Write general description for INVALIDUSERROLE
|
|
67
|
+
INVALIDUSERROLE = 'invalid-user-role'.freeze,
|
|
68
|
+
|
|
69
|
+
# TODO: Write general description for ACCOUNTNOTVALID
|
|
70
|
+
ACCOUNTNOTVALID = 'account-not-valid'.freeze,
|
|
71
|
+
|
|
72
|
+
# TODO: Write general description for FEEDNOTFOUNDORALREADYDELETED
|
|
73
|
+
FEEDNOTFOUNDORALREADYDELETED = 'feed-not-found-or-already-deleted'.freeze
|
|
74
|
+
].freeze
|
|
75
|
+
|
|
76
|
+
def self.validate(value)
|
|
77
|
+
return false if value.nil?
|
|
78
|
+
|
|
79
|
+
TYPE11.include?(value)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def self.from_value(value, default_value = INVALIDREQUEST)
|
|
83
|
+
return default_value if value.nil?
|
|
84
|
+
|
|
85
|
+
str = value.to_s.strip
|
|
86
|
+
|
|
87
|
+
case str.downcase
|
|
88
|
+
when 'invalidrequest' then INVALIDREQUEST
|
|
89
|
+
when 'invalidapplication' then INVALIDAPPLICATION
|
|
90
|
+
when 'invalidfeedconnection' then INVALIDFEEDCONNECTION
|
|
91
|
+
when 'duplicatestatement' then DUPLICATESTATEMENT
|
|
92
|
+
when 'invalidendbalance' then INVALIDENDBALANCE
|
|
93
|
+
when 'invalidstartandenddate' then INVALIDSTARTANDENDDATE
|
|
94
|
+
when 'invalidstartdate' then INVALIDSTARTDATE
|
|
95
|
+
when 'internalerror' then INTERNALERROR
|
|
96
|
+
when 'feedalreadyconnectedincurrentorganisation' then FEEDALREADYCONNECTEDINCURRENTORGANISATION
|
|
97
|
+
when 'invalidenddate' then INVALIDENDDATE
|
|
98
|
+
when 'statementnotfound' then STATEMENTNOTFOUND
|
|
99
|
+
when 'feedconnectedindifferentorganisation' then FEEDCONNECTEDINDIFFERENTORGANISATION
|
|
100
|
+
when 'feedalreadyconnectedindifferentorganisation' then FEEDALREADYCONNECTEDINDIFFERENTORGANISATION
|
|
101
|
+
when 'bankfeednotfound' then BANKFEEDNOTFOUND
|
|
102
|
+
when 'invalidcountryspecified' then INVALIDCOUNTRYSPECIFIED
|
|
103
|
+
when 'invalidorganisationbankfeeds' then INVALIDORGANISATIONBANKFEEDS
|
|
104
|
+
when 'invalidorganisationmulticurrency' then INVALIDORGANISATIONMULTICURRENCY
|
|
105
|
+
when 'invalidfeedconnectionfororganisation' then INVALIDFEEDCONNECTIONFORORGANISATION
|
|
106
|
+
when 'invaliduserrole' then INVALIDUSERROLE
|
|
107
|
+
when 'accountnotvalid' then ACCOUNTNOTVALID
|
|
108
|
+
when 'feednotfoundoralreadydeleted' then FEEDNOTFOUNDORALREADYDELETED
|
|
109
|
+
else
|
|
110
|
+
default_value
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|