bookings_api = client.bookingsBookingsApi
- Create Booking
- Search Availability
- Retrieve Business Booking Profile
- List Team Member Booking Profiles
- Retrieve Team Member Booking Profile
- Retrieve Booking
- Update Booking
- Cancel Booking
Creates a booking.
def create_booking(body:)| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
Create Booking Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
body = {}
body[:idempotency_key] = 'idempotency_key2'
body[:booking] = {}
body[:booking][:id] = 'id8'
body[:booking][:version] = 148
body[:booking][:status] = 'ACCEPTED'
body[:booking][:created_at] = 'created_at6'
body[:booking][:updated_at] = 'updated_at4'
result = bookings_api.create_booking(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endSearches for availabilities for booking.
def search_availability(body:)| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
Search Availability Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Search Availability Response Hash
body = {}
body[:query] = {}
body[:query][:filter] = {}
body[:query][:filter][:start_at_range] = {}
body[:query][:filter][:start_at_range][:start_at] = 'start_at8'
body[:query][:filter][:start_at_range][:end_at] = 'end_at4'
body[:query][:filter][:location_id] = 'location_id6'
body[:query][:filter][:segment_filters] = []
body[:query][:filter][:segment_filters][0] = {}
body[:query][:filter][:segment_filters][0][:service_variation_id] = 'service_variation_id8'
body[:query][:filter][:segment_filters][0][:team_member_id_filter] = {}
body[:query][:filter][:segment_filters][0][:team_member_id_filter][:all] = ['all7']
body[:query][:filter][:segment_filters][0][:team_member_id_filter][:any] = ['any0', 'any1']
body[:query][:filter][:segment_filters][0][:team_member_id_filter][:none] = ['none5']
body[:query][:filter][:segment_filters][1] = {}
body[:query][:filter][:segment_filters][1][:service_variation_id] = 'service_variation_id7'
body[:query][:filter][:segment_filters][1][:team_member_id_filter] = {}
body[:query][:filter][:segment_filters][1][:team_member_id_filter][:all] = ['all6', 'all7', 'all8']
body[:query][:filter][:segment_filters][1][:team_member_id_filter][:any] = ['any1', 'any2', 'any3']
body[:query][:filter][:segment_filters][1][:team_member_id_filter][:none] = ['none6', 'none7']
body[:query][:filter][:booking_id] = 'booking_id6'
result = bookings_api.search_availability(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endRetrieves a seller's booking profile.
def retrieve_business_booking_profileRetrieve Business Booking Profile Response Hash
result = bookings_api.retrieve_business_booking_profile()
if result.success?
puts result.data
elsif result.error?
warn result.errors
endLists booking profiles for team members.
def list_team_member_booking_profiles(bookable_only: false,
limit: nil,
cursor: nil,
location_id: nil)| Parameter | Type | Tags | Description |
|---|---|---|---|
bookable_only |
Boolean |
Query, Optional | Indicates whether to include only bookable team members in the returned result (true) or not (false).Default: false |
limit |
Integer |
Query, Optional | The maximum number of results to return. |
cursor |
String |
Query, Optional | The cursor for paginating through the results. |
location_id |
String |
Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |
List Team Member Booking Profiles Response Hash
bookable_only = false
limit = 172
cursor = 'cursor6'
location_id = 'location_id4'
result = bookings_api.list_team_member_booking_profiles(bookable_only: bookable_only, limit: limit, cursor: cursor, location_id: location_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endRetrieves a team member's booking profile.
def retrieve_team_member_booking_profile(team_member_id:)| Parameter | Type | Tags | Description |
|---|---|---|---|
team_member_id |
String |
Template, Required | The ID of the team member to retrieve. |
Retrieve Team Member Booking Profile Response Hash
team_member_id = 'team_member_id0'
result = bookings_api.retrieve_team_member_booking_profile(team_member_id: team_member_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endRetrieves a booking.
def retrieve_booking(booking_id:)| Parameter | Type | Tags | Description |
|---|---|---|---|
booking_id |
String |
Template, Required | The ID of the Booking object representing the to-be-retrieved booking. |
Retrieve Booking Response Hash
booking_id = 'booking_id4'
result = bookings_api.retrieve_booking(booking_id: booking_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endUpdates a booking.
def update_booking(booking_id:,
body:)| Parameter | Type | Tags | Description |
|---|---|---|---|
booking_id |
String |
Template, Required | The ID of the Booking object representing the to-be-updated booking. |
body |
Update Booking Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
booking_id = 'booking_id4'
body = {}
body[:idempotency_key] = 'idempotency_key2'
body[:booking] = {}
body[:booking][:id] = 'id8'
body[:booking][:version] = 148
body[:booking][:status] = 'ACCEPTED'
body[:booking][:created_at] = 'created_at6'
body[:booking][:updated_at] = 'updated_at4'
result = bookings_api.update_booking(booking_id: booking_id, body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
endCancels an existing booking.
def cancel_booking(booking_id:,
body:)| Parameter | Type | Tags | Description |
|---|---|---|---|
booking_id |
String |
Template, Required | The ID of the Booking object representing the to-be-cancelled booking. |
body |
Cancel Booking Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
booking_id = 'booking_id4'
body = {}
body[:idempotency_key] = 'idempotency_key2'
body[:booking_version] = 8
result = bookings_api.cancel_booking(booking_id: booking_id, body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end