testPhoneNumberSendSmsWithHttpInfo method
Future<Response>
testPhoneNumberSendSmsWithHttpInfo(
- String phoneNumberId,
- TestPhoneNumberOptions testPhoneNumberOptions, {
- String? xTestId,
Performs an HTTP 'POST /phone/numbers/{phoneNumberId}/test' operation and returns the Response
.
Parameters:
-
String phoneNumberId (required):
-
TestPhoneNumberOptions testPhoneNumberOptions (required):
-
String xTestId:
Implementation
Future<Response> testPhoneNumberSendSmsWithHttpInfo(String phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, { String? xTestId, }) async {
// ignore: prefer_const_declarations
final path = r'/phone/numbers/{phoneNumberId}/test'
.replaceAll('{phoneNumberId}', phoneNumberId);
// ignore: prefer_final_locals
Object? postBody = testPhoneNumberOptions;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (xTestId != null) {
headerParams[r'x-test-id'] = parameterToString(xTestId);
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}