class Cb::Models::SavedSearch::SearchParameters
Attributes
boolean_operator[RW]
category[RW]
city[RW]
company[RW]
country[RW]
education_code[RW]
emp_type[RW]
exclude_company_names[RW]
exclude_job_titles[RW]
exclude_keywords[RW]
exclude_national[RW]
industry_codes[RW]
jc_advertiser_flags[RW]
jc_job_nature[RW]
jc_location[RW]
jc_position_level[RW]
job_category[RW]
job_title[RW]
keywords[RW]
location[RW]
order_by[RW]
order_direction[RW]
pay_high[RW]
pay_info_only[RW]
pay_low[RW]
posted_within[RW]
radius[RW]
specific_education[RW]
state[RW]
Public Class Methods
new(args = {})
click to toggle source
# File lib/cb/models/implementations/saved_search.rb, line 112 def initialize(args = {}) @boolean_operator = args['BooleanOperator'] || '' @category = args['Category'] || '' @job_category = args['JobCategory'] || '' @education_code = args['EducationCode'] || '' @emp_type = args['EmpType'] || '' @exclude_company_names = args['ExcludeCompanyNames'] || '' @exclude_job_titles = args['ExcludeJobTitles'] || '' @exclude_keywords = args['ExcludeKeywords'] || '' @exclude_national = args['ExcludeNational'].nil? ? false : args['ExcludeNational'] @industry_codes = args['IndustryCodes'] || '' @job_title = args['JobTitle'] || '' @keywords = args['Keywords'] || '' @location = args['Location'] || '' @order_by = args['OrderBy'] || '' @order_direction = args['OrderDirection'] || '' @pay_high = args['PayHigh'] || 0 @pay_low = args['PayLow'] || 0 @pay_info_only = args['PayInfoOnly'].nil? ? false : args['PayInfoOnly'] @posted_within = args['PostedWithin'] || 30 @radius = args['Radius'] || 30 @specific_education = args['SpecificEducation'].nil? ? false : args['SpecificEducation'] @city = args['City'] || '' @state = args['State'] || '' @country = args['Country'] || '' @company = args['Company'] || '' @jc_position_level = args['JCPositionLevel'] || '' @jc_location = args['JCLocation'] || '' @jc_advertiser_flags = args['JCAdvertiserFlags'] || '' @jc_job_nature = args['JCJobNature'] || '' end
Public Instance Methods
to_hash()
click to toggle source
# File lib/cb/models/implementations/saved_search.rb, line 172 def to_hash { 'BooleanOperator' => boolean_operator, 'JobCategory' => job_category, 'EducationCode' => education_code, 'EmpType' => emp_type, 'ExcludeCompanyNames' => exclude_company_names, 'ExcludeJobTitles' => exclude_job_titles, 'Country' => country, 'IndustryCodes' => industry_codes, 'JobTitle' => job_title, 'Keywords' => keywords, 'Location' => location, 'OrderBy' => order_by, 'OrderDirection' => order_direction, 'PayHigh' => pay_high, 'PayLow' => pay_low, 'PostedWithin' => posted_within, 'Radius' => radius, 'SpecificEducation' => specific_education, 'ExcludeNational' => exclude_national, 'PayInfoOnly' => pay_info_only } end
to_xml()
click to toggle source
# File lib/cb/models/implementations/saved_search.rb, line 144 def to_xml <<-eos <SearchParameters> <BooleanOperator>#{boolean_operator}</BooleanOperator> <JobCategory>#{category}</JobCategory> <EducationCode>#{education_code}</EducationCode> <EmpType>#{emp_type}</EmpType> <ExcludeCompanyNames>#{exclude_company_names}</ExcludeCompanyNames> <ExcludeJobTitles>#{exclude_job_titles}</ExcludeJobTitles> <ExcludeKeywords>#{exclude_keywords}</ExcludeKeywords> <Country>#{country}</Country> <IndustryCodes>#{industry_codes}</IndustryCodes> <JobTitle>#{job_title}</JobTitle> <Keywords>#{keywords}</Keywords> <Location>#{location}</Location> <OrderBy>#{order_by}</OrderBy> <OrderDirection>#{order_direction}</OrderDirection> <PayHigh>#{pay_high}</PayHigh> <PayLow>#{pay_low}</PayLow> <PostedWithin>#{posted_within}</PostedWithin> <Radius>#{radius}</Radius> <SpecificEducation>#{specific_education}</SpecificEducation> <ExcludeNational>#{exclude_national}</ExcludeNational> <PayInfoOnly>#{pay_info_only}</PayInfoOnly> </SearchParameters> eos end