createPhoneNumberOrder method

Future<CreatePhoneNumberOrderResponse> createPhoneNumberOrder({
  1. required List<String> e164PhoneNumbers,
  2. required PhoneNumberProductType productType,
})

Creates an order for phone numbers to be provisioned. For toll-free numbers, you cannot use the Amazon Chime Business Calling product type. For numbers outside the U.S., you must use the Amazon Chime SIP Media Application Dial-In product type.

May throw AccessDeniedException. May throw BadRequestException. May throw ForbiddenException. May throw ResourceLimitExceededException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter e164PhoneNumbers : List of phone numbers, in E.164 format.

Parameter productType : The phone number product type.

Implementation

Future<CreatePhoneNumberOrderResponse> createPhoneNumberOrder({
  required List<String> e164PhoneNumbers,
  required PhoneNumberProductType productType,
}) async {
  final $payload = <String, dynamic>{
    'E164PhoneNumbers': e164PhoneNumbers,
    'ProductType': productType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/phone-number-orders',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePhoneNumberOrderResponse.fromJson(response);
}