Module: Booker::CommonREST
- Included in:
- BusinessREST, CustomerREST
- Defined in:
- lib/booker/common_rest.rb
Constant Summary collapse
- DEFAULT_PAGINATION_PARAMS =
{ 'UsePaging' => true, 'PageSize' => Integer(ENV['BOOKER_DEFAULT_PAGE_SIZE'] || 10), 'PageNumber' => 1 }
Instance Method Summary collapse
- #confirm_appointment(appointment_id:) ⇒ Object
- #get_location(booker_location_id:) ⇒ Object
- #get_online_booking_settings(booker_location_id:) ⇒ Object
Instance Method Details
#confirm_appointment(appointment_id:) ⇒ Object
14 15 16 |
# File 'lib/booker/common_rest.rb', line 14 def confirm_appointment(appointment_id:) put '/appointment/confirm', build_params('ID' => appointment_id), Booker::Models::Appointment end |
#get_location(booker_location_id:) ⇒ Object
18 19 20 21 |
# File 'lib/booker/common_rest.rb', line 18 def get_location(booker_location_id:) response = get("/location/#{booker_location_id}", build_params) Booker::Models::Location.from_hash(response) end |
#get_online_booking_settings(booker_location_id:) ⇒ Object
9 10 11 12 |
# File 'lib/booker/common_rest.rb', line 9 def get_online_booking_settings(booker_location_id:) response = get("/location/#{booker_location_id}/online_booking_settings", build_params) Booker::Models::OnlineBookingSettings.from_hash(response['OnlineBookingSettings']) end |