Module: Booker::V4::CustomerREST
Constant Summary
RequestHelper::DEFAULT_PAGINATION_PARAMS
Instance Method Summary
collapse
Methods included from CommonREST
#confirm_appointment, #get_location, #get_online_booking_settings
#build_params
Instance Method Details
#create_appointment(booker_location_id:, available_time:, customer:, params: {}) ⇒ Object
6
7
8
9
10
11
12
13
14
|
# File 'lib/booker/v4/customer_rest.rb', line 6
def create_appointment(booker_location_id:, available_time:, customer:, params: {})
post '/appointment/create', build_params({
'LocationID' => booker_location_id,
'ItineraryTimeSlotList' => [
'TreatmentTimeSlots' => [available_time]
],
'Customer' => customer
}, params), Booker::V4::Models::Appointment
end
|
#create_class_appointment(booker_location_id:, class_instance_id:, customer:, params: {}) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/booker/v4/customer_rest.rb', line 16
def create_class_appointment(booker_location_id:, class_instance_id:, customer:, params: {})
post '/class_appointment/create', build_params({
LocationID: booker_location_id,
ClassInstanceID: class_instance_id,
Customer: customer
}, params), Booker::V4::Models::Appointment
end
|
#run_class_availability(booker_location_id:, from_start_date_time:, to_start_date_time:, params: {}) ⇒ Object
24
25
26
27
28
29
30
31
32
|
# File 'lib/booker/v4/customer_rest.rb', line 24
def run_class_availability(booker_location_id:, from_start_date_time:, to_start_date_time:, params: {})
post '/availability/class', build_params({
FromStartDateTime: from_start_date_time,
LocationID: booker_location_id,
OnlyIfAvailable: true,
ToStartDateTime: to_start_date_time,
ExcludeClosedDates: true
}, params), Booker::V4::Models::ClassInstance
end
|