Class: BlgrLib::ReservationQuery::ConfigBuilder
- Inherits:
-
Object
- Object
- BlgrLib::ReservationQuery::ConfigBuilder
- Defined in:
- lib/blgr_lib/reservation_query.rb
Overview
Builder config when instantiating ReservationQuery class
Don't use this class directly
Instance Method Summary collapse
-
#collect_active ⇒ Object
filter by active reservations only.
-
#collect_inactive ⇒ Object
filer by inactive reservations only.
- #commission_status=(commission_status) ⇒ Object
-
#date=(date) ⇒ Object
filter by date equal given argument.
-
#end_date=(date) ⇒ Object
filter by end_date.
-
#end_of_created_date=(date) ⇒ Object
filter by end_of_created_date.
- #remove_no_show ⇒ Object
-
#reservation_id_like=(id) ⇒ Object
filter by reservation id like given argument this will use '%id%' query.
- #reservation_status=(reservation_status) ⇒ Object
-
#restaurant_ids=(ids) ⇒ Object
filter by restaurant id.
-
#restaurant_name_like=(name) ⇒ Object
filter by restaurant name like given argument this will use '%name%' query.
-
#start_date=(date) ⇒ Object
filter by start_date.
-
#start_of_created_date=(date) ⇒ Object
filter by start_of_created_date.
Instance Method Details
#collect_active ⇒ Object
filter by active reservations only
238 239 240 |
# File 'lib/blgr_lib/reservation_query.rb', line 238 def collect_active config['active'] = true end |
#collect_inactive ⇒ Object
filer by inactive reservations only
247 248 249 |
# File 'lib/blgr_lib/reservation_query.rb', line 247 def collect_inactive config['active'] = false end |
#commission_status=(commission_status) ⇒ Object
310 311 312 |
# File 'lib/blgr_lib/reservation_query.rb', line 310 def commission_status=(commission_status) config['commission_status'] = commission_status end |
#date=(date) ⇒ Object
filter by date equal given argument
306 307 308 |
# File 'lib/blgr_lib/reservation_query.rb', line 306 def date=(date) config['date_eq'] = date end |
#end_date=(date) ⇒ Object
filter by end_date
261 262 263 |
# File 'lib/blgr_lib/reservation_query.rb', line 261 def end_date=(date) config['end_date'] = date.iso8601 end |
#end_of_created_date=(date) ⇒ Object
filter by end_of_created_date
275 276 277 |
# File 'lib/blgr_lib/reservation_query.rb', line 275 def end_of_created_date=(date) config['end_of_created_date'] = date.iso8601 end |
#remove_no_show ⇒ Object
242 243 244 |
# File 'lib/blgr_lib/reservation_query.rb', line 242 def remove_no_show config['remove_no_show'] = true end |
#reservation_id_like=(id) ⇒ Object
filter by reservation id like given argument this will use '%id%' query
299 300 301 |
# File 'lib/blgr_lib/reservation_query.rb', line 299 def reservation_id_like=(id) config['reservation_id_like'] = id end |
#reservation_status=(reservation_status) ⇒ Object
314 315 316 |
# File 'lib/blgr_lib/reservation_query.rb', line 314 def reservation_status=(reservation_status) config['reservation_status'] = reservation_status end |
#restaurant_ids=(ids) ⇒ Object
filter by restaurant id
283 284 285 |
# File 'lib/blgr_lib/reservation_query.rb', line 283 def restaurant_ids=(ids) config['restaurant_ids'] = Array(ids).flatten if ids.present? end |
#restaurant_name_like=(name) ⇒ Object
filter by restaurant name like given argument this will use '%name%' query
291 292 293 |
# File 'lib/blgr_lib/reservation_query.rb', line 291 def restaurant_name_like=(name) config['restaurant_name_like'] = name end |
#start_date=(date) ⇒ Object
filter by start_date
254 255 256 |
# File 'lib/blgr_lib/reservation_query.rb', line 254 def start_date=(date) config['start_date'] = date.iso8601 end |
#start_of_created_date=(date) ⇒ Object
filter by start_of_created_date
268 269 270 |
# File 'lib/blgr_lib/reservation_query.rb', line 268 def start_of_created_date=(date) config['start_of_created_date'] = date.iso8601 end |