Class: Cb::CbSavedSearch
- Inherits:
-
Object
- Object
- Cb::CbSavedSearch
- Defined in:
- lib/cb/models/implementations/cb_saved_search.rb
Defined Under Namespace
Classes: CbSavedSearchParameters
Instance Attribute Summary collapse
-
#boolean_operator ⇒ Object
Returns the value of attribute boolean_operator.
-
#browser_id ⇒ Object
Returns the value of attribute browser_id.
-
#category ⇒ Object
Returns the value of attribute category.
-
#city ⇒ Object
Returns the value of attribute city.
-
#cobrand ⇒ Object
Returns the value of attribute cobrand.
-
#company ⇒ Object
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#dev_key ⇒ Object
Returns the value of attribute dev_key.
-
#education_code ⇒ Object
Returns the value of attribute education_code.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#emp_type ⇒ Object
Returns the value of attribute emp_type.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#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_national ⇒ Object
Returns the value of attribute exclude_national.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#external_user_id ⇒ Object
Returns the value of attribute external_user_id.
-
#hostsite ⇒ Object
Returns the value of attribute hostsite.
-
#industry_codes ⇒ Object
Returns the value of attribute industry_codes.
-
#is_daily_email ⇒ Object
Returns the value of attribute is_daily_email.
-
#job_category ⇒ Object
Returns the value of attribute job_category.
-
#job_search_url ⇒ Object
Returns the value of attribute job_search_url.
-
#jrdid ⇒ Object
Returns the value of attribute jrdid.
-
#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.
-
#saved_search_parameters ⇒ Object
Returns the value of attribute saved_search_parameters.
-
#search_name ⇒ Object
Returns the value of attribute search_name.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#site_id ⇒ Object
Returns the value of attribute site_id.
-
#specific_education ⇒ Object
Returns the value of attribute specific_education.
-
#state ⇒ Object
Returns the value of attribute state.
-
#test ⇒ Object
Returns the value of attribute test.
Instance Method Summary collapse
- #create_anon_to_xml ⇒ Object
-
#create_to_xml ⇒ Object
CbSavedSearchParameters.
- #delete_anon_to_xml ⇒ Object
- #delete_to_xml ⇒ Object
-
#initialize(args = {}) ⇒ CbSavedSearch
constructor
A new instance of CbSavedSearch.
- #update_to_xml ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ CbSavedSearch
Returns a new instance of CbSavedSearch.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 11 def initialize(args={}) @hostsite = args['HostSite'] || '' @cobrand = args['Cobrand'] || '' @search_name = args['SearchName'] || '' @site_id = args['SiteId'] || '' @boolean_operator = args['BooleanOperator'] || '' @category = args['Category'] || '' @education_code = args['EducationCode'] || '' @specific_education = args['SpecificEducation'] || false @emp_type = args['EmpType'] || '' @exclude_company_names = args['ExcludeCompanyNames'] || '' @exclude_job_titles = args['ExcludeJobTitles'] || '' @exclude_national = args['ExcludeNational'] || false @industry_codes = args['IndustryCodes'] || '' @keywords = args['Keywords'] || '' @order_by = args['OrderBy'] || '' @order_direction = args['OrderDirection'] || '' @radius = args['Radius'] || 30 @pay_high = args['PayHigh'] || 0 @pay_low = args['PayLow'] || 0 @posted_within = args['PostedWithin'] || 30 @pay_info_only = args['PayInfoOnly'] || false @location = args['Location'] || '' @job_category = args['JobCategory'] || '' @company = args['Company'] || '' @city = args['City'] || '' @state = args['State'] || '' @is_daily_email = args['IsDailyEmail'] || '' @email_delivery_day = args['EmailDeliveryDay'] || '' @external_id = args['ExternalID'] || '' @external_user_id = args['ExternalUserID'] || '' @dev_key = args['DeveloperKey'] || '' @job_search_url = args['JobSearchUrl'] || '' @jrdid = args['JRDID'] || '' @errors = args['Errors'] || nil @browser_id = args['BrowserID'] || nil @session_id = args['SessionID'] || '' @test = args['Test'].to_s || false @email_address = args['EmailAddress'] || '' @country = args['Country'] || '' if args.has_key?('SavedSearchParameters') unless args['SavedSearchParameters'].empty? @saved_search_parameters = CbSavedSearch.new(args['SavedSearchParameters']) end end end |
Instance Attribute Details
#boolean_operator ⇒ Object
Returns the value of attribute boolean_operator.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def boolean_operator @boolean_operator end |
#browser_id ⇒ Object
Returns the value of attribute browser_id.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def browser_id @browser_id end |
#category ⇒ Object
Returns the value of attribute category.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def category @category end |
#city ⇒ Object
Returns the value of attribute city.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def city @city end |
#cobrand ⇒ Object
Returns the value of attribute cobrand.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def cobrand @cobrand end |
#company ⇒ Object
Returns the value of attribute company.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def country @country end |
#dev_key ⇒ Object
Returns the value of attribute dev_key.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def dev_key @dev_key end |
#education_code ⇒ Object
Returns the value of attribute education_code.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def education_code @education_code end |
#email_address ⇒ Object
Returns the value of attribute email_address.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def email_address @email_address end |
#emp_type ⇒ Object
Returns the value of attribute emp_type.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def emp_type @emp_type end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def errors @errors end |
#exclude_company_names ⇒ Object
Returns the value of attribute exclude_company_names.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def exclude_company_names @exclude_company_names end |
#exclude_job_titles ⇒ Object
Returns the value of attribute exclude_job_titles.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def exclude_job_titles @exclude_job_titles end |
#exclude_national ⇒ Object
Returns the value of attribute exclude_national.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def exclude_national @exclude_national end |
#external_id ⇒ Object
Returns the value of attribute external_id.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def external_id @external_id end |
#external_user_id ⇒ Object
Returns the value of attribute external_user_id.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def external_user_id @external_user_id end |
#hostsite ⇒ Object
Returns the value of attribute hostsite.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def hostsite @hostsite end |
#industry_codes ⇒ Object
Returns the value of attribute industry_codes.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def industry_codes @industry_codes end |
#is_daily_email ⇒ Object
Returns the value of attribute is_daily_email.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def is_daily_email @is_daily_email end |
#job_category ⇒ Object
Returns the value of attribute job_category.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def job_category @job_category end |
#job_search_url ⇒ Object
Returns the value of attribute job_search_url.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def job_search_url @job_search_url end |
#jrdid ⇒ Object
Returns the value of attribute jrdid.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def jrdid @jrdid end |
#keywords ⇒ Object
Returns the value of attribute keywords.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def keywords @keywords end |
#location ⇒ Object
Returns the value of attribute location.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def location @location end |
#order_by ⇒ Object
Returns the value of attribute order_by.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def order_by @order_by end |
#order_direction ⇒ Object
Returns the value of attribute order_direction.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def order_direction @order_direction end |
#pay_high ⇒ Object
Returns the value of attribute pay_high.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def pay_high @pay_high end |
#pay_info_only ⇒ Object
Returns the value of attribute pay_info_only.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def pay_info_only @pay_info_only end |
#pay_low ⇒ Object
Returns the value of attribute pay_low.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def pay_low @pay_low end |
#posted_within ⇒ Object
Returns the value of attribute posted_within.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def posted_within @posted_within end |
#radius ⇒ Object
Returns the value of attribute radius.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def radius @radius end |
#saved_search_parameters ⇒ Object
Returns the value of attribute saved_search_parameters.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def saved_search_parameters @saved_search_parameters end |
#search_name ⇒ Object
Returns the value of attribute search_name.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def search_name @search_name end |
#session_id ⇒ Object
Returns the value of attribute session_id.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def session_id @session_id end |
#site_id ⇒ Object
Returns the value of attribute site_id.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def site_id @site_id end |
#specific_education ⇒ Object
Returns the value of attribute specific_education.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def specific_education @specific_education end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def state @state end |
#test ⇒ Object
Returns the value of attribute test.
4 5 6 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 4 def test @test end |
Instance Method Details
#create_anon_to_xml ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 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 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 127 def create_anon_to_xml ret = "<Request>" ret += "<HostSite>#{@hostsite}</HostSite>" ret += "<Cobrand>#{@cobrand}</Cobrand>" ret += "<BrowserID>#{@browser_id}</BrowserID>" ret += "<SessionID>#{@session_id}</SessionID>" ret += "<Test>#{@test}</Test>" ret += "<EmailAddress>#{@email_address}</EmailAddress>" ret += "<SearchName>#{@search_name}</SearchName>" ret += "<SearchParameters>" ret += "<BooleanOperator>#{@boolean_operator}</BooleanOperator>" ret += "<Category>#{@category}</Category>" ret += "<EducationCode>#{@education_code}</EducationCode>" ret += "<SpecificEducation>#{@specific_education}</SpecificEducation>" ret += "<EmpType>#{@emp_type}</EmpType>" ret += "<ExcludeCompanyNames>#{@exclude_company_names}</ExcludeCompanyNames>" ret += "<ExcludeJobTitles>#{@exclude_job_titles}</ExcludeJobTitles>" ret += "<ExcludeNational>#{@exclude_national}</ExcludeNational>" ret += "<IndustryCodes>#{@industry_codes}</IndustryCodes>" ret += "<Keywords>#{@keywords}</Keywords>" ret += "<OrderBy>#{@order_by}</OrderBy>" ret += "<OrderDirection>#{@order_direction}</OrderDirection>" ret += "<Radius>#{@radius}</Radius>" ret += "<PayHigh>#{@pay_high}</PayHigh>" ret += "<PayLow>#{@pay_high}</PayLow>" ret += "<PostedWithin>#{@posted_within}</PostedWithin>" ret += "<PayInfoOnly>#{@pay_info_only}</PayInfoOnly>" ret += "<Location>#{@location}</Location>" ret += "<JobCategory>#{@job_category}</JobCategory>" ret += "<Company>#{@company}</Company>" ret += "<City>#{@city}</City>" ret += "<State>#{@state}</State>" ret += "<Country>#{@country}</Country>" ret += "</SearchParameters>" ret += "<IsDailyEmail>#{@is_daily_email.upcase}</IsDailyEmail>" ret += "<DeveloperKey>#{@dev_key}</DeveloperKey>" ret += "</Request>" ret end |
#create_to_xml ⇒ Object
CbSavedSearchParameters
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 89 def create_to_xml ret = "<Request>" ret += "<HostSite>#{@hostsite}</HostSite>" ret += "<Cobrand>#{@cobrand}</Cobrand>" ret += "<SearchName>#{@search_name}</SearchName>" ret += "<SearchParameters>" ret += "<BooleanOperator>#{@boolean_operator}</BooleanOperator>" ret += "<Category>#{@category}</Category>" ret += "<EducationCode>#{@education_code}</EducationCode>" ret += "<SpecificEducation>#{@specific_education}</SpecificEducation>" ret += "<EmpType>#{@emp_type}</EmpType>" ret += "<ExcludeCompanyNames>#{@exclude_company_names}</ExcludeCompanyNames>" ret += "<ExcludeJobTitles>#{@exclude_job_titles}</ExcludeJobTitles>" ret += "<ExcludeNational>#{@exclude_national}</ExcludeNational>" ret += "<IndustryCodes>#{@industry_codes}</IndustryCodes>" ret += "<Keywords>#{@keywords}</Keywords>" ret += "<OrderBy>#{@order_by}</OrderBy>" ret += "<OrderDirection>#{@order_direction}</OrderDirection>" ret += "<Radius>#{@radius}</Radius>" ret += "<PayHigh>#{@pay_high}</PayHigh>" ret += "<PayLow>#{@pay_high}</PayLow>" ret += "<PostedWithin>#{@posted_within}</PostedWithin>" ret += "<PayInfoOnly>#{@pay_info_only}</PayInfoOnly>" ret += "<Location>#{@location}</Location>" ret += "<JobCategory>#{@job_category}</JobCategory>" ret += "<Company>#{@company}</Company>" ret += "<City>#{@city}</City>" ret += "<State>#{@state}</State>" ret += "<Country>#{@country}</Country>" ret += "</SearchParameters>" ret += "<IsDailyEmail>#{@is_daily_email.upcase}</IsDailyEmail>" ret += "<ExternalUserID>#{@external_user_id}</ExternalUserID>" ret += "<DeveloperKey>#{@dev_key}</DeveloperKey>" ret += "</Request>" ret end |
#delete_anon_to_xml ⇒ Object
218 219 220 221 222 223 224 225 226 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 218 def delete_anon_to_xml ret = "<Request>" ret += "<DeveloperKey>#{@dev_key}</DeveloperKey>" ret += "<ExternalID>#{@external_id}</ExternalID>" ret += "<Test>#{@test}</Test>" ret += "</Request>" ret end |
#delete_to_xml ⇒ Object
207 208 209 210 211 212 213 214 215 216 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 207 def delete_to_xml ret = "<Request>" ret += "<HostSite>#{@hostsite}</HostSite>" ret += "<ExternalID>#{@external_id}</ExternalID>" ret += "<ExternalUserID>#{@external_user_id}</ExternalUserID>" ret += "<DeveloperKey>#{@dev_key}</DeveloperKey>" ret += "</Request>" ret end |
#update_to_xml ⇒ Object
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/cb/models/implementations/cb_saved_search.rb', line 168 def update_to_xml ret = "<Request>" ret += "<HostSite>#{@hostsite}</HostSite>" ret += "<Cobrand>#{@cobrand}</Cobrand>" ret += "<SearchName>#{@search_name}</SearchName>" ret += "<SearchParameters>" ret += "<BooleanOperator>#{@boolean_operator}</BooleanOperator>" ret += "<Category>#{@category}</Category>" ret += "<EducationCode>#{@education_code}</EducationCode>" ret += "<SpecificEducation>#{@specific_education}</SpecificEducation>" ret += "<EmpType>#{@emp_type}</EmpType>" ret += "<ExcludeCompanyNames>#{@exclude_company_names}</ExcludeCompanyNames>" ret += "<ExcludeJobTitles>#{@exclude_job_titles}</ExcludeJobTitles>" ret += "<ExcludeNational>#{@exclude_national}</ExcludeNational>" ret += "<IndustryCodes>#{@industry_codes}</IndustryCodes>" ret += "<Keywords>#{@keywords}</Keywords>" ret += "<OrderBy>#{@order_by}</OrderBy>" ret += "<OrderDirection>#{@order_direction}</OrderDirection>" ret += "<Radius>#{@radius}</Radius>" ret += "<PayHigh>#{@pay_high}</PayHigh>" ret += "<PayLow>#{@pay_high}</PayLow>" ret += "<PostedWithin>#{@posted_within}</PostedWithin>" ret += "<PayInfoOnly>#{@pay_info_only}</PayInfoOnly>" ret += "<Location>#{@location}</Location>" ret += "<JobCategory>#{@job_category}</JobCategory>" ret += "<Company>#{@company}</Company>" ret += "<City>#{@city}</City>" ret += "<State>#{@state}</State>" ret += "<Country>#{@country}</Country>" ret += "</SearchParameters>" ret += "<IsDailyEmail>#{@is_daily_email}</IsDailyEmail>" ret += "<ExternalID>#{@external_id}</ExternalID>" ret += "<ExternalUserID>#{@external_user_id}</ExternalUserID>" ret += "<DeveloperKey>#{@dev_key}</DeveloperKey>" ret += "</Request>" ret end |