xero-ruby 1.1.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +181 -72
- data/build_notes.md +43 -0
- data/docs/accounting/AccountingApi.md +1503 -779
- data/docs/accounting/Allocation.md +11 -1
- data/docs/accounting/Attachment.md +1 -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/ManualJournalLine.md +2 -0
- data/docs/accounting/Organisation.md +3 -1
- data/docs/accounting/Payment.md +4 -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 +1368 -72
- data/lib/xero-ruby/api/asset_api.rb +39 -3
- data/lib/xero-ruby/api/project_api.rb +1113 -0
- data/lib/xero-ruby/api_client.rb +104 -38
- 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 +13 -9
- 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 +2 -2
- 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 +39 -10
- 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 +47 -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 +2 -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 +3 -3
- data/spec/accounting/models/ten_nintey_nine_contact_spec.rb +6 -6
- data/spec/api_client_spec.rb +125 -38
- data/spec/assets/api/asset_api_spec.rb +3 -3
- data/spec/configuration_spec.rb +7 -23
- 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/xero-ruby.gemspec +3 -4
- metadata +85 -10
- data/xero-ruby-1.0.gem +0 -0
- data/xero-ruby.gem +0 -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
|
|
data/spec/configuration_spec.rb
CHANGED
@@ -12,31 +12,15 @@ OpenAPI Generator version: 4.3.0
|
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
|
15
|
-
describe XeroRuby::
|
16
|
-
let(:config) { XeroRuby::
|
15
|
+
describe XeroRuby::Configuration do
|
16
|
+
let(:config) { XeroRuby::Configuration.default }
|
17
17
|
|
18
|
-
|
19
|
-
# uncomment below to setup host and base_path
|
20
|
-
# require 'URI'
|
21
|
-
# uri = URI.parse("https://api.xero.com/api.xro/2.0")
|
22
|
-
# XeroRuby::Accounting.configure do |c|
|
23
|
-
# c.host = uri.host
|
24
|
-
# c.base_path = uri.path
|
25
|
-
# end
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#base_url' do
|
18
|
+
describe 'urls' do
|
29
19
|
it 'should have the default value' do
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
it 'should remove trailing slashes' do
|
35
|
-
[nil, '', '/', '//'].each do |base_path|
|
36
|
-
config.base_path = base_path
|
37
|
-
# uncomment below to test trailing slashes
|
38
|
-
# expect(config.base_url).to eq("https://api.xero.com/api.xro/2.0")
|
39
|
-
end
|
20
|
+
expect(config.login_url).to eq("https://login.xero.com/identity/connect/authorize")
|
21
|
+
expect(config.token_url).to eq("https://identity.xero.com/connect/token")
|
22
|
+
expect(config.accounting_url).to eq("https://api.xero.com/api.xro/2.0")
|
23
|
+
expect(config.asset_url).to eq("https://api.xero.com/assets.xro/1.0")
|
40
24
|
end
|
41
25
|
end
|
42
26
|
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Projects API
|
3
|
+
|
4
|
+
#This is the Xero Projects API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
|
+
Contact: api@xero.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for XeroRuby::ProjectApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ProjectApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = XeroRuby::ProjectApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ProjectApi' do
|
30
|
+
it 'should create an instance of ProjectApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(XeroRuby::ProjectApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create_project
|
36
|
+
# create one or more new projects
|
37
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
38
|
+
# @param project_create_or_update Create a new project with ProjectCreateOrUpdate object
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Project]
|
41
|
+
describe 'create_project test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for create_time_entry
|
48
|
+
# Allows you to create a task
|
49
|
+
# Allows you to create a specific task
|
50
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
51
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
52
|
+
# @param time_entry_create_or_update The time entry object you are creating
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [TimeEntry]
|
55
|
+
describe 'create_time_entry test' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# unit tests for delete_time_entry
|
62
|
+
# Allows you to delete a time entry
|
63
|
+
# Allows you to delete a specific time entry
|
64
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
65
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
66
|
+
# @param time_entry_id You can specify an individual task by appending the id to the endpoint
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @return [nil]
|
69
|
+
describe 'delete_time_entry test' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# unit tests for get_project
|
76
|
+
# Allows you to retrieve a single project
|
77
|
+
# Allows you to retrieve a specific project
|
78
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
79
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [Project]
|
82
|
+
describe 'get_project test' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# unit tests for get_project_users
|
89
|
+
# list all project users
|
90
|
+
# Allows you to retrieve the users on a projects.
|
91
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
94
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
95
|
+
# @return [ProjectUsers]
|
96
|
+
describe 'get_project_users test' do
|
97
|
+
it 'should work' do
|
98
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# unit tests for get_projects
|
103
|
+
# list all projects
|
104
|
+
# Allows you to retrieve, create and update projects.
|
105
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds
|
108
|
+
# @option opts [String] :contact_id Filter for projects for a specific contact
|
109
|
+
# @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED)
|
110
|
+
# @option opts [Integer] :page set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
111
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
112
|
+
# @return [Projects]
|
113
|
+
describe 'get_projects test' do
|
114
|
+
it 'should work' do
|
115
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# unit tests for get_task
|
120
|
+
# Allows you to retrieve a single project
|
121
|
+
# Allows you to retrieve a specific project
|
122
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
123
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
124
|
+
# @param task_id You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskId}
|
125
|
+
# @param [Hash] opts the optional parameters
|
126
|
+
# @return [Task]
|
127
|
+
describe 'get_task test' do
|
128
|
+
it 'should work' do
|
129
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# unit tests for get_tasks
|
134
|
+
# Allows you to retrieve a single project
|
135
|
+
# Allows you to retrieve a specific project
|
136
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
137
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
140
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
141
|
+
# @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskId},{taskId}
|
142
|
+
# @return [Tasks]
|
143
|
+
describe 'get_tasks test' do
|
144
|
+
it 'should work' do
|
145
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# unit tests for get_time_entries
|
150
|
+
# Allows you to retrieve the time entries associated with a specific project
|
151
|
+
# Allows you to retrieve the time entries associated with a specific project
|
152
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
153
|
+
# @param project_id Identifier of the project, that the task (which the time entry is logged against) belongs to.
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [String] :user_id The xero user identifier of the person who logged time.
|
156
|
+
# @option opts [String] :task_id Identifier of the task that time entry is logged against.
|
157
|
+
# @option opts [String] :invoice_id Finds all time entries for this invoice.
|
158
|
+
# @option opts [String] :contact_id Finds all time entries for this contact identifier.
|
159
|
+
# @option opts [Integer] :page Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
|
160
|
+
# @option opts [Integer] :page_size Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
|
161
|
+
# @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever’s specified.
|
162
|
+
# @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
|
163
|
+
# @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
|
164
|
+
# @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
|
165
|
+
# @return [TimeEntries]
|
166
|
+
describe 'get_time_entries test' do
|
167
|
+
it 'should work' do
|
168
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# unit tests for get_time_entry
|
173
|
+
# Allows you to get a single time entry in a project
|
174
|
+
# Allows you to upget a single time entry in a project
|
175
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
176
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
177
|
+
# @param time_entry_id You can specify an individual time entry by appending the id to the endpoint
|
178
|
+
# @param [Hash] opts the optional parameters
|
179
|
+
# @return [TimeEntry]
|
180
|
+
describe 'get_time_entry test' do
|
181
|
+
it 'should work' do
|
182
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# unit tests for patch_project
|
187
|
+
# creates a project for the specified contact
|
188
|
+
# Allows you to update a specific projects.
|
189
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
190
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
191
|
+
# @param project_patch Update the status of an existing Project
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [nil]
|
194
|
+
describe 'patch_project test' do
|
195
|
+
it 'should work' do
|
196
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# unit tests for update_project
|
201
|
+
# update a specific project
|
202
|
+
# Allows you to update a specific projects.
|
203
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
204
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
205
|
+
# @param project_create_or_update Request of type ProjectCreateOrUpdate
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @return [nil]
|
208
|
+
describe 'update_project test' do
|
209
|
+
it 'should work' do
|
210
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# unit tests for update_time_entry
|
215
|
+
# Allows you to update time entry in a project
|
216
|
+
# Allows you to update time entry in a project
|
217
|
+
# @param xero_tenant_id Xero identifier for Tenant
|
218
|
+
# @param project_id You can specify an individual project by appending the projectId to the endpoint
|
219
|
+
# @param time_entry_id You can specify an individual time entry by appending the id to the endpoint
|
220
|
+
# @param time_entry_create_or_update The time entry object you are updating
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @return [nil]
|
223
|
+
describe 'update_time_entry test' do
|
224
|
+
it 'should work' do
|
225
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Projects API
|
3
|
+
|
4
|
+
#This is the Xero Projects API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
|
+
Contact: api@xero.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for XeroRuby::Projects::Amount
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Amount' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = XeroRuby::Projects::Amount.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Amount' do
|
31
|
+
it 'should create an instance of Amount' do
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Projects::Amount)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "currency"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "value"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Projects API
|
3
|
+
|
4
|
+
#This is the Xero Projects API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
|
+
Contact: api@xero.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for XeroRuby::Projects::ChargeType
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'ChargeType' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = XeroRuby::Projects::ChargeType.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of ChargeType' do
|
31
|
+
it 'should create an instance of ChargeType' do
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Projects::ChargeType)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Projects API
|
3
|
+
|
4
|
+
#This is the Xero Projects API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
|
+
Contact: api@xero.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for XeroRuby::Projects::CurrencyCode
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'CurrencyCode' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = XeroRuby::Projects::CurrencyCode.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of CurrencyCode' do
|
31
|
+
it 'should create an instance of CurrencyCode' do
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Projects::CurrencyCode)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Projects API
|
3
|
+
|
4
|
+
#This is the Xero Projects API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
|
+
Contact: api@xero.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for XeroRuby::Projects::Error
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Error' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = XeroRuby::Projects::Error.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Error' do
|
31
|
+
it 'should create an instance of Error' do
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Projects::Error)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "message"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "model_state"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|