C# Class FastSms.FastSmsClient

Inheritance: IFastSmsClient
Mostrar archivo Open project: fastsmsuk/dotNet-sdk Class Usage Examples

Public Methods

Method 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 method

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
return decimal

CheckMessageStatus() public method

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
return string

CreateUser() public method

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

DeleteAllContacts() public method

Deletes all contacts in current account.
public DeleteAllContacts ( ) : void
return void

DeleteAllGroups() public method

Deletes all groups.
public DeleteAllGroups ( ) : void
return void

DeleteGroup() public method

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

EmptyGroup() public method

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

FastSmsClient() public method

public FastSmsClient ( ) : System.Collections.Generic
return System.Collections.Generic

FastSmsClient() public method

public FastSmsClient ( string token ) : System.Collections.Generic
token string
return System.Collections.Generic

FastSmsClient() public method

public FastSmsClient ( string token, IHttpClient httpClient ) : System.Collections.Generic
token string
httpClient IHttpClient
return System.Collections.Generic

GetReports() public method

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)
return List

ImportContactsCsv() public method

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
return List

SendMessage() public method

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
return string

SendMessage() public method

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

SendMessage() public method

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

UpdateCredits() public method

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