C# Class MessageGears.MessageGearsClient

MessageGears C# SDK main entry point.
Show file Open project: messagegears/messagegears-csharp-sdk

Public Methods

Method Description
AccountActivity ( AccountActivityRequest request ) : AccountActivityResponse
AccountActivity ( System.DateTime activityDate, ActivityType activityType ) : String

Used to create a file that contains all of the account activity of a certain type for the specified day.

AccountSummary ( AccountSummaryRequest request ) : AccountSummaryResponse
AccountSummary ( System.DateTime activityDate ) : AccountSummaryResponse

Used to return a summary of total account activity (total clicks, bounces, etc.) for a given day.

AccountSummary ( int activityYear, int activityMonth ) : AccountSummaryResponse

Used to return a summary of total account activity (total clicks, bounces, etc.) for a given month.

BulkCampaignSubmit ( BulkCampaignSubmitRequest request ) : BulkJobSubmitResponse

Submits a bulk campaign for processing. A bulk campaign can be used to send a email message to one or more (millions) of recipients.

BulkJobSubmit ( BulkJobSubmitRequest request ) : BulkJobSubmitResponse

Submits a bulk job for processing. A bulk job can be used to send a email message to one or more (millions) of recipients.

BulkJobSummary ( BulkJobSummaryRequest bulkJobSummary ) : BulkJobSummaryResponse

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.).

BulkJobSummary ( String bulkJobRequestId ) : BulkJobSummaryResponse

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.).

BulkJobSummaryByCorrelationId ( String bulkJobCorrelationId ) : BulkJobSummaryResponse

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.) queried by correlation id.

CreateAccount ( CreateAccountRequest request ) : CreateAccountResponse

Used to create a new subaccount

MessageGearsClient ( MessageGearsProperties properties ) : System

Constructor which sets the properties

MessagePreview ( MessagePreviewRequest request ) : MessagePreviewResponse

Allows you to submit your message content for rendering without actually sending a email message. This can be used to build a UI tool to test content as it is being created. A list of errors will be returned if there are and problems rendering the message.

PrintResponse ( AccountSummaryResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( BulkJobSubmitResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( BulkJobSummaryResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( CreateAccountResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( MessagePreviewResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( ThumbnailResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( TransactionalContent response ) : void

Utility function to print response data to the console.

PrintResponse ( TransactionalJobSubmitResponse response ) : void

Utility function to print response data to the console.

PrintResponse ( UpdateAccountResponse response ) : void

Utility function to print response data to the console.

RetrieveJobState ( JobStateRetrievalRequest jobStateRequest ) : JobStateResponse

Used to retrieve the current state of a given job (pause/resume/cancel)

SetJobState ( JobStateRequest jobStateRequest ) : JobStateResponse

Used to set a job to a given state (pause/resume/cancel)

Thumbnail ( ThumbnailRequest request ) : ThumbnailResponse

Thumbnail the specified request.

TransactionalCampaignSubmit ( TransactionalCampaignSubmitRequest request ) : TransactionalJobSubmitResponse

Submits a Transactional Campaign (to a single recipient) for processing.

TransactionalContentRetrieval ( TransactionalContentRetrievalRequest request ) : TransactionalContent

Used to return content of a transactional job or campaign

TransactionalJobSubmit ( TransactionalJobSubmitRequest request ) : TransactionalJobSubmitResponse

Submits a Transactional Job (to a single recipient) for processing.

UpdateAccount ( UpdateAccountRequest request ) : UpdateAccountResponse

Used to update a subaccount

Private Methods

Method Description
CopyStream ( Stream input, Stream output ) : void
PrintResponse ( System.Result result, RequestError requestErrors ) : void
appendAccountRequest ( StringBuilder &data, AccountRequest request ) : void
appendBaseJobRequest ( StringBuilder &data, BaseJobRequest request ) : void
appendCampaignRequest ( StringBuilder &data, CampaignRequest request ) : void
appendCredentials ( StringBuilder &data ) : void
appendJobRequest ( StringBuilder &data, JobRequest request ) : void
invoke ( StringBuilder data ) : String
invokeAccountActivity ( StringBuilder data, String fileName ) : void

Method Details

AccountActivity() public method

public AccountActivity ( AccountActivityRequest request ) : AccountActivityResponse
request MessageGears.Model.AccountActivityRequest
return AccountActivityResponse

AccountActivity() public method

Used to create a file that contains all of the account activity of a certain type for the specified day.
public AccountActivity ( System.DateTime activityDate, ActivityType activityType ) : String
activityDate System.DateTime /// The date of the activity data to be collected. ///
activityType ActivityType /// The tyoe of activity to be collected. ///
return String

AccountSummary() public method

public AccountSummary ( AccountSummaryRequest request ) : AccountSummaryResponse
request MessageGears.Model.AccountSummaryRequest
return AccountSummaryResponse

AccountSummary() public method

Used to return a summary of total account activity (total clicks, bounces, etc.) for a given day.
public AccountSummary ( System.DateTime activityDate ) : AccountSummaryResponse
activityDate System.DateTime /// A ///
return AccountSummaryResponse

AccountSummary() public method

Used to return a summary of total account activity (total clicks, bounces, etc.) for a given month.
public AccountSummary ( int activityYear, int activityMonth ) : AccountSummaryResponse
activityYear int /// A Must be in the form of YYYY. ///
activityMonth int /// A Must be in the form of MM (eg "01", "12", etc). ///
return AccountSummaryResponse

BulkCampaignSubmit() public method

Submits a bulk campaign for processing. A bulk campaign can be used to send a email message to one or more (millions) of recipients.
public BulkCampaignSubmit ( BulkCampaignSubmitRequest request ) : BulkJobSubmitResponse
request MessageGears.Model.BulkCampaignSubmitRequest /// A ///
return BulkJobSubmitResponse

BulkJobSubmit() public method

Submits a bulk job for processing. A bulk job can be used to send a email message to one or more (millions) of recipients.
public BulkJobSubmit ( BulkJobSubmitRequest request ) : BulkJobSubmitResponse
request MessageGears.Model.BulkJobSubmitRequest /// A ///
return BulkJobSubmitResponse

BulkJobSummary() public method

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.).
public BulkJobSummary ( BulkJobSummaryRequest bulkJobSummary ) : BulkJobSummaryResponse
bulkJobSummary MessageGears.Model.BulkJobSummaryRequest
return BulkJobSummaryResponse

BulkJobSummary() public method

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.).
public BulkJobSummary ( String bulkJobRequestId ) : BulkJobSummaryResponse
bulkJobRequestId String /// The id of the bulk job. ///
return BulkJobSummaryResponse

BulkJobSummaryByCorrelationId() public method

Used to return a summary of the total activity for a bulk job (total clicks, bounces, etc.) queried by correlation id.
public BulkJobSummaryByCorrelationId ( String bulkJobCorrelationId ) : BulkJobSummaryResponse
bulkJobCorrelationId String /// The correlation id of the bulk job. ///
return BulkJobSummaryResponse

CreateAccount() public method

Used to create a new subaccount
public CreateAccount ( CreateAccountRequest request ) : CreateAccountResponse
request MessageGears.Model.CreateAccountRequest /// A ///
return CreateAccountResponse

MessageGearsClient() public method

Constructor which sets the properties
public MessageGearsClient ( MessageGearsProperties properties ) : System
properties MessageGearsProperties /// A ///
return System

MessagePreview() public method

Allows you to submit your message content for rendering without actually sending a email message. This can be used to build a UI tool to test content as it is being created. A list of errors will be returned if there are and problems rendering the message.
public MessagePreview ( MessagePreviewRequest request ) : MessagePreviewResponse
request MessageGears.Model.MessagePreviewRequest /// A ///
return MessagePreviewResponse

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( AccountSummaryResponse response ) : void
response AccountSummaryResponse /// The AccountSummaryResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( BulkJobSubmitResponse response ) : void
response BulkJobSubmitResponse /// The BulkJobSubmitResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( BulkJobSummaryResponse response ) : void
response BulkJobSummaryResponse /// The BulkJobSummaryResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( CreateAccountResponse response ) : void
response CreateAccountResponse /// The CreateAccountResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( MessagePreviewResponse response ) : void
response MessagePreviewResponse /// The MessagePreviewResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( ThumbnailResponse response ) : void
response ThumbnailResponse /// The ThumbnailResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( TransactionalContent response ) : void
response TransactionalContent /// The TransactionalContent to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( TransactionalJobSubmitResponse response ) : void
response TransactionalJobSubmitResponse /// The TransactionalJobSubmitResponse to be printed. ///
return void

PrintResponse() public method

Utility function to print response data to the console.
public PrintResponse ( UpdateAccountResponse response ) : void
response UpdateAccountResponse /// The UpdateAccountResponse to be printed. ///
return void

RetrieveJobState() public method

Used to retrieve the current state of a given job (pause/resume/cancel)
public RetrieveJobState ( JobStateRetrievalRequest jobStateRequest ) : JobStateResponse
jobStateRequest MessageGears.Model.JobStateRetrievalRequest
return JobStateResponse

SetJobState() public method

Used to set a job to a given state (pause/resume/cancel)
public SetJobState ( JobStateRequest jobStateRequest ) : JobStateResponse
jobStateRequest MessageGears.Model.JobStateRequest /// The representation of the request, including the job request id to set the state on, and the state to set ///
return JobStateResponse

Thumbnail() public method

Thumbnail the specified request.
public Thumbnail ( ThumbnailRequest request ) : ThumbnailResponse
request MessageGears.Model.ThumbnailRequest /// Request. ///
return ThumbnailResponse

TransactionalCampaignSubmit() public method

Submits a Transactional Campaign (to a single recipient) for processing.
public TransactionalCampaignSubmit ( TransactionalCampaignSubmitRequest request ) : TransactionalJobSubmitResponse
request MessageGears.Model.TransactionalCampaignSubmitRequest /// A ///
return TransactionalJobSubmitResponse

TransactionalContentRetrieval() public method

Used to return content of a transactional job or campaign
public TransactionalContentRetrieval ( TransactionalContentRetrievalRequest request ) : TransactionalContent
request MessageGears.Model.TransactionalContentRetrievalRequest
return TransactionalContent

TransactionalJobSubmit() public method

Submits a Transactional Job (to a single recipient) for processing.
public TransactionalJobSubmit ( TransactionalJobSubmitRequest request ) : TransactionalJobSubmitResponse
request MessageGears.Model.TransactionalJobSubmitRequest /// A ///
return TransactionalJobSubmitResponse

UpdateAccount() public method

Used to update a subaccount
public UpdateAccount ( UpdateAccountRequest request ) : UpdateAccountResponse
request MessageGears.Model.UpdateAccountRequest /// A ///
return UpdateAccountResponse