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,381 @@
|
|
|
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
|
+
# Payment Model.
|
|
8
|
+
class Payment < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Invoice]
|
|
14
|
+
attr_accessor :invoice
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [CreditNote]
|
|
18
|
+
attr_accessor :credit_note
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [Prepayment]
|
|
22
|
+
attr_accessor :prepayment
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [Overpayment]
|
|
26
|
+
attr_accessor :overpayment
|
|
27
|
+
|
|
28
|
+
# Number of invoice or credit note you are applying payment to e.g.INV-4003
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :invoice_number
|
|
31
|
+
|
|
32
|
+
# Number of invoice or credit note you are applying payment to e.g. INV-4003
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :credit_note_number
|
|
35
|
+
|
|
36
|
+
# Number of invoice or credit note you are applying payment to e.g. INV-4003
|
|
37
|
+
# @return [BatchPayment]
|
|
38
|
+
attr_accessor :batch_payment
|
|
39
|
+
|
|
40
|
+
# Number of invoice or credit note you are applying payment to e.g. INV-4003
|
|
41
|
+
# @return [Account]
|
|
42
|
+
attr_accessor :account
|
|
43
|
+
|
|
44
|
+
# Code of account you are using to make the payment e.g. 001 (note- not all
|
|
45
|
+
# accounts have a code value)
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :code
|
|
48
|
+
|
|
49
|
+
# Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :date
|
|
52
|
+
|
|
53
|
+
# Exchange rate when payment is received. Only used for non base currency
|
|
54
|
+
# invoices and credit notes e.g. 0.7500
|
|
55
|
+
# @return [Float]
|
|
56
|
+
attr_accessor :currency_rate
|
|
57
|
+
|
|
58
|
+
# The amount of the payment. Must be less than or equal to the outstanding
|
|
59
|
+
# amount owing on the invoice e.g. 200.00
|
|
60
|
+
# @return [Float]
|
|
61
|
+
attr_accessor :amount
|
|
62
|
+
|
|
63
|
+
# The amount of the payment in the currency of the bank account.
|
|
64
|
+
# @return [Float]
|
|
65
|
+
attr_accessor :bank_amount
|
|
66
|
+
|
|
67
|
+
# An optional description for the payment e.g. Direct Debit
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :reference
|
|
70
|
+
|
|
71
|
+
# An optional parameter for the payment. A boolean indicating whether you
|
|
72
|
+
# would like the payment to be created as reconciled when using PUT, or
|
|
73
|
+
# whether a payment has been reconciled when using GET
|
|
74
|
+
# @return [TrueClass | FalseClass]
|
|
75
|
+
attr_accessor :is_reconciled
|
|
76
|
+
|
|
77
|
+
# The status of the payment.
|
|
78
|
+
# @return [Status7]
|
|
79
|
+
attr_accessor :status
|
|
80
|
+
|
|
81
|
+
# See Payment Types.
|
|
82
|
+
# @return [PaymentType]
|
|
83
|
+
attr_accessor :payment_type
|
|
84
|
+
|
|
85
|
+
# UTC timestamp of last update to the payment
|
|
86
|
+
# @return [String]
|
|
87
|
+
attr_accessor :updated_date_utc
|
|
88
|
+
|
|
89
|
+
# The Xero identifier for an Payment e.g.
|
|
90
|
+
# 297c2dc5-cc47-4afd-8ec8-74990b8761e9
|
|
91
|
+
# @return [UUID | String]
|
|
92
|
+
attr_accessor :payment_id
|
|
93
|
+
|
|
94
|
+
# Present if the payment was created as part of a batch.
|
|
95
|
+
# @return [UUID | String]
|
|
96
|
+
attr_accessor :batch_payment_id
|
|
97
|
+
|
|
98
|
+
# The suppliers bank account number the payment is being made to
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :bank_account_number
|
|
101
|
+
|
|
102
|
+
# The suppliers bank account number the payment is being made to
|
|
103
|
+
# @return [String]
|
|
104
|
+
attr_accessor :particulars
|
|
105
|
+
|
|
106
|
+
# The information to appear on the supplier's bank account
|
|
107
|
+
# @return [String]
|
|
108
|
+
attr_accessor :details
|
|
109
|
+
|
|
110
|
+
# A boolean to indicate if a contact has an validation errors
|
|
111
|
+
# @return [TrueClass | FalseClass]
|
|
112
|
+
attr_accessor :has_account
|
|
113
|
+
|
|
114
|
+
# A boolean to indicate if a contact has an validation errors
|
|
115
|
+
# @return [TrueClass | FalseClass]
|
|
116
|
+
attr_accessor :has_validation_errors
|
|
117
|
+
|
|
118
|
+
# A string to indicate if a invoice status
|
|
119
|
+
# @return [String]
|
|
120
|
+
attr_accessor :status_attribute_string
|
|
121
|
+
|
|
122
|
+
# Displays array of validation error messages from the API
|
|
123
|
+
# @return [Array[ValidationError]]
|
|
124
|
+
attr_accessor :validation_errors
|
|
125
|
+
|
|
126
|
+
# Displays array of warning messages from the API
|
|
127
|
+
# @return [Array[ValidationError]]
|
|
128
|
+
attr_accessor :warnings
|
|
129
|
+
|
|
130
|
+
# A mapping from model property names to API property names.
|
|
131
|
+
def self.names
|
|
132
|
+
@_hash = {} if @_hash.nil?
|
|
133
|
+
@_hash['invoice'] = 'Invoice'
|
|
134
|
+
@_hash['credit_note'] = 'CreditNote'
|
|
135
|
+
@_hash['prepayment'] = 'Prepayment'
|
|
136
|
+
@_hash['overpayment'] = 'Overpayment'
|
|
137
|
+
@_hash['invoice_number'] = 'InvoiceNumber'
|
|
138
|
+
@_hash['credit_note_number'] = 'CreditNoteNumber'
|
|
139
|
+
@_hash['batch_payment'] = 'BatchPayment'
|
|
140
|
+
@_hash['account'] = 'Account'
|
|
141
|
+
@_hash['code'] = 'Code'
|
|
142
|
+
@_hash['date'] = 'Date'
|
|
143
|
+
@_hash['currency_rate'] = 'CurrencyRate'
|
|
144
|
+
@_hash['amount'] = 'Amount'
|
|
145
|
+
@_hash['bank_amount'] = 'BankAmount'
|
|
146
|
+
@_hash['reference'] = 'Reference'
|
|
147
|
+
@_hash['is_reconciled'] = 'IsReconciled'
|
|
148
|
+
@_hash['status'] = 'Status'
|
|
149
|
+
@_hash['payment_type'] = 'PaymentType'
|
|
150
|
+
@_hash['updated_date_utc'] = 'UpdatedDateUTC'
|
|
151
|
+
@_hash['payment_id'] = 'PaymentID'
|
|
152
|
+
@_hash['batch_payment_id'] = 'BatchPaymentID'
|
|
153
|
+
@_hash['bank_account_number'] = 'BankAccountNumber'
|
|
154
|
+
@_hash['particulars'] = 'Particulars'
|
|
155
|
+
@_hash['details'] = 'Details'
|
|
156
|
+
@_hash['has_account'] = 'HasAccount'
|
|
157
|
+
@_hash['has_validation_errors'] = 'HasValidationErrors'
|
|
158
|
+
@_hash['status_attribute_string'] = 'StatusAttributeString'
|
|
159
|
+
@_hash['validation_errors'] = 'ValidationErrors'
|
|
160
|
+
@_hash['warnings'] = 'Warnings'
|
|
161
|
+
@_hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# An array for optional fields
|
|
165
|
+
def self.optionals
|
|
166
|
+
%w[
|
|
167
|
+
invoice
|
|
168
|
+
credit_note
|
|
169
|
+
prepayment
|
|
170
|
+
overpayment
|
|
171
|
+
invoice_number
|
|
172
|
+
credit_note_number
|
|
173
|
+
batch_payment
|
|
174
|
+
account
|
|
175
|
+
code
|
|
176
|
+
date
|
|
177
|
+
currency_rate
|
|
178
|
+
amount
|
|
179
|
+
bank_amount
|
|
180
|
+
reference
|
|
181
|
+
is_reconciled
|
|
182
|
+
status
|
|
183
|
+
payment_type
|
|
184
|
+
updated_date_utc
|
|
185
|
+
payment_id
|
|
186
|
+
batch_payment_id
|
|
187
|
+
bank_account_number
|
|
188
|
+
particulars
|
|
189
|
+
details
|
|
190
|
+
has_account
|
|
191
|
+
has_validation_errors
|
|
192
|
+
status_attribute_string
|
|
193
|
+
validation_errors
|
|
194
|
+
warnings
|
|
195
|
+
]
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# An array for nullable fields
|
|
199
|
+
def self.nullables
|
|
200
|
+
[]
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
def initialize(invoice: SKIP, credit_note: SKIP, prepayment: SKIP,
|
|
204
|
+
overpayment: SKIP, invoice_number: SKIP,
|
|
205
|
+
credit_note_number: SKIP, batch_payment: SKIP, account: SKIP,
|
|
206
|
+
code: SKIP, date: SKIP, currency_rate: SKIP, amount: SKIP,
|
|
207
|
+
bank_amount: SKIP, reference: SKIP, is_reconciled: SKIP,
|
|
208
|
+
status: SKIP, payment_type: SKIP, updated_date_utc: SKIP,
|
|
209
|
+
payment_id: SKIP, batch_payment_id: SKIP,
|
|
210
|
+
bank_account_number: SKIP, particulars: SKIP, details: SKIP,
|
|
211
|
+
has_account: false, has_validation_errors: false,
|
|
212
|
+
status_attribute_string: SKIP, validation_errors: SKIP,
|
|
213
|
+
warnings: SKIP, additional_properties: nil)
|
|
214
|
+
# Add additional model properties to the instance
|
|
215
|
+
additional_properties = {} if additional_properties.nil?
|
|
216
|
+
|
|
217
|
+
@invoice = invoice unless invoice == SKIP
|
|
218
|
+
@credit_note = credit_note unless credit_note == SKIP
|
|
219
|
+
@prepayment = prepayment unless prepayment == SKIP
|
|
220
|
+
@overpayment = overpayment unless overpayment == SKIP
|
|
221
|
+
@invoice_number = invoice_number unless invoice_number == SKIP
|
|
222
|
+
@credit_note_number = credit_note_number unless credit_note_number == SKIP
|
|
223
|
+
@batch_payment = batch_payment unless batch_payment == SKIP
|
|
224
|
+
@account = account unless account == SKIP
|
|
225
|
+
@code = code unless code == SKIP
|
|
226
|
+
@date = date unless date == SKIP
|
|
227
|
+
@currency_rate = currency_rate unless currency_rate == SKIP
|
|
228
|
+
@amount = amount unless amount == SKIP
|
|
229
|
+
@bank_amount = bank_amount unless bank_amount == SKIP
|
|
230
|
+
@reference = reference unless reference == SKIP
|
|
231
|
+
@is_reconciled = is_reconciled unless is_reconciled == SKIP
|
|
232
|
+
@status = status unless status == SKIP
|
|
233
|
+
@payment_type = payment_type unless payment_type == SKIP
|
|
234
|
+
@updated_date_utc = updated_date_utc unless updated_date_utc == SKIP
|
|
235
|
+
@payment_id = payment_id unless payment_id == SKIP
|
|
236
|
+
@batch_payment_id = batch_payment_id unless batch_payment_id == SKIP
|
|
237
|
+
@bank_account_number = bank_account_number unless bank_account_number == SKIP
|
|
238
|
+
@particulars = particulars unless particulars == SKIP
|
|
239
|
+
@details = details unless details == SKIP
|
|
240
|
+
@has_account = has_account unless has_account == SKIP
|
|
241
|
+
@has_validation_errors = has_validation_errors unless has_validation_errors == SKIP
|
|
242
|
+
@status_attribute_string = status_attribute_string unless status_attribute_string == SKIP
|
|
243
|
+
@validation_errors = validation_errors unless validation_errors == SKIP
|
|
244
|
+
@warnings = warnings unless warnings == SKIP
|
|
245
|
+
@additional_properties = additional_properties
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Creates an instance of the object from a hash.
|
|
249
|
+
def self.from_hash(hash)
|
|
250
|
+
return nil unless hash
|
|
251
|
+
|
|
252
|
+
# Extract variables from the hash.
|
|
253
|
+
invoice = Invoice.from_hash(hash['Invoice']) if hash['Invoice']
|
|
254
|
+
credit_note = CreditNote.from_hash(hash['CreditNote']) if hash['CreditNote']
|
|
255
|
+
prepayment = Prepayment.from_hash(hash['Prepayment']) if hash['Prepayment']
|
|
256
|
+
overpayment = Overpayment.from_hash(hash['Overpayment']) if hash['Overpayment']
|
|
257
|
+
invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
|
|
258
|
+
credit_note_number =
|
|
259
|
+
hash.key?('CreditNoteNumber') ? hash['CreditNoteNumber'] : SKIP
|
|
260
|
+
batch_payment = BatchPayment.from_hash(hash['BatchPayment']) if hash['BatchPayment']
|
|
261
|
+
account = Account.from_hash(hash['Account']) if hash['Account']
|
|
262
|
+
code = hash.key?('Code') ? hash['Code'] : SKIP
|
|
263
|
+
date = hash.key?('Date') ? hash['Date'] : SKIP
|
|
264
|
+
currency_rate = hash.key?('CurrencyRate') ? hash['CurrencyRate'] : SKIP
|
|
265
|
+
amount = hash.key?('Amount') ? hash['Amount'] : SKIP
|
|
266
|
+
bank_amount = hash.key?('BankAmount') ? hash['BankAmount'] : SKIP
|
|
267
|
+
reference = hash.key?('Reference') ? hash['Reference'] : SKIP
|
|
268
|
+
is_reconciled = hash.key?('IsReconciled') ? hash['IsReconciled'] : SKIP
|
|
269
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
270
|
+
payment_type = hash.key?('PaymentType') ? hash['PaymentType'] : SKIP
|
|
271
|
+
updated_date_utc =
|
|
272
|
+
hash.key?('UpdatedDateUTC') ? hash['UpdatedDateUTC'] : SKIP
|
|
273
|
+
payment_id = hash.key?('PaymentID') ? hash['PaymentID'] : SKIP
|
|
274
|
+
batch_payment_id =
|
|
275
|
+
hash.key?('BatchPaymentID') ? hash['BatchPaymentID'] : SKIP
|
|
276
|
+
bank_account_number =
|
|
277
|
+
hash.key?('BankAccountNumber') ? hash['BankAccountNumber'] : SKIP
|
|
278
|
+
particulars = hash.key?('Particulars') ? hash['Particulars'] : SKIP
|
|
279
|
+
details = hash.key?('Details') ? hash['Details'] : SKIP
|
|
280
|
+
has_account = hash['HasAccount'] ||= false
|
|
281
|
+
has_validation_errors = hash['HasValidationErrors'] ||= false
|
|
282
|
+
status_attribute_string =
|
|
283
|
+
hash.key?('StatusAttributeString') ? hash['StatusAttributeString'] : SKIP
|
|
284
|
+
# Parameter is an array, so we need to iterate through it
|
|
285
|
+
validation_errors = nil
|
|
286
|
+
unless hash['ValidationErrors'].nil?
|
|
287
|
+
validation_errors = []
|
|
288
|
+
hash['ValidationErrors'].each do |structure|
|
|
289
|
+
validation_errors << (ValidationError.from_hash(structure) if structure)
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
validation_errors = SKIP unless hash.key?('ValidationErrors')
|
|
294
|
+
# Parameter is an array, so we need to iterate through it
|
|
295
|
+
warnings = nil
|
|
296
|
+
unless hash['Warnings'].nil?
|
|
297
|
+
warnings = []
|
|
298
|
+
hash['Warnings'].each do |structure|
|
|
299
|
+
warnings << (ValidationError.from_hash(structure) if structure)
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
warnings = SKIP unless hash.key?('Warnings')
|
|
304
|
+
|
|
305
|
+
# Create a new hash for additional properties, removing known properties.
|
|
306
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
307
|
+
|
|
308
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
309
|
+
new_hash, proc { |value| value }
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
# Create object from extracted values.
|
|
313
|
+
Payment.new(invoice: invoice,
|
|
314
|
+
credit_note: credit_note,
|
|
315
|
+
prepayment: prepayment,
|
|
316
|
+
overpayment: overpayment,
|
|
317
|
+
invoice_number: invoice_number,
|
|
318
|
+
credit_note_number: credit_note_number,
|
|
319
|
+
batch_payment: batch_payment,
|
|
320
|
+
account: account,
|
|
321
|
+
code: code,
|
|
322
|
+
date: date,
|
|
323
|
+
currency_rate: currency_rate,
|
|
324
|
+
amount: amount,
|
|
325
|
+
bank_amount: bank_amount,
|
|
326
|
+
reference: reference,
|
|
327
|
+
is_reconciled: is_reconciled,
|
|
328
|
+
status: status,
|
|
329
|
+
payment_type: payment_type,
|
|
330
|
+
updated_date_utc: updated_date_utc,
|
|
331
|
+
payment_id: payment_id,
|
|
332
|
+
batch_payment_id: batch_payment_id,
|
|
333
|
+
bank_account_number: bank_account_number,
|
|
334
|
+
particulars: particulars,
|
|
335
|
+
details: details,
|
|
336
|
+
has_account: has_account,
|
|
337
|
+
has_validation_errors: has_validation_errors,
|
|
338
|
+
status_attribute_string: status_attribute_string,
|
|
339
|
+
validation_errors: validation_errors,
|
|
340
|
+
warnings: warnings,
|
|
341
|
+
additional_properties: additional_properties)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Provides a human-readable string representation of the object.
|
|
345
|
+
def to_s
|
|
346
|
+
class_name = self.class.name.split('::').last
|
|
347
|
+
"<#{class_name} invoice: #{@invoice}, credit_note: #{@credit_note}, prepayment:"\
|
|
348
|
+
" #{@prepayment}, overpayment: #{@overpayment}, invoice_number: #{@invoice_number},"\
|
|
349
|
+
" credit_note_number: #{@credit_note_number}, batch_payment: #{@batch_payment}, account:"\
|
|
350
|
+
" #{@account}, code: #{@code}, date: #{@date}, currency_rate: #{@currency_rate}, amount:"\
|
|
351
|
+
" #{@amount}, bank_amount: #{@bank_amount}, reference: #{@reference}, is_reconciled:"\
|
|
352
|
+
" #{@is_reconciled}, status: #{@status}, payment_type: #{@payment_type}, updated_date_utc:"\
|
|
353
|
+
" #{@updated_date_utc}, payment_id: #{@payment_id}, batch_payment_id: #{@batch_payment_id},"\
|
|
354
|
+
" bank_account_number: #{@bank_account_number}, particulars: #{@particulars}, details:"\
|
|
355
|
+
" #{@details}, has_account: #{@has_account}, has_validation_errors:"\
|
|
356
|
+
" #{@has_validation_errors}, status_attribute_string: #{@status_attribute_string},"\
|
|
357
|
+
" validation_errors: #{@validation_errors}, warnings: #{@warnings}, additional_properties:"\
|
|
358
|
+
" #{@additional_properties}>"
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
362
|
+
def inspect
|
|
363
|
+
class_name = self.class.name.split('::').last
|
|
364
|
+
"<#{class_name} invoice: #{@invoice.inspect}, credit_note: #{@credit_note.inspect},"\
|
|
365
|
+
" prepayment: #{@prepayment.inspect}, overpayment: #{@overpayment.inspect}, invoice_number:"\
|
|
366
|
+
" #{@invoice_number.inspect}, credit_note_number: #{@credit_note_number.inspect},"\
|
|
367
|
+
" batch_payment: #{@batch_payment.inspect}, account: #{@account.inspect}, code:"\
|
|
368
|
+
" #{@code.inspect}, date: #{@date.inspect}, currency_rate: #{@currency_rate.inspect},"\
|
|
369
|
+
" amount: #{@amount.inspect}, bank_amount: #{@bank_amount.inspect}, reference:"\
|
|
370
|
+
" #{@reference.inspect}, is_reconciled: #{@is_reconciled.inspect}, status:"\
|
|
371
|
+
" #{@status.inspect}, payment_type: #{@payment_type.inspect}, updated_date_utc:"\
|
|
372
|
+
" #{@updated_date_utc.inspect}, payment_id: #{@payment_id.inspect}, batch_payment_id:"\
|
|
373
|
+
" #{@batch_payment_id.inspect}, bank_account_number: #{@bank_account_number.inspect},"\
|
|
374
|
+
" particulars: #{@particulars.inspect}, details: #{@details.inspect}, has_account:"\
|
|
375
|
+
" #{@has_account.inspect}, has_validation_errors: #{@has_validation_errors.inspect},"\
|
|
376
|
+
" status_attribute_string: #{@status_attribute_string.inspect}, validation_errors:"\
|
|
377
|
+
" #{@validation_errors.inspect}, warnings: #{@warnings.inspect}, additional_properties:"\
|
|
378
|
+
" #{@additional_properties}>"
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
# PaymentDelete Model.
|
|
8
|
+
class PaymentDelete < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The status of the payment.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :status
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['status'] = 'Status'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(status: 'DELETED', additional_properties: nil)
|
|
34
|
+
# Add additional model properties to the instance
|
|
35
|
+
additional_properties = {} if additional_properties.nil?
|
|
36
|
+
|
|
37
|
+
@status = status
|
|
38
|
+
@additional_properties = additional_properties
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
status = hash['Status'] ||= 'DELETED'
|
|
47
|
+
|
|
48
|
+
# Create a new hash for additional properties, removing known properties.
|
|
49
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
50
|
+
|
|
51
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
52
|
+
new_hash, proc { |value| value }
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Create object from extracted values.
|
|
56
|
+
PaymentDelete.new(status: status,
|
|
57
|
+
additional_properties: additional_properties)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Provides a human-readable string representation of the object.
|
|
61
|
+
def to_s
|
|
62
|
+
class_name = self.class.name.split('::').last
|
|
63
|
+
"<#{class_name} status: #{@status}, additional_properties: #{@additional_properties}>"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
67
|
+
def inspect
|
|
68
|
+
class_name = self.class.name.split('::').last
|
|
69
|
+
"<#{class_name} status: #{@status.inspect}, additional_properties:"\
|
|
70
|
+
" #{@additional_properties}>"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
# PaymentService Model.
|
|
8
|
+
class PaymentService < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Xero identifier
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :payment_service_id
|
|
15
|
+
|
|
16
|
+
# Name of payment service
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :payment_service_name
|
|
19
|
+
|
|
20
|
+
# The custom payment URL
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :payment_service_url
|
|
23
|
+
|
|
24
|
+
# The text displayed on the Pay Now button in Xero Online Invoicing. If this
|
|
25
|
+
# is not set it will default to Pay by credit card
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :pay_now_text
|
|
28
|
+
|
|
29
|
+
# This will always be CUSTOM for payment services created via the API.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :payment_service_type
|
|
32
|
+
|
|
33
|
+
# Displays array of validation error messages from the API
|
|
34
|
+
# @return [Array[ValidationError]]
|
|
35
|
+
attr_accessor :validation_errors
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['payment_service_id'] = 'PaymentServiceID'
|
|
41
|
+
@_hash['payment_service_name'] = 'PaymentServiceName'
|
|
42
|
+
@_hash['payment_service_url'] = 'PaymentServiceUrl'
|
|
43
|
+
@_hash['pay_now_text'] = 'PayNowText'
|
|
44
|
+
@_hash['payment_service_type'] = 'PaymentServiceType'
|
|
45
|
+
@_hash['validation_errors'] = 'ValidationErrors'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
payment_service_id
|
|
53
|
+
payment_service_name
|
|
54
|
+
payment_service_url
|
|
55
|
+
pay_now_text
|
|
56
|
+
payment_service_type
|
|
57
|
+
validation_errors
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(payment_service_id: SKIP, payment_service_name: SKIP,
|
|
67
|
+
payment_service_url: SKIP, pay_now_text: SKIP,
|
|
68
|
+
payment_service_type: SKIP, validation_errors: SKIP,
|
|
69
|
+
additional_properties: nil)
|
|
70
|
+
# Add additional model properties to the instance
|
|
71
|
+
additional_properties = {} if additional_properties.nil?
|
|
72
|
+
|
|
73
|
+
@payment_service_id = payment_service_id unless payment_service_id == SKIP
|
|
74
|
+
@payment_service_name = payment_service_name unless payment_service_name == SKIP
|
|
75
|
+
@payment_service_url = payment_service_url unless payment_service_url == SKIP
|
|
76
|
+
@pay_now_text = pay_now_text unless pay_now_text == SKIP
|
|
77
|
+
@payment_service_type = payment_service_type unless payment_service_type == SKIP
|
|
78
|
+
@validation_errors = validation_errors unless validation_errors == SKIP
|
|
79
|
+
@additional_properties = additional_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Creates an instance of the object from a hash.
|
|
83
|
+
def self.from_hash(hash)
|
|
84
|
+
return nil unless hash
|
|
85
|
+
|
|
86
|
+
# Extract variables from the hash.
|
|
87
|
+
payment_service_id =
|
|
88
|
+
hash.key?('PaymentServiceID') ? hash['PaymentServiceID'] : SKIP
|
|
89
|
+
payment_service_name =
|
|
90
|
+
hash.key?('PaymentServiceName') ? hash['PaymentServiceName'] : SKIP
|
|
91
|
+
payment_service_url =
|
|
92
|
+
hash.key?('PaymentServiceUrl') ? hash['PaymentServiceUrl'] : SKIP
|
|
93
|
+
pay_now_text = hash.key?('PayNowText') ? hash['PayNowText'] : SKIP
|
|
94
|
+
payment_service_type =
|
|
95
|
+
hash.key?('PaymentServiceType') ? hash['PaymentServiceType'] : SKIP
|
|
96
|
+
# Parameter is an array, so we need to iterate through it
|
|
97
|
+
validation_errors = nil
|
|
98
|
+
unless hash['ValidationErrors'].nil?
|
|
99
|
+
validation_errors = []
|
|
100
|
+
hash['ValidationErrors'].each do |structure|
|
|
101
|
+
validation_errors << (ValidationError.from_hash(structure) if structure)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
validation_errors = SKIP unless hash.key?('ValidationErrors')
|
|
106
|
+
|
|
107
|
+
# Create a new hash for additional properties, removing known properties.
|
|
108
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
109
|
+
|
|
110
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
111
|
+
new_hash, proc { |value| value }
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
# Create object from extracted values.
|
|
115
|
+
PaymentService.new(payment_service_id: payment_service_id,
|
|
116
|
+
payment_service_name: payment_service_name,
|
|
117
|
+
payment_service_url: payment_service_url,
|
|
118
|
+
pay_now_text: pay_now_text,
|
|
119
|
+
payment_service_type: payment_service_type,
|
|
120
|
+
validation_errors: validation_errors,
|
|
121
|
+
additional_properties: additional_properties)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Provides a human-readable string representation of the object.
|
|
125
|
+
def to_s
|
|
126
|
+
class_name = self.class.name.split('::').last
|
|
127
|
+
"<#{class_name} payment_service_id: #{@payment_service_id}, payment_service_name:"\
|
|
128
|
+
" #{@payment_service_name}, payment_service_url: #{@payment_service_url}, pay_now_text:"\
|
|
129
|
+
" #{@pay_now_text}, payment_service_type: #{@payment_service_type}, validation_errors:"\
|
|
130
|
+
" #{@validation_errors}, additional_properties: #{@additional_properties}>"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
134
|
+
def inspect
|
|
135
|
+
class_name = self.class.name.split('::').last
|
|
136
|
+
"<#{class_name} payment_service_id: #{@payment_service_id.inspect}, payment_service_name:"\
|
|
137
|
+
" #{@payment_service_name.inspect}, payment_service_url: #{@payment_service_url.inspect},"\
|
|
138
|
+
" pay_now_text: #{@pay_now_text.inspect}, payment_service_type:"\
|
|
139
|
+
" #{@payment_service_type.inspect}, validation_errors: #{@validation_errors.inspect},"\
|
|
140
|
+
" additional_properties: #{@additional_properties}>"
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# xero_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module XeroApIs
|
|
7
|
+
# PaymentServices Model.
|
|
8
|
+
class PaymentServices < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[PaymentService]]
|
|
14
|
+
attr_accessor :payment_services
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['payment_services'] = 'PaymentServices'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
payment_services
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(payment_services: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@payment_services = payment_services unless payment_services == 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
|
+
payment_services = nil
|
|
50
|
+
unless hash['PaymentServices'].nil?
|
|
51
|
+
payment_services = []
|
|
52
|
+
hash['PaymentServices'].each do |structure|
|
|
53
|
+
payment_services << (PaymentService.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
payment_services = SKIP unless hash.key?('PaymentServices')
|
|
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
|
+
PaymentServices.new(payment_services: payment_services,
|
|
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} payment_services: #{@payment_services}, 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} payment_services: #{@payment_services.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|