class XeroRuby::ProjectApi
Attributes
Public Class Methods
# File lib/xero-ruby/api/project_api.rb, line 16 def initialize(api_client = ApiClient.new) @api_client = api_client end
Public Instance Methods
Create one or more new projects @param xero_tenant_id [String] Xero identifier for Tenant @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object @param [Hash] opts the optional parameters @return [Project]
# File lib/xero-ruby/api/project_api.rb, line 24 def create_project(xero_tenant_id, project_create_or_update, opts = {}) data, _status_code, _headers = create_project_with_http_info(xero_tenant_id, project_create_or_update, opts) data end
Create one or more new projects @param xero_tenant_id [String] Xero identifier for Tenant @param project_create_or_update [ProjectCreateOrUpdate] Create a new project with ProjectCreateOrUpdate object @param [Hash] opts the optional parameters @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 34 def create_project_with_http_info(xero_tenant_id, project_create_or_update, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_project" end # verify the required parameter 'project_create_or_update' is set if @api_client.config.client_side_validation && project_create_or_update.nil? fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.create_project" end # resource path local_var_path = '/Projects' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(project_create_or_update) # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a time entry for a specific project Allows you to create a specific task @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating @param [Hash] opts the optional parameters @return [TimeEntry]
# File lib/xero-ruby/api/project_api.rb, line 103 def create_time_entry(xero_tenant_id, project_id, time_entry_create_or_update, opts = {}) data, _status_code, _headers = create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, opts) data end
Creates a time entry for a specific project Allows you to create a specific task @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are creating @param [Hash] opts the optional parameters @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 115 def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_create_or_update, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.create_time_entry ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.create_time_entry" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_time_entry" end # verify the required parameter 'time_entry_create_or_update' is set if @api_client.config.client_side_validation && time_entry_create_or_update.nil? fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.create_time_entry" end # resource path local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update) # return_type return_type = opts[:return_type] || 'TimeEntry' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#create_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a time entry for a specific project Allows you to delete a specific time entry @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/project_api.rb, line 188 def delete_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {}) delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts) nil end
Deletes a time entry for a specific project Allows you to delete a specific time entry @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual task by appending the id to the endpoint @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 200 def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.delete_time_entry ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.delete_time_entry" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_time_entry" end # verify the required parameter 'time_entry_id' is set if @api_client.config.client_side_validation && time_entry_id.nil? fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.delete_time_entry" end # resource path local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#delete_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single project Allows you to retrieve a specific project using the projectId @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param [Hash] opts the optional parameters @return [Project]
# File lib/xero-ruby/api/project_api.rb, line 268 def get_project(xero_tenant_id, project_id, opts = {}) data, _status_code, _headers = get_project_with_http_info(xero_tenant_id, project_id, opts) data end
Retrieves a list of all project users Allows you to retrieve the users on a projects. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @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. (default to 1) @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. (default to 50) @return [ProjectUsers]
# File lib/xero-ruby/api/project_api.rb, line 346 def get_project_users(xero_tenant_id, opts = {}) data, _status_code, _headers = get_project_users_with_http_info(xero_tenant_id, opts) data end
Retrieves a list of all project users Allows you to retrieve the users on a projects. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @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. @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. @return [Array<(ProjectUsers, Integer, Hash)>] ProjectUsers data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 358 def get_project_users_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_project_users ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project_users" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_project_users, must be greater than or equal to 1.' end # resource path local_var_path = '/ProjectsUsers' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ProjectUsers' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_project_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single project Allows you to retrieve a specific project using the projectId @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param [Hash] opts the optional parameters @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 279 def get_project_with_http_info(xero_tenant_id, project_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_project ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_project" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project" end # resource path local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all projects Allows you to retrieve, create and update projects. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds @option opts [String] :contact_id Filter for projects for a specific contact @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED) @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. (default to 1) @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. (default to 50) @return [Projects]
# File lib/xero-ruby/api/project_api.rb, line 434 def get_projects(xero_tenant_id, opts = {}) data, _status_code, _headers = get_projects_with_http_info(xero_tenant_id, opts) data end
Retrieves all projects Allows you to retrieve, create and update projects. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Array<String>] :project_ids Search for all projects that match a comma separated list of projectIds @option opts [String] :contact_id Filter for projects for a specific contact @option opts [String] :states Filter for projects in a particular state (INPROGRESS or CLOSED) @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. @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. @return [Array<(Projects
, Integer, Hash)>] Projects
data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 449 def get_projects_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_projects ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_projects" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.get_projects, must be greater than or equal to 1.' end # resource path local_var_path = '/Projects' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil? query_params[:'contactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Projects' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single project task Allows you to retrieve a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET …/tasks/{taskID} @param [Hash] opts the optional parameters @return [Task]
# File lib/xero-ruby/api/project_api.rb, line 525 def get_task(xero_tenant_id, project_id, task_id, opts = {}) data, _status_code, _headers = get_task_with_http_info(xero_tenant_id, project_id, task_id, opts) data end
Retrieves a single project task Allows you to retrieve a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param task_id [String] You can specify an individual task by appending the taskId to the endpoint, i.e. GET …/tasks/{taskID} @param [Hash] opts the optional parameters @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 537 def get_task_with_http_info(xero_tenant_id, project_id, task_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_task ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_task" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_task" end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling ProjectApi.get_task" end # resource path local_var_path = '/Projects/{projectId}/Tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Task' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all project tasks Allows you to retrieve a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param [Hash] opts the optional parameters @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. @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. @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET …/tasks?taskIds={taskID},{taskID} @option opts [ChargeType] :charge_type @return [Tasks]
# File lib/xero-ruby/api/project_api.rb, line 611 def get_tasks(xero_tenant_id, project_id, opts = {}) data, _status_code, _headers = get_tasks_with_http_info(xero_tenant_id, project_id, opts) data end
Retrieves all project tasks Allows you to retrieve a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param [Hash] opts the optional parameters @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. @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. @option opts [String] :task_ids taskIdsSearch for all tasks that match a comma separated list of taskIds, i.e. GET …/tasks?taskIds={taskID},{taskID} @option opts [ChargeType] :charge_type @return [Array<(Tasks, Integer, Hash)>] Tasks data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 626 def get_tasks_with_http_info(xero_tenant_id, project_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_tasks ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_tasks" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_tasks" end # resource path local_var_path = '/Projects/{projectId}/Tasks'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'taskIds'] = opts[:'task_ids'] if !opts[:'task_ids'].nil? query_params[:'chargeType'] = opts[:'charge_type'] if !opts[:'charge_type'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Tasks' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to. @param [Hash] opts the optional parameters @option opts [String] :user_id The xero user identifier of the person who logged time. @option opts [String] :task_id Identifier of the task that time entry is logged against. @option opts [String] :invoice_id Finds all time entries for this invoice. @option opts [String] :contact_id Finds all time entries for this contact identifier. @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. @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. @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified. @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. @return [TimeEntries]
# File lib/xero-ruby/api/project_api.rb, line 706 def get_time_entries(xero_tenant_id, project_id, opts = {}) data, _status_code, _headers = get_time_entries_with_http_info(xero_tenant_id, project_id, opts) data end
Retrieves all time entries associated with a specific project Allows you to retrieve the time entries associated with a specific project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] Identifier of the project, that the task (which the time entry is logged against) belongs to. @param [Hash] opts the optional parameters @option opts [String] :user_id The xero user identifier of the person who logged time. @option opts [String] :task_id Identifier of the task that time entry is logged against. @option opts [String] :invoice_id Finds all time entries for this invoice. @option opts [String] :contact_id Finds all time entries for this contact identifier. @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. @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. @option opts [Array<String>] :states Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified. @option opts [Boolean] :is_chargeable Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`. @option opts [DateTime] :date_after_utc ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field. @option opts [DateTime] :date_before_utc ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field. @return [Array<(TimeEntries, Integer, Hash)>] TimeEntries data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 727 def get_time_entries_with_http_info(xero_tenant_id, project_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entries ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entries" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entries" end # resource path local_var_path = '/Projects/{projectId}/Time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'taskId'] = opts[:'task_id'] if !opts[:'task_id'].nil? query_params[:'invoiceId'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil? query_params[:'contactId'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil? query_params[:'isChargeable'] = opts[:'is_chargeable'] if !opts[:'is_chargeable'].nil? query_params[:'dateAfterUtc'] = opts[:'date_after_utc'] if !opts[:'date_after_utc'].nil? query_params[:'dateBeforeUtc'] = opts[:'date_before_utc'] if !opts[:'date_before_utc'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TimeEntries' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_time_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single time entry for a specific project Allows you to get a single time entry in a project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint @param [Hash] opts the optional parameters @return [TimeEntry]
# File lib/xero-ruby/api/project_api.rb, line 804 def get_time_entry(xero_tenant_id, project_id, time_entry_id, opts = {}) data, _status_code, _headers = get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opts) data end
Retrieves a single time entry for a specific project Allows you to get a single time entry in a project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint @param [Hash] opts the optional parameters @return [Array<(TimeEntry, Integer, Hash)>] TimeEntry data, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 816 def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_time_entry ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.get_time_entry" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_time_entry" end # verify the required parameter 'time_entry_id' is set if @api_client.config.client_side_validation && time_entry_id.nil? fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.get_time_entry" end # resource path local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TimeEntry' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
creates a project for the specified contact Allows you to update a specific projects. @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param project_patch [ProjectPatch] Update the status of an existing Project @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/project_api.rb, line 887 def patch_project(xero_tenant_id, project_id, project_patch, opts = {}) patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts) nil end
creates a project for the specified contact Allows you to update a specific projects. @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param project_patch [ProjectPatch] Update the status of an existing Project @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 899 def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.patch_project ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.patch_project" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.patch_project" end # verify the required parameter 'project_patch' is set if @api_client.config.client_side_validation && project_patch.nil? fail ArgumentError, "Missing the required parameter 'project_patch' when calling ProjectApi.patch_project" end # resource path local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(project_patch) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific project Allows you to update a specific projects. @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/project_api.rb, line 972 def update_project(xero_tenant_id, project_id, project_create_or_update, opts = {}) update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, opts) nil end
Updates a specific project Allows you to update a specific projects. @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param project_create_or_update [ProjectCreateOrUpdate] Request of type ProjectCreateOrUpdate @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 984 def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_update, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.update_project ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_project" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_project" end # verify the required parameter 'project_create_or_update' is set if @api_client.config.client_side_validation && project_create_or_update.nil? fail ArgumentError, "Missing the required parameter 'project_create_or_update' when calling ProjectApi.update_project" end # resource path local_var_path = '/Projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(project_create_or_update) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a time entry for a specific project Allows you to update time entry in a project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/project_api.rb, line 1058 def update_time_entry(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts = {}) update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, opts) nil end
Updates a time entry for a specific project Allows you to update time entry in a project @param xero_tenant_id [String] Xero identifier for Tenant @param project_id [String] You can specify an individual project by appending the projectId to the endpoint @param time_entry_id [String] You can specify an individual time entry by appending the id to the endpoint @param time_entry_create_or_update [TimeEntryCreateOrUpdate] The time entry object you are updating @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/project_api.rb, line 1071 def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, time_entry_create_or_update, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.update_time_entry ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling ProjectApi.update_time_entry" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_time_entry" end # verify the required parameter 'time_entry_id' is set if @api_client.config.client_side_validation && time_entry_id.nil? fail ArgumentError, "Missing the required parameter 'time_entry_id' when calling ProjectApi.update_time_entry" end # verify the required parameter 'time_entry_create_or_update' is set if @api_client.config.client_side_validation && time_entry_create_or_update.nil? fail ArgumentError, "Missing the required parameter 'time_entry_create_or_update' when calling ProjectApi.update_time_entry" end # resource path local_var_path = '/Projects/{projectId}/Time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Xero-Tenant-Id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(time_entry_create_or_update) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "ProjectApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#update_time_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end