xero-ruby 1.0 → 2.0.3
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 +4 -4
- data/README.md +43 -3
- data/build_notes.md +21 -0
- data/docs/accounting/AccountingApi.md +1514 -722
- data/docs/accounting/Allocation.md +11 -1
- data/docs/accounting/BankTransfer.md +1 -1
- data/docs/accounting/BatchPayment.md +1 -1
- data/docs/accounting/Contact.md +2 -2
- data/docs/accounting/CreditNote.md +2 -2
- data/docs/accounting/Invoice.md +2 -2
- data/docs/accounting/Journal.md +1 -1
- data/docs/accounting/ManualJournalLine.md +2 -0
- data/docs/accounting/Organisation.md +3 -1
- data/docs/accounting/Payment.md +6 -4
- data/docs/accounting/Quote.md +5 -1
- data/docs/accounting/Report.md +1 -1
- data/docs/accounting/{TenNinteyNineContact.md → TenNinetyNineContact.md} +2 -2
- data/docs/assets/AssetApi.md +40 -16
- data/docs/assets/AssetType.md +1 -1
- data/docs/projects/Amount.md +19 -0
- data/docs/projects/ChargeType.md +16 -0
- data/docs/projects/CurrencyCode.md +16 -0
- data/docs/projects/Error.md +19 -0
- data/docs/projects/Pagination.md +23 -0
- data/docs/projects/Project.md +59 -0
- data/docs/projects/ProjectApi.md +979 -0
- data/docs/projects/ProjectCreateOrUpdate.md +23 -0
- data/docs/projects/ProjectPatch.md +17 -0
- data/docs/projects/ProjectStatus.md +16 -0
- data/docs/projects/ProjectUser.md +21 -0
- data/docs/projects/ProjectUsers.md +19 -0
- data/docs/projects/Projects.md +19 -0
- data/docs/projects/Task.md +45 -0
- data/docs/projects/TaskCreateOrUpdate.md +23 -0
- data/docs/projects/Tasks.md +19 -0
- data/docs/projects/TimeEntries.md +19 -0
- data/docs/projects/TimeEntry.md +33 -0
- data/docs/projects/TimeEntryCreateOrUpdate.md +25 -0
- data/lib/xero-ruby.rb +22 -3
- data/lib/xero-ruby/api/accounting_api.rb +85 -9
- data/lib/xero-ruby/api/asset_api.rb +3 -3
- data/lib/xero-ruby/api/project_api.rb +1035 -0
- data/lib/xero-ruby/api_client.rb +103 -37
- data/lib/xero-ruby/api_error.rb +2 -2
- data/lib/xero-ruby/configuration.rb +4 -5
- data/lib/xero-ruby/models/accounting/account.rb +61 -20
- data/lib/xero-ruby/models/accounting/account_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/accounts.rb +8 -3
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +11 -5
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +11 -5
- data/lib/xero-ruby/models/accounting/address.rb +19 -12
- data/lib/xero-ruby/models/accounting/allocation.rb +66 -9
- data/lib/xero-ruby/models/accounting/allocations.rb +8 -3
- data/lib/xero-ruby/models/accounting/attachment.rb +12 -8
- data/lib/xero-ruby/models/accounting/attachments.rb +8 -3
- data/lib/xero-ruby/models/accounting/balances.rb +9 -3
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +43 -24
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +8 -3
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +20 -14
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +8 -3
- data/lib/xero-ruby/models/accounting/batch_payment.rb +29 -19
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +11 -7
- data/lib/xero-ruby/models/accounting/batch_payments.rb +8 -3
- data/lib/xero-ruby/models/accounting/bill.rb +8 -3
- data/lib/xero-ruby/models/accounting/branding_theme.rb +13 -8
- data/lib/xero-ruby/models/accounting/branding_themes.rb +8 -3
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +9 -5
- data/lib/xero-ruby/models/accounting/cis_setting.rb +8 -4
- data/lib/xero-ruby/models/accounting/cis_settings.rb +8 -3
- data/lib/xero-ruby/models/accounting/contact.rb +51 -37
- data/lib/xero-ruby/models/accounting/contact_group.rb +12 -6
- data/lib/xero-ruby/models/accounting/contact_groups.rb +8 -3
- data/lib/xero-ruby/models/accounting/contact_person.rb +10 -6
- data/lib/xero-ruby/models/accounting/contacts.rb +8 -3
- data/lib/xero-ruby/models/accounting/country_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/credit_note.rb +47 -30
- data/lib/xero-ruby/models/accounting/credit_notes.rb +8 -3
- data/lib/xero-ruby/models/accounting/currencies.rb +8 -3
- data/lib/xero-ruby/models/accounting/currency.rb +9 -4
- data/lib/xero-ruby/models/accounting/currency_code.rb +4 -4
- data/lib/xero-ruby/models/accounting/element.rb +14 -4
- data/lib/xero-ruby/models/accounting/employee.rb +17 -8
- data/lib/xero-ruby/models/accounting/employees.rb +8 -3
- data/lib/xero-ruby/models/accounting/error.rb +10 -6
- data/lib/xero-ruby/models/accounting/expense_claim.rb +26 -15
- data/lib/xero-ruby/models/accounting/expense_claims.rb +8 -3
- data/lib/xero-ruby/models/accounting/external_link.rb +14 -4
- data/lib/xero-ruby/models/accounting/history_record.rb +10 -6
- data/lib/xero-ruby/models/accounting/history_records.rb +8 -3
- data/lib/xero-ruby/models/accounting/invoice.rb +69 -46
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +7 -3
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +8 -3
- data/lib/xero-ruby/models/accounting/invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/item.rb +24 -18
- data/lib/xero-ruby/models/accounting/items.rb +8 -3
- data/lib/xero-ruby/models/accounting/journal.rb +40 -11
- data/lib/xero-ruby/models/accounting/journal_line.rb +21 -16
- data/lib/xero-ruby/models/accounting/journals.rb +8 -3
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/line_item.rb +25 -21
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +10 -6
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +25 -13
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +8 -3
- data/lib/xero-ruby/models/accounting/manual_journal.rb +25 -15
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +26 -12
- data/lib/xero-ruby/models/accounting/manual_journals.rb +8 -3
- data/lib/xero-ruby/models/accounting/online_invoice.rb +7 -3
- data/lib/xero-ruby/models/accounting/online_invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/organisation.rb +122 -32
- data/lib/xero-ruby/models/accounting/organisations.rb +8 -3
- data/lib/xero-ruby/models/accounting/overpayment.rb +36 -23
- data/lib/xero-ruby/models/accounting/overpayments.rb +8 -3
- data/lib/xero-ruby/models/accounting/payment.rb +57 -24
- data/lib/xero-ruby/models/accounting/payment_delete.rb +7 -3
- data/lib/xero-ruby/models/accounting/payment_service.rb +12 -8
- data/lib/xero-ruby/models/accounting/payment_services.rb +8 -3
- data/lib/xero-ruby/models/accounting/payment_term.rb +9 -3
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/payments.rb +8 -3
- data/lib/xero-ruby/models/accounting/phone.rb +16 -6
- data/lib/xero-ruby/models/accounting/prepayment.rb +37 -23
- data/lib/xero-ruby/models/accounting/prepayments.rb +8 -3
- data/lib/xero-ruby/models/accounting/purchase.rb +11 -7
- data/lib/xero-ruby/models/accounting/purchase_order.rb +45 -33
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +8 -3
- data/lib/xero-ruby/models/accounting/quote.rb +58 -28
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +3 -2
- data/lib/xero-ruby/models/accounting/quotes.rb +8 -3
- data/lib/xero-ruby/models/accounting/receipt.rb +32 -19
- data/lib/xero-ruby/models/accounting/receipts.rb +8 -3
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +30 -17
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +8 -3
- data/lib/xero-ruby/models/accounting/report.rb +15 -9
- data/lib/xero-ruby/models/accounting/report_attribute.rb +9 -3
- data/lib/xero-ruby/models/accounting/report_cell.rb +9 -3
- data/lib/xero-ruby/models/accounting/report_fields.rb +10 -3
- data/lib/xero-ruby/models/accounting/report_row.rb +10 -3
- data/lib/xero-ruby/models/accounting/report_rows.rb +11 -3
- data/lib/xero-ruby/models/accounting/report_with_row.rb +15 -9
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +8 -3
- data/lib/xero-ruby/models/accounting/reports.rb +8 -3
- data/lib/xero-ruby/models/accounting/request_empty.rb +7 -3
- data/lib/xero-ruby/models/accounting/row_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +8 -4
- data/lib/xero-ruby/models/accounting/schedule.rb +23 -11
- data/lib/xero-ruby/models/accounting/tax_component.rb +11 -7
- data/lib/xero-ruby/models/accounting/tax_rate.rb +100 -18
- data/lib/xero-ruby/models/accounting/tax_rates.rb +8 -3
- data/lib/xero-ruby/models/accounting/tax_type.rb +6 -2
- data/lib/xero-ruby/models/accounting/{ten_nintey_nine_contact.rb → ten_ninety_nine_contact.rb} +44 -40
- data/lib/xero-ruby/models/accounting/time_zone.rb +2 -2
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +8 -3
- data/lib/xero-ruby/models/accounting/tracking_category.rb +15 -8
- data/lib/xero-ruby/models/accounting/tracking_option.rb +13 -6
- data/lib/xero-ruby/models/accounting/tracking_options.rb +8 -3
- data/lib/xero-ruby/models/accounting/user.rb +20 -9
- data/lib/xero-ruby/models/accounting/users.rb +8 -3
- data/lib/xero-ruby/models/accounting/validation_error.rb +7 -3
- data/lib/xero-ruby/models/assets/asset.rb +24 -17
- data/lib/xero-ruby/models/assets/asset_status.rb +2 -2
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +2 -2
- data/lib/xero-ruby/models/assets/asset_type.rb +13 -13
- data/lib/xero-ruby/models/assets/assets.rb +9 -3
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +19 -15
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +26 -11
- data/lib/xero-ruby/models/assets/error.rb +11 -7
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +12 -8
- data/lib/xero-ruby/models/assets/pagination.rb +11 -3
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +11 -7
- data/lib/xero-ruby/models/assets/setting.rb +14 -10
- data/lib/xero-ruby/models/projects/amount.rb +218 -0
- data/lib/xero-ruby/models/projects/charge_type.rb +38 -0
- data/lib/xero-ruby/models/projects/currency_code.rb +199 -0
- data/lib/xero-ruby/models/projects/error.rb +218 -0
- data/lib/xero-ruby/models/projects/pagination.rb +238 -0
- data/lib/xero-ruby/models/projects/project.rb +423 -0
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +243 -0
- data/lib/xero-ruby/models/projects/project_patch.rb +213 -0
- data/lib/xero-ruby/models/projects/project_status.rb +37 -0
- data/lib/xero-ruby/models/projects/project_user.rb +228 -0
- data/lib/xero-ruby/models/projects/project_users.rb +220 -0
- data/lib/xero-ruby/models/projects/projects.rb +220 -0
- data/lib/xero-ruby/models/projects/task.rb +385 -0
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +253 -0
- data/lib/xero-ruby/models/projects/tasks.rb +220 -0
- data/lib/xero-ruby/models/projects/time_entries.rb +220 -0
- data/lib/xero-ruby/models/projects/time_entry.rb +324 -0
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +268 -0
- data/lib/xero-ruby/version.rb +3 -3
- data/spec/accounting/api/accounting_api_spec.rb +19 -6
- data/spec/accounting/models/account_spec.rb +1 -1
- data/spec/accounting/models/account_type_spec.rb +1 -1
- data/spec/accounting/models/accounts_payable_spec.rb +1 -1
- data/spec/accounting/models/accounts_receivable_spec.rb +1 -1
- data/spec/accounting/models/accounts_spec.rb +1 -1
- data/spec/accounting/models/address_spec.rb +1 -1
- data/spec/accounting/models/allocation_spec.rb +1 -1
- data/spec/accounting/models/allocations_spec.rb +1 -1
- data/spec/accounting/models/attachment_spec.rb +1 -1
- data/spec/accounting/models/attachments_spec.rb +1 -1
- data/spec/accounting/models/balances_spec.rb +1 -1
- data/spec/accounting/models/bank_transaction_spec.rb +1 -1
- data/spec/accounting/models/bank_transactions_spec.rb +1 -1
- data/spec/accounting/models/bank_transfer_spec.rb +1 -1
- data/spec/accounting/models/bank_transfers_spec.rb +1 -1
- data/spec/accounting/models/batch_payment_details_spec.rb +1 -1
- data/spec/accounting/models/batch_payment_spec.rb +1 -1
- data/spec/accounting/models/batch_payments_spec.rb +1 -1
- data/spec/accounting/models/bill_spec.rb +1 -1
- data/spec/accounting/models/branding_theme_spec.rb +1 -1
- data/spec/accounting/models/branding_themes_spec.rb +1 -1
- data/spec/accounting/models/cis_org_setting_spec.rb +1 -1
- data/spec/accounting/models/cis_setting_spec.rb +1 -1
- data/spec/accounting/models/cis_settings_spec.rb +1 -1
- data/spec/accounting/models/contact_group_spec.rb +1 -1
- data/spec/accounting/models/contact_groups_spec.rb +1 -1
- data/spec/accounting/models/contact_person_spec.rb +1 -1
- data/spec/accounting/models/contact_spec.rb +1 -1
- data/spec/accounting/models/contacts_spec.rb +1 -1
- data/spec/accounting/models/country_code_spec.rb +1 -1
- data/spec/accounting/models/credit_note_spec.rb +1 -1
- data/spec/accounting/models/credit_notes_spec.rb +1 -1
- data/spec/accounting/models/currencies_spec.rb +1 -1
- data/spec/accounting/models/currency_code_spec.rb +1 -1
- data/spec/accounting/models/currency_spec.rb +1 -1
- data/spec/accounting/models/element_spec.rb +1 -1
- data/spec/accounting/models/employee_spec.rb +1 -1
- data/spec/accounting/models/employees_spec.rb +1 -1
- data/spec/accounting/models/error_spec.rb +1 -1
- data/spec/accounting/models/expense_claim_spec.rb +1 -1
- data/spec/accounting/models/expense_claims_spec.rb +1 -1
- data/spec/accounting/models/external_link_spec.rb +1 -1
- data/spec/accounting/models/history_record_spec.rb +1 -1
- data/spec/accounting/models/history_records_spec.rb +1 -1
- data/spec/accounting/models/invoice_reminder_spec.rb +1 -1
- data/spec/accounting/models/invoice_reminders_spec.rb +1 -1
- data/spec/accounting/models/invoice_spec.rb +1 -1
- data/spec/accounting/models/invoices_spec.rb +1 -1
- data/spec/accounting/models/item_spec.rb +1 -1
- data/spec/accounting/models/items_spec.rb +1 -1
- data/spec/accounting/models/journal_line_spec.rb +1 -1
- data/spec/accounting/models/journal_spec.rb +1 -1
- data/spec/accounting/models/journals_spec.rb +1 -1
- data/spec/accounting/models/line_amount_types_spec.rb +1 -1
- data/spec/accounting/models/line_item_spec.rb +1 -1
- data/spec/accounting/models/line_item_tracking_spec.rb +1 -1
- data/spec/accounting/models/linked_transaction_spec.rb +1 -1
- data/spec/accounting/models/linked_transactions_spec.rb +1 -1
- data/spec/accounting/models/manual_journal_line_spec.rb +1 -1
- data/spec/accounting/models/manual_journal_spec.rb +1 -1
- data/spec/accounting/models/manual_journals_spec.rb +1 -1
- data/spec/accounting/models/online_invoice_spec.rb +1 -1
- data/spec/accounting/models/online_invoices_spec.rb +1 -1
- data/spec/accounting/models/organisation_spec.rb +1 -1
- data/spec/accounting/models/organisations_spec.rb +1 -1
- data/spec/accounting/models/overpayment_spec.rb +1 -1
- data/spec/accounting/models/overpayments_spec.rb +1 -1
- data/spec/accounting/models/payment_delete_spec.rb +1 -1
- data/spec/accounting/models/payment_service_spec.rb +1 -1
- data/spec/accounting/models/payment_services_spec.rb +1 -1
- data/spec/accounting/models/payment_spec.rb +7 -1
- data/spec/accounting/models/payment_term_spec.rb +1 -1
- data/spec/accounting/models/payment_term_type_spec.rb +1 -1
- data/spec/accounting/models/payments_spec.rb +1 -1
- data/spec/accounting/models/phone_spec.rb +1 -1
- data/spec/accounting/models/prepayment_spec.rb +1 -1
- data/spec/accounting/models/prepayments_spec.rb +1 -1
- data/spec/accounting/models/purchase_order_spec.rb +1 -1
- data/spec/accounting/models/purchase_orders_spec.rb +1 -1
- data/spec/accounting/models/purchase_spec.rb +1 -1
- data/spec/accounting/models/quote_line_amount_types_spec.rb +1 -1
- data/spec/accounting/models/quote_spec.rb +1 -1
- data/spec/accounting/models/quote_status_codes_spec.rb +1 -1
- data/spec/accounting/models/quotes_spec.rb +1 -1
- data/spec/accounting/models/receipt_spec.rb +1 -1
- data/spec/accounting/models/receipts_spec.rb +1 -1
- data/spec/accounting/models/repeating_invoice_spec.rb +1 -1
- data/spec/accounting/models/repeating_invoices_spec.rb +1 -1
- data/spec/accounting/models/report_attribute_spec.rb +1 -1
- data/spec/accounting/models/report_cell_spec.rb +1 -1
- data/spec/accounting/models/report_fields_spec.rb +1 -1
- data/spec/accounting/models/report_row_spec.rb +1 -1
- data/spec/accounting/models/report_rows_spec.rb +1 -1
- data/spec/accounting/models/report_spec.rb +1 -1
- data/spec/accounting/models/report_with_row_spec.rb +1 -1
- data/spec/accounting/models/report_with_rows_spec.rb +1 -1
- data/spec/accounting/models/reports_spec.rb +1 -1
- data/spec/accounting/models/request_empty_spec.rb +1 -1
- data/spec/accounting/models/row_type_spec.rb +1 -1
- data/spec/accounting/models/sales_tracking_category_spec.rb +1 -1
- data/spec/accounting/models/schedule_spec.rb +1 -1
- data/spec/accounting/models/tax_component_spec.rb +1 -1
- data/spec/accounting/models/tax_rate_spec.rb +2 -2
- data/spec/accounting/models/tax_rates_spec.rb +1 -1
- data/spec/accounting/models/tax_type_spec.rb +1 -1
- data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +7 -7
- data/spec/accounting/models/time_zone_spec.rb +1 -1
- data/spec/accounting/models/tracking_categories_spec.rb +1 -1
- data/spec/accounting/models/tracking_category_spec.rb +1 -1
- data/spec/accounting/models/tracking_option_spec.rb +1 -1
- data/spec/accounting/models/tracking_options_spec.rb +1 -1
- data/spec/accounting/models/user_spec.rb +1 -1
- data/spec/accounting/models/users_spec.rb +1 -1
- data/spec/accounting/models/validation_error_spec.rb +1 -1
- data/spec/api_client_spec.rb +120 -33
- data/spec/assets/api/asset_api_spec.rb +4 -4
- data/spec/assets/models/asset_spec.rb +1 -1
- data/spec/assets/models/asset_status_query_param_spec.rb +1 -1
- data/spec/assets/models/asset_status_spec.rb +1 -1
- data/spec/assets/models/asset_type_spec.rb +1 -1
- data/spec/assets/models/assets_spec.rb +1 -1
- data/spec/assets/models/book_depreciation_detail_spec.rb +1 -1
- data/spec/assets/models/book_depreciation_setting_spec.rb +1 -1
- data/spec/assets/models/error_spec.rb +1 -1
- data/spec/assets/models/field_validation_errors_element_spec.rb +1 -1
- data/spec/assets/models/pagination_spec.rb +1 -1
- data/spec/assets/models/resource_validation_errors_element_spec.rb +1 -1
- data/spec/assets/models/setting_spec.rb +1 -1
- data/spec/configuration_spec.rb +8 -24
- data/spec/projects/api/project_api_spec.rb +229 -0
- data/spec/projects/models/amount_spec.rb +47 -0
- data/spec/projects/models/charge_type_spec.rb +35 -0
- data/spec/projects/models/currency_code_spec.rb +35 -0
- data/spec/projects/models/error_spec.rb +47 -0
- data/spec/projects/models/pagination_spec.rb +59 -0
- data/spec/projects/models/project_create_or_update_spec.rb +59 -0
- data/spec/projects/models/project_patch_spec.rb +41 -0
- data/spec/projects/models/project_spec.rb +167 -0
- data/spec/projects/models/project_status_spec.rb +35 -0
- data/spec/projects/models/project_user_spec.rb +53 -0
- data/spec/projects/models/project_users_spec.rb +47 -0
- data/spec/projects/models/projects_spec.rb +47 -0
- data/spec/projects/models/task_create_or_update_spec.rb +59 -0
- data/spec/projects/models/task_spec.rb +129 -0
- data/spec/projects/models/tasks_spec.rb +47 -0
- data/spec/projects/models/time_entries_spec.rb +47 -0
- data/spec/projects/models/time_entry_create_or_update_spec.rb +65 -0
- data/spec/projects/models/time_entry_spec.rb +93 -0
- data/spec/spec_helper.rb +1 -1
- data/xero-ruby.gemspec +3 -4
- metadata +85 -9
- data/xero-ruby.gem +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -63,7 +63,7 @@ describe 'TaxRate' do
|
|
|
63
63
|
describe 'test attribute "report_tax_type"' do
|
|
64
64
|
it 'should work' do
|
|
65
65
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
66
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT"])
|
|
66
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE"])
|
|
67
67
|
# validator.allowable_values.each do |value|
|
|
68
68
|
# expect { @instance.report_tax_type = value }.not_to raise_error
|
|
69
69
|
# end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -14,22 +14,22 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for XeroRuby::Accounting::
|
|
17
|
+
# Unit tests for XeroRuby::Accounting::TenNinetyNineContact
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe '
|
|
20
|
+
describe 'TenNinetyNineContact' do
|
|
21
21
|
before do
|
|
22
22
|
# run before each test
|
|
23
|
-
@instance = XeroRuby::Accounting::
|
|
23
|
+
@instance = XeroRuby::Accounting::TenNinetyNineContact.new
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
after do
|
|
27
27
|
# run after each test
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test an instance of
|
|
31
|
-
it 'should create an instance of
|
|
32
|
-
expect(@instance).to be_instance_of(XeroRuby::Accounting::
|
|
30
|
+
describe 'test an instance of TenNinetyNineContact' do
|
|
31
|
+
it 'should create an instance of TenNinetyNineContact' do
|
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Accounting::TenNinetyNineContact)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
describe 'test attribute "box1"' do
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
data/spec/api_client_spec.rb
CHANGED
|
@@ -3,49 +3,49 @@
|
|
|
3
3
|
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
|
-
require 'spec_helper'
|
|
13
|
+
require './spec_helper'
|
|
14
14
|
|
|
15
|
-
describe XeroRuby::
|
|
15
|
+
describe XeroRuby::ApiClient do
|
|
16
16
|
context 'initialization' do
|
|
17
17
|
context 'URL stuff' do
|
|
18
18
|
context 'host' do
|
|
19
19
|
it 'removes http from host' do
|
|
20
|
-
XeroRuby
|
|
21
|
-
expect(XeroRuby::
|
|
20
|
+
XeroRuby.configure { |c| c.host = 'http://example.com' }
|
|
21
|
+
expect(XeroRuby::Configuration.default.host).to eq('example.com')
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it 'removes https from host' do
|
|
25
|
-
XeroRuby
|
|
26
|
-
expect(XeroRuby::
|
|
25
|
+
XeroRuby.configure { |c| c.host = 'https://wookiee.com' }
|
|
26
|
+
expect(XeroRuby::Configuration.default.host).to eq('wookiee.com')
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
it 'removes trailing path from host' do
|
|
30
|
-
XeroRuby
|
|
31
|
-
expect(XeroRuby::
|
|
30
|
+
XeroRuby.configure { |c| c.host = 'hobo.com/v4' }
|
|
31
|
+
expect(XeroRuby::Configuration.default.host).to eq('hobo.com')
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
context 'base_path' do
|
|
36
36
|
it "prepends a slash to base_path" do
|
|
37
|
-
XeroRuby
|
|
38
|
-
expect(XeroRuby::
|
|
37
|
+
XeroRuby.configure { |c| c.base_path = 'v4/dog' }
|
|
38
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('/v4/dog')
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it "doesn't prepend a slash if one is already there" do
|
|
42
|
-
XeroRuby
|
|
43
|
-
expect(XeroRuby::
|
|
42
|
+
XeroRuby.configure { |c| c.base_path = '/v4/dog' }
|
|
43
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('/v4/dog')
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
it "ends up as a blank string if nil" do
|
|
47
|
-
XeroRuby
|
|
48
|
-
expect(XeroRuby::
|
|
47
|
+
XeroRuby.configure { |c| c.base_path = nil }
|
|
48
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('')
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -53,7 +53,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
53
53
|
|
|
54
54
|
describe '#deserialize' do
|
|
55
55
|
it "handles Array<Integer>" do
|
|
56
|
-
api_client = XeroRuby::
|
|
56
|
+
api_client = XeroRuby::ApiClient.new
|
|
57
57
|
headers = { 'Content-Type' => 'application/json' }
|
|
58
58
|
response = double('response', headers: headers, body: '[12, 34]')
|
|
59
59
|
data = api_client.deserialize(response, 'Array<Integer>')
|
|
@@ -62,7 +62,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
it 'handles Array<Array<Integer>>' do
|
|
65
|
-
api_client = XeroRuby::
|
|
65
|
+
api_client = XeroRuby::ApiClient.new
|
|
66
66
|
headers = { 'Content-Type' => 'application/json' }
|
|
67
67
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
|
68
68
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
|
@@ -71,7 +71,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
it 'handles Hash<String, String>' do
|
|
74
|
-
api_client = XeroRuby::
|
|
74
|
+
api_client = XeroRuby::ApiClient.new
|
|
75
75
|
headers = { 'Content-Type' => 'application/json' }
|
|
76
76
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
|
77
77
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
|
@@ -80,22 +80,109 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
-
describe "#object_to_hash" do
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
describe "#object_to_hash modifies a hash from snake_case to PascalCase" do
|
|
84
|
+
contact_after = {:Contacts=>[{:Name=>"Bruce Banner", :EmailAddress=>"hulk@avengers.com", :Phones=>[{:PhoneType=>"MOBILE", :PhoneNumber=>"555-1212", :PhoneAreaCode=>"415"}], :PaymentTerms=>{:Bills=>{:Day=>15, :Type=>"OFCURRENTMONTH"}, :Sales=>{:Day=>10, :Type=>"DAYSAFTERBILLMONTH"}}}]}
|
|
85
|
+
|
|
86
|
+
it 'Serializes snake_case object correctly' do
|
|
87
|
+
contact_before = {:contacts=>[{:name=>"Bruce Banner", :email_address=>"hulk@avengers.com", :phones=>[{:phone_type=>"MOBILE", :phone_number=>"555-1212", :phone_area_code=>"415"}], :payment_terms=>{:bills=>{:day=>15, :type=>"OFCURRENTMONTH"}, :sales=>{:day=>10, :type=>"DAYSAFTERBILLMONTH"}}}]}
|
|
88
|
+
api_client = XeroRuby::ApiClient.new
|
|
89
|
+
expect(api_client.object_to_hash(contact_before)).to eq(contact_after)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
it 'Serializes camelCase object correctly' do
|
|
93
|
+
json_before = {
|
|
94
|
+
type: "ACCREC",
|
|
95
|
+
invoiceNumber: "INV-01",
|
|
96
|
+
dueDate: "2020-01-01",
|
|
97
|
+
lineItems: [
|
|
98
|
+
{ quantity: 1.0, unitAmount: 20 }
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
json_after = {
|
|
102
|
+
Type: "ACCREC",
|
|
103
|
+
InvoiceNumber: "INV-01",
|
|
104
|
+
DueDate: "2020-01-01",
|
|
105
|
+
LineItems: [
|
|
106
|
+
{ Quantity: 1.0, UnitAmount: 20 }
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
api_client = XeroRuby::ApiClient.new
|
|
110
|
+
expect(api_client.object_to_hash(json_before)).to eq(json_after)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
it 'Serializes json with multiple nested objects correctly' do
|
|
114
|
+
json_before = {
|
|
115
|
+
"line_Items":[
|
|
116
|
+
{
|
|
117
|
+
"quantity":1.0,
|
|
118
|
+
"unit_amount":20,
|
|
119
|
+
"sub_Items":[
|
|
120
|
+
{
|
|
121
|
+
"quantity":1.0,
|
|
122
|
+
"unit_amount":20
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"quantity":1.0,
|
|
126
|
+
"Unit_amount":20,
|
|
127
|
+
"Deep_Items":[
|
|
128
|
+
{
|
|
129
|
+
"quantity":1.0,
|
|
130
|
+
"unit_amount":20
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"quantity":1.0,
|
|
134
|
+
"unit_Amount":20
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
json_after = {
|
|
144
|
+
"LineItems":[
|
|
145
|
+
{
|
|
146
|
+
"UnitAmount":20,
|
|
147
|
+
"Quantity":1.0,
|
|
148
|
+
"SubItems":[
|
|
149
|
+
{
|
|
150
|
+
"UnitAmount":20,
|
|
151
|
+
"Quantity":1.0
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"UnitAmount":20,
|
|
155
|
+
"Quantity":1.0,
|
|
156
|
+
"DeepItems":[
|
|
157
|
+
{
|
|
158
|
+
"UnitAmount":20,
|
|
159
|
+
"Quantity":1.0
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"UnitAmount":20,
|
|
163
|
+
"Quantity":1.0
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
api_client = XeroRuby::ApiClient.new
|
|
172
|
+
expect(api_client.object_to_hash(json_before)).to eq(json_after)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
it 'Serializes mixed cased keys correctly' do
|
|
176
|
+
contact_after = { :Contacts=>[{:Name=>"Bruce Banner", :EmailAddress=>"hulk@avengers.com", :Phones=>[{:PhoneType=>"MOBILE", :PhoneNumber=>"555-1212", :PhoneAreaCode=>"415"}], :PaymentTerms=>{:Bills=>{:Day=>15, :Type=>"OFCURRENTMONTH"}, :Sales=>{:Day=>10, :Type=>"DAYSAFTERBILLMONTH"}}}]}
|
|
177
|
+
contact_before = {:contacts=>[{:name=>"Bruce Banner", :emailAddress=>"hulk@avengers.com", :phones=>[{:phoneType=>"MOBILE", :phone_number=>"555-1212", :phone_areaCode=>"415"}], :Payment_terms=>{:bills=>{:day=>15, :type=>"OFCURRENTMONTH"}, :sales=>{:day=>10, :type=>"DAYSAFTERBILLMONTH"}}}]}
|
|
178
|
+
api_client = XeroRuby::ApiClient.new
|
|
179
|
+
expect(api_client.object_to_hash(contact_before)).to eq(contact_after)
|
|
93
180
|
end
|
|
94
181
|
end
|
|
95
182
|
|
|
96
183
|
describe '#build_collection_param' do
|
|
97
184
|
let(:param) { ['aa', 'bb', 'cc'] }
|
|
98
|
-
let(:api_client) { XeroRuby::
|
|
185
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
|
99
186
|
|
|
100
187
|
it 'works for csv' do
|
|
101
188
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
|
@@ -123,7 +210,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
123
210
|
end
|
|
124
211
|
|
|
125
212
|
describe '#json_mime?' do
|
|
126
|
-
let(:api_client) { XeroRuby::
|
|
213
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
|
127
214
|
|
|
128
215
|
it 'works' do
|
|
129
216
|
expect(api_client.json_mime?(nil)).to eq false
|
|
@@ -140,7 +227,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
140
227
|
end
|
|
141
228
|
|
|
142
229
|
describe '#select_header_accept' do
|
|
143
|
-
let(:api_client) { XeroRuby::
|
|
230
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
|
144
231
|
|
|
145
232
|
it 'works' do
|
|
146
233
|
expect(api_client.select_header_accept(nil)).to be_nil
|
|
@@ -156,7 +243,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
156
243
|
end
|
|
157
244
|
|
|
158
245
|
describe '#select_header_content_type' do
|
|
159
|
-
let(:api_client) { XeroRuby::
|
|
246
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
|
160
247
|
|
|
161
248
|
it 'works' do
|
|
162
249
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
|
@@ -171,7 +258,7 @@ describe XeroRuby::Accounting::ApiClient do
|
|
|
171
258
|
end
|
|
172
259
|
|
|
173
260
|
describe '#sanitize_filename' do
|
|
174
|
-
let(:api_client) { XeroRuby::
|
|
261
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
|
175
262
|
|
|
176
263
|
it 'works' do
|
|
177
264
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#This is the Xero Assets API
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2.1.
|
|
6
|
+
The version of the OpenAPI document: 2.1.3
|
|
7
7
|
Contact: api@xero.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.3.0
|
|
@@ -13,13 +13,13 @@ OpenAPI Generator version: 4.3.0
|
|
|
13
13
|
require 'spec_helper'
|
|
14
14
|
require 'json'
|
|
15
15
|
|
|
16
|
-
# Unit tests for XeroRuby::
|
|
16
|
+
# Unit tests for XeroRuby::AssetApi
|
|
17
17
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
18
|
# Please update as you see appropriate
|
|
19
19
|
describe 'AssetApi' do
|
|
20
20
|
before do
|
|
21
21
|
# run before each test
|
|
22
|
-
@api_instance = XeroRuby::
|
|
22
|
+
@api_instance = XeroRuby::AssetApi.new
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
after do
|
|
@@ -28,7 +28,7 @@ describe 'AssetApi' do
|
|
|
28
28
|
|
|
29
29
|
describe 'test an instance of AssetApi' do
|
|
30
30
|
it 'should create an instance of AssetApi' do
|
|
31
|
-
expect(@api_instance).to be_instance_of(XeroRuby::
|
|
31
|
+
expect(@api_instance).to be_instance_of(XeroRuby::AssetApi)
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|