testPhoneNumberSendSmsWithHttpInfo method

Future<Response> testPhoneNumberSendSmsWithHttpInfo(
  1. String phoneNumberId,
  2. TestPhoneNumberOptions testPhoneNumberOptions, {
  3. String? xTestId,
})

Performs an HTTP 'POST /phone/numbers/{phoneNumberId}/test' operation and returns the Response. Parameters:

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,
  );
}