Module: Booker::CustomerREST
Constant Summary
Constants included from CommonREST
Booker::CommonREST::DEFAULT_PAGINATION_PARAMS
Instance Method Summary collapse
- #create_appointment(booker_location_id:, available_time:, customer:, options: {}) ⇒ Object
- #create_class_appointment(booker_location_id:, class_instance_id:, customer:, options: {}) ⇒ Object
- #run_class_availability(booker_location_id:, from_start_date_time:, to_start_date_time:, options: {}) ⇒ Object
- #run_multi_spa_multi_sub_category_availability(booker_location_ids:, treatment_sub_category_ids:, start_date_time:, end_date_time:, options: {}) ⇒ Object
Methods included from CommonREST
#confirm_appointment, #get_online_booking_settings
Instance Method Details
#create_appointment(booker_location_id:, available_time:, customer:, options: {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/booker/customer_rest.rb', line 5 def create_appointment(booker_location_id:, available_time:, customer:, options: {}) post '/appointment/create', build_params({ 'LocationID' => booker_location_id, 'ItineraryTimeSlotList' => [ 'TreatmentTimeSlots' => [available_time] ], 'Customer' => customer }, ), Booker::Models::Appointment end |
#create_class_appointment(booker_location_id:, class_instance_id:, customer:, options: {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/booker/customer_rest.rb', line 15 def create_class_appointment(booker_location_id:, class_instance_id:, customer:, options: {}) post '/class_appointment/create', build_params({ 'LocationID' => booker_location_id, 'ClassInstanceID' => class_instance_id, 'Customer' => customer }, ), Booker::Models::Appointment end |
#run_class_availability(booker_location_id:, from_start_date_time:, to_start_date_time:, options: {}) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/booker/customer_rest.rb', line 33 def run_class_availability(booker_location_id:, from_start_date_time:, to_start_date_time:, options: {}) post '/availability/class', build_params({ 'FromStartDateTime' => from_start_date_time, 'LocationID' => booker_location_id, 'OnlyIfAvailable' => true, 'ToStartDateTime' => to_start_date_time, 'ExcludeClosedDates' => true }, ), Booker::Models::ClassInstance end |
#run_multi_spa_multi_sub_category_availability(booker_location_ids:, treatment_sub_category_ids:, start_date_time:, end_date_time:, options: {}) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/booker/customer_rest.rb', line 23 def run_multi_spa_multi_sub_category_availability(booker_location_ids:, treatment_sub_category_ids:, start_date_time:, end_date_time:, options: {}) post '/availability/multispamultisubcategory', build_params({ 'LocationIDs' => booker_location_ids, 'TreatmentSubCategoryIDs' => treatment_sub_category_ids, 'StartDateTime' => start_date_time, 'EndDateTime' => end_date_time, 'MaxTimesPerTreatment' => 1000 }, ), Booker::Models::SpaEmployeeAvailabilitySearchItem end |