Skip to content

Commit

Permalink
Add SMS type and response codes (thanks @DJFliX)
Browse files Browse the repository at this point in the history
  • Loading branch information
smithrobs committed Jul 28, 2015
1 parent 0517349 commit 9eae86e
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions Nexmo.Api/SMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,96 @@ namespace Nexmo.Api
{
public static class SMS
{
public enum SmsType
{
text,
binary,
wappush,
unicode,
vcal,
vcard
}

public enum SmsResponseCodes
{
/// <summary>
/// The message was successfully accepted for delivery by Nexmo
/// </summary>
success = 0,
/// <summary>
/// You have exceeded the submission capacity allowed on this account, please back-off and retry
/// </summary>
throttled = 1,
/// <summary>
/// Your request is incomplete and missing some mandatory parameters
/// </summary>
missing_params = 2,
/// <summary>
/// The value of one or more parameters is invalid
/// </summary>
invalid_params = 3,
/// <summary>
/// The api_key / api_secret you supplied is either invalid or disabled
/// </summary>
invalid_credentials = 4,
/// <summary>
/// An error has occurred in the Nexmo platform whilst processing this message
/// </summary>
internal_error = 5,
/// <summary>
/// The Nexmo platform was unable to process this message. For example due to an un-recognized destination number prefix
/// </summary>
invalid_message = 6,
/// <summary>
/// The number you are trying to submit to is blacklisted and may not receive messages
/// </summary>
number_barred = 7,
/// <summary>
/// The api_key you supplied is for an account that has been barred from submitting messages
/// </summary>
partner_account_barred = 8,
/// <summary>
/// Your pre-pay account does not have sufficient credit to process this message
/// </summary>
partner_quota_exceeded = 9,
/// <summary>
/// This account is not provisioned for REST submission, you should use SMPP instead
/// </summary>
account_rest_not_enabled = 11,
/// <summary>
/// Applies to Binary submissions, where the length of the UDH and the message body combined exceed 140 octets
/// </summary>
message_too_long = 12,
/// <summary>
/// Message was not submitted because there was a communication failure
/// </summary>
communication_failed = 13,
/// <summary>
/// Message was not submitted due to a verification failure in the submitted signature
/// </summary>
invalid_signature = 14,
/// <summary>
/// The sender address (from parameter) was not allowed for this message. Restrictions may apply depending on the destination see our FAQs
/// </summary>
invalid_sender_address = 15,
/// <summary>
/// The ttl parameter values is invalid
/// </summary>
invalid_ttl = 16,
/// <summary>
/// Your request makes use of a facility that is not enabled on your account
/// </summary>
facility_not_allowed = 19,
/// <summary>
/// The message class value supplied was out of range (0 - 3)
/// </summary>
invalid_message_class = 20,
/// <summary>
/// The destination number is not in your pre-approved destination list (trial accounts only).
/// </summary>
non_whitelisted_destination = 29
}

public class SMSRequest
{
public string from { get; set; }
Expand Down

0 comments on commit 9eae86e

Please # to comment.