From 9eae86edce1dc6a8b7587ccb975e593344584151 Mon Sep 17 00:00:00 2001 From: Robert Smith Date: Tue, 28 Jul 2015 14:16:18 -0400 Subject: [PATCH] Add SMS type and response codes (thanks @DJFliX) --- Nexmo.Api/SMS.cs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/Nexmo.Api/SMS.cs b/Nexmo.Api/SMS.cs index 2e7fc55b5..5c5bd4565 100644 --- a/Nexmo.Api/SMS.cs +++ b/Nexmo.Api/SMS.cs @@ -4,6 +4,96 @@ namespace Nexmo.Api { public static class SMS { + public enum SmsType + { + text, + binary, + wappush, + unicode, + vcal, + vcard + } + + public enum SmsResponseCodes + { + /// + /// The message was successfully accepted for delivery by Nexmo + /// + success = 0, + /// + /// You have exceeded the submission capacity allowed on this account, please back-off and retry + /// + throttled = 1, + /// + /// Your request is incomplete and missing some mandatory parameters + /// + missing_params = 2, + /// + /// The value of one or more parameters is invalid + /// + invalid_params = 3, + /// + /// The api_key / api_secret you supplied is either invalid or disabled + /// + invalid_credentials = 4, + /// + /// An error has occurred in the Nexmo platform whilst processing this message + /// + internal_error = 5, + /// + /// The Nexmo platform was unable to process this message. For example due to an un-recognized destination number prefix + /// + invalid_message = 6, + /// + /// The number you are trying to submit to is blacklisted and may not receive messages + /// + number_barred = 7, + /// + /// The api_key you supplied is for an account that has been barred from submitting messages + /// + partner_account_barred = 8, + /// + /// Your pre-pay account does not have sufficient credit to process this message + /// + partner_quota_exceeded = 9, + /// + /// This account is not provisioned for REST submission, you should use SMPP instead + /// + account_rest_not_enabled = 11, + /// + /// Applies to Binary submissions, where the length of the UDH and the message body combined exceed 140 octets + /// + message_too_long = 12, + /// + /// Message was not submitted because there was a communication failure + /// + communication_failed = 13, + /// + /// Message was not submitted due to a verification failure in the submitted signature + /// + invalid_signature = 14, + /// + /// The sender address (from parameter) was not allowed for this message. Restrictions may apply depending on the destination see our FAQs + /// + invalid_sender_address = 15, + /// + /// The ttl parameter values is invalid + /// + invalid_ttl = 16, + /// + /// Your request makes use of a facility that is not enabled on your account + /// + facility_not_allowed = 19, + /// + /// The message class value supplied was out of range (0 - 3) + /// + invalid_message_class = 20, + /// + /// The destination number is not in your pre-approved destination list (trial accounts only). + /// + non_whitelisted_destination = 29 + } + public class SMSRequest { public string from { get; set; }