Class: Cb::Requests::Resumes::Post

Inherits:
Base
  • Object
show all
Defined in:
lib/cb/requests/resumes/post.rb

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Base

#base_uri, #initialize, #query

Constructor Details

This class inherits a constructor from Cb::Requests::Base

Instance Method Details

#bodyObject



25
26
27
28
29
30
31
32
33
# File 'lib/cb/requests/resumes/post.rb', line 25

def body
  {
    desiredJobTitle: args[:desired_job_title],
    privacySetting: args[:privacy_setting],
    resumeFileData: args[:resume_file_data],
    resumeFileName: args[:resume_file_name],
    hostSite: args[:host_site]
  }.to_json
end

#endpoint_uriObject



17
18
19
# File 'lib/cb/requests/resumes/post.rb', line 17

def endpoint_uri
  Cb.configuration.uri_resume_post
end

#headersObject



35
36
37
38
39
40
41
# File 'lib/cb/requests/resumes/post.rb', line 35

def headers
  {
    'HostSite' => Cb.configuration.host_site,
    'Content-Type' => 'application/json;version=1.0',
    'Authorization' => three_scale_bearer_token
  }
end

#http_methodObject



21
22
23
# File 'lib/cb/requests/resumes/post.rb', line 21

def http_method
  :post
end

#three_scale_bearer_tokenObject



43
44
45
# File 'lib/cb/requests/resumes/post.rb', line 43

def three_scale_bearer_token
  "Bearer #{args[:three_scale_token]}"
end