// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new BookingBusiness
{
Email = "admin@fabrikam.com",
SchedulingPolicy = new BookingSchedulingPolicy
{
TimeSlotInterval = TimeSpan.Parse("PT60M"),
MinimumLeadTime = TimeSpan.Parse("P1D"),
MaximumAdvance = TimeSpan.Parse("P30D"),
SendConfirmationsToOwner = true,
AllowStaffSelection = true,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingBusiness bookingBusiness = new BookingBusiness();
bookingBusiness.setEmail("admin@fabrikam.com");
BookingSchedulingPolicy schedulingPolicy = new BookingSchedulingPolicy();
PeriodAndDuration timeSlotInterval = PeriodAndDuration.ofDuration(Duration.parse("PT60M"));
schedulingPolicy.setTimeSlotInterval(timeSlotInterval);
PeriodAndDuration minimumLeadTime = PeriodAndDuration.ofDuration(Duration.parse("P1D"));
schedulingPolicy.setMinimumLeadTime(minimumLeadTime);
PeriodAndDuration maximumAdvance = PeriodAndDuration.ofDuration(Duration.parse("P30D"));
schedulingPolicy.setMaximumAdvance(maximumAdvance);
schedulingPolicy.setSendConfirmationsToOwner(true);
schedulingPolicy.setAllowStaffSelection(true);
bookingBusiness.setSchedulingPolicy(schedulingPolicy);
BookingBusiness result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").patch(bookingBusiness);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.booking_business import BookingBusiness
from msgraph.generated.models.booking_scheduling_policy import BookingSchedulingPolicy
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BookingBusiness(
email = "admin@fabrikam.com",
scheduling_policy = BookingSchedulingPolicy(
time_slot_interval = "PT60M",
minimum_lead_time = "P1D",
maximum_advance = "P30D",
send_confirmations_to_owner = True,
allow_staff_selection = True,
),
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').patch(request_body)