Update company (v3)

Update a company.

Documentation pages that include this code sample

To view the code sample used in context, see the following documentation:

Code Sample


# company_name     = "The name of the company you want to update. The format is "projects/{project_id}/companies/{company_id}""
# company_updated  = "The new company object to be updated"

require "google/apis/jobs_v3"

jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
# @see
# https://developers.google.com/identity/protocols/application-default-credentials#callingruby
talent_solution_client.authorization = Google::Auth.get_application_default(

  update_company_request = jobs::UpdateCompanyRequest.new company: company_updated
  company_updated = talent_solution_client
                    .patch_project_company(company_name, update_company_request)
  puts "Company updated: #{company_updated.to_json}"
  return company_updated
rescue StandardError => e
  puts "Exception occurred while updating company: #{e}"