xero-ruby 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +68 -0
- data/docs/accounting/AccountingApi.md +1497 -785
- 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/Organisation.md +2 -0
- data/docs/accounting/Payment.md +4 -4
- data/docs/accounting/Quote.md +5 -1
- 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 +21 -2
- data/lib/xero-ruby/api/accounting_api.rb +77 -85
- 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 +33 -7
- data/lib/xero-ruby/api_error.rb +2 -2
- data/lib/xero-ruby/configuration.rb +4 -2
- data/lib/xero-ruby/models/accounting/account.rb +56 -20
- data/lib/xero-ruby/models/accounting/account_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/accounts.rb +4 -3
- data/lib/xero-ruby/models/accounting/accounts_payable.rb +5 -3
- data/lib/xero-ruby/models/accounting/accounts_receivable.rb +5 -3
- data/lib/xero-ruby/models/accounting/address.rb +15 -12
- data/lib/xero-ruby/models/accounting/allocation.rb +61 -8
- data/lib/xero-ruby/models/accounting/allocations.rb +4 -3
- data/lib/xero-ruby/models/accounting/attachment.rb +8 -8
- data/lib/xero-ruby/models/accounting/attachments.rb +4 -3
- data/lib/xero-ruby/models/accounting/balances.rb +5 -3
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +35 -20
- data/lib/xero-ruby/models/accounting/bank_transactions.rb +4 -3
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +15 -13
- data/lib/xero-ruby/models/accounting/bank_transfers.rb +4 -3
- data/lib/xero-ruby/models/accounting/batch_payment.rb +24 -18
- data/lib/xero-ruby/models/accounting/batch_payment_details.rb +7 -7
- data/lib/xero-ruby/models/accounting/batch_payments.rb +4 -3
- data/lib/xero-ruby/models/accounting/bill.rb +4 -3
- data/lib/xero-ruby/models/accounting/branding_theme.rb +9 -8
- data/lib/xero-ruby/models/accounting/branding_themes.rb +4 -3
- data/lib/xero-ruby/models/accounting/cis_org_setting.rb +5 -5
- data/lib/xero-ruby/models/accounting/cis_setting.rb +4 -4
- data/lib/xero-ruby/models/accounting/cis_settings.rb +4 -3
- data/lib/xero-ruby/models/accounting/contact.rb +46 -36
- data/lib/xero-ruby/models/accounting/contact_group.rb +8 -6
- data/lib/xero-ruby/models/accounting/contact_groups.rb +4 -3
- data/lib/xero-ruby/models/accounting/contact_person.rb +6 -6
- data/lib/xero-ruby/models/accounting/contacts.rb +4 -3
- data/lib/xero-ruby/models/accounting/country_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/credit_note.rb +38 -25
- data/lib/xero-ruby/models/accounting/credit_notes.rb +4 -3
- data/lib/xero-ruby/models/accounting/currencies.rb +4 -3
- data/lib/xero-ruby/models/accounting/currency.rb +5 -4
- data/lib/xero-ruby/models/accounting/currency_code.rb +2 -2
- data/lib/xero-ruby/models/accounting/element.rb +10 -4
- data/lib/xero-ruby/models/accounting/employee.rb +13 -8
- data/lib/xero-ruby/models/accounting/employees.rb +4 -3
- data/lib/xero-ruby/models/accounting/error.rb +6 -6
- data/lib/xero-ruby/models/accounting/expense_claim.rb +19 -12
- data/lib/xero-ruby/models/accounting/expense_claims.rb +4 -3
- data/lib/xero-ruby/models/accounting/external_link.rb +10 -4
- data/lib/xero-ruby/models/accounting/history_record.rb +6 -6
- data/lib/xero-ruby/models/accounting/history_records.rb +4 -3
- data/lib/xero-ruby/models/accounting/invoice.rb +56 -37
- data/lib/xero-ruby/models/accounting/invoice_reminder.rb +3 -3
- data/lib/xero-ruby/models/accounting/invoice_reminders.rb +4 -3
- data/lib/xero-ruby/models/accounting/invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/item.rb +18 -16
- data/lib/xero-ruby/models/accounting/items.rb +4 -3
- data/lib/xero-ruby/models/accounting/journal.rb +35 -10
- data/lib/xero-ruby/models/accounting/journal_line.rb +14 -13
- data/lib/xero-ruby/models/accounting/journals.rb +4 -3
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/line_item.rb +15 -15
- data/lib/xero-ruby/models/accounting/line_item_tracking.rb +6 -6
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +21 -13
- data/lib/xero-ruby/models/accounting/linked_transactions.rb +4 -3
- data/lib/xero-ruby/models/accounting/manual_journal.rb +21 -15
- data/lib/xero-ruby/models/accounting/manual_journal_line.rb +9 -9
- data/lib/xero-ruby/models/accounting/manual_journals.rb +4 -3
- data/lib/xero-ruby/models/accounting/online_invoice.rb +3 -3
- data/lib/xero-ruby/models/accounting/online_invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/organisation.rb +103 -43
- data/lib/xero-ruby/models/accounting/organisations.rb +4 -3
- data/lib/xero-ruby/models/accounting/overpayment.rb +27 -18
- data/lib/xero-ruby/models/accounting/overpayments.rb +4 -3
- data/lib/xero-ruby/models/accounting/payment.rb +41 -22
- data/lib/xero-ruby/models/accounting/payment_delete.rb +3 -3
- data/lib/xero-ruby/models/accounting/payment_service.rb +8 -8
- data/lib/xero-ruby/models/accounting/payment_services.rb +4 -3
- data/lib/xero-ruby/models/accounting/payment_term.rb +5 -3
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/payments.rb +4 -3
- data/lib/xero-ruby/models/accounting/phone.rb +12 -6
- data/lib/xero-ruby/models/accounting/prepayment.rb +28 -18
- data/lib/xero-ruby/models/accounting/prepayments.rb +4 -3
- data/lib/xero-ruby/models/accounting/purchase.rb +6 -6
- data/lib/xero-ruby/models/accounting/purchase_order.rb +36 -28
- data/lib/xero-ruby/models/accounting/purchase_orders.rb +4 -3
- data/lib/xero-ruby/models/accounting/quote.rb +50 -24
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +2 -2
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +2 -2
- data/lib/xero-ruby/models/accounting/quotes.rb +4 -3
- data/lib/xero-ruby/models/accounting/receipt.rb +25 -16
- data/lib/xero-ruby/models/accounting/receipts.rb +4 -3
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +23 -14
- data/lib/xero-ruby/models/accounting/repeating_invoices.rb +4 -3
- data/lib/xero-ruby/models/accounting/report.rb +10 -8
- data/lib/xero-ruby/models/accounting/report_attribute.rb +5 -3
- data/lib/xero-ruby/models/accounting/report_cell.rb +5 -3
- data/lib/xero-ruby/models/accounting/report_fields.rb +6 -3
- data/lib/xero-ruby/models/accounting/report_row.rb +6 -3
- data/lib/xero-ruby/models/accounting/report_rows.rb +7 -3
- data/lib/xero-ruby/models/accounting/report_with_row.rb +11 -9
- data/lib/xero-ruby/models/accounting/report_with_rows.rb +4 -3
- data/lib/xero-ruby/models/accounting/reports.rb +4 -3
- data/lib/xero-ruby/models/accounting/request_empty.rb +3 -3
- data/lib/xero-ruby/models/accounting/row_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/sales_tracking_category.rb +4 -4
- data/lib/xero-ruby/models/accounting/schedule.rb +19 -11
- data/lib/xero-ruby/models/accounting/tax_component.rb +6 -6
- data/lib/xero-ruby/models/accounting/tax_rate.rb +94 -16
- data/lib/xero-ruby/models/accounting/tax_rates.rb +4 -3
- data/lib/xero-ruby/models/accounting/tax_type.rb +2 -2
- data/lib/xero-ruby/models/accounting/ten_nintey_nine_contact.rb +24 -24
- data/lib/xero-ruby/models/accounting/time_zone.rb +2 -2
- data/lib/xero-ruby/models/accounting/tracking_categories.rb +4 -3
- data/lib/xero-ruby/models/accounting/tracking_category.rb +11 -8
- data/lib/xero-ruby/models/accounting/tracking_option.rb +9 -6
- data/lib/xero-ruby/models/accounting/tracking_options.rb +4 -3
- data/lib/xero-ruby/models/accounting/user.rb +16 -9
- data/lib/xero-ruby/models/accounting/users.rb +4 -3
- data/lib/xero-ruby/models/accounting/validation_error.rb +3 -3
- data/lib/xero-ruby/models/assets/asset.rb +17 -14
- 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 +9 -13
- data/lib/xero-ruby/models/assets/assets.rb +5 -3
- data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +9 -9
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +21 -10
- data/lib/xero-ruby/models/assets/error.rb +7 -7
- data/lib/xero-ruby/models/assets/field_validation_errors_element.rb +8 -8
- data/lib/xero-ruby/models/assets/pagination.rb +7 -3
- data/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +7 -7
- data/lib/xero-ruby/models/assets/setting.rb +10 -10
- data/lib/xero-ruby/models/projects/amount.rb +214 -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 +214 -0
- data/lib/xero-ruby/models/projects/pagination.rb +234 -0
- data/lib/xero-ruby/models/projects/project.rb +419 -0
- data/lib/xero-ruby/models/projects/project_create_or_update.rb +239 -0
- data/lib/xero-ruby/models/projects/project_patch.rb +209 -0
- data/lib/xero-ruby/models/projects/project_status.rb +37 -0
- data/lib/xero-ruby/models/projects/project_user.rb +224 -0
- data/lib/xero-ruby/models/projects/project_users.rb +216 -0
- data/lib/xero-ruby/models/projects/projects.rb +216 -0
- data/lib/xero-ruby/models/projects/task.rb +381 -0
- data/lib/xero-ruby/models/projects/task_create_or_update.rb +249 -0
- data/lib/xero-ruby/models/projects/tasks.rb +216 -0
- data/lib/xero-ruby/models/projects/time_entries.rb +216 -0
- data/lib/xero-ruby/models/projects/time_entry.rb +320 -0
- data/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +264 -0
- data/lib/xero-ruby/version.rb +3 -3
- data/spec/accounting/api/accounting_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +23 -23
- 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.gem +0 -0
- data/xero-ruby.gemspec +3 -3
- metadata +83 -7
- data/xero-ruby-1.0.gem +0 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
# XeroRuby::Projects::ProjectCreateOrUpdate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**contact_id** | **String** | Identifier of the contact this project was created for. | [optional]
|
8
|
+
**name** | **String** | Name of the project. |
|
9
|
+
**estimate_amount** | **Float** | | [optional]
|
10
|
+
**deadline_utc** | **DateTime** | Deadline for the project. UTC Date Time in ISO-8601 format. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'XeroRuby::Projects'
|
16
|
+
|
17
|
+
instance = XeroRuby::Projects::ProjectCreateOrUpdate.new(contact_id: 01234567-89ab-cdef-0123-456789abcdef,
|
18
|
+
name: New Kitchen,
|
19
|
+
estimate_amount: 1.0,
|
20
|
+
deadline_utc: 2019-12-10T12:59:59Z)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# XeroRuby::Projects::ProjectPatch
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**status** | [**ProjectStatus**](ProjectStatus.md) | |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'XeroRuby::Projects'
|
13
|
+
|
14
|
+
instance = XeroRuby::Projects::ProjectPatch.new(status: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# XeroRuby::Projects::ProjectStatus
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'XeroRuby::Projects'
|
12
|
+
|
13
|
+
instance = XeroRuby::Projects::ProjectStatus.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# XeroRuby::Projects::ProjectUser
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**user_id** | **String** | Identifier of the user of the project. | [optional]
|
8
|
+
**name** | **String** | Full name of the user. | [optional]
|
9
|
+
**email** | **String** | Email address of the user. | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'XeroRuby::Projects'
|
15
|
+
|
16
|
+
instance = XeroRuby::Projects::ProjectUser.new(user_id: 254553fa-2be8-4991-bd5e-70a97ea12ef8,
|
17
|
+
name: Sidney Allen,
|
18
|
+
email: sidneyallen@xero.com)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# XeroRuby::Projects::ProjectUsers
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
8
|
+
**items** | [**Array<ProjectUser>**](ProjectUser.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'XeroRuby::Projects'
|
14
|
+
|
15
|
+
instance = XeroRuby::Projects::ProjectUsers.new(pagination: null,
|
16
|
+
items: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# XeroRuby::Projects::Projects
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
8
|
+
**items** | [**Array<Project>**](Project.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'XeroRuby::Projects'
|
14
|
+
|
15
|
+
instance = XeroRuby::Projects::Projects.new(pagination: null,
|
16
|
+
items: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# XeroRuby::Projects::Task
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**task_id** | **String** | Identifier of the task. | [optional]
|
8
|
+
**name** | **String** | Name of the task. | [optional]
|
9
|
+
**rate** | [**Amount**](Amount.md) | | [optional]
|
10
|
+
**charge_type** | [**ChargeType**](ChargeType.md) | | [optional]
|
11
|
+
**estimate_minutes** | **Float** | An estimated time to perform the task | [optional]
|
12
|
+
**project_id** | **String** | Identifier of the project task belongs to. | [optional]
|
13
|
+
**total_minutes** | **Float** | Total minutes which have been logged against the task. Logged by assigning a time entry to a task | [optional]
|
14
|
+
**total_amount** | [**Amount**](Amount.md) | | [optional]
|
15
|
+
**minutes_invoiced** | **Float** | Minutes on this task which have been invoiced. | [optional]
|
16
|
+
**minutes_to_be_invoiced** | **Float** | Minutes on this task which have not been invoiced. | [optional]
|
17
|
+
**fixed_minutes** | **Float** | Minutes logged against this task if its charge type is `FIXED`. | [optional]
|
18
|
+
**non_chargeable_minutes** | **Float** | Minutes logged against this task if its charge type is `NON_CHARGEABLE`. | [optional]
|
19
|
+
**amount_to_be_invoiced** | [**Amount**](Amount.md) | | [optional]
|
20
|
+
**amount_invoiced** | [**Amount**](Amount.md) | | [optional]
|
21
|
+
**status** | **String** | Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified. | [optional]
|
22
|
+
|
23
|
+
## Code Sample
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'XeroRuby::Projects'
|
27
|
+
|
28
|
+
instance = XeroRuby::Projects::Task.new(task_id: 00000000-0000-0000-0000-000000000000,
|
29
|
+
name: null,
|
30
|
+
rate: null,
|
31
|
+
charge_type: null,
|
32
|
+
estimate_minutes: null,
|
33
|
+
project_id: 00000000-0000-0000-0000-000000000000,
|
34
|
+
total_minutes: null,
|
35
|
+
total_amount: null,
|
36
|
+
minutes_invoiced: null,
|
37
|
+
minutes_to_be_invoiced: null,
|
38
|
+
fixed_minutes: null,
|
39
|
+
non_chargeable_minutes: null,
|
40
|
+
amount_to_be_invoiced: null,
|
41
|
+
amount_invoiced: null,
|
42
|
+
status: null)
|
43
|
+
```
|
44
|
+
|
45
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# XeroRuby::Projects::TaskCreateOrUpdate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of the task. Max length 100 characters. |
|
8
|
+
**rate** | [**Amount**](Amount.md) | |
|
9
|
+
**charge_type** | [**ChargeType**](ChargeType.md) | |
|
10
|
+
**estimate_minutes** | **Integer** | Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'XeroRuby::Projects'
|
16
|
+
|
17
|
+
instance = XeroRuby::Projects::TaskCreateOrUpdate.new(name: null,
|
18
|
+
rate: null,
|
19
|
+
charge_type: null,
|
20
|
+
estimate_minutes: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# XeroRuby::Projects::Tasks
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
8
|
+
**items** | [**Array<Task>**](Task.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'XeroRuby::Projects'
|
14
|
+
|
15
|
+
instance = XeroRuby::Projects::Tasks.new(pagination: null,
|
16
|
+
items: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# XeroRuby::Projects::TimeEntries
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
8
|
+
**items** | [**Array<TimeEntry>**](TimeEntry.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'XeroRuby::Projects'
|
14
|
+
|
15
|
+
instance = XeroRuby::Projects::TimeEntries.new(pagination: null,
|
16
|
+
items: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# XeroRuby::Projects::TimeEntry
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**time_entry_id** | **String** | Identifier of the time entry. | [optional]
|
8
|
+
**user_id** | **String** | The xero user identifier of the person who logged time. | [optional]
|
9
|
+
**project_id** | **String** | Identifier of the project, that the task (which the time entry is logged against) belongs to. | [optional]
|
10
|
+
**task_id** | **String** | Identifier of the task that time entry is logged against. | [optional]
|
11
|
+
**date_utc** | **DateTime** | The date time that time entry is logged on. UTC Date Time in ISO-8601 format. | [optional]
|
12
|
+
**date_entered_utc** | **DateTime** | The date time that time entry is created. UTC Date Time in ISO-8601 format. By default it is set to server time. | [optional]
|
13
|
+
**duration** | **Integer** | The duration of logged minutes. | [optional]
|
14
|
+
**description** | **String** | A description of the time entry. | [optional]
|
15
|
+
**status** | **String** | Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced. | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'XeroRuby::Projects'
|
21
|
+
|
22
|
+
instance = XeroRuby::Projects::TimeEntry.new(time_entry_id: 00000000-0000-0000-0000-000000000000,
|
23
|
+
user_id: 00000000-0000-0000-0000-000000000000,
|
24
|
+
project_id: 00000000-0000-0000-0000-000000000000,
|
25
|
+
task_id: 00000000-0000-0000-0000-000000000000,
|
26
|
+
date_utc: null,
|
27
|
+
date_entered_utc: null,
|
28
|
+
duration: null,
|
29
|
+
description: null,
|
30
|
+
status: null)
|
31
|
+
```
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# XeroRuby::Projects::TimeEntryCreateOrUpdate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**user_id** | **String** | The xero user identifier of the person logging the time. |
|
8
|
+
**task_id** | **String** | Identifier of the task that time entry is logged against. |
|
9
|
+
**date_utc** | **DateTime** | Date time entry is logged on. UTC Date Time in ISO-8601 format. |
|
10
|
+
**duration** | **Integer** | Number of minutes to be logged. Duration is between 1 and 59940 inclusively. |
|
11
|
+
**description** | **String** | An optional description of the time entry, will be set to null if not provided during update. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'XeroRuby::Projects'
|
17
|
+
|
18
|
+
instance = XeroRuby::Projects::TimeEntryCreateOrUpdate.new(user_id: 00000000-0000-0000-0000-000000000000,
|
19
|
+
task_id: 00000000-0000-0000-0000-000000000000,
|
20
|
+
date_utc: null,
|
21
|
+
duration: null,
|
22
|
+
description: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/lib/xero-ruby.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -17,6 +17,24 @@ require 'xero-ruby/version'
|
|
17
17
|
require 'xero-ruby/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'xero-ruby/models/projects/amount'
|
21
|
+
require 'xero-ruby/models/projects/charge_type'
|
22
|
+
require 'xero-ruby/models/projects/currency_code'
|
23
|
+
require 'xero-ruby/models/projects/error'
|
24
|
+
require 'xero-ruby/models/projects/pagination'
|
25
|
+
require 'xero-ruby/models/projects/project'
|
26
|
+
require 'xero-ruby/models/projects/project_create_or_update'
|
27
|
+
require 'xero-ruby/models/projects/project_patch'
|
28
|
+
require 'xero-ruby/models/projects/project_status'
|
29
|
+
require 'xero-ruby/models/projects/project_user'
|
30
|
+
require 'xero-ruby/models/projects/project_users'
|
31
|
+
require 'xero-ruby/models/projects/projects'
|
32
|
+
require 'xero-ruby/models/projects/task'
|
33
|
+
require 'xero-ruby/models/projects/task_create_or_update'
|
34
|
+
require 'xero-ruby/models/projects/tasks'
|
35
|
+
require 'xero-ruby/models/projects/time_entries'
|
36
|
+
require 'xero-ruby/models/projects/time_entry'
|
37
|
+
require 'xero-ruby/models/projects/time_entry_create_or_update'
|
20
38
|
require 'xero-ruby/models/assets/asset'
|
21
39
|
require 'xero-ruby/models/assets/asset_status'
|
22
40
|
require 'xero-ruby/models/assets/asset_status_query_param'
|
@@ -145,6 +163,7 @@ require 'xero-ruby/models/accounting/users'
|
|
145
163
|
require 'xero-ruby/models/accounting/validation_error'
|
146
164
|
|
147
165
|
# APIs
|
166
|
+
require 'xero-ruby/api/project_api'
|
148
167
|
require 'xero-ruby/api/asset_api'
|
149
168
|
require 'xero-ruby/api/accounting_api'
|
150
169
|
|
@@ -3,10 +3,10 @@
|
|
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.
|
6
|
+
The version of the OpenAPI document: 2.2.2
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -16,7 +16,7 @@ module XeroRuby
|
|
16
16
|
class AccountingApi
|
17
17
|
attr_accessor :api_client
|
18
18
|
|
19
|
-
def initialize(api_client = ApiClient.
|
19
|
+
def initialize(api_client = ApiClient.new)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Allows you to create a new chart of accounts
|
@@ -6464,6 +6464,73 @@ module XeroRuby
|
|
6464
6464
|
return data, status_code, headers
|
6465
6465
|
end
|
6466
6466
|
|
6467
|
+
# Allows you to retrieve a single contact by Contact Number in a Xero organisation
|
6468
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6469
|
+
# @param contact_number [String] This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
|
6470
|
+
# @param [Hash] opts the optional parameters
|
6471
|
+
# @return [Contacts]
|
6472
|
+
def get_contact_by_contact_number(xero_tenant_id, contact_number, opts = {})
|
6473
|
+
data, _status_code, _headers = get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, opts)
|
6474
|
+
data
|
6475
|
+
end
|
6476
|
+
|
6477
|
+
# Allows you to retrieve a single contact by Contact Number in a Xero organisation
|
6478
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6479
|
+
# @param contact_number [String] This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
|
6480
|
+
# @param [Hash] opts the optional parameters
|
6481
|
+
# @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
|
6482
|
+
def get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, opts = {})
|
6483
|
+
if @api_client.config.debugging
|
6484
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_by_contact_number ...'
|
6485
|
+
end
|
6486
|
+
# verify the required parameter 'xero_tenant_id' is set
|
6487
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
6488
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_by_contact_number"
|
6489
|
+
end
|
6490
|
+
# verify the required parameter 'contact_number' is set
|
6491
|
+
if @api_client.config.client_side_validation && contact_number.nil?
|
6492
|
+
fail ArgumentError, "Missing the required parameter 'contact_number' when calling AccountingApi.get_contact_by_contact_number"
|
6493
|
+
end
|
6494
|
+
# resource path
|
6495
|
+
local_var_path = '/Contacts/{ContactNumber}'.sub('{' + 'ContactNumber' + '}', contact_number.to_s)
|
6496
|
+
|
6497
|
+
# query parameters
|
6498
|
+
query_params = opts[:query_params] || {}
|
6499
|
+
|
6500
|
+
# header parameters
|
6501
|
+
header_params = opts[:header_params] || {}
|
6502
|
+
# HTTP header 'Accept' (if needed)
|
6503
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
6504
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
6505
|
+
|
6506
|
+
# form parameters
|
6507
|
+
form_params = opts[:form_params] || {}
|
6508
|
+
|
6509
|
+
# http body (model)
|
6510
|
+
post_body = opts[:body]
|
6511
|
+
|
6512
|
+
# return_type
|
6513
|
+
return_type = opts[:return_type] || 'Contacts'
|
6514
|
+
|
6515
|
+
# auth_names
|
6516
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
6517
|
+
|
6518
|
+
new_options = opts.merge(
|
6519
|
+
:header_params => header_params,
|
6520
|
+
:query_params => query_params,
|
6521
|
+
:form_params => form_params,
|
6522
|
+
:body => post_body,
|
6523
|
+
:auth_names => auth_names,
|
6524
|
+
:return_type => return_type
|
6525
|
+
)
|
6526
|
+
|
6527
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
6528
|
+
if @api_client.config.debugging
|
6529
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_contact_by_contact_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
6530
|
+
end
|
6531
|
+
return data, status_code, headers
|
6532
|
+
end
|
6533
|
+
|
6467
6534
|
# Allows you to retrieve CISSettings for a contact in a Xero organisation
|
6468
6535
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6469
6536
|
# @param contact_id [String] Unique identifier for a Contact
|
@@ -9778,6 +9845,7 @@ module XeroRuby
|
|
9778
9845
|
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
9779
9846
|
# @option opts [String] :where Filter by an any element
|
9780
9847
|
# @option opts [String] :order Order by an any element
|
9848
|
+
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
|
9781
9849
|
# @return [Payments]
|
9782
9850
|
def get_payments(xero_tenant_id, opts = {})
|
9783
9851
|
data, _status_code, _headers = get_payments_with_http_info(xero_tenant_id, opts)
|
@@ -9790,6 +9858,7 @@ module XeroRuby
|
|
9790
9858
|
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
9791
9859
|
# @option opts [String] :where Filter by an any element
|
9792
9860
|
# @option opts [String] :order Order by an any element
|
9861
|
+
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
|
9793
9862
|
# @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
|
9794
9863
|
def get_payments_with_http_info(xero_tenant_id, opts = {})
|
9795
9864
|
if @api_client.config.debugging
|
@@ -9806,6 +9875,7 @@ module XeroRuby
|
|
9806
9875
|
query_params = opts[:query_params] || {}
|
9807
9876
|
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
|
9808
9877
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
9878
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
9809
9879
|
|
9810
9880
|
# header parameters
|
9811
9881
|
header_params = opts[:header_params] || {}
|
@@ -9909,73 +9979,6 @@ module XeroRuby
|
|
9909
9979
|
return data, status_code, headers
|
9910
9980
|
end
|
9911
9981
|
|
9912
|
-
# Allows you to retrieve prepayments as PDF files
|
9913
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9914
|
-
# @param prepayment_id [String] Unique identifier for a PrePayment
|
9915
|
-
# @param [Hash] opts the optional parameters
|
9916
|
-
# @return [File]
|
9917
|
-
def get_prepayment_as_pdf(xero_tenant_id, prepayment_id, opts = {})
|
9918
|
-
data, _status_code, _headers = get_prepayment_as_pdf_with_http_info(xero_tenant_id, prepayment_id, opts)
|
9919
|
-
data
|
9920
|
-
end
|
9921
|
-
|
9922
|
-
# Allows you to retrieve prepayments as PDF files
|
9923
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9924
|
-
# @param prepayment_id [String] Unique identifier for a PrePayment
|
9925
|
-
# @param [Hash] opts the optional parameters
|
9926
|
-
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
9927
|
-
def get_prepayment_as_pdf_with_http_info(xero_tenant_id, prepayment_id, opts = {})
|
9928
|
-
if @api_client.config.debugging
|
9929
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.get_prepayment_as_pdf ...'
|
9930
|
-
end
|
9931
|
-
# verify the required parameter 'xero_tenant_id' is set
|
9932
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
9933
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_prepayment_as_pdf"
|
9934
|
-
end
|
9935
|
-
# verify the required parameter 'prepayment_id' is set
|
9936
|
-
if @api_client.config.client_side_validation && prepayment_id.nil?
|
9937
|
-
fail ArgumentError, "Missing the required parameter 'prepayment_id' when calling AccountingApi.get_prepayment_as_pdf"
|
9938
|
-
end
|
9939
|
-
# resource path
|
9940
|
-
local_var_path = '/Prepayments/{PrepaymentID}'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s)
|
9941
|
-
|
9942
|
-
# query parameters
|
9943
|
-
query_params = opts[:query_params] || {}
|
9944
|
-
|
9945
|
-
# header parameters
|
9946
|
-
header_params = opts[:header_params] || {}
|
9947
|
-
# HTTP header 'Accept' (if needed)
|
9948
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/pdf'])
|
9949
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
9950
|
-
|
9951
|
-
# form parameters
|
9952
|
-
form_params = opts[:form_params] || {}
|
9953
|
-
|
9954
|
-
# http body (model)
|
9955
|
-
post_body = opts[:body]
|
9956
|
-
|
9957
|
-
# return_type
|
9958
|
-
return_type = opts[:return_type] || 'File'
|
9959
|
-
|
9960
|
-
# auth_names
|
9961
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
9962
|
-
|
9963
|
-
new_options = opts.merge(
|
9964
|
-
:header_params => header_params,
|
9965
|
-
:query_params => query_params,
|
9966
|
-
:form_params => form_params,
|
9967
|
-
:body => post_body,
|
9968
|
-
:auth_names => auth_names,
|
9969
|
-
:return_type => return_type
|
9970
|
-
)
|
9971
|
-
|
9972
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
9973
|
-
if @api_client.config.debugging
|
9974
|
-
@api_client.config.logger.debug "API called: AccountingApi#get_prepayment_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
9975
|
-
end
|
9976
|
-
return data, status_code, headers
|
9977
|
-
end
|
9978
|
-
|
9979
9982
|
# Allows you to retrieve a history records of an Prepayment
|
9980
9983
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
9981
9984
|
# @param prepayment_id [String] Unique identifier for a PrePayment
|
@@ -13146,26 +13149,20 @@ module XeroRuby
|
|
13146
13149
|
return data, status_code, headers
|
13147
13150
|
end
|
13148
13151
|
|
13149
|
-
# Allows you to update a single spend or receive money transaction
|
13150
13152
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
13151
|
-
# @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction
|
13152
13153
|
# @param bank_transactions [BankTransactions]
|
13153
13154
|
# @param [Hash] opts the optional parameters
|
13154
|
-
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
13155
13155
|
# @return [BankTransactions]
|
13156
|
-
def update_bank_transaction(xero_tenant_id,
|
13157
|
-
data, _status_code, _headers = update_bank_transaction_with_http_info(xero_tenant_id,
|
13156
|
+
def update_bank_transaction(xero_tenant_id, bank_transactions, opts = {})
|
13157
|
+
data, _status_code, _headers = update_bank_transaction_with_http_info(xero_tenant_id, bank_transactions, opts)
|
13158
13158
|
data
|
13159
13159
|
end
|
13160
13160
|
|
13161
|
-
# Allows you to update a single spend or receive money transaction
|
13162
13161
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
13163
|
-
# @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction
|
13164
13162
|
# @param bank_transactions [BankTransactions]
|
13165
13163
|
# @param [Hash] opts the optional parameters
|
13166
|
-
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
13167
13164
|
# @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
|
13168
|
-
def update_bank_transaction_with_http_info(xero_tenant_id,
|
13165
|
+
def update_bank_transaction_with_http_info(xero_tenant_id, bank_transactions, opts = {})
|
13169
13166
|
if @api_client.config.debugging
|
13170
13167
|
@api_client.config.logger.debug 'Calling API: AccountingApi.update_bank_transaction ...'
|
13171
13168
|
end
|
@@ -13173,20 +13170,15 @@ module XeroRuby
|
|
13173
13170
|
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
13174
13171
|
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_bank_transaction"
|
13175
13172
|
end
|
13176
|
-
# verify the required parameter 'bank_transaction_id' is set
|
13177
|
-
if @api_client.config.client_side_validation && bank_transaction_id.nil?
|
13178
|
-
fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.update_bank_transaction"
|
13179
|
-
end
|
13180
13173
|
# verify the required parameter 'bank_transactions' is set
|
13181
13174
|
if @api_client.config.client_side_validation && bank_transactions.nil?
|
13182
13175
|
fail ArgumentError, "Missing the required parameter 'bank_transactions' when calling AccountingApi.update_bank_transaction"
|
13183
13176
|
end
|
13184
13177
|
# resource path
|
13185
|
-
local_var_path = '/BankTransactions/{BankTransactionID}'
|
13178
|
+
local_var_path = '/BankTransactions/{BankTransactionID}'
|
13186
13179
|
|
13187
13180
|
# query parameters
|
13188
13181
|
query_params = opts[:query_params] || {}
|
13189
|
-
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
13190
13182
|
|
13191
13183
|
# header parameters
|
13192
13184
|
header_params = opts[:header_params] || {}
|