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



15
16
17
18
19
20
21
22
23
# File 'lib/cb/requests/resumes/post.rb', line 15

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



7
8
9
# File 'lib/cb/requests/resumes/post.rb', line 7

def endpoint_uri
  Cb.configuration.uri_resume_post
end

#headersObject



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

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

#http_methodObject



11
12
13
# File 'lib/cb/requests/resumes/post.rb', line 11

def http_method
  :post
end

#three_scale_bearer_tokenObject



33
34
35
# File 'lib/cb/requests/resumes/post.rb', line 33

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