Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
En el cuerpo de la solicitud, proporcione solo los valores de las propiedades que se van a actualizar. Las propiedades existentes que no se incluyen en el cuerpo de la solicitud mantienen sus valores anteriores o se recalculan en función de los cambios realizados en otros valores de propiedad.
En la tabla siguiente se especifican las propiedades que se pueden actualizar.
Propiedad
Tipo
Descripción
answerInputType
answerInputType
Tipo de respuesta esperado. Los valores posibles son: text, radioButton, unknownFutureValue. Opcional.
answerOptions
Colección string
Lista de posibles valores de respuesta. Opcional.
displayName
Cadena
La pregunta. Obligatorio.
Respuesta
Si se ejecuta correctamente, este método devuelve un 200 OK código de respuesta y un objeto bookingCustomQuestion actualizado en el cuerpo de la respuesta.
PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/customQuestions/91f1ef26-ca00-451c-1c64-8f3560c80d3d
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.bookingCustomQuestion",
"displayName": "What is your age?",
"answerInputType": "text",
"answerOptions": []
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new BookingCustomQuestion
{
OdataType = "#microsoft.graph.bookingCustomQuestion",
DisplayName = "What is your age?",
AnswerInputType = AnswerInputType.Text,
AnswerOptions = new List<string>
{
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].CustomQuestions["{bookingCustomQuestion-id}"].PatchAsync(requestBody);
// 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.NewBookingCustomQuestion()
displayName := "What is your age?"
requestBody.SetDisplayName(&displayName)
answerInputType := graphmodels.TEXT_ANSWERINPUTTYPE
requestBody.SetAnswerInputType(&answerInputType)
answerOptions := []string {
}
requestBody.SetAnswerOptions(answerOptions)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
customQuestions, err := graphClient.Solutions().BookingBusinesses().ByBookingBusinessId("bookingBusiness-id").CustomQuestions().ByBookingCustomQuestionId("bookingCustomQuestion-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingCustomQuestion bookingCustomQuestion = new BookingCustomQuestion();
bookingCustomQuestion.setOdataType("#microsoft.graph.bookingCustomQuestion");
bookingCustomQuestion.setDisplayName("What is your age?");
bookingCustomQuestion.setAnswerInputType(AnswerInputType.Text);
LinkedList<String> answerOptions = new LinkedList<String>();
bookingCustomQuestion.setAnswerOptions(answerOptions);
BookingCustomQuestion result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").customQuestions().byBookingCustomQuestionId("{bookingCustomQuestion-id}").patch(bookingCustomQuestion);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\BookingCustomQuestion;
use Microsoft\Graph\Generated\Models\AnswerInputType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BookingCustomQuestion();
$requestBody->setOdataType('#microsoft.graph.bookingCustomQuestion');
$requestBody->setDisplayName('What is your age?');
$requestBody->setAnswerInputType(new AnswerInputType('text'));
$requestBody->setAnswerOptions([ ]);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->customQuestions()->byBookingCustomQuestionId('bookingCustomQuestion-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.booking_custom_question import BookingCustomQuestion
from msgraph.generated.models.answer_input_type import AnswerInputType
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BookingCustomQuestion(
odata_type = "#microsoft.graph.bookingCustomQuestion",
display_name = "What is your age?",
answer_input_type = AnswerInputType.Text,
answer_options = [
],
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').custom_questions.by_booking_custom_question_id('bookingCustomQuestion-id').patch(request_body)