postNotifySendSms method

Future<Object?> postNotifySendSms(
  1. NotifySend notifySend
)

Delivers one transactional SMS through the caller org's own provider credential.

Delivers one transactional SMS through the caller org's own provider credential. It is the channel-pinned form of the generic send: identical in every respect except that the channel is fixed to sms, OVERRIDING whatever the body names — so a body that says email still goes out as a text message. The provider is the org's own SMS credential from KMS (Twilio, then Plivo), resolved for the validated principal's org; an unauthenticated caller gets 401.

Parameters:

Implementation

Future<Object?> postNotifySendSms(NotifySend notifySend,) async {
  final response = await postNotifySendSmsWithHttpInfo(notifySend,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;

  }
  return null;
}