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,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
|
+
# Schedule Model.
|
|
8
|
+
class Schedule < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months)
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :period
|
|
15
|
+
|
|
16
|
+
# One of the following - WEEKLY or MONTHLY
|
|
17
|
+
# @return [Unit]
|
|
18
|
+
attr_accessor :unit
|
|
19
|
+
|
|
20
|
+
# Integer used with due date type e.g 20 (of following month), 31 (of
|
|
21
|
+
# current month)
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :due_date
|
|
24
|
+
|
|
25
|
+
# the payment terms
|
|
26
|
+
# @return [DueDateType]
|
|
27
|
+
attr_accessor :due_date_type
|
|
28
|
+
|
|
29
|
+
# Date the first invoice of the current version of the repeating schedule
|
|
30
|
+
# was generated (changes when repeating invoice is edited)
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :start_date
|
|
33
|
+
|
|
34
|
+
# The calendar date of the next invoice in the schedule to be generated
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :next_scheduled_date
|
|
37
|
+
|
|
38
|
+
# Invoice end date – only returned if the template has an end date set
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :end_date
|
|
41
|
+
|
|
42
|
+
# A mapping from model property names to API property names.
|
|
43
|
+
def self.names
|
|
44
|
+
@_hash = {} if @_hash.nil?
|
|
45
|
+
@_hash['period'] = 'Period'
|
|
46
|
+
@_hash['unit'] = 'Unit'
|
|
47
|
+
@_hash['due_date'] = 'DueDate'
|
|
48
|
+
@_hash['due_date_type'] = 'DueDateType'
|
|
49
|
+
@_hash['start_date'] = 'StartDate'
|
|
50
|
+
@_hash['next_scheduled_date'] = 'NextScheduledDate'
|
|
51
|
+
@_hash['end_date'] = 'EndDate'
|
|
52
|
+
@_hash
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# An array for optional fields
|
|
56
|
+
def self.optionals
|
|
57
|
+
%w[
|
|
58
|
+
period
|
|
59
|
+
unit
|
|
60
|
+
due_date
|
|
61
|
+
due_date_type
|
|
62
|
+
start_date
|
|
63
|
+
next_scheduled_date
|
|
64
|
+
end_date
|
|
65
|
+
]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# An array for nullable fields
|
|
69
|
+
def self.nullables
|
|
70
|
+
[]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def initialize(period: SKIP, unit: SKIP, due_date: SKIP,
|
|
74
|
+
due_date_type: SKIP, start_date: SKIP,
|
|
75
|
+
next_scheduled_date: SKIP, end_date: SKIP,
|
|
76
|
+
additional_properties: nil)
|
|
77
|
+
# Add additional model properties to the instance
|
|
78
|
+
additional_properties = {} if additional_properties.nil?
|
|
79
|
+
|
|
80
|
+
@period = period unless period == SKIP
|
|
81
|
+
@unit = unit unless unit == SKIP
|
|
82
|
+
@due_date = due_date unless due_date == SKIP
|
|
83
|
+
@due_date_type = due_date_type unless due_date_type == SKIP
|
|
84
|
+
@start_date = start_date unless start_date == SKIP
|
|
85
|
+
@next_scheduled_date = next_scheduled_date unless next_scheduled_date == SKIP
|
|
86
|
+
@end_date = end_date unless end_date == SKIP
|
|
87
|
+
@additional_properties = additional_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Creates an instance of the object from a hash.
|
|
91
|
+
def self.from_hash(hash)
|
|
92
|
+
return nil unless hash
|
|
93
|
+
|
|
94
|
+
# Extract variables from the hash.
|
|
95
|
+
period = hash.key?('Period') ? hash['Period'] : SKIP
|
|
96
|
+
unit = hash.key?('Unit') ? hash['Unit'] : SKIP
|
|
97
|
+
due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP
|
|
98
|
+
due_date_type = hash.key?('DueDateType') ? hash['DueDateType'] : SKIP
|
|
99
|
+
start_date = hash.key?('StartDate') ? hash['StartDate'] : SKIP
|
|
100
|
+
next_scheduled_date =
|
|
101
|
+
hash.key?('NextScheduledDate') ? hash['NextScheduledDate'] : SKIP
|
|
102
|
+
end_date = hash.key?('EndDate') ? hash['EndDate'] : SKIP
|
|
103
|
+
|
|
104
|
+
# Create a new hash for additional properties, removing known properties.
|
|
105
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
106
|
+
|
|
107
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
108
|
+
new_hash, proc { |value| value }
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# Create object from extracted values.
|
|
112
|
+
Schedule.new(period: period,
|
|
113
|
+
unit: unit,
|
|
114
|
+
due_date: due_date,
|
|
115
|
+
due_date_type: due_date_type,
|
|
116
|
+
start_date: start_date,
|
|
117
|
+
next_scheduled_date: next_scheduled_date,
|
|
118
|
+
end_date: end_date,
|
|
119
|
+
additional_properties: additional_properties)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Provides a human-readable string representation of the object.
|
|
123
|
+
def to_s
|
|
124
|
+
class_name = self.class.name.split('::').last
|
|
125
|
+
"<#{class_name} period: #{@period}, unit: #{@unit}, due_date: #{@due_date}, due_date_type:"\
|
|
126
|
+
" #{@due_date_type}, start_date: #{@start_date}, next_scheduled_date:"\
|
|
127
|
+
" #{@next_scheduled_date}, end_date: #{@end_date}, additional_properties:"\
|
|
128
|
+
" #{@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} period: #{@period.inspect}, unit: #{@unit.inspect}, due_date:"\
|
|
135
|
+
" #{@due_date.inspect}, due_date_type: #{@due_date_type.inspect}, start_date:"\
|
|
136
|
+
" #{@start_date.inspect}, next_scheduled_date: #{@next_scheduled_date.inspect}, end_date:"\
|
|
137
|
+
" #{@end_date.inspect}, additional_properties: #{@additional_properties}>"
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
# Setting Model.
|
|
8
|
+
class Setting < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The prefix used for fixed asset numbers (“FA-” by default)
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :asset_number_prefix
|
|
15
|
+
|
|
16
|
+
# The next available sequence number
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :asset_number_sequence
|
|
19
|
+
|
|
20
|
+
# The date depreciation calculations started on registered fixed assets in
|
|
21
|
+
# Xero
|
|
22
|
+
# @return [Date]
|
|
23
|
+
attr_accessor :asset_start_date
|
|
24
|
+
|
|
25
|
+
# The last depreciation date
|
|
26
|
+
# @return [Date]
|
|
27
|
+
attr_accessor :last_depreciation_date
|
|
28
|
+
|
|
29
|
+
# Default account that gains are posted to
|
|
30
|
+
# @return [UUID | String]
|
|
31
|
+
attr_accessor :default_gain_on_disposal_account_id
|
|
32
|
+
|
|
33
|
+
# Default account that losses are posted to
|
|
34
|
+
# @return [UUID | String]
|
|
35
|
+
attr_accessor :default_loss_on_disposal_account_id
|
|
36
|
+
|
|
37
|
+
# Default account that capital gains are posted to
|
|
38
|
+
# @return [UUID | String]
|
|
39
|
+
attr_accessor :default_capital_gain_on_disposal_account_id
|
|
40
|
+
|
|
41
|
+
# opt in for tax calculation
|
|
42
|
+
# @return [TrueClass | FalseClass]
|
|
43
|
+
attr_accessor :opt_in_for_tax
|
|
44
|
+
|
|
45
|
+
# A mapping from model property names to API property names.
|
|
46
|
+
def self.names
|
|
47
|
+
@_hash = {} if @_hash.nil?
|
|
48
|
+
@_hash['asset_number_prefix'] = 'assetNumberPrefix'
|
|
49
|
+
@_hash['asset_number_sequence'] = 'assetNumberSequence'
|
|
50
|
+
@_hash['asset_start_date'] = 'assetStartDate'
|
|
51
|
+
@_hash['last_depreciation_date'] = 'lastDepreciationDate'
|
|
52
|
+
@_hash['default_gain_on_disposal_account_id'] =
|
|
53
|
+
'defaultGainOnDisposalAccountId'
|
|
54
|
+
@_hash['default_loss_on_disposal_account_id'] =
|
|
55
|
+
'defaultLossOnDisposalAccountId'
|
|
56
|
+
@_hash['default_capital_gain_on_disposal_account_id'] =
|
|
57
|
+
'defaultCapitalGainOnDisposalAccountId'
|
|
58
|
+
@_hash['opt_in_for_tax'] = 'optInForTax'
|
|
59
|
+
@_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array for optional fields
|
|
63
|
+
def self.optionals
|
|
64
|
+
%w[
|
|
65
|
+
asset_number_prefix
|
|
66
|
+
asset_number_sequence
|
|
67
|
+
asset_start_date
|
|
68
|
+
last_depreciation_date
|
|
69
|
+
default_gain_on_disposal_account_id
|
|
70
|
+
default_loss_on_disposal_account_id
|
|
71
|
+
default_capital_gain_on_disposal_account_id
|
|
72
|
+
opt_in_for_tax
|
|
73
|
+
]
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# An array for nullable fields
|
|
77
|
+
def self.nullables
|
|
78
|
+
[]
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def initialize(asset_number_prefix: SKIP, asset_number_sequence: SKIP,
|
|
82
|
+
asset_start_date: SKIP, last_depreciation_date: SKIP,
|
|
83
|
+
default_gain_on_disposal_account_id: SKIP,
|
|
84
|
+
default_loss_on_disposal_account_id: SKIP,
|
|
85
|
+
default_capital_gain_on_disposal_account_id: SKIP,
|
|
86
|
+
opt_in_for_tax: SKIP, additional_properties: nil)
|
|
87
|
+
# Add additional model properties to the instance
|
|
88
|
+
additional_properties = {} if additional_properties.nil?
|
|
89
|
+
|
|
90
|
+
@asset_number_prefix = asset_number_prefix unless asset_number_prefix == SKIP
|
|
91
|
+
@asset_number_sequence = asset_number_sequence unless asset_number_sequence == SKIP
|
|
92
|
+
@asset_start_date = asset_start_date unless asset_start_date == SKIP
|
|
93
|
+
@last_depreciation_date = last_depreciation_date unless last_depreciation_date == SKIP
|
|
94
|
+
unless default_gain_on_disposal_account_id == SKIP
|
|
95
|
+
@default_gain_on_disposal_account_id =
|
|
96
|
+
default_gain_on_disposal_account_id
|
|
97
|
+
end
|
|
98
|
+
unless default_loss_on_disposal_account_id == SKIP
|
|
99
|
+
@default_loss_on_disposal_account_id =
|
|
100
|
+
default_loss_on_disposal_account_id
|
|
101
|
+
end
|
|
102
|
+
unless default_capital_gain_on_disposal_account_id == SKIP
|
|
103
|
+
@default_capital_gain_on_disposal_account_id =
|
|
104
|
+
default_capital_gain_on_disposal_account_id
|
|
105
|
+
end
|
|
106
|
+
@opt_in_for_tax = opt_in_for_tax unless opt_in_for_tax == SKIP
|
|
107
|
+
@additional_properties = additional_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Creates an instance of the object from a hash.
|
|
111
|
+
def self.from_hash(hash)
|
|
112
|
+
return nil unless hash
|
|
113
|
+
|
|
114
|
+
# Extract variables from the hash.
|
|
115
|
+
asset_number_prefix =
|
|
116
|
+
hash.key?('assetNumberPrefix') ? hash['assetNumberPrefix'] : SKIP
|
|
117
|
+
asset_number_sequence =
|
|
118
|
+
hash.key?('assetNumberSequence') ? hash['assetNumberSequence'] : SKIP
|
|
119
|
+
asset_start_date =
|
|
120
|
+
hash.key?('assetStartDate') ? hash['assetStartDate'] : SKIP
|
|
121
|
+
last_depreciation_date =
|
|
122
|
+
hash.key?('lastDepreciationDate') ? hash['lastDepreciationDate'] : SKIP
|
|
123
|
+
default_gain_on_disposal_account_id =
|
|
124
|
+
hash.key?('defaultGainOnDisposalAccountId') ? hash['defaultGainOnDisposalAccountId'] : SKIP
|
|
125
|
+
default_loss_on_disposal_account_id =
|
|
126
|
+
hash.key?('defaultLossOnDisposalAccountId') ? hash['defaultLossOnDisposalAccountId'] : SKIP
|
|
127
|
+
default_capital_gain_on_disposal_account_id =
|
|
128
|
+
hash.key?('defaultCapitalGainOnDisposalAccountId') ? hash['defaultCapitalGainOnDisposalAccountId'] : SKIP
|
|
129
|
+
opt_in_for_tax = hash.key?('optInForTax') ? hash['optInForTax'] : SKIP
|
|
130
|
+
|
|
131
|
+
# Create a new hash for additional properties, removing known properties.
|
|
132
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
133
|
+
|
|
134
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
135
|
+
new_hash, proc { |value| value }
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
# Create object from extracted values.
|
|
139
|
+
Setting.new(asset_number_prefix: asset_number_prefix,
|
|
140
|
+
asset_number_sequence: asset_number_sequence,
|
|
141
|
+
asset_start_date: asset_start_date,
|
|
142
|
+
last_depreciation_date: last_depreciation_date,
|
|
143
|
+
default_gain_on_disposal_account_id: default_gain_on_disposal_account_id,
|
|
144
|
+
default_loss_on_disposal_account_id: default_loss_on_disposal_account_id,
|
|
145
|
+
default_capital_gain_on_disposal_account_id: default_capital_gain_on_disposal_account_id,
|
|
146
|
+
opt_in_for_tax: opt_in_for_tax,
|
|
147
|
+
additional_properties: additional_properties)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Provides a human-readable string representation of the object.
|
|
151
|
+
def to_s
|
|
152
|
+
class_name = self.class.name.split('::').last
|
|
153
|
+
"<#{class_name} asset_number_prefix: #{@asset_number_prefix}, asset_number_sequence:"\
|
|
154
|
+
" #{@asset_number_sequence}, asset_start_date: #{@asset_start_date}, last_depreciation_date:"\
|
|
155
|
+
" #{@last_depreciation_date}, default_gain_on_disposal_account_id:"\
|
|
156
|
+
" #{@default_gain_on_disposal_account_id}, default_loss_on_disposal_account_id:"\
|
|
157
|
+
" #{@default_loss_on_disposal_account_id}, default_capital_gain_on_disposal_account_id:"\
|
|
158
|
+
" #{@default_capital_gain_on_disposal_account_id}, opt_in_for_tax: #{@opt_in_for_tax},"\
|
|
159
|
+
" additional_properties: #{@additional_properties}>"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
163
|
+
def inspect
|
|
164
|
+
class_name = self.class.name.split('::').last
|
|
165
|
+
"<#{class_name} asset_number_prefix: #{@asset_number_prefix.inspect},"\
|
|
166
|
+
" asset_number_sequence: #{@asset_number_sequence.inspect}, asset_start_date:"\
|
|
167
|
+
" #{@asset_start_date.inspect}, last_depreciation_date: #{@last_depreciation_date.inspect},"\
|
|
168
|
+
" default_gain_on_disposal_account_id: #{@default_gain_on_disposal_account_id.inspect},"\
|
|
169
|
+
" default_loss_on_disposal_account_id: #{@default_loss_on_disposal_account_id.inspect},"\
|
|
170
|
+
' default_capital_gain_on_disposal_account_id:'\
|
|
171
|
+
" #{@default_capital_gain_on_disposal_account_id.inspect}, opt_in_for_tax:"\
|
|
172
|
+
" #{@opt_in_for_tax.inspect}, additional_properties: #{@additional_properties}>"
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
# Setup Model.
|
|
8
|
+
class Setup < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The date when the organisation starts using Xero
|
|
13
|
+
# @return [ConversionDate]
|
|
14
|
+
attr_accessor :conversion_date
|
|
15
|
+
|
|
16
|
+
# Balance supplied for each account that has a value as at the conversion
|
|
17
|
+
# date.
|
|
18
|
+
# @return [Array[ConversionBalances]]
|
|
19
|
+
attr_accessor :conversion_balances
|
|
20
|
+
|
|
21
|
+
# Balance supplied for each account that has a value as at the conversion
|
|
22
|
+
# date.
|
|
23
|
+
# @return [Array[Account]]
|
|
24
|
+
attr_accessor :accounts
|
|
25
|
+
|
|
26
|
+
# A mapping from model property names to API property names.
|
|
27
|
+
def self.names
|
|
28
|
+
@_hash = {} if @_hash.nil?
|
|
29
|
+
@_hash['conversion_date'] = 'ConversionDate'
|
|
30
|
+
@_hash['conversion_balances'] = 'ConversionBalances'
|
|
31
|
+
@_hash['accounts'] = 'Accounts'
|
|
32
|
+
@_hash
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for optional fields
|
|
36
|
+
def self.optionals
|
|
37
|
+
%w[
|
|
38
|
+
conversion_date
|
|
39
|
+
conversion_balances
|
|
40
|
+
accounts
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for nullable fields
|
|
45
|
+
def self.nullables
|
|
46
|
+
[]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def initialize(conversion_date: SKIP, conversion_balances: SKIP,
|
|
50
|
+
accounts: SKIP, additional_properties: nil)
|
|
51
|
+
# Add additional model properties to the instance
|
|
52
|
+
additional_properties = {} if additional_properties.nil?
|
|
53
|
+
|
|
54
|
+
@conversion_date = conversion_date unless conversion_date == SKIP
|
|
55
|
+
@conversion_balances = conversion_balances unless conversion_balances == SKIP
|
|
56
|
+
@accounts = accounts unless accounts == SKIP
|
|
57
|
+
@additional_properties = additional_properties
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
conversion_date = ConversionDate.from_hash(hash['ConversionDate']) if hash['ConversionDate']
|
|
66
|
+
# Parameter is an array, so we need to iterate through it
|
|
67
|
+
conversion_balances = nil
|
|
68
|
+
unless hash['ConversionBalances'].nil?
|
|
69
|
+
conversion_balances = []
|
|
70
|
+
hash['ConversionBalances'].each do |structure|
|
|
71
|
+
conversion_balances << (ConversionBalances.from_hash(structure) if structure)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
conversion_balances = SKIP unless hash.key?('ConversionBalances')
|
|
76
|
+
# Parameter is an array, so we need to iterate through it
|
|
77
|
+
accounts = nil
|
|
78
|
+
unless hash['Accounts'].nil?
|
|
79
|
+
accounts = []
|
|
80
|
+
hash['Accounts'].each do |structure|
|
|
81
|
+
accounts << (Account.from_hash(structure) if structure)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
accounts = SKIP unless hash.key?('Accounts')
|
|
86
|
+
|
|
87
|
+
# Create a new hash for additional properties, removing known properties.
|
|
88
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
89
|
+
|
|
90
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
91
|
+
new_hash, proc { |value| value }
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Create object from extracted values.
|
|
95
|
+
Setup.new(conversion_date: conversion_date,
|
|
96
|
+
conversion_balances: conversion_balances,
|
|
97
|
+
accounts: accounts,
|
|
98
|
+
additional_properties: additional_properties)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Provides a human-readable string representation of the object.
|
|
102
|
+
def to_s
|
|
103
|
+
class_name = self.class.name.split('::').last
|
|
104
|
+
"<#{class_name} conversion_date: #{@conversion_date}, conversion_balances:"\
|
|
105
|
+
" #{@conversion_balances}, accounts: #{@accounts}, additional_properties:"\
|
|
106
|
+
" #{@additional_properties}>"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
110
|
+
def inspect
|
|
111
|
+
class_name = self.class.name.split('::').last
|
|
112
|
+
"<#{class_name} conversion_date: #{@conversion_date.inspect}, conversion_balances:"\
|
|
113
|
+
" #{@conversion_balances.inspect}, accounts: #{@accounts.inspect}, additional_properties:"\
|
|
114
|
+
" #{@additional_properties}>"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
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
|
+
# sortDirection.
|
|
8
|
+
class SortDirection
|
|
9
|
+
SORT_DIRECTION = [
|
|
10
|
+
# TODO: Write general description for ASC
|
|
11
|
+
ASC = 'asc'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for DESC
|
|
14
|
+
DESC = 'desc'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
SORT_DIRECTION.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ASC)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'asc' then ASC
|
|
30
|
+
when 'desc' then DESC
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# The Type of the source tranasction. This will be ACCPAY if the linked
|
|
8
|
+
# transaction was created from an invoice and SPEND if it was created from a
|
|
9
|
+
# bank transaction.
|
|
10
|
+
class SourceTransactionTypeCode
|
|
11
|
+
SOURCE_TRANSACTION_TYPE_CODE = [
|
|
12
|
+
# TODO: Write general description for ACCPAY
|
|
13
|
+
ACCPAY = 'ACCPAY'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for SPEND
|
|
16
|
+
SPEND = 'SPEND'.freeze
|
|
17
|
+
].freeze
|
|
18
|
+
|
|
19
|
+
def self.validate(value)
|
|
20
|
+
return false if value.nil?
|
|
21
|
+
|
|
22
|
+
SOURCE_TRANSACTION_TYPE_CODE.include?(value)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.from_value(value, default_value = ACCPAY)
|
|
26
|
+
return default_value if value.nil?
|
|
27
|
+
|
|
28
|
+
str = value.to_s.strip
|
|
29
|
+
|
|
30
|
+
case str.downcase
|
|
31
|
+
when 'accpay' then ACCPAY
|
|
32
|
+
when 'spend' then SPEND
|
|
33
|
+
else
|
|
34
|
+
default_value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# The journal source type. The type of transaction that created the journal
|
|
8
|
+
class SourceType
|
|
9
|
+
SOURCE_TYPE = [
|
|
10
|
+
# TODO: Write general description for ACCREC
|
|
11
|
+
ACCREC = 'ACCREC'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ACCPAY
|
|
14
|
+
ACCPAY = 'ACCPAY'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ACCRECCREDIT
|
|
17
|
+
ACCRECCREDIT = 'ACCRECCREDIT'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for ACCPAYCREDIT
|
|
20
|
+
ACCPAYCREDIT = 'ACCPAYCREDIT'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ACCRECPAYMENT
|
|
23
|
+
ACCRECPAYMENT = 'ACCRECPAYMENT'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for ACCPAYPAYMENT
|
|
26
|
+
ACCPAYPAYMENT = 'ACCPAYPAYMENT'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for ARCREDITPAYMENT
|
|
29
|
+
ARCREDITPAYMENT = 'ARCREDITPAYMENT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for APCREDITPAYMENT
|
|
32
|
+
APCREDITPAYMENT = 'APCREDITPAYMENT'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for CASHREC
|
|
35
|
+
CASHREC = 'CASHREC'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for CASHPAID
|
|
38
|
+
CASHPAID = 'CASHPAID'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for TRANSFER
|
|
41
|
+
TRANSFER = 'TRANSFER'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for ARPREPAYMENT
|
|
44
|
+
ARPREPAYMENT = 'ARPREPAYMENT'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for APPREPAYMENT
|
|
47
|
+
APPREPAYMENT = 'APPREPAYMENT'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for AROVERPAYMENT
|
|
50
|
+
AROVERPAYMENT = 'AROVERPAYMENT'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for APOVERPAYMENT
|
|
53
|
+
APOVERPAYMENT = 'APOVERPAYMENT'.freeze,
|
|
54
|
+
|
|
55
|
+
# TODO: Write general description for EXPCLAIM
|
|
56
|
+
EXPCLAIM = 'EXPCLAIM'.freeze,
|
|
57
|
+
|
|
58
|
+
# TODO: Write general description for EXPPAYMENT
|
|
59
|
+
EXPPAYMENT = 'EXPPAYMENT'.freeze,
|
|
60
|
+
|
|
61
|
+
# TODO: Write general description for MANJOURNAL
|
|
62
|
+
MANJOURNAL = 'MANJOURNAL'.freeze,
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for PAYSLIP
|
|
65
|
+
PAYSLIP = 'PAYSLIP'.freeze,
|
|
66
|
+
|
|
67
|
+
# TODO: Write general description for WAGEPAYABLE
|
|
68
|
+
WAGEPAYABLE = 'WAGEPAYABLE'.freeze,
|
|
69
|
+
|
|
70
|
+
# TODO: Write general description for INTEGRATEDPAYROLLPE
|
|
71
|
+
INTEGRATEDPAYROLLPE = 'INTEGRATEDPAYROLLPE'.freeze,
|
|
72
|
+
|
|
73
|
+
# TODO: Write general description for INTEGRATEDPAYROLLPT
|
|
74
|
+
INTEGRATEDPAYROLLPT = 'INTEGRATEDPAYROLLPT'.freeze,
|
|
75
|
+
|
|
76
|
+
# TODO: Write general description for EXTERNALSPENDMONEY
|
|
77
|
+
EXTERNALSPENDMONEY = 'EXTERNALSPENDMONEY'.freeze,
|
|
78
|
+
|
|
79
|
+
# TODO: Write general description for INTEGRATEDPAYROLLPTPAYMENT
|
|
80
|
+
INTEGRATEDPAYROLLPTPAYMENT = 'INTEGRATEDPAYROLLPTPAYMENT'.freeze,
|
|
81
|
+
|
|
82
|
+
# TODO: Write general description for INTEGRATEDPAYROLLCN
|
|
83
|
+
INTEGRATEDPAYROLLCN = 'INTEGRATEDPAYROLLCN'.freeze
|
|
84
|
+
].freeze
|
|
85
|
+
|
|
86
|
+
def self.validate(value)
|
|
87
|
+
return false if value.nil?
|
|
88
|
+
|
|
89
|
+
SOURCE_TYPE.include?(value)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.from_value(value, default_value = ACCREC)
|
|
93
|
+
return default_value if value.nil?
|
|
94
|
+
|
|
95
|
+
str = value.to_s.strip
|
|
96
|
+
|
|
97
|
+
case str.downcase
|
|
98
|
+
when 'accrec' then ACCREC
|
|
99
|
+
when 'accpay' then ACCPAY
|
|
100
|
+
when 'accreccredit' then ACCRECCREDIT
|
|
101
|
+
when 'accpaycredit' then ACCPAYCREDIT
|
|
102
|
+
when 'accrecpayment' then ACCRECPAYMENT
|
|
103
|
+
when 'accpaypayment' then ACCPAYPAYMENT
|
|
104
|
+
when 'arcreditpayment' then ARCREDITPAYMENT
|
|
105
|
+
when 'apcreditpayment' then APCREDITPAYMENT
|
|
106
|
+
when 'cashrec' then CASHREC
|
|
107
|
+
when 'cashpaid' then CASHPAID
|
|
108
|
+
when 'transfer' then TRANSFER
|
|
109
|
+
when 'arprepayment' then ARPREPAYMENT
|
|
110
|
+
when 'apprepayment' then APPREPAYMENT
|
|
111
|
+
when 'aroverpayment' then AROVERPAYMENT
|
|
112
|
+
when 'apoverpayment' then APOVERPAYMENT
|
|
113
|
+
when 'expclaim' then EXPCLAIM
|
|
114
|
+
when 'exppayment' then EXPPAYMENT
|
|
115
|
+
when 'manjournal' then MANJOURNAL
|
|
116
|
+
when 'payslip' then PAYSLIP
|
|
117
|
+
when 'wagepayable' then WAGEPAYABLE
|
|
118
|
+
when 'integratedpayrollpe' then INTEGRATEDPAYROLLPE
|
|
119
|
+
when 'integratedpayrollpt' then INTEGRATEDPAYROLLPT
|
|
120
|
+
when 'externalspendmoney' then EXTERNALSPENDMONEY
|
|
121
|
+
when 'integratedpayrollptpayment' then INTEGRATEDPAYROLLPTPAYMENT
|
|
122
|
+
when 'integratedpayrollcn' then INTEGRATEDPAYROLLCN
|
|
123
|
+
else
|
|
124
|
+
default_value
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|