createProductRestEndpointPage method
Future<CreateProductRestEndpointPageResponse>
createProductRestEndpointPage({
- required String portalProductId,
- required RestEndpointIdentifier restEndpointIdentifier,
- EndpointDisplayContent? displayContent,
- TryItState? tryItState,
Creates a product REST endpoint page for a portal product.
May throw AccessDeniedException.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter portalProductId :
The portal product identifier.
Parameter restEndpointIdentifier :
The REST endpoint identifier.
Parameter displayContent :
The content of the product REST endpoint page.
Parameter tryItState :
The try it state of the product REST endpoint page.
Implementation
Future<CreateProductRestEndpointPageResponse> createProductRestEndpointPage({
required String portalProductId,
required RestEndpointIdentifier restEndpointIdentifier,
EndpointDisplayContent? displayContent,
TryItState? tryItState,
}) async {
final $payload = <String, dynamic>{
'restEndpointIdentifier': restEndpointIdentifier,
if (displayContent != null) 'displayContent': displayContent,
if (tryItState != null) 'tryItState': tryItState.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/portalproducts/${Uri.encodeComponent(portalProductId)}/productrestendpointpages',
exceptionFnMap: _exceptionFns,
);
return CreateProductRestEndpointPageResponse.fromJson(response);
}