createSubscription method

Future<CreateSubscriptionOutput> createSubscription({
  1. required String domainId,
})

Creates a new Subscription within a Domain for billing and user management.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter domainId : The unique identifier of the parent Domain.

Implementation

Future<CreateSubscriptionOutput> createSubscription({
  required String domainId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/domains/${Uri.encodeComponent(domainId)}/subscriptions',
    exceptionFnMap: _exceptionFns,
  );
  return CreateSubscriptionOutput.fromJson(response);
}