dotmailer SDK: dotMailer.Sdk.Collections.DmContactCollection Class Reference

dotmailer SDK

dotmailer SDK
Tools to access and manage an account in the dotMailer system
dotMailer.Sdk.Collections.DmContactCollection Class Reference

A collection of DmContacts More...

Inheritance diagram for dotMailer.Sdk.Collections.DmContactCollection:

Public Member Functions

 DmContactCollection ()
 Creates an empty contact collection
 
 DmContactCollection (DmService api)
 Creates an empty contact collection
 
 DmContactCollection (IEnumerable< IDmContact > contacts)
 Creates a new contact collection and adds the specified contacts
 
 DmContactCollection (DmService api, IEnumerable< IDmContact > contacts)
 Creates a new contact collection and adds the specified contacts
 
void AddRange (IEnumerable< IDmContact > iContacts)
 Adds a range of iDmContacts to the list. Coverts to DmCDontacts
 
DmContact GetContact (string emailAddress)
 returns a contact that has the specified email address
 
DmContact GetContact (int contactId)
 returns a contact that has the specified id
 
SendResultCollection SendCampaign (int campaignId, DateTime dateTimeToSend)
 Sends the specified campaign to the collection
 
SendResultCollection SendCampaign (IDmCampaign campaign, DateTime dateTimeToSend)
 Sends the specified campaign to the collection
 
ImportContactResult AddToAddressBook (int addressBookId)
 Adds the collection to the address book with the specified id
 
ImportContactResult AddToAddressBook (IDmAddressBook addressBook)
 Adds the collection to the address book
 
bool Unsubscribe ()
 Unsubscribe the collection
 
bool Delete ()
 removes the collection of contacts from the account
 
bool Contains (string emailAddress)
 checks to see if a contact in the collection contains the specified emailAddress
 
void UpdateIds< T > (IEnumerable< T > contacts)
 Updates a source collection of IDmContacts, with the contact ids found in this collection
 

Properties

override string ObjectType [get, set]
 Returns the type name of the class Used by the serialisation process
 
DmContact this[string emailAddress] [get]
 
 

Detailed Description

A collection of DmContacts

Constructor & Destructor Documentation

dotMailer.Sdk.Collections.DmContactCollection.DmContactCollection ( )

Creates an empty contact collection

dotMailer.Sdk.Collections.DmContactCollection.DmContactCollection ( DmService  api)

Creates an empty contact collection

Parameters
apiService Api
dotMailer.Sdk.Collections.DmContactCollection.DmContactCollection ( IEnumerable< IDmContact contacts)

Creates a new contact collection and adds the specified contacts

Parameters
contactslist of contact interfaces
dotMailer.Sdk.Collections.DmContactCollection.DmContactCollection ( DmService  api,
IEnumerable< IDmContact contacts 
)

Creates a new contact collection and adds the specified contacts

Parameters
apiDmService API
contactslist of contact interfaces

Member Function Documentation

void dotMailer.Sdk.Collections.DmContactCollection.AddRange ( IEnumerable< IDmContact iContacts)

Adds a range of iDmContacts to the list. Coverts to DmCDontacts

Parameters
iContactscollection of contact interfaces
ImportContactResult dotMailer.Sdk.Collections.DmContactCollection.AddToAddressBook ( int  addressBookId)

Adds the collection to the address book with the specified id

Parameters
addressBookIdId of the address book
Returns
ImportContactResult
ImportContactResult dotMailer.Sdk.Collections.DmContactCollection.AddToAddressBook ( IDmAddressBook  addressBook)

Adds the collection to the address book

Parameters
addressBookthe address book to add the contacts to
Returns
ImportContactResult
bool dotMailer.Sdk.Collections.DmContactCollection.Contains ( string  emailAddress)

checks to see if a contact in the collection contains the specified emailAddress

Parameters
emailAddress
Returns
true if found
bool dotMailer.Sdk.Collections.DmContactCollection.Delete ( )

removes the collection of contacts from the account

Returns
DmContact dotMailer.Sdk.Collections.DmContactCollection.GetContact ( string  emailAddress)

returns a contact that has the specified email address

Parameters
emailAddressthe email address of the required contact
Returns
DmContact
DmContact dotMailer.Sdk.Collections.DmContactCollection.GetContact ( int  contactId)

returns a contact that has the specified id

Parameters
contactIdthe id of the required contact
Returns
DmContact
SendResultCollection dotMailer.Sdk.Collections.DmContactCollection.SendCampaign ( int  campaignId,
DateTime  dateTimeToSend 
)

Sends the specified campaign to the collection

Parameters
campaignIdid of the campaign to send
dateTimeToSenddate time to send the campaign
Returns
SendResultCollection
SendResultCollection dotMailer.Sdk.Collections.DmContactCollection.SendCampaign ( IDmCampaign  campaign,
DateTime  dateTimeToSend 
)

Sends the specified campaign to the collection

Parameters
campaigncampaign to send
dateTimeToSenddate time to send the campaign
Returns
SendResult
bool dotMailer.Sdk.Collections.DmContactCollection.Unsubscribe ( )

Unsubscribe the collection

Will call one api call per contact

Returns
true if successful
void dotMailer.Sdk.Collections.DmContactCollection.UpdateIds< T > ( IEnumerable< T >  contacts)

Updates a source collection of IDmContacts, with the contact ids found in this collection

Template Parameters
T
Parameters
contacts
Type Constraints
T :IDmContact 

Property Documentation

override string dotMailer.Sdk.Collections.DmContactCollection.ObjectType
getset

Returns the type name of the class Used by the serialisation process

DmContact dotMailer.Sdk.Collections.DmContactCollection.this[string emailAddress]
get

Parameters
emailAddress
Generated by   doxygen 1.8.3