AT&T API Platform SDK for Microsoft®  2.3.3
Wrapper classes that allow developers to build robust applications using .NET
 All Classes Namespaces Functions Enumerations Properties

The RequestFactory manages the connections and calls to the AT&T API Platform. More...

List of all members.

Public Types

enum  ScopeTypes
 Set of allowed Scope values. More...

Public Member Functions

AdResponse GetAdvertisement (AdRequest adsRequest, string udid=null)
 Gets Advertisement details This method gets client credentials and issues the API request. Once the response is received, the response will be parsed into an AdResponse object.
CreateSessionResponse CreateSession (NameValueCollection parameters=null)
 This method creates a Session for an outgoing call or message.
SendSignalResponse SendSignal (string sessionId, string signal)
 This method sends a Signal to an active Session.
ATT_MSSDK.DeviceCapabilitiesv2.DeviceCapabilities GetDeviceCapabilities ()
 Get the device capabilities for the specified Wireless Number.
DeviceLocation GetTerminalLocation (int requestedAccuracy=100, TerminalLocationTolerance tolerance=TerminalLocationTolerance.DelayTolerant, int acceptableAccuracy=10000)
 This methods returns Device Location details from the network for an AT&T Wireless Number. It returns latitude, longitude and accuracy of the coordinates. This version 2.1 is latest.
GetMessageHeadersResponse GetMessageHeaders (int headerCount, string indexCursor=null)
 This method gets meta-data for one or more Subscriber Messages from the AT&T Messages environment.
GetMessageContentResponse GetMessage (string messageId, string partNumber)
 This method gets one or more subscriber messages from the AT&T Messages environment.
MmsResponse SendMms (string address, string message, MmsPriority priority=MmsPriority.Normal, bool?notifyDeliveryStatus=null)
 Send an MMS message to the specified address, without attachment.
MmsResponse SendMms (string address, string message, List< string > attachments, MmsPriority priority=MmsPriority.Normal, long size=600, bool?notifyDeliveryStatus=null)
 Send an MMS message to the specified address.
MmsResponse SendMms (List< string > addresses, string message, MmsPriority priority=MmsPriority.Normal, bool?notifyDeliveryStatus=null)
 Send an MMS message to the specified addresses.
MmsResponse SendMms (List< string > addresses, string message, List< string > attachments, MmsPriority priority=MmsPriority.Normal, long size=600, bool?notifyDeliveryStatus=null)
 Send an MMS message to the specified addresses.
MmsDeliveryResponse GetMmsDeliveryResponse (string deliveryId)
 Gets the MmsDeliveryResponse for the specified deliveryId.
SendMessageResponse SendMessage (string address, string text, string subject=null, bool group=false, int maxAddressCount=10)
 Send a message to the specified address.
SendMessageResponse SendMessage (List< string > addresses, string text, string subject=null, bool group=false, int maxAddressCount=10)
 Send a message to the specified address list.
SendMessageResponse SendMessage (string address, List< string > attachments, string text, string subject=null, bool group=false, int maxAddressCount=10)
 Send a message to the specified address.
SendMessageResponse SendMessage (List< string > addresses, List< string > attachments, string text, string subject=null, bool group=false, int maxAddressCount=10)
 Send a message to the specified address list.
string GetNewTransactionRedirect (NotaryResponse notaryResponse)
 Get the redirect url pointing to AT&T Platform payment endpoint. This url can be used by the application to redirect the user to AT&T payment endpoint which collects user consent for the transaction.
string GetNewTransactionRedirect (double amount, PaymentCategories category, string description, string transactionId, string productId, string redirectUrl, TransactionOperationStatus transactionOperationStatus=TransactionOperationStatus.Charged)
 Get the redirect url pointing to AT&T Platform payment endpoint. This url can be used by the application to redirect the user to AT&T payment endpoint which collects user consent for the transaction.
NotaryResponse GetNotarizedForNewTransaction (double amount, PaymentCategories category, string description, string transactionId, string productId, string redirectUrl, TransactionOperationStatus transactionOperationStatus=TransactionOperationStatus.Charged)
 This method notarizes/encrypts the transaction payload. The Notary Response can be used to initiate a new Transaction Purchase.
NotaryResponse GetNotarizedForNewSubscription (double amount, PaymentCategories category, string description, string transactionId, string productId, string redirectUrl, TransactionOperationStatus transactionOperationStatus=TransactionOperationStatus.Charged)
 This method notarizes/encrypts the subscription payload. The Notary Response can be used to initiate a new subscription Purchase.
NotaryResponse GetNotaryResponse (string payload)
 Get the Notary Response for given payload.
string GetNewSubscriptionRedirect (double amount, PaymentCategories category, string description, string transactionId, string productId, string redirectUrl, TransactionOperationStatus transactionOperationStatus=TransactionOperationStatus.Charged)
 Get the redirect url pointing to AT&T Platform payment endpoint. This url can be used by the application to redirect the user to AT&T payment endpoint which collects user consent for the subscription.
string GetNewSubscriptionRedirect (NotaryResponse notaryResponse)
 Get the redirect url pointing to AT&T Platform payment endpoint. This url can be used by the application to redirect the user to AT&T payment endpoint which collects user consent for the subscription.
TransactionStatus GetTransactionStatus (TransactionIdTypes idType, string id)
 This method retrieves the status of an existing transaction.
SubscriptionDetails GetSubscriptionDetails (string merchantSubscriptionId, string consumerId)
 Get the Subscription Details for a given subscription Id and consumer Id.
SubscriptionStatus GetSubscriptionStatus (SubscriptionIdTypes idType, string id)
 Get the Subscription Status for a given subscription Id.
RefundResponseObject Refund (string id, int reasonCode, string reasonText)
 Refunds a transaction for a given transaction Id.
CancelSubscriptionResponse CancelSubscription (string id, int reasonCode, string reasonText)
 Cancels a given subscription.
CommitTransactionResponse CommitTransaction (decimal amount, string transactionId, TransactionOperationStatus transactionOperationStatus=TransactionOperationStatus.Charged)
 Commit Transaction.
List< NotificationIdGetNotificationIds (System.IO.Stream stream)
 Method fetches notification ids from the stream.
List< NotificationObjectAcknowledgeNotifications (System.IO.Stream stream)
 Method fetches notification ids, and get the notification data and acknowledge the nofitication.
NotificationObject GetNotification (string notificationId)
 Method fetches notification data for the given notification Id.
List< NotificationObjectGetNotification (List< string > notificationIds)
 Method fetches notification data for the given list of notification Ids.
List
< AcknowledgeNotificationResponse
AcknowledgeNotifications (List< string > notificationIds)
 This method acknowledges notifications, and requests that the notifications be stopped for a list of NotificationIds.
AcknowledgeNotificationResponse AcknowledgeNotifications (string notificationId)
 Method acknowledges notification and requests that the notifications be stopped for a particular NotificationId.
 RequestFactory (string endPoint, string clientId, string clientSecret, List< ScopeTypes > scopes, string redirectUri, string proxyAddress)
 Initializes a new instance of the RequestFactory class.
void ResetCredentials ()
 Reset the current credentials and force new credentials to be generated on the next request.
bool IsProduction ()
 This method can be used during testing to differentiate between test endpoints and the production endpoints.
void GetAuthorizeCredentials (string authorizationCode)
 Get the Access Token associated with an Authorization Code.
Uri GetOAuthRedirect ()
 Get the redirect Uri to initiate the OAuth redirect process.
void RefreshClientCredentials ()
 Fetches access token using refresh token and stores to ClientCredential Object

Exceptions:
InvalidResponseExceptionthrown if there is an error

SmsResponse SendSms (string address, string message, bool?notifyDeliveryStatus=null)
 This method sends an SMS message to one Mobile Network device.
SmsResponse SendSms (List< string > addresses, string message, bool?notifyDeliveryStatus=null)
 Send an SMS message to the specified addresses.
SmsDeliveryResponse GetSmsDeliveryResponse (string deliveryId)
 This method gets the status of a previous SMS delivery request that was successfully accepted by the AT&T Network for delivery to the destination mobile device. The identifier returned in the response of the corresponding SendSMS operation must be provided in the GetSmsDeliveryStatus operation request.
InboundSmsMessageList ReceiveSms (string shortCode)
 This method retrieves all SMS messages received on its short code resource via polling mechanism.
SpeechResponse SpeechToTextCustom (string audioFilePath, string dictionaryFilePath, string grammarFilePath, XSpeechCustomContext speechCustomContext, string xArgs=null, string audioContentType=null)
SpeechResponse SpeechToText (string audioFilePath)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XSpeechContext speechContext)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, NameValueCollection xArgsCollection)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XSpeechContext speechContext, NameValueCollection xArgsCollection)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XSpeechContext speechContext, string xArgs, string contentLanguage=null, string speechSubContext=null, string audioContentType=null)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XArgs xArgs)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XSpeechContext speechContext, XArgs xArgs)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, XSpeechContext speechContext, XArgs xArgs, string xSpeechSubContext, string audioContentType=null)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, string speechContext)
 This method converts spoken audio to text.
SpeechResponse SpeechToText (string audioFilePath, string speechContext, string xArgsParameter)
 This method converts spoken audio to text.
TextToSpeechResponse TextToSpeech (string textToConvert, string contentType="text/plain", string contentLanguage="en-US", string returnAudioFormat="audio/amr-wb", string xArgs=null)
 This method converts text to synthesized voice.

Static Public Member Functions

static InboundMmsMessage GetMms (System.IO.Stream stream, string directoryToSaveImage)
 Get MMS message from the specified input stream. This method can be used in the listener(Url listening to the MMS MO from AT&T Platform) to retrieve MMS Content from the input stream.
static MmsDeliveryStatus GetMMSDeliveryStatus (System.IO.Stream inputStream)
 Parses given stream and returns ATT_MSSDK.MMSv3.MmsDeliveryStatus object.
static ReceivedSMS GetSMS (System.IO.Stream inputStream)
 Parses given stream and returns ATT_MSSDK.SMSv3.ReceivedSMS object.
static SmsDeliveryStatus GetSMSDeliveryStatus (System.IO.Stream inputStream)
 Parses given stream and returns ATT_MSSDK.SMSv3.SmsDeliveryStatus object.

Properties

Uri EndPoint [get, set]
 Gets or sets the EndPoint for this RequestFactory.
string ClientId [get, set]
 Gets or sets the ClientId for this RequestFactory. The ClientID of registered application.
string ClientSecret [get, set]
 Gets or sets the ClientSecret for this RequestFactory. The ClientSecret of registered application.
List< ScopeTypesScopes [get, set]
 Gets or sets the scopes allowed for this RequestFactory.
Uri RedirectUri [get, set]
 Gets or sets the RedirectUri for this RequestFactory. The URL for the OAuth redirect.
Uri ProxyAddress [get, set]
 Gets or sets the ProxyAddress for this RequestFactory. The URL and Port number of your proxy.
OAuthToken ClientCredential [get, set]
 Gets or sets the ClientCredential for this RequestFactory.
OAuthToken AuthorizeCredential [get, set]
 Gets or sets the AuthorizeCredential for this RequestFactory.

Detailed Description

The RequestFactory manages the connections and calls to the AT&T API Platform.

You must create a RequestFactory instance for each AT&T API Platform Application. The clientId and clientSecret values are available from the AT&T Developer Platform website. Each RequestFactory must have a set of Scopes specifying which services are allowed. Scopes that are not configured for your application will not work. For example, your application may be configured in the AT&T API Platform to support the Payment and SMS scopes. The RequestFactory may specify any combination of Payment or SMS. If you specify Scopes other than Payment and SMS, those scopes will not work. Connections and Credentials are not established until commands, for example SendSms, are called.


Member Enumeration Documentation

Set of allowed Scope values.


Constructor & Destructor Documentation

ATT_MSSDK.RequestFactory.RequestFactory ( string  endPoint,
string  clientId,
string  clientSecret,
List< ScopeTypes scopes,
string  redirectUri,
string  proxyAddress 
)

Initializes a new instance of the RequestFactory class.

Parameters:
endPointThe End Point URL. This defaults to https://api.att.com.
clientIdThe client id of your application.
clientSecretThe client secret of your application.
scopesOne or more values from Payment, SMS, MMS, DeviceLocation, WAPPush.
redirectUriThe URL for the OAuth redirect. Required if scopes include Terminal Location or Device Capabilities
proxyAddressThe URL and Port number of your proxy, if you have one. For example: http://proxy:8888.
Exceptions:
ArgumentExceptionThrown if the arguments are incorrect.

Member Function Documentation

void ATT_MSSDK.RequestFactory.GetAuthorizeCredentials ( string  authorizationCode)

Get the Access Token associated with an Authorization Code.

Parameters:
authorizationCodeThe Authorization Code returned by the OAuth Process.

Get the redirect Uri to initiate the OAuth redirect process.

Returns:
The string containing the OAuth Redirect that must be passed back to the browser.

This method can be used during testing to differentiate between test endpoints and the production endpoints.

Returns:
True if the EndPoint is https://api.att.com.

Fetches access token using refresh token and stores to ClientCredential Object

Exceptions:
InvalidResponseExceptionthrown if there is an error

Reset the current credentials and force new credentials to be generated on the next request.


Property Documentation

Gets or sets the AuthorizeCredential for this RequestFactory.

Gets or sets the ClientCredential for this RequestFactory.

Gets or sets the ClientId for this RequestFactory. The ClientID of registered application.

Gets or sets the ClientSecret for this RequestFactory. The ClientSecret of registered application.

Gets or sets the EndPoint for this RequestFactory.

Gets or sets the ProxyAddress for this RequestFactory. The URL and Port number of your proxy.

Gets or sets the RedirectUri for this RequestFactory. The URL for the OAuth redirect.

Gets or sets the scopes allowed for this RequestFactory.