PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/fabrikam@contoso.com
Content-type: application/json
{
"email": "admin@fabrikam.com",
"schedulingPolicy": {
"timeSlotInterval": "PT60M",
"minimumLeadTime": "P1D",
"maximumAdvance": "P30D",
"sendConfirmationsToOwner": true,
"allowStaffSelection": true
}
}
// 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);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
mgc solutions booking-businesses patch --booking-business-id {bookingBusiness-id} --body '{\
"email": "admin@fabrikam.com",\
"schedulingPolicy": {\
"timeSlotInterval": "PT60M",\
"minimumLeadTime": "P1D",\
"maximumAdvance": "P30D",\
"sendConfirmationsToOwner": true,\
"allowStaffSelection": true\
}\
}\
'
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewBookingBusiness()
email := "admin@fabrikam.com"
requestBody.SetEmail(&email)
schedulingPolicy := graphmodels.NewBookingSchedulingPolicy()
timeSlotInterval , err := abstractions.ParseISODuration("PT60M")
schedulingPolicy.SetTimeSlotInterval(&timeSlotInterval)
minimumLeadTime , err := abstractions.ParseISODuration("P1D")
schedulingPolicy.SetMinimumLeadTime(&minimumLeadTime)
maximumAdvance , err := abstractions.ParseISODuration("P30D")
schedulingPolicy.SetMaximumAdvance(&maximumAdvance)
sendConfirmationsToOwner := true
schedulingPolicy.SetSendConfirmationsToOwner(&sendConfirmationsToOwner)
allowStaffSelection := true
schedulingPolicy.SetAllowStaffSelection(&allowStaffSelection)
requestBody.SetSchedulingPolicy(schedulingPolicy)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
bookingBusinesses, err := graphClient.Solutions().BookingBusinesses().ByBookingBusinessId("bookingBusiness-id").Patch(context.Background(), requestBody, nil)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// 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);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
const bookingBusiness = {
email: 'admin@fabrikam.com',
schedulingPolicy: {
timeSlotInterval: 'PT60M',
minimumLeadTime: 'P1D',
maximumAdvance: 'P30D',
sendConfirmationsToOwner: true,
allowStaffSelection: true
}
};
await client.api('/solutions/bookingBusinesses/fabrikam@contoso.com')
.update(bookingBusiness);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\BookingBusiness;
use Microsoft\Graph\Generated\Models\BookingSchedulingPolicy;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BookingBusiness();
$requestBody->setEmail('admin@fabrikam.com');
$schedulingPolicy = new BookingSchedulingPolicy();
$schedulingPolicy->setTimeSlotInterval(new \DateInterval('PT60M'));
$schedulingPolicy->setMinimumLeadTime(new \DateInterval('P1D'));
$schedulingPolicy->setMaximumAdvance(new \DateInterval('P30D'));
$schedulingPolicy->setSendConfirmationsToOwner(true);
$schedulingPolicy->setAllowStaffSelection(true);
$requestBody->setSchedulingPolicy($schedulingPolicy);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->patch($requestBody)->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.Bookings
$params = @{
email = "admin@fabrikam.com"
schedulingPolicy = @{
timeSlotInterval = "PT60M"
minimumLeadTime = "P1D"
maximumAdvance = "P30D"
sendConfirmationsToOwner = $true
allowStaffSelection = $true
}
}
Update-MgBookingBusiness -BookingBusinessId $bookingBusinessId -BodyParameter $params
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
# 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)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。