C# Class FastSms.FastSmsClient

Inheritance: IFastSmsClient
Afficher le fichier Open project: fastsmsuk/dotNet-sdk Class Usage Examples

Méthodes publiques

Méthode Description
CheckCredits ( ) : decimal

Checks your current credit balance. No further parameters are required. Your credit balance will be returned in the content of the page.

CheckMessageStatus ( string messageId ) : string

Checks message status.

CreateUser ( CreateUserRequest user ) : void

Creates the user.

DeleteAllContacts ( ) : void

Deletes all contacts in current account.

DeleteAllGroups ( ) : void

Deletes all groups.

DeleteGroup ( string groupName ) : void

Deletes the specified group.

EmptyGroup ( string groupName ) : void

Removes all contacts from the specified group.

FastSmsClient ( ) : System.Collections.Generic
FastSmsClient ( string token ) : System.Collections.Generic
FastSmsClient ( string token, IHttpClient httpClient ) : System.Collections.Generic
GetReports ( ReportType reportType, string dateFrom, string dateTo ) : List

Retrieve the data from a report. The report, in CSV format, will be returned in the content of the page.

ImportContactsCsv ( List contacts, bool ignoreDupes = false, bool overwriteDupesOne = false, bool overwriteDupesTwo = false ) : List

Imports contacts in the address book.

SendMessage ( SendMessageToUserRequest messageToUser ) : string

Sends a message. The message ID or error code will be returned in the content of the Page. If multiple numbers are submitted, then multiple IDs / error codes will be returned, separated by commas.

SendMessage ( MessageToGroupRequest messageToGroup ) : void

Sends message to group.

SendMessage ( SendMessageToListRequest messageToList ) : void

Sends message to list.

UpdateCredits ( string childUsername, int quantity ) : void

Transfers credits to/from a child user.

Method Details

CheckCredits() public méthode

Checks your current credit balance. No further parameters are required. Your credit balance will be returned in the content of the page.
public CheckCredits ( ) : decimal
Résultat decimal

CheckMessageStatus() public méthode

Checks message status.
public CheckMessageStatus ( string messageId ) : string
messageId string The Message ID of the message that you wish to query. This is the ID returned by the Send action and can also be found in a message report
Résultat string

CreateUser() public méthode

Creates the user.
public CreateUser ( CreateUserRequest user ) : void
user FastSmsSdk.Models.Requests.CreateUserRequest User model to create
Résultat void

DeleteAllContacts() public méthode

Deletes all contacts in current account.
public DeleteAllContacts ( ) : void
Résultat void

DeleteAllGroups() public méthode

Deletes all groups.
public DeleteAllGroups ( ) : void
Résultat void

DeleteGroup() public méthode

Deletes the specified group.
public DeleteGroup ( string groupName ) : void
groupName string Group name to delete
Résultat void

EmptyGroup() public méthode

Removes all contacts from the specified group.
public EmptyGroup ( string groupName ) : void
groupName string Group name to empty
Résultat void

FastSmsClient() public méthode

public FastSmsClient ( ) : System.Collections.Generic
Résultat System.Collections.Generic

FastSmsClient() public méthode

public FastSmsClient ( string token ) : System.Collections.Generic
token string
Résultat System.Collections.Generic

FastSmsClient() public méthode

public FastSmsClient ( string token, IHttpClient httpClient ) : System.Collections.Generic
token string
httpClient IHttpClient
Résultat System.Collections.Generic

GetReports() public méthode

Retrieve the data from a report. The report, in CSV format, will be returned in the content of the page.
public GetReports ( ReportType reportType, string dateFrom, string dateTo ) : List
reportType ReportType The Type of report. Options are: Outbox (From and To dates are ignored for this report), Messages, Usage, Inbound messages
dateFrom string The start date for the report (YYYYMMDDHHMMSS)
dateTo string The end date for the report (YYYYMMDDHHMMSS)
Résultat List

ImportContactsCsv() public méthode

Imports contacts in the address book.
public ImportContactsCsv ( List contacts, bool ignoreDupes = false, bool overwriteDupesOne = false, bool overwriteDupesTwo = false ) : List
contacts List Contact list
ignoreDupes bool Allow duplicate contacts
overwriteDupesOne bool Ignore dupes
overwriteDupesTwo bool Overwrite duplicate number
Résultat List

SendMessage() public méthode

Sends a message. The message ID or error code will be returned in the content of the Page. If multiple numbers are submitted, then multiple IDs / error codes will be returned, separated by commas.
public SendMessage ( SendMessageToUserRequest messageToUser ) : string
messageToUser FastSmsSdk.Models.Requests.SendMessageToUserRequest Message model
Résultat string

SendMessage() public méthode

Sends message to group.
public SendMessage ( MessageToGroupRequest messageToGroup ) : void
messageToGroup FastSmsSdk.Models.Requests.MessageToGroupRequest Message model for group
Résultat void

SendMessage() public méthode

Sends message to list.
public SendMessage ( SendMessageToListRequest messageToList ) : void
messageToList FastSmsSdk.Models.Requests.SendMessageToListRequest Message model for list
Résultat void

UpdateCredits() public méthode

Transfers credits to/from a child user.
public UpdateCredits ( string childUsername, int quantity ) : void
childUsername string Child username
quantity int Quantity of credits
Résultat void