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

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

Instance Method Summary collapse

Methods included from Cb::Requests::ApplicationUtils

#cover_letter_info, #parsed_responses, #resume_info

Methods inherited from Base

#initialize, #query

Constructor Details

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

Instance Method Details

#bodyObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/cb/requests/application/update.rb', line 26

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



10
11
12
# File 'lib/cb/requests/application/update.rb', line 10

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

#headersObject



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

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

#http_methodObject



14
15
16
# File 'lib/cb/requests/application/update.rb', line 14

def http_method
  :put
end