Class: Cb::Models::ApplicationExternal

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/implementations/application_external.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ ApplicationExternal

Returns a new instance of ApplicationExternal.



6
7
8
9
10
11
12
# File 'lib/cb/models/implementations/application_external.rb', line 6

def initialize(args = {})
  @job_did          = args[:job_did] || ''
  @email            = args[:email] || ''
  @site_id          = args[:site_id] || 'cbnsv'
  @ipath            = args[:ipath] || ''
  @apply_url        = ''
end

Instance Attribute Details

#apply_urlObject

Returns the value of attribute apply_url.



4
5
6
# File 'lib/cb/models/implementations/application_external.rb', line 4

def apply_url
  @apply_url
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/cb/models/implementations/application_external.rb', line 4

def email
  @email
end

#ipathObject

Returns the value of attribute ipath.



4
5
6
# File 'lib/cb/models/implementations/application_external.rb', line 4

def ipath
  @ipath
end

#job_didObject

Returns the value of attribute job_did.



4
5
6
# File 'lib/cb/models/implementations/application_external.rb', line 4

def job_did
  @job_did
end

#site_idObject

Returns the value of attribute site_id.



4
5
6
# File 'lib/cb/models/implementations/application_external.rb', line 4

def site_id
  @site_id
end

Instance Method Details

#to_xmlObject



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cb/models/implementations/application_external.rb', line 14

def to_xml
  ret = "<Request>"
  ret += "<DeveloperKey>#{Cb.configuration.dev_key}</DeveloperKey>"
  ret += "<EmailAddress>#{@email}</EmailAddress>"
  ret += "<JobDID>#{@job_did}</JobDID>"
  ret += "<SiteID>#{@site_id}</SiteID>"
  ret += "<IPath>#{@ipath}</IPath>"
  ret += "<IsExternalLinkApply>false</IsExternalLinkApply>"
  ret += "<HostSite>#{Cb.configuration.host_site}</HostSite>"
  ret += "</Request>"
  ret
end