cb-api 5.3.3 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,15 @@
|
|
1
1
|
module Cb
|
2
2
|
module Models
|
3
3
|
class ApplicationExternal
|
4
|
-
attr_accessor :job_did, :email, :site_id, :ipath, :apply_url
|
4
|
+
attr_accessor :job_did, :email, :site_id, :ipath, :apply_url, :is_external_link_apply
|
5
5
|
|
6
6
|
def initialize(args = {})
|
7
|
-
@job_did
|
8
|
-
@email
|
9
|
-
@site_id
|
10
|
-
@ipath
|
11
|
-
@
|
7
|
+
@job_did = args[:job_did] || ''
|
8
|
+
@email = args[:email] || ''
|
9
|
+
@site_id = args[:site_id] || 'cbnsv'
|
10
|
+
@ipath = args[:ipath] || ''
|
11
|
+
@is_external_link_apply = args[:is_external_link_apply] || false
|
12
|
+
@apply_url = ''
|
12
13
|
end
|
13
14
|
|
14
15
|
def to_xml
|
@@ -18,7 +19,7 @@ module Cb
|
|
18
19
|
ret += "<JobDID>#{@job_did}</JobDID>"
|
19
20
|
ret += "<SiteID>#{@site_id}</SiteID>"
|
20
21
|
ret += "<IPath>#{@ipath}</IPath>"
|
21
|
-
ret += "<IsExternalLinkApply
|
22
|
+
ret += "<IsExternalLinkApply>#{@is_external_link_apply}</IsExternalLinkApply>"
|
22
23
|
ret += "<HostSite>#{Cb.configuration.host_site}</HostSite>"
|
23
24
|
ret += "</Request>"
|
24
25
|
ret
|
data/lib/cb/utils/api.rb
CHANGED
@@ -16,25 +16,25 @@ module Cb
|
|
16
16
|
self.class.headers.merge! ({'accept-encoding' => 'deflate, gzip'}) unless Cb.configuration.debug_api
|
17
17
|
end
|
18
18
|
|
19
|
-
def cb_get(
|
19
|
+
def cb_get(path, options={})
|
20
20
|
self.class.base_uri Cb.configuration.base_uri
|
21
|
-
response = self.class.get(
|
21
|
+
response = self.class.get(path, options)
|
22
22
|
validated_response = ResponseValidator.validate(response)
|
23
23
|
set_api_error(validated_response)
|
24
24
|
validated_response
|
25
25
|
end
|
26
26
|
|
27
|
-
def cb_post(
|
27
|
+
def cb_post(path, options={})
|
28
28
|
self.class.base_uri Cb.configuration.base_uri
|
29
|
-
response = self.class.post(
|
29
|
+
response = self.class.post(path, options)
|
30
30
|
validated_response = ResponseValidator.validate(response)
|
31
31
|
set_api_error(validated_response)
|
32
32
|
validated_response
|
33
33
|
end
|
34
34
|
|
35
|
-
def cb_put(
|
35
|
+
def cb_put(path, options={})
|
36
36
|
self.class.base_uri Cb.configuration.base_uri
|
37
|
-
response = self.class.put(
|
37
|
+
response = self.class.put(path, options)
|
38
38
|
validated_response = ResponseValidator.validate(response)
|
39
39
|
set_api_error(validated_response)
|
40
40
|
validated_response
|
data/lib/cb/version.rb
CHANGED