class Cb::Requests::Resumes::Put
Public Instance Methods
body()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 33 def body { userIdentifier: args[:user_identifier], resumeHash: args[:resume_hash], desiredJobTitle: args[:desired_job_title], privacySetting: args[:privacy_setting], workExperience: extract_work_experience, salaryInformation: extract_salary_information, educations: extract_educations, skillsAndQualifications: extract_skills_and_qualifications, relocations: extract_relocations, governmentAndMilitary: extract_government_and_military, resumeFileData: args[:resume_file_data], resumeFileName: args[:resume_file_name], replaceEducationAndExperience: args[:replace_education_and_experience] == 'true' }.to_json end
endpoint_uri()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 17 def endpoint_uri Cb.configuration.uri_resume_put.gsub(':resume_hash', args[:resume_hash].to_s) end
headers()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 25 def headers { 'DeveloperKey' => Cb.configuration.dev_key, 'HostSite' => Cb.configuration.host_site, 'Content-Type' => 'application/json;version=1.0' } end
http_method()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 21 def http_method :put end
Private Instance Methods
extract_educations()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 82 def extract_educations return [] if args[:educations].blank? args[:educations].collect do |education| { schoolName: education[:school_name], majorOrProgram: education[:major_or_program], degree: education[:degree], graduationDate: education[:graduation_date] } end end
extract_government_and_military()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 116 def extract_government_and_military government = args[:government_and_military] return {} if government.blank? { hasSecurityClearance: government[:has_security_clearance], militaryExperience: government[:military_experience] } end
extract_relocations()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 105 def extract_relocations return [] unless args[:relocations] args[:relocations].collect do |relocate| { city: relocate[:city], adminArea: relocate[:admin_area], countryCode: relocate[:country_code] } end end
extract_salary_information()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 69 def extract_salary_information salary = args[:salary_information] return {} if salary.blank? { mostRecentPayAmount: salary[:most_recent_pay_amount], perHourOrPerYear: salary[:per_hour_or_per_year], currencyCode: salary[:currency_code], workExperienceId: salary[:work_experience_id], annualBonus: salary[:annual_bonus], annualCommission: salary[:annual_commission] } end
extract_skills_and_qualifications()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 94 def extract_skills_and_qualifications skills = args[:skills_and_qualifications] return {} if skills.blank? { accreditationsAndCertifications: skills[:accreditations_and_certifications], languagesSpoken: skills[:languages_spoken], hasManagementExperience: skills[:has_management_experience], sizeOfTeamManaged: skills[:size_of_team_managed] } end
extract_work_experience()
click to toggle source
# File lib/cb/requests/resumes/put.rb, line 53 def extract_work_experience return [] if args[:work_experience].blank? args[:work_experience].collect do |experience| { jobTitle: experience[:job_title], companyName: experience[:company_name], employmentType: experience[:employment_type], startDate: experience[:start_date], endDate: experience[:end_date], currentlyEmployedHere: experience[:currently_employed_here], experienceDetail: experience[:work_activities], id: experience[:id] } end end