run_custom_attribute_sample arguments

in jobs/V3/custom_attribute_sample.rb [140:174]


def run_custom_attribute_sample arguments
  require_relative "basic_company_sample"
  require_relative "basic_job_sample"

  command = arguments.shift
  default_project_id = "projects/#{ENV['GOOGLE_CLOUD_PROJECT']}"

  company_name = "#{default_project_id}/companies/#{arguments.shift}"

  case command
  when "create_job_with_custom_attribute"
    job_generated = job_discovery_generate_job_with_custom_attribute company_name:   company_name,
                                                                     requisition_id: arguments.shift
    job_discovery_create_job job_to_be_created: job_generated,
                             project_id:        default_project_id
  when "filters_on_long_value_custom_attribute"
    job_discovery_filters_on_long_value_custom_attribute project_id: default_project_id
  when "filters_on_string_value_custom_attribute"
    job_discovery_filters_on_string_value_custom_attribute project_id: default_project_id
  when "filters_on_multi_custom_attributes"
    job_discovery_filters_on_multi_custom_attributes project_id: default_project_id
  else
    puts <<~USAGE
      Usage: bundle exec ruby custom_attribute_sample.rb [command] [arguments]
      Commands:
        create_job_with_custom_attribute               <company_name> <requisition_id>  Create job with custom attribute under given company.
        filters_on_long_value_custom_attribute         <project_id>                   Filter jobs on long value customer attribute under given comany.
        filters_on_string_value_custom_attribute       <project_id>                   Filter jobs on string value customer attribute under given comany.
        filters_on_multi_custom_attributes             <project_id>                   Filter jobs on multi customer attributes under given comany.
      Environment variables:
        GOOGLE_CLOUD_PROJECT must be set to your Google Cloud project ID
    USAGE
  end
end