Module: CareerBuilder::Client::GetResume

Included in:
CareerBuilder::Client
Defined in:
lib/career_builder/client/get_resume.rb

Constant Summary collapse

VALID_OPTIONS =
[:resume_id, :cust_acct_code, :get_word_doc_if_available].freeze

Instance Method Summary collapse

Instance Method Details

#get_resume(options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/career_builder/client/get_resume.rb', line 7

def get_resume(options = {})
  unless (invalid_options = options.keys - VALID_OPTIONS).empty?
    raise ArgumentError, "Invalid options #{invalid_options}"
  end

  response = auth_request("V2_GetResume", options)

  if response =~ /ResumeID/ # valid response
    API::Resume.parse(response, :single => true)
  else
    raise OutOfCredits
  end
end