@@ -5,7 +5,9 @@ All URIs are relative to *https://api.xero.com/projects.xro/2.0*
55Method | HTTP request | Description
66------------- | ------------- | -------------
77[**create_project**](ProjectApi.md#create_project) | **POST** /Projects | Create one or more new projects
8+ [**create_task**](ProjectApi.md#create_task) | **POST** /Projects/{projectId}/Tasks | Allows you to create a task
89[**create_time_entry**](ProjectApi.md#create_time_entry) | **POST** /Projects/{projectId}/Time | Creates a time entry for a specific project
10+ [**delete_task**](ProjectApi.md#delete_task) | **DELETE** /Projects/{projectId}/Tasks/{taskId} | Allows you to delete a task
911[**delete_time_entry**](ProjectApi.md#delete_time_entry) | **DELETE** /Projects/{projectId}/Time/{timeEntryId} | Deletes a time entry for a specific project
1012[**get_project**](ProjectApi.md#get_project) | **GET** /Projects/{projectId} | Retrieves a single project
1113[**get_project_users**](ProjectApi.md#get_project_users) | **GET** /ProjectsUsers | Retrieves a list of all project users
@@ -16,6 +18,7 @@ Method | HTTP request | Description
1618[**get_time_entry**](ProjectApi.md#get_time_entry) | **GET** /Projects/{projectId}/Time/{timeEntryId} | Retrieves a single time entry for a specific project
1719[**patch_project**](ProjectApi.md#patch_project) | **PATCH** /Projects/{projectId} | creates a project for the specified contact
1820[**update_project**](ProjectApi.md#update_project) | **PUT** /Projects/{projectId} | Updates a specific project
21+ [**update_task**](ProjectApi.md#update_task) | **PUT** /Projects/{projectId}/Tasks/{taskId} | Allows you to update a task
1922[**update_time_entry**](ProjectApi.md#update_time_entry) | **PUT** /Projects/{projectId}/Time/{timeEntryId} | Updates a time entry for a specific project
2023
2124
@@ -84,6 +87,73 @@ Name | Type | Description | Notes
8487- **Accept**: application/json
8588
8689
90+ ## create_task
91+
92+ > create_task(xero_tenant_id, project_id, task_create_or_update)
93+
94+ Allows you to create a task
95+
96+ Allows you to create a specific task
97+
98+ ### Example
99+
100+ ```ruby
101+ # load the gem
102+ require 'xero-ruby'
103+
104+ creds = {
105+ client_id: ENV['CLIENT_ID'],
106+ client_secret: ENV['CLIENT_SECRET'],
107+ redirect_uri: ENV['REDIRECT_URI'],
108+ scopes: ENV['SCOPES']
109+ }
110+ xero_client = XeroRuby::ApiClient.new(credentials: creds)
111+
112+ token_set = fetch_valid_token_set(user) # example
113+
114+ xero_client.refresh_token_set(token_set)
115+
116+ # You need to namespace your api method call to one of the following api sets
117+ # [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]
118+
119+ api_instance = xero_client.<api_set>
120+
121+
122+
123+ xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
124+ project_id = 'project_id_example' # String | You can create a task on a specified projectId
125+ task_create_or_update = { "status": "INPROGRESS" } # TaskCreateOrUpdate | The task object you are creating
126+ begin
127+ #Allows you to create a task
128+ api_instance.create_task(xero_tenant_id, project_id, task_create_or_update)
129+ rescue XeroRuby::Projects::ApiError => e
130+ puts "Exception when calling ProjectApi->create_task: #{e}"
131+ end
132+ ```
133+
134+ ### Parameters
135+
136+
137+ Name | Type | Description | Notes
138+ ------------- | ------------- | ------------- | -------------
139+ **xero_tenant_id** | **String**| Xero identifier for Tenant |
140+ **project_id** | [**String**](.md)| You can create a task on a specified projectId |
141+ **task_create_or_update** | [**TaskCreateOrUpdate**](TaskCreateOrUpdate.md)| The task object you are creating |
142+
143+ ### Return type
144+
145+ nil (empty response body)
146+
147+ ### Authorization
148+
149+ [OAuth2](../README.md#OAuth2)
150+
151+ ### HTTP request headers
152+
153+ - **Content-Type**: application/json
154+ - **Accept**: application/json
155+
156+
87157## create_time_entry
88158
89159> TimeEntry create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update)
@@ -152,6 +222,73 @@ Name | Type | Description | Notes
152222- **Accept**: application/json
153223
154224
225+ ## delete_task
226+
227+ > delete_task(xero_tenant_id, project_id, task_id)
228+
229+ Allows you to delete a task
230+
231+ Allows you to delete a specific task
232+
233+ ### Example
234+
235+ ```ruby
236+ # load the gem
237+ require 'xero-ruby'
238+
239+ creds = {
240+ client_id: ENV['CLIENT_ID'],
241+ client_secret: ENV['CLIENT_SECRET'],
242+ redirect_uri: ENV['REDIRECT_URI'],
243+ scopes: ENV['SCOPES']
244+ }
245+ xero_client = XeroRuby::ApiClient.new(credentials: creds)
246+
247+ token_set = fetch_valid_token_set(user) # example
248+
249+ xero_client.refresh_token_set(token_set)
250+
251+ # You need to namespace your api method call to one of the following api sets
252+ # [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]
253+
254+ api_instance = xero_client.<api_set>
255+
256+
257+
258+ xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
259+ project_id = 'project_id_example' # String | You can specify an individual project by appending the projectId to the endpoint
260+ task_id = 'task_id_example' # String | You can specify an individual task by appending the id to the endpoint
261+ begin
262+ #Allows you to delete a task
263+ api_instance.delete_task(xero_tenant_id, project_id, task_id)
264+ rescue XeroRuby::Projects::ApiError => e
265+ puts "Exception when calling ProjectApi->delete_task: #{e}"
266+ end
267+ ```
268+
269+ ### Parameters
270+
271+
272+ Name | Type | Description | Notes
273+ ------------- | ------------- | ------------- | -------------
274+ **xero_tenant_id** | **String**| Xero identifier for Tenant |
275+ **project_id** | [**String**](.md)| You can specify an individual project by appending the projectId to the endpoint |
276+ **task_id** | [**String**](.md)| You can specify an individual task by appending the id to the endpoint |
277+
278+ ### Return type
279+
280+ nil (empty response body)
281+
282+ ### Authorization
283+
284+ [OAuth2](../README.md#OAuth2)
285+
286+ ### HTTP request headers
287+
288+ - **Content-Type**: Not defined
289+ - **Accept**: application/json
290+
291+
155292## delete_time_entry
156293
157294> delete_time_entry(xero_tenant_id, project_id, time_entry_id)
@@ -216,7 +353,7 @@ nil (empty response body)
216353### HTTP request headers
217354
218355- **Content-Type**: Not defined
219- - **Accept**: Not defined
356+ - **Accept**: application/json
220357
221358
222359## get_project
@@ -886,6 +1023,75 @@ nil (empty response body)
8861023- **Accept**: application/json
8871024
8881025
1026+ ## update_task
1027+
1028+ > update_task(xero_tenant_id, project_id, task_id, task_create_or_update)
1029+
1030+ Allows you to update a task
1031+
1032+ Allows you to update a specific task
1033+
1034+ ### Example
1035+
1036+ ```ruby
1037+ # load the gem
1038+ require 'xero-ruby'
1039+
1040+ creds = {
1041+ client_id: ENV['CLIENT_ID'],
1042+ client_secret: ENV['CLIENT_SECRET'],
1043+ redirect_uri: ENV['REDIRECT_URI'],
1044+ scopes: ENV['SCOPES']
1045+ }
1046+ xero_client = XeroRuby::ApiClient.new(credentials: creds)
1047+
1048+ token_set = fetch_valid_token_set(user) # example
1049+
1050+ xero_client.refresh_token_set(token_set)
1051+
1052+ # You need to namespace your api method call to one of the following api sets
1053+ # [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api, :app_store_api]
1054+
1055+ api_instance = xero_client.<api_set>
1056+
1057+
1058+
1059+ xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
1060+ project_id = 'project_id_example' # String | You can specify an individual project by appending the projectId to the endpoint
1061+ task_id = 'task_id_example' # String | You can specify an individual task by appending the id to the endpoint
1062+ task_create_or_update = XeroRuby::Projects::TaskCreateOrUpdate.new # TaskCreateOrUpdate | The task object you are updating
1063+ begin
1064+ #Allows you to update a task
1065+ api_instance.update_task(xero_tenant_id, project_id, task_id, task_create_or_update)
1066+ rescue XeroRuby::Projects::ApiError => e
1067+ puts "Exception when calling ProjectApi->update_task: #{e}"
1068+ end
1069+ ```
1070+
1071+ ### Parameters
1072+
1073+
1074+ Name | Type | Description | Notes
1075+ ------------- | ------------- | ------------- | -------------
1076+ **xero_tenant_id** | **String**| Xero identifier for Tenant |
1077+ **project_id** | [**String**](.md)| You can specify an individual project by appending the projectId to the endpoint |
1078+ **task_id** | [**String**](.md)| You can specify an individual task by appending the id to the endpoint |
1079+ **task_create_or_update** | [**TaskCreateOrUpdate**](TaskCreateOrUpdate.md)| The task object you are updating |
1080+
1081+ ### Return type
1082+
1083+ nil (empty response body)
1084+
1085+ ### Authorization
1086+
1087+ [OAuth2](../README.md#OAuth2)
1088+
1089+ ### HTTP request headers
1090+
1091+ - **Content-Type**: application/json
1092+ - **Accept**: application/json
1093+
1094+
8891095## update_time_entry
8901096
8911097> update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update)
@@ -952,5 +1158,5 @@ nil (empty response body)
9521158### HTTP request headers
9531159
9541160- **Content-Type**: application/json
955- - **Accept**: Not defined
1161+ - **Accept**: application/json
9561162
0 commit comments