Class: Cb::Requests::Application::Update

Inherits:
Base
  • Object
show all
Includes:
Cb::Requests::ApplicationUtils
Defined in:
lib/cb/requests/application/update.rb

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods included from Cb::Requests::ApplicationUtils

#cover_letter_info, #parsed_responses, #resume_info

Methods inherited from Base

#base_uri, #initialize, #query

Constructor Details

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

Instance Method Details

#bodyObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/cb/requests/application/update.rb', line 36

def body
  {
    ApplicationDID: args[:application_did],
    JobDID: args[:job_did],
    IsSubmitted: args[:is_submitted],
    ExternalUserID: args[:external_user_id],
    VID: args[:vid],
    BID: args[:bid],
    SID: args[:sid],
    SiteID: args[:site_id],
    IPathID: args[:ipath_id],
    TNDID: args[:tn_did],
    Resume:  resume_info(args[:resume]),
    CoverLetter: cover_letter_info(args[:cover_letter]),
    Responses: parsed_responses(args[:responses]),
    Test: test?
  }.to_json
end

#endpoint_uriObject



20
21
22
# File 'lib/cb/requests/application/update.rb', line 20

def endpoint_uri
  Cb.configuration.uri_application.sub ':did', args[:application_did].to_s
end

#headersObject



28
29
30
31
32
33
34
# File 'lib/cb/requests/application/update.rb', line 28

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

#http_methodObject



24
25
26
# File 'lib/cb/requests/application/update.rb', line 24

def http_method
  :put
end