cb-api 1.3.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cb.rb +7 -99
- data/lib/cb/clients/anon_saved_search.rb +42 -0
- data/lib/cb/clients/application.rb +53 -0
- data/lib/cb/clients/application_external.rb +24 -0
- data/lib/cb/clients/category.rb +49 -0
- data/lib/cb/clients/company.rb +34 -0
- data/lib/cb/clients/education.rb +28 -0
- data/lib/cb/clients/email_subscription.rb +55 -0
- data/lib/cb/clients/employee_types.rb +31 -0
- data/lib/cb/clients/job.rb +57 -0
- data/lib/cb/clients/job_branding.rb +21 -0
- data/lib/cb/clients/recommendation.rb +76 -0
- data/lib/cb/clients/saved_search.rb +66 -0
- data/lib/cb/clients/spot.rb +27 -0
- data/lib/cb/clients/talent_network.rb +51 -0
- data/lib/cb/clients/user.rb +94 -0
- data/lib/cb/convenience.rb +83 -0
- data/lib/cb/criteria/job/details.rb +11 -0
- data/lib/cb/criteria/job/search.rb +25 -0
- data/lib/cb/criteria/spot/retrieve.rb +12 -0
- data/lib/cb/exceptions.rb +2 -1
- data/lib/cb/models/implementations/application.rb +92 -0
- data/lib/cb/models/implementations/application_external.rb +28 -0
- data/lib/cb/models/implementations/application_schema.rb +75 -0
- data/lib/cb/models/implementations/branding/media.rb +14 -14
- data/lib/cb/models/implementations/branding/section.rb +14 -15
- data/lib/cb/models/implementations/branding/style.rb +10 -10
- data/lib/cb/models/implementations/branding/styles/base.rb +12 -10
- data/lib/cb/models/implementations/branding/styles/buttons.rb +7 -6
- data/lib/cb/models/implementations/branding/styles/company_info.rb +14 -12
- data/lib/cb/models/implementations/branding/styles/container.rb +7 -6
- data/lib/cb/models/implementations/branding/styles/content.rb +7 -5
- data/lib/cb/models/implementations/branding/styles/css_adapter.rb +39 -41
- data/lib/cb/models/implementations/branding/styles/headings.rb +7 -5
- data/lib/cb/models/implementations/branding/styles/job_details.rb +12 -11
- data/lib/cb/models/implementations/branding/styles/page.rb +7 -5
- data/lib/cb/models/implementations/branding/widget.rb +9 -7
- data/lib/cb/models/implementations/category.rb +24 -0
- data/lib/cb/models/implementations/company.rb +135 -0
- data/lib/cb/models/implementations/education.rb +17 -0
- data/lib/cb/models/implementations/email_subscription.rb +17 -0
- data/lib/cb/models/implementations/employee_type.rb +13 -0
- data/lib/cb/models/implementations/job.rb +167 -0
- data/lib/cb/models/implementations/job_branding.rb +34 -0
- data/lib/cb/models/implementations/saved_search.rb +159 -0
- data/lib/cb/models/implementations/spot.rb +30 -0
- data/lib/cb/models/implementations/talent_network.rb +156 -0
- data/lib/cb/models/implementations/user.rb +58 -0
- data/lib/cb/responses/anonymous_saved_search/create.rb +36 -0
- data/lib/cb/responses/anonymous_saved_search/delete.rb +23 -0
- data/lib/cb/responses/api_response.rb +64 -0
- data/lib/cb/responses/employee_types/search.rb +48 -0
- data/lib/cb/responses/errors.rb +47 -0
- data/lib/cb/responses/metadata.rb +27 -0
- data/lib/cb/responses/saved_search/delete.rb +28 -0
- data/lib/cb/responses/saved_search/list.rb +43 -0
- data/lib/cb/responses/saved_search/singular.rb +50 -0
- data/lib/cb/responses/spot/retrieve_response.rb +31 -20
- data/lib/cb/responses/timing.rb +37 -0
- data/lib/cb/utils/api.rb +2 -2
- data/lib/cb/utils/response_array_extractor.rb +14 -4
- data/lib/cb/version.rb +1 -1
- metadata +114 -69
- data/lib/cb/clients/anon_saved_search_api.rb +0 -41
- data/lib/cb/clients/application_api.rb +0 -78
- data/lib/cb/clients/application_external_api.rb +0 -30
- data/lib/cb/clients/category_api.rb +0 -51
- data/lib/cb/clients/company_api.rb +0 -39
- data/lib/cb/clients/education_api.rb +0 -37
- data/lib/cb/clients/email_subscription_api.rb +0 -68
- data/lib/cb/clients/employee_types_api.rb +0 -48
- data/lib/cb/clients/job_api.rb +0 -70
- data/lib/cb/clients/job_branding_api.rb +0 -24
- data/lib/cb/clients/recommendation_api.rb +0 -98
- data/lib/cb/clients/resume_api.rb +0 -185
- data/lib/cb/clients/saved_search_api.rb +0 -139
- data/lib/cb/clients/spot_api.rb +0 -25
- data/lib/cb/clients/talent_network_api.rb +0 -70
- data/lib/cb/clients/user_api.rb +0 -118
- data/lib/cb/criteria/job_details_criteria.rb +0 -11
- data/lib/cb/criteria/job_search_criteria.rb +0 -29
- data/lib/cb/criteria/spot_retrieve_criteria.rb +0 -12
- data/lib/cb/models/implementations/cb_application.rb +0 -91
- data/lib/cb/models/implementations/cb_application_external.rb +0 -31
- data/lib/cb/models/implementations/cb_application_schema.rb +0 -78
- data/lib/cb/models/implementations/cb_category.rb +0 -22
- data/lib/cb/models/implementations/cb_company.rb +0 -133
- data/lib/cb/models/implementations/cb_education.rb +0 -25
- data/lib/cb/models/implementations/cb_email_subscription.rb +0 -19
- data/lib/cb/models/implementations/cb_employee_type.rb +0 -12
- data/lib/cb/models/implementations/cb_job.rb +0 -175
- data/lib/cb/models/implementations/cb_job_branding.rb +0 -33
- data/lib/cb/models/implementations/cb_resume.rb +0 -221
- data/lib/cb/models/implementations/cb_saved_search.rb +0 -228
- data/lib/cb/models/implementations/cb_spot.rb +0 -32
- data/lib/cb/models/implementations/cb_talent_network.rb +0 -155
- data/lib/cb/models/implementations/cb_user.rb +0 -56
- data/lib/cb/responses/raw_api_response.rb +0 -34
@@ -1,31 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbApplicationExternal
|
3
|
-
# API Request parameters
|
4
|
-
attr_accessor :job_did, :email, :site_id, :ipath
|
5
|
-
|
6
|
-
# Response from External Application API
|
7
|
-
# Populated after application submission.
|
8
|
-
attr_accessor :apply_url
|
9
|
-
|
10
|
-
def initialize(args = {})
|
11
|
-
@job_did = args[:job_did] || ''
|
12
|
-
@email = args[:email] || ''
|
13
|
-
@site_id = args[:site_id] || 'cbnsv'
|
14
|
-
@ipath = args[:ipath] || ''
|
15
|
-
@apply_url = ''
|
16
|
-
end
|
17
|
-
|
18
|
-
def to_xml
|
19
|
-
ret = "<Request>"
|
20
|
-
ret += "<DeveloperKey>#{Cb.configuration.dev_key}</DeveloperKey>"
|
21
|
-
ret += "<EmailAddress>#{@email}</EmailAddress>"
|
22
|
-
ret += "<JobDID>#{@job_did}</JobDID>"
|
23
|
-
ret += "<SiteID>#{@site_id}</SiteID>"
|
24
|
-
ret += "<IPath>#{@ipath}</IPath>"
|
25
|
-
ret += "<IsExternalLinkApply>false</IsExternalLinkApply>"
|
26
|
-
ret += "<HostSite>#{Cb.configuration.host_site}</HostSite>"
|
27
|
-
ret += "</Request>"
|
28
|
-
ret
|
29
|
-
end # to_xml
|
30
|
-
end # CbApplicationExternal
|
31
|
-
end # Cb
|
@@ -1,78 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
#################################################################
|
3
|
-
## This general purpose object stores anything having to do with
|
4
|
-
## an application. The API objects dealing with application,
|
5
|
-
## will populate one or many of this object.
|
6
|
-
#################################################################
|
7
|
-
class CbApplicationSchema
|
8
|
-
attr_accessor :did, :title, :requirements,
|
9
|
-
:apply_url, :submit_service_url, :is_shared_apply,
|
10
|
-
:total_questions, :total_required_questions, :questions
|
11
|
-
|
12
|
-
def initialize(args = {})
|
13
|
-
return if args.nil?
|
14
|
-
|
15
|
-
# Job Info related
|
16
|
-
@did = args['JobDID'] || ''
|
17
|
-
@title = args['JobTitle'] || ''
|
18
|
-
@requirements = args['Requirements'] || ''
|
19
|
-
|
20
|
-
# Apply URL related
|
21
|
-
@submit_service_url = args['ApplicationSubmitServiceURL'] || ''
|
22
|
-
@apply_url = args['ApplyURL'] || ''
|
23
|
-
@is_shared_apply = (args['IsSharedApply'].downcase == 'true')
|
24
|
-
|
25
|
-
# Question related
|
26
|
-
@total_questions = args['TotalQuestions'] || ''
|
27
|
-
@total_required_questions = args['TotalRequiredQuestions'] || ''
|
28
|
-
@total_questions = @total_questions.to_i if Cb::Utils::Api.is_numeric? @total_questions
|
29
|
-
@total_required_questions = @total_required_questions.to_i if Cb::Utils::Api.is_numeric? @total_required_questions
|
30
|
-
|
31
|
-
@questions = []
|
32
|
-
if args.has_key?('Questions')
|
33
|
-
unless args['Questions'].empty?
|
34
|
-
args['Questions']['Question'].each do | qq |
|
35
|
-
@questions << CbApplicationSchema::CbQuestionSchema.new(qq)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end # Initialize
|
40
|
-
end # CbApplicationSchema
|
41
|
-
|
42
|
-
#################################################################
|
43
|
-
class CbApplicationSchema::CbQuestionSchema
|
44
|
-
attr_accessor :id, :type, :required, :format, :text, :answers
|
45
|
-
|
46
|
-
def initialize(args = {})
|
47
|
-
return if args.nil?
|
48
|
-
|
49
|
-
@id = args['QuestionID'] || ''
|
50
|
-
@type = args['QuestionType'] || ''
|
51
|
-
@required = (args['IsRequired'].downcase == 'true')
|
52
|
-
@format = args['ExpectedResponseFormat'] || ''
|
53
|
-
@text = args['QuestionText'] || ''
|
54
|
-
|
55
|
-
@answers = []
|
56
|
-
if args.has_key?('Answers')
|
57
|
-
unless args['Answers'].empty?
|
58
|
-
args['Answers']['Answer'].each do | aa |
|
59
|
-
@answers << CbApplicationSchema::CbAnswerSchema.new(aa)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end # CbQuestionSchema
|
65
|
-
|
66
|
-
#################################################################
|
67
|
-
class CbApplicationSchema::CbAnswerSchema
|
68
|
-
attr_accessor :question_id, :id, :text
|
69
|
-
|
70
|
-
def initialize(args = {})
|
71
|
-
return if args.nil?
|
72
|
-
|
73
|
-
@question_id = args['QuestionID']
|
74
|
-
@id = args['AnswerID']
|
75
|
-
@text = args['AnswerText']
|
76
|
-
end
|
77
|
-
end # CbAnswerSchema
|
78
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbCategory
|
3
|
-
attr_accessor :code, :name, :language
|
4
|
-
def initialize(args={})
|
5
|
-
@code = args["Code"] || String.new
|
6
|
-
@name = args["Name"]["#text"] || String.new
|
7
|
-
@language = args["Name"]["@language"] || String.new
|
8
|
-
end
|
9
|
-
|
10
|
-
def CategoryName()
|
11
|
-
@name unless @name.nil?
|
12
|
-
end
|
13
|
-
|
14
|
-
def CategoryCode()
|
15
|
-
@code unless @code.nil?
|
16
|
-
end
|
17
|
-
|
18
|
-
def CategoryLanguage()
|
19
|
-
@language unless @language.nil?
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,133 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbCompany
|
3
|
-
attr_accessor :did, :name, :hh_name, :url, :size, :type, :year_founded,
|
4
|
-
:news_feed, :overview, :total_jobs, :headquarters, :host_sites, :s_drive,
|
5
|
-
:industry,
|
6
|
-
|
7
|
-
:image_file, :header_image, :footer_image, :logo, :photos, :my_photos,
|
8
|
-
:bright_cove_video,
|
9
|
-
|
10
|
-
:twitter_url, :linked_in_url, :facebook_url, :facebook_widget,
|
11
|
-
:linked_in_widget, :twitter_widget,
|
12
|
-
|
13
|
-
:benefits, :benefits_label, :history, :contact, :contact_label, :links,
|
14
|
-
:vision, :vision_label, :products, :products_label, :career_opps, :career_opps_label,
|
15
|
-
:culture, :culture_label, :addresses, :bulletin_board, :testimonials,
|
16
|
-
:college, :college_label, :diversity, :diversity_label, :people, :people_label,
|
17
|
-
|
18
|
-
:extra_custom_tab, :tab_header_bg_color, :tab_header_text_color, :tab_header_hover_color,
|
19
|
-
:side_bar_header_color, :button_color, :button_text_color, :gutter_bg_color,
|
20
|
-
:my_content_tabs, :info_tabs, :is_enhance, :is_military, :is_premium
|
21
|
-
|
22
|
-
def initialize(args = {})
|
23
|
-
return if args.nil?
|
24
|
-
|
25
|
-
# General
|
26
|
-
################################################################
|
27
|
-
@did = args['CompanyDID'] || ''
|
28
|
-
@name = args['CompanyName'] || ''
|
29
|
-
@hh_name = args['HHName'] || ''
|
30
|
-
@url = args['URL'] || ''
|
31
|
-
@size = args['CompanySize'] || ''
|
32
|
-
@type = args['CompanyType'] || ''
|
33
|
-
@year_founded = args['YearFounded'] || ''
|
34
|
-
@news_feed = args['NewsFeed'] || ''
|
35
|
-
@overview = args['Overview'] || ''
|
36
|
-
@total_jobs = args['TotalNumberJobs'] || ''
|
37
|
-
@headquarters = args['Headquarter'] || ''
|
38
|
-
@host_sites = args['HostSites'] || ''
|
39
|
-
@s_drive = args['SDrive'] || ''
|
40
|
-
@industry = args['IndustryType'] || ''
|
41
|
-
|
42
|
-
# Images
|
43
|
-
################################################################
|
44
|
-
@logo = args['CompanyLogo'] || ''
|
45
|
-
@header_image = args['HeaderImage'] || ''
|
46
|
-
@footer_image = args['FooterImage'] || ''
|
47
|
-
@image_file = args['ImageFile'] || ''
|
48
|
-
|
49
|
-
@photos = args['CompanyPhotos']['PhotoList'] || ''
|
50
|
-
@my_photos = args['MyPhotos'] || ''
|
51
|
-
|
52
|
-
# Videos
|
53
|
-
################################################################
|
54
|
-
@bright_cove_video = args['BrightcoveVideo'] || ''
|
55
|
-
|
56
|
-
# Social sites
|
57
|
-
################################################################
|
58
|
-
@facebook_url = args['FBPageURL'] || args['FacebookURL'] || ''
|
59
|
-
@facebook_widget = args['FacebookWidget'] || ''
|
60
|
-
@twitter_url = args['TwitterURL'] || ''
|
61
|
-
@twitter_widget = args['TwitterWidget'] || ''
|
62
|
-
@linked_in_url = args['LinkedURL'] || ''
|
63
|
-
@linked_in_widget = args['LinkedInWidget'] || ''
|
64
|
-
|
65
|
-
# Detailed information (blobs)
|
66
|
-
################################################################
|
67
|
-
@history = args['HistoryBody'] || ''
|
68
|
-
@people = args['PeopleBody'] || ''
|
69
|
-
@people_label = args['PeopleLabel'] || ''
|
70
|
-
@contact = args['ContactBody'] || ''
|
71
|
-
@contact_label = args['ContactLabel'] || ''
|
72
|
-
@benefits = args['BenefitsBody'] || ''
|
73
|
-
@benefits_label = args['BenefitsLabel'] || ''
|
74
|
-
@vision = args['VisionBody'] || ''
|
75
|
-
@vision_label = args['VisionLabel'] || ''
|
76
|
-
@products = args['ProductsBody'] || ''
|
77
|
-
@products_label = args['ProductsLabel'] || ''
|
78
|
-
@career_opps = args['CareerOpportunitiesBody'] || ''
|
79
|
-
@career_opps_label = args['CareerOpportunitiesLabel'] || ''
|
80
|
-
@culture = args['CultureBody'] || ''
|
81
|
-
@culture_label = args['CultureLabel'] || ''
|
82
|
-
@bulletin_board = args['CompanyBulletinBoard']['bulletinboards'] || ''
|
83
|
-
@testimonials = args['Testimonials']['Testimonials'] || ''
|
84
|
-
@addresses = []
|
85
|
-
if args.has_key?('CompanyAddress')
|
86
|
-
unless args['CompanyAddress'].empty? || args['CompanyAddress']['AddressList'].nil?
|
87
|
-
args['CompanyAddress']['AddressList']['Address'].each do |cur_addr|
|
88
|
-
@addresses << CbCompany::CbAddress.new(cur_addr)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
@college = args['CollegeBody'] || ''
|
93
|
-
@college_label = args['CollegeLabel'] || ''
|
94
|
-
@diversity = args['DiversityBody'] || ''
|
95
|
-
@diversity_label = args['DiversityLabel'] || ''
|
96
|
-
@links = args['CompanyLinksCollection']['companylinks'] || ''
|
97
|
-
|
98
|
-
# tabs, colors, buttons, headers, etc
|
99
|
-
################################################################
|
100
|
-
@extra_custom_tab = args['ExtraCustomTab'] || ''
|
101
|
-
@tab_header_bg_color = args['TabHeaderBGColor'] || ''
|
102
|
-
@tab_header_text_color = args['TabHeaderTextColor'] || ''
|
103
|
-
@tab_header_hover_color = args['TabHeaderHoverColor'] || ''
|
104
|
-
@side_bar_header_color = args['SidebarHeaderColor'] || ''
|
105
|
-
@button_color = args['ButtonColor'] || ''
|
106
|
-
@button_text_color = args['ButtonTextColor'] || ''
|
107
|
-
@gutter_bg_color = args['GutterBGColor'] || ''
|
108
|
-
@my_content_tabs = args['MyContent']['MyContentTabs'] || ''
|
109
|
-
@info_tabs = args['InfoTabs']['InfoTabs'] || ''
|
110
|
-
@is_enhance = args['isEnhance'] || ''
|
111
|
-
@is_military = args['MilitaryIcon'] || ''
|
112
|
-
@is_premium = args['PremiumProfile'] || ''
|
113
|
-
end
|
114
|
-
|
115
|
-
# CbAddress # CbCompany has a collection of these
|
116
|
-
################################################################
|
117
|
-
class CbAddress
|
118
|
-
attr_accessor :street, :city, :state, :country, :zip
|
119
|
-
|
120
|
-
def initialize(args = {})
|
121
|
-
begin
|
122
|
-
@street = args['Street'] || ''
|
123
|
-
@city = args['City'] || ''
|
124
|
-
@state = args['State'] || ''
|
125
|
-
@country = args['Country'] || ''
|
126
|
-
@zip = args['ZIPCode'] || ''
|
127
|
-
rescue
|
128
|
-
# failed to load address
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end #CbAddress
|
132
|
-
end #CbCompany
|
133
|
-
end #Cb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbEducation
|
3
|
-
attr_accessor :code, :text, :language
|
4
|
-
|
5
|
-
##############################################################
|
6
|
-
## This object stores Education Codes having to do with a
|
7
|
-
## country. The API objects dealing with job, will populate
|
8
|
-
## one or many of this object.
|
9
|
-
##
|
10
|
-
## For more information, please visit:
|
11
|
-
## http://api.careerbuilder.com/v1/educationcodes
|
12
|
-
##############################################################
|
13
|
-
def initialize(args = {})
|
14
|
-
return if args.nil?
|
15
|
-
|
16
|
-
@code = args['Code'] || ''
|
17
|
-
@language = args['Name']['@language'] unless args['Name'].nil?
|
18
|
-
@text = args['Name']['#text'] unless args['Name'].nil?
|
19
|
-
|
20
|
-
# I have got to find a better way to do this
|
21
|
-
@language ||= ''
|
22
|
-
@text ||= ''
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbEmailSubscription
|
3
|
-
attr_accessor :career_resources, :product_sponsor_info, :applicant_survey_invites,
|
4
|
-
:job_recs, :unsubscribe_all
|
5
|
-
|
6
|
-
def initialize(args = {})
|
7
|
-
return if args.nil?
|
8
|
-
|
9
|
-
@career_resources = args['CareerResources'].to_s || ''
|
10
|
-
@product_sponsor_info = args['ProductSponsorInfo'].to_s || ''
|
11
|
-
@applicant_survey_invites = args['ApplicantSurveyInvites'].to_s || ''
|
12
|
-
@job_recs = args['JobRecs'].to_s || ''
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
@@ -1,175 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
class CbJob
|
3
|
-
attr_accessor :did, :title, :job_skin, :job_skin_did, :job_branding, :pay, :pay_per, :commission, :bonus, :pay_other,
|
4
|
-
:categories, :category_codes, :degree_required, :experience_required, :travel_required,
|
5
|
-
:industry_codes, :manages_others_code,
|
6
|
-
:contact_email_url, :contact_fax, :contact_name, :contact_phone,
|
7
|
-
:company_name, :company_did, :company_details_url, :company_image_url, :company,
|
8
|
-
:description_teaser, :external_apply_url, :job_tracking_url, :location, :distance, :latitude, :longitude, :location_formatted,
|
9
|
-
:description, :requirements, :employment_type,
|
10
|
-
:details_url, :service_url, :similar_jobs_url, :apply_url,
|
11
|
-
:begin_date, :end_date, :posted_date,
|
12
|
-
:relevancy, :state, :city, :zip,
|
13
|
-
:can_be_quick_applied, :apply_requirements, :custom_apply_type,
|
14
|
-
:divison, :industry, :location_street_1, :relocation_options, :location_street_2, :display_job_id,
|
15
|
-
:manages_others_string,
|
16
|
-
:degree_required_code, :travel_required_code, :employment_type_code
|
17
|
-
|
18
|
-
attr_writer :external_application, :is_screener_apply,
|
19
|
-
:is_shared_job,
|
20
|
-
:relocation_covered, :manages_others
|
21
|
-
|
22
|
-
##############################################################
|
23
|
-
## This general purpose object stores anything having to do
|
24
|
-
## with a job. The API objects dealing with job, will populate
|
25
|
-
## one or many of this object.
|
26
|
-
##############################################################
|
27
|
-
def initialize(args = {})
|
28
|
-
return if args.nil?
|
29
|
-
|
30
|
-
# General
|
31
|
-
@did = args['DID'] || args['JobDID'] || ''
|
32
|
-
@title = args['JobTitle'] || args['Title'] || ''
|
33
|
-
@employment_type = args['EmploymentType'] || ''
|
34
|
-
@employment_type_code = args['EmploymentTypeCode'] || ''
|
35
|
-
@latitude = args['LocationLatitude'] || ''
|
36
|
-
@longitude = args['LocationLongitude'] || ''
|
37
|
-
@location_street_1 = args['LocationStreet1'] || ''
|
38
|
-
@location_street_2 = args['LocationStreet2'] || ''
|
39
|
-
@location_formatted = args['LocationFormatted'] || ''
|
40
|
-
|
41
|
-
# Job Skin Related
|
42
|
-
@job_skin = args.has_key?("JobSkin") && !args["JobSkin"].nil? ? args['JobSkin']['#cdata-section'] : ''
|
43
|
-
@job_skin_did = args['JobSkinDID'] || ''
|
44
|
-
@job_branding = @job_skin_did.blank? ? '' : Cb.job_branding.find_by_id(job_skin_did)
|
45
|
-
@job_tracking_url = args['JobTrackingURL'] || ''
|
46
|
-
@display_job_id = args['DisplayJobID'] || ''
|
47
|
-
|
48
|
-
# Compensation
|
49
|
-
@pay = args['PayHighLowFormatted'] || ''
|
50
|
-
@pay_per = args['PayPer'] || ''
|
51
|
-
@commission = args.has_key?("PayCommission") && !args["PayCommission"].nil? ? args['PayCommission']['Money']['FormattedAmount'] : ''
|
52
|
-
@bonus = args.has_key?("PayBonus") && !args["PayBonus"].nil? ? args['PayBonus']['Money']['FormattedAmount'] : ''
|
53
|
-
@pay_other = args.has_key?("PayOther") && !args["PayOther"].nil? ? args['PayOther'] : ''
|
54
|
-
|
55
|
-
# Job Search related
|
56
|
-
@description_teaser = args['DescriptionTeaser'] || ''
|
57
|
-
@posted_date = args['PostedDate'] || ''
|
58
|
-
@distance = args['Distance'] || ''
|
59
|
-
@details_url = args['JobDetailsURL'] || ''
|
60
|
-
@service_url = args['JobServiceURL'] || ''
|
61
|
-
@location = args['Location'] || ''
|
62
|
-
@similar_jobs_url = args['SimilarJobsURL'] || ''
|
63
|
-
|
64
|
-
# Summary
|
65
|
-
@categories = args['Categories'] || ''
|
66
|
-
@category_codes = args['CategoriesCodes'] || ''
|
67
|
-
@degree_required = args['DegreeRequired'] || ''
|
68
|
-
@degree_required_code = args['DegreeRequiredCode'] || ''
|
69
|
-
@experience_required = args['ExperienceRequired'] || ''
|
70
|
-
@experience_required_code = args['ExperienceRequiredCode'] || ''
|
71
|
-
@travel_required = args['TravelRequired'] || ''
|
72
|
-
@travel_required_code = args['TravelRequiredCode'] || ''
|
73
|
-
@relocation_covered = args['RelocationCovered'] || ''
|
74
|
-
@relocation_options = args['RelocationOptions'] || ''
|
75
|
-
@division = args['Division'] || ''
|
76
|
-
@industry = args['Industry'] || ''
|
77
|
-
@industry_codes = args['IndustryCodes'] || ''
|
78
|
-
@manages_others = args['ManagesOthers'] || ''
|
79
|
-
@manages_others_code = args['ManagesOthersCode'] || ''
|
80
|
-
@manages_others_string = args['ManagesOthersString'] || ''
|
81
|
-
|
82
|
-
# Contact Info
|
83
|
-
@contact_email_url = args['ContactInfoEmailURL'] || ''
|
84
|
-
@contact_fax = args['ContactInfoFax'] || ''
|
85
|
-
@contact_name = args['ContactInfoName'] || ''
|
86
|
-
@contact_phone = args['ContactInfoPhone'] || ''
|
87
|
-
|
88
|
-
# Job Details related
|
89
|
-
@description = args['Description'] || args['JobDescription'] || ''
|
90
|
-
@requirements = args['JobRequirements'] || ''
|
91
|
-
@begin_date = args['BeginDate'] || ''
|
92
|
-
@end_date = args['EndDate'] || ''
|
93
|
-
|
94
|
-
# Application
|
95
|
-
@apply_url = args['ApplyURL'] || ''
|
96
|
-
@external_apply_url = args['ExternalApplyURL'] || ''
|
97
|
-
@external_application = args['ExternalApplication'] || ''
|
98
|
-
@is_screener_apply = args['IsScreenerApply'] || ''
|
99
|
-
@is_shared_job = args['IsSharedJob'] || ''
|
100
|
-
@can_be_quick_applied = args['CanBeQuickApplied'] || ''
|
101
|
-
@custom_apply_type = args['CustomApplyType'] || ''
|
102
|
-
@apply_requirements = Cb::Utils::ResponseArrayExtractor.extract(args, 'ApplyRequirements')
|
103
|
-
|
104
|
-
# Company related
|
105
|
-
@company_name = args['Company'] || ''
|
106
|
-
@company_did = args['CompanyDID'] || ''
|
107
|
-
@company_details_url = args['CompanyDetailsURL'] || ''
|
108
|
-
@company_image_url = args['CompanyImageURL'] || ''
|
109
|
-
|
110
|
-
# Recommendations related
|
111
|
-
@relevancy = args['Relevancy'] || ''
|
112
|
-
@state = args['LocationState'] || ''
|
113
|
-
@city = args['LocationCity'] || ''
|
114
|
-
@zip = args['LocationPostalCode'] || ''
|
115
|
-
@company_name = args['Company']['CompanyName'] unless args['Company'].nil? || args['Company']['CompanyName'].nil?
|
116
|
-
@company_details_url = args['Company']['CompanyDetailsURL'] unless args['Company'].nil? || args['Company']['CompanyDetailsURL'].nil?
|
117
|
-
|
118
|
-
|
119
|
-
end
|
120
|
-
|
121
|
-
def find_company
|
122
|
-
if @company
|
123
|
-
return @company
|
124
|
-
else
|
125
|
-
@company = Cb::CompanyApi.find_for self
|
126
|
-
|
127
|
-
return @company
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
def external_application?
|
132
|
-
@external_application.downcase == 'true'
|
133
|
-
end
|
134
|
-
|
135
|
-
def relocation_covered?
|
136
|
-
@relocation_covered.downcase == 'true'
|
137
|
-
end
|
138
|
-
|
139
|
-
def manages_others?
|
140
|
-
@manages_others.downcase == 'true'
|
141
|
-
end
|
142
|
-
|
143
|
-
def screener_apply?
|
144
|
-
@is_screener_apply.downcase == 'true'
|
145
|
-
end
|
146
|
-
|
147
|
-
def skip_resume?
|
148
|
-
@custom_apply_type.downcase == 'caskipresume'
|
149
|
-
end
|
150
|
-
|
151
|
-
def shared_job?
|
152
|
-
@is_shared_job.downcase == 'true'
|
153
|
-
end
|
154
|
-
|
155
|
-
def can_be_quick_applied?
|
156
|
-
@can_be_quick_applied.downcase == 'true'
|
157
|
-
end
|
158
|
-
|
159
|
-
def city
|
160
|
-
if @city.empty?
|
161
|
-
return @location['City']
|
162
|
-
else
|
163
|
-
return @city
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
def state
|
168
|
-
if @state.empty?
|
169
|
-
return @location['State']
|
170
|
-
else
|
171
|
-
return @state
|
172
|
-
end
|
173
|
-
end
|
174
|
-
end
|
175
|
-
end
|