Class: Cb::Models::SavedSearch::SearchParameters
- Inherits:
-
Object
- Object
- Cb::Models::SavedSearch::SearchParameters
- Defined in:
- lib/cb/models/implementations/saved_search.rb
Instance Attribute Summary collapse
-
#boolean_operator ⇒ Object
Returns the value of attribute boolean_operator.
-
#category ⇒ Object
Returns the value of attribute category.
-
#city ⇒ Object
Returns the value of attribute city.
-
#company ⇒ Object
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#education_code ⇒ Object
Returns the value of attribute education_code.
-
#emp_type ⇒ Object
Returns the value of attribute emp_type.
-
#exclude_company_names ⇒ Object
Returns the value of attribute exclude_company_names.
-
#exclude_job_titles ⇒ Object
Returns the value of attribute exclude_job_titles.
-
#exclude_keywords ⇒ Object
Returns the value of attribute exclude_keywords.
-
#exclude_national ⇒ Object
Returns the value of attribute exclude_national.
-
#industry_codes ⇒ Object
Returns the value of attribute industry_codes.
-
#jc_advertiser_flags ⇒ Object
Returns the value of attribute jc_advertiser_flags.
-
#jc_job_nature ⇒ Object
Returns the value of attribute jc_job_nature.
-
#jc_location ⇒ Object
Returns the value of attribute jc_location.
-
#jc_position_level ⇒ Object
Returns the value of attribute jc_position_level.
-
#job_category ⇒ Object
Returns the value of attribute job_category.
-
#job_title ⇒ Object
Returns the value of attribute job_title.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#location ⇒ Object
Returns the value of attribute location.
-
#order_by ⇒ Object
Returns the value of attribute order_by.
-
#order_direction ⇒ Object
Returns the value of attribute order_direction.
-
#pay_high ⇒ Object
Returns the value of attribute pay_high.
-
#pay_info_only ⇒ Object
Returns the value of attribute pay_info_only.
-
#pay_low ⇒ Object
Returns the value of attribute pay_low.
-
#posted_within ⇒ Object
Returns the value of attribute posted_within.
-
#radius ⇒ Object
Returns the value of attribute radius.
-
#specific_education ⇒ Object
Returns the value of attribute specific_education.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ SearchParameters
constructor
A new instance of SearchParameters.
- #to_hash ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ SearchParameters
Returns a new instance of SearchParameters.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/cb/models/implementations/saved_search.rb', line 110 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 |
Instance Attribute Details
#boolean_operator ⇒ Object
Returns the value of attribute boolean_operator.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def boolean_operator @boolean_operator end |
#category ⇒ Object
Returns the value of attribute category.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def category @category end |
#city ⇒ Object
Returns the value of attribute city.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def city @city end |
#company ⇒ Object
Returns the value of attribute company.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def country @country end |
#education_code ⇒ Object
Returns the value of attribute education_code.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def education_code @education_code end |
#emp_type ⇒ Object
Returns the value of attribute emp_type.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def emp_type @emp_type end |
#exclude_company_names ⇒ Object
Returns the value of attribute exclude_company_names.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def exclude_company_names @exclude_company_names end |
#exclude_job_titles ⇒ Object
Returns the value of attribute exclude_job_titles.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def exclude_job_titles @exclude_job_titles end |
#exclude_keywords ⇒ Object
Returns the value of attribute exclude_keywords.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def exclude_keywords @exclude_keywords end |
#exclude_national ⇒ Object
Returns the value of attribute exclude_national.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def exclude_national @exclude_national end |
#industry_codes ⇒ Object
Returns the value of attribute industry_codes.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def industry_codes @industry_codes end |
#jc_advertiser_flags ⇒ Object
Returns the value of attribute jc_advertiser_flags.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def jc_advertiser_flags @jc_advertiser_flags end |
#jc_job_nature ⇒ Object
Returns the value of attribute jc_job_nature.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def jc_job_nature @jc_job_nature end |
#jc_location ⇒ Object
Returns the value of attribute jc_location.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def jc_location @jc_location end |
#jc_position_level ⇒ Object
Returns the value of attribute jc_position_level.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def jc_position_level @jc_position_level end |
#job_category ⇒ Object
Returns the value of attribute job_category.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def job_category @job_category end |
#job_title ⇒ Object
Returns the value of attribute job_title.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def job_title @job_title end |
#keywords ⇒ Object
Returns the value of attribute keywords.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def keywords @keywords end |
#location ⇒ Object
Returns the value of attribute location.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def location @location end |
#order_by ⇒ Object
Returns the value of attribute order_by.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def order_by @order_by end |
#order_direction ⇒ Object
Returns the value of attribute order_direction.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def order_direction @order_direction end |
#pay_high ⇒ Object
Returns the value of attribute pay_high.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def pay_high @pay_high end |
#pay_info_only ⇒ Object
Returns the value of attribute pay_info_only.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def pay_info_only @pay_info_only end |
#pay_low ⇒ Object
Returns the value of attribute pay_low.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def pay_low @pay_low end |
#posted_within ⇒ Object
Returns the value of attribute posted_within.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def posted_within @posted_within end |
#radius ⇒ Object
Returns the value of attribute radius.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def radius @radius end |
#specific_education ⇒ Object
Returns the value of attribute specific_education.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def specific_education @specific_education end |
#state ⇒ Object
Returns the value of attribute state.
104 105 106 |
# File 'lib/cb/models/implementations/saved_search.rb', line 104 def state @state end |
Instance Method Details
#to_hash ⇒ Object
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/cb/models/implementations/saved_search.rb', line 170 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 ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/cb/models/implementations/saved_search.rb', line 142 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 |