Class: Google::Apis::CoordinateV1::CoordinateService

Inherits:
Google::Apis::Core::BaseService show all
Defined in:
generated/google/apis/coordinate_v1/service.rb

Overview

Google Maps Coordinate API

Lets you view and manage jobs in a Coordinate team.

Examples:

require 'google/apis/coordinate_v1'

Coordinate = Google::Apis::CoordinateV1 # Alias the module
service = Coordinate::CoordinateService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Google::Apis::Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Google::Apis::Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Constructor Details

#initializeCoordinateService

Returns a new instance of CoordinateService.



51
52
53
# File 'generated/google/apis/coordinate_v1/service.rb', line 51

def initialize
  super('https://www.googleapis.com/', 'coordinate/v1/')
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/coordinate_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



44
45
46
# File 'generated/google/apis/coordinate_v1/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



49
50
51
# File 'generated/google/apis/coordinate_v1/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

#get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job

Retrieves a job, including all the changes made to the job.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



116
117
118
119
120
121
122
123
124
125
126
# File 'generated/google/apis/coordinate_v1/service.rb', line 116

def get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/jobs/{jobId}', options)
  command.response_representation = Google::Apis::CoordinateV1::Job::Representation
  command.response_class = Google::Apis::CoordinateV1::Job
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule

Retrieves the schedule for a job.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



471
472
473
474
475
476
477
478
479
480
481
# File 'generated/google/apis/coordinate_v1/service.rb', line 471

def get_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/jobs/{jobId}/schedule', options)
  command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
  command.response_class = Google::Apis::CoordinateV1::Schedule
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_job(team_id, address, lat, lng, title, job_object = nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, note: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job

Inserts a new job. Only the state field of the job should be set.

Parameters:

  • team_id (String)

    Team ID

  • address (String)

    Job address as newline (Unix) separated string

  • lat (Float)

    The latitude coordinate of this job's location.

  • lng (Float)

    The longitude coordinate of this job's location.

  • title (String)

    Job title

  • job_object (Google::Apis::CoordinateV1::Job) (defaults to: nil)
  • assignee (String) (defaults to: nil)

    Assignee email address, or empty string to unassign.

  • custom_field (Array<String>, String) (defaults to: nil)

    Sets the value of custom fields. To set a custom field, pass the field id ( from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

  • customer_name (String) (defaults to: nil)

    Customer name

  • customer_phone_number (String) (defaults to: nil)

    Customer phone number

  • note (String) (defaults to: nil)

    Job note as newline (Unix) separated string

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'generated/google/apis/coordinate_v1/service.rb', line 176

def insert_job(team_id, address, lat, lng, title, job_object = nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, note: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'teams/{teamId}/jobs', options)
  command.request_representation = Google::Apis::CoordinateV1::Job::Representation
  command.request_object = job_object
  command.response_representation = Google::Apis::CoordinateV1::Job::Representation
  command.response_class = Google::Apis::CoordinateV1::Job
  command.params['teamId'] = team_id unless team_id.nil?
  command.query['address'] = address unless address.nil?
  command.query['assignee'] = assignee unless assignee.nil?
  command.query['customField'] = custom_field unless custom_field.nil?
  command.query['customerName'] = customer_name unless customer_name.nil?
  command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
  command.query['lat'] = lat unless lat.nil?
  command.query['lng'] = lng unless lng.nil?
  command.query['note'] = note unless note.nil?
  command.query['title'] = title unless title.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListCustomFieldDefResponse

Retrieves a list of custom field definitions for a team.

Parameters:

  • team_id (String)

    Team ID

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



79
80
81
82
83
84
85
86
87
88
# File 'generated/google/apis/coordinate_v1/service.rb', line 79

def list_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/custom_fields', options)
  command.response_representation = Google::Apis::CoordinateV1::ListCustomFieldDefResponse::Representation
  command.response_class = Google::Apis::CoordinateV1::ListCustomFieldDefResponse
  command.params['teamId'] = team_id unless team_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, omit_job_changes: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListJobResponse

Retrieves jobs created or modified since the given timestamp.

Parameters:

  • team_id (String)

    Team ID

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return in one page.

  • min_modified_timestamp_ms (String) (defaults to: nil)

    Minimum time a job was modified in milliseconds since epoch.

  • omit_job_changes (Boolean) (defaults to: nil)

    Whether to omit detail job history information.

  • page_token (String) (defaults to: nil)

    Continuation token

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'generated/google/apis/coordinate_v1/service.rb', line 230

def list_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, omit_job_changes: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/jobs', options)
  command.response_representation = Google::Apis::CoordinateV1::ListJobResponse::Representation
  command.response_class = Google::Apis::CoordinateV1::ListJobResponse
  command.params['teamId'] = team_id unless team_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['minModifiedTimestampMs'] = min_modified_timestamp_ms unless min_modified_timestamp_ms.nil?
  command.query['omitJobChanges'] = omit_job_changes unless omit_job_changes.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_locations(team_id, worker_email, start_timestamp_ms, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListLocationResponse

Retrieves a list of locations for a worker.

Parameters:

  • team_id (String)

    Team ID

  • worker_email (String)

    Worker email address.

  • start_timestamp_ms (String)

    Start timestamp in milliseconds since the epoch.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return in one page.

  • page_token (String) (defaults to: nil)

    Continuation token

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



430
431
432
433
434
435
436
437
438
439
440
441
442
443
# File 'generated/google/apis/coordinate_v1/service.rb', line 430

def list_locations(team_id, worker_email, start_timestamp_ms, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/workers/{workerEmail}/locations', options)
  command.response_representation = Google::Apis::CoordinateV1::ListLocationResponse::Representation
  command.response_class = Google::Apis::CoordinateV1::ListLocationResponse
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['workerEmail'] = worker_email unless worker_email.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['startTimestampMs'] = start_timestamp_ms unless start_timestamp_ms.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListTeamResponse

Retrieves a list of teams for a user.

Parameters:

  • admin (Boolean) (defaults to: nil)

    Whether to include teams for which the user has the Admin role.

  • dispatcher (Boolean) (defaults to: nil)

    Whether to include teams for which the user has the Dispatcher role.

  • worker (Boolean) (defaults to: nil)

    Whether to include teams for which the user has the Worker role.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



620
621
622
623
624
625
626
627
628
629
630
631
# File 'generated/google/apis/coordinate_v1/service.rb', line 620

def list_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams', options)
  command.response_representation = Google::Apis::CoordinateV1::ListTeamResponse::Representation
  command.response_class = Google::Apis::CoordinateV1::ListTeamResponse
  command.query['admin'] = admin unless admin.nil?
  command.query['dispatcher'] = dispatcher unless dispatcher.nil?
  command.query['worker'] = worker unless worker.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListWorkerResponse

Retrieves a list of workers in a team.

Parameters:

  • team_id (String)

    Team ID

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



657
658
659
660
661
662
663
664
665
666
# File 'generated/google/apis/coordinate_v1/service.rb', line 657

def list_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'teams/{teamId}/workers', options)
  command.response_representation = Google::Apis::CoordinateV1::ListWorkerResponse::Representation
  command.response_class = Google::Apis::CoordinateV1::ListWorkerResponse
  command.params['teamId'] = team_id unless team_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job

Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • job_object (Google::Apis::CoordinateV1::Job) (defaults to: nil)
  • address (String) (defaults to: nil)

    Job address as newline (Unix) separated string

  • assignee (String) (defaults to: nil)

    Assignee email address, or empty string to unassign.

  • custom_field (Array<String>, String) (defaults to: nil)

    Sets the value of custom fields. To set a custom field, pass the field id ( from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

  • customer_name (String) (defaults to: nil)

    Customer name

  • customer_phone_number (String) (defaults to: nil)

    Customer phone number

  • lat (Float) (defaults to: nil)

    The latitude coordinate of this job's location.

  • lng (Float) (defaults to: nil)

    The longitude coordinate of this job's location.

  • note (String) (defaults to: nil)

    Job note as newline (Unix) separated string

  • progress (String) (defaults to: nil)

    Job progress

  • title (String) (defaults to: nil)

    Job title

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'generated/google/apis/coordinate_v1/service.rb', line 298

def patch_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'teams/{teamId}/jobs/{jobId}', options)
  command.request_representation = Google::Apis::CoordinateV1::Job::Representation
  command.request_object = job_object
  command.response_representation = Google::Apis::CoordinateV1::Job::Representation
  command.response_class = Google::Apis::CoordinateV1::Job
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['address'] = address unless address.nil?
  command.query['assignee'] = assignee unless assignee.nil?
  command.query['customField'] = custom_field unless custom_field.nil?
  command.query['customerName'] = customer_name unless customer_name.nil?
  command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
  command.query['lat'] = lat unless lat.nil?
  command.query['lng'] = lng unless lng.nil?
  command.query['note'] = note unless note.nil?
  command.query['progress'] = progress unless progress.nil?
  command.query['title'] = title unless title.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule

Replaces the schedule of a job with the provided schedule. This method supports patch semantics.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • schedule_object (Google::Apis::CoordinateV1::Schedule) (defaults to: nil)
  • all_day (Boolean) (defaults to: nil)

    Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true.

  • duration (String) (defaults to: nil)

    Job duration in milliseconds.

  • end_time (String) (defaults to: nil)

    Scheduled end time in milliseconds since epoch.

  • start_time (String) (defaults to: nil)

    Scheduled start time in milliseconds since epoch.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'generated/google/apis/coordinate_v1/service.rb', line 520

def patch_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'teams/{teamId}/jobs/{jobId}/schedule', options)
  command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation
  command.request_object = schedule_object
  command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
  command.response_class = Google::Apis::CoordinateV1::Schedule
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['allDay'] = all_day unless all_day.nil?
  command.query['duration'] = duration unless duration.nil?
  command.query['endTime'] = end_time unless end_time.nil?
  command.query['startTime'] = start_time unless start_time.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job

Updates a job. Fields that are set in the job state will be updated.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • job_object (Google::Apis::CoordinateV1::Job) (defaults to: nil)
  • address (String) (defaults to: nil)

    Job address as newline (Unix) separated string

  • assignee (String) (defaults to: nil)

    Assignee email address, or empty string to unassign.

  • custom_field (Array<String>, String) (defaults to: nil)

    Sets the value of custom fields. To set a custom field, pass the field id ( from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500.

  • customer_name (String) (defaults to: nil)

    Customer name

  • customer_phone_number (String) (defaults to: nil)

    Customer phone number

  • lat (Float) (defaults to: nil)

    The latitude coordinate of this job's location.

  • lng (Float) (defaults to: nil)

    The longitude coordinate of this job's location.

  • note (String) (defaults to: nil)

    Job note as newline (Unix) separated string

  • progress (String) (defaults to: nil)

    Job progress

  • title (String) (defaults to: nil)

    Job title

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'generated/google/apis/coordinate_v1/service.rb', line 374

def update_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'teams/{teamId}/jobs/{jobId}', options)
  command.request_representation = Google::Apis::CoordinateV1::Job::Representation
  command.request_object = job_object
  command.response_representation = Google::Apis::CoordinateV1::Job::Representation
  command.response_class = Google::Apis::CoordinateV1::Job
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['address'] = address unless address.nil?
  command.query['assignee'] = assignee unless assignee.nil?
  command.query['customField'] = custom_field unless custom_field.nil?
  command.query['customerName'] = customer_name unless customer_name.nil?
  command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil?
  command.query['lat'] = lat unless lat.nil?
  command.query['lng'] = lng unless lng.nil?
  command.query['note'] = note unless note.nil?
  command.query['progress'] = progress unless progress.nil?
  command.query['title'] = title unless title.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule

Replaces the schedule of a job with the provided schedule.

Parameters:

  • team_id (String)

    Team ID

  • job_id (String)

    Job number

  • schedule_object (Google::Apis::CoordinateV1::Schedule) (defaults to: nil)
  • all_day (Boolean) (defaults to: nil)

    Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true.

  • duration (String) (defaults to: nil)

    Job duration in milliseconds.

  • end_time (String) (defaults to: nil)

    Scheduled end time in milliseconds since epoch.

  • start_time (String) (defaults to: nil)

    Scheduled start time in milliseconds since epoch.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'generated/google/apis/coordinate_v1/service.rb', line 574

def update_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'teams/{teamId}/jobs/{jobId}/schedule', options)
  command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation
  command.request_object = schedule_object
  command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation
  command.response_class = Google::Apis::CoordinateV1::Schedule
  command.params['teamId'] = team_id unless team_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['allDay'] = all_day unless all_day.nil?
  command.query['duration'] = duration unless duration.nil?
  command.query['endTime'] = end_time unless end_time.nil?
  command.query['startTime'] = start_time unless start_time.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end