dotmailer SDK: dotMailer.Sdk.AddressBookFactory Class Reference

dotmailer SDK

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

Address Book Factory. Provides methods to manage address books of contacts More...

Inheritance diagram for dotMailer.Sdk.AddressBookFactory:

Public Member Functions

ImportContactResult ImportContactsIntoAddressBook (ImportContactOptions importOptions, int addressBookId, IEnumerable< IDmContact > contacts)
 Adds contacts to the address book specified by the Id
 
void UpdateContactsResult (ImportContactResult result)
 Updates an existing ImportContactResult object. Will poll each import session from the web service, in order to update the overall status
 
DmAddressBook CreateAddressBook (IDmAddressBook addressBook)
 Creates a new address book, if the address book already exists, the address book will be read and returned
 
DmAddressBook CreateAddressBook (string addressBookName)
 Creates a new address book, if the address book already exists, the address book will be read and returned
 
DmAddressBookCollection ListAddressBooks ()
 Returns an DmAddressBookCollection of the address books in the dotMailer account
 
DmContactCollection ListContactsInAddressBook (string addressbookName, ListContactOptions listOptions)
 Returns an DmContactCollection of contacts that exist in the specified address book
 
DmContactCollection ListContactsInAddressBook (int addressBookId, ListContactOptions listOptions)
 Returns an DmContactCollection of contacts that exist in the specified address book
 
DmCampaignCollection ListCampaignsForAddressBook (int addressBookId)
 Returns a DmCampaignCollection of campaigns that have sent emails using the specified address book
 
DmContactCollection ListContactsInAddressBookModifiedSince (int addressBookId, DateTime sinceDate)
 Returns a DmContactCollection of the contacts that have been modified since the specified data in the specified address book.
 
DmContactCollection ListAllContactsWithContactData ()
 Lists all the contacts, with full data, in the dotMailer account, by accessing the special 'All Contacts' address book
 
DmContactCollection ListAllContacts ()
 Lists all the contacts in the dotMailer account, by accessing the special 'All Contacts' address book
 
DmContactCollection ListUnsubscribedContactsInAddressBookSinceDate (int addressBookId, DateTime sinceDate)
 Returns a DmContactCollection of contacts that have unsubscribed from the specified address book
 
bool RemoveAllAddressBookContacts (int addressBookId, bool preventResubscribe, bool totalUnsubscribe)
 Removes all contacts from the specified address book
 
bool RemoveAddressBookContact (int addressBookId, string contactEmail, bool preventResubscribe, bool totalUnsubscribe)
 Removes a single the contacts from the specified address book
 
void RemoveAddressBookContacts (int addressBookId, IDmContactCollection contactsToRemove)
 Removes a collection of contacts from the specified address book
 
void RemoveAddressBookContacts (int addressBookId, IEnumerable< string > emailAddressToRemove)
 Removes the specified email addresses from the specified addressbook.
 
void RemoveAddressBookContacts (string addressBookName, IEnumerable< string > emailAddressToRemove)
 Removes the specified email addresses from the specified addressbook.
 
bool DeleteAddressBook (int addressBookId)
 Deletes the specified address book
 
DmAddressBook GetAddressBookByName (string addressBookName)
 Returns the first address book that has the specified name Throws exception if the address book is not found
 
int GetContactCount (int addressBookId)
 Returns the number of contact in the specified address book
 
DmAddressBook GetAddressBookById (int addressBookId)
 Returns the address book that has the specified Id
 
DmAddressBook CreateNewDmAddressBook ()
 Creates a new DmAddressBook Object
 
DmAddressBookCollection ListPrivateAddressBooks ()
 Lists all private address books for the current account.
 
DmAddressBookCollection ListPublicAddressBooks ()
 Lists all public address books for the current account.
 
DmAddressBookCollection GetEmptyAddressBookCollection ()
 Creates and returns an empty addressbook collection that is linked to the api service
 

Detailed Description

Address Book Factory. Provides methods to manage address books of contacts

Member Function Documentation

DmAddressBook dotMailer.Sdk.AddressBookFactory.CreateAddressBook ( IDmAddressBook  addressBook)

Creates a new address book, if the address book already exists, the address book will be read and returned

Parameters
addressBookInterface to the address book data
Returns
DmAddressBook instance for the new address book
Exceptions
DmException
DmAddressBook dotMailer.Sdk.AddressBookFactory.CreateAddressBook ( string  addressBookName)

Creates a new address book, if the address book already exists, the address book will be read and returned

The name for the new address book

Returns
DmAddressBook instance for the new address book
Exceptions
DmException
DmAddressBook dotMailer.Sdk.AddressBookFactory.CreateNewDmAddressBook ( )

Creates a new DmAddressBook Object

Returns
DmAddressBook
bool dotMailer.Sdk.AddressBookFactory.DeleteAddressBook ( int  addressBookId)

Deletes the specified address book

Parameters
addressBookIdthe id of the address book
Returns
Exceptions
DmException
DmAddressBook dotMailer.Sdk.AddressBookFactory.GetAddressBookById ( int  addressBookId)

Returns the address book that has the specified Id

Parameters
addressBookIdthe id of the required address book
Returns
DmAddressBook dotMailer.Sdk.AddressBookFactory.GetAddressBookByName ( string  addressBookName)

Returns the first address book that has the specified name Throws exception if the address book is not found

Parameters
addressBookNamethe name of the desired address book
Returns
DmAddressBook
int dotMailer.Sdk.AddressBookFactory.GetContactCount ( int  addressBookId)

Returns the number of contact in the specified address book

Parameters
addressBookIdthe address book id
Returns
Exceptions
DmException
DmAddressBookCollection dotMailer.Sdk.AddressBookFactory.GetEmptyAddressBookCollection ( )

Creates and returns an empty addressbook collection that is linked to the api service

Returns
ImportContactResult dotMailer.Sdk.AddressBookFactory.ImportContactsIntoAddressBook ( ImportContactOptions  importOptions,
int  addressBookId,
IEnumerable< IDmContact contacts 
)

Adds contacts to the address book specified by the Id

Parameters
importOptionsImport Options instance
addressBookIdId of the address book
contactsIEnumerable List of the contact data
Returns
InportContactResult
Exceptions
DmException
DmAddressBookCollection dotMailer.Sdk.AddressBookFactory.ListAddressBooks ( )

Returns an DmAddressBookCollection of the address books in the dotMailer account

Returns
DmAddressBookCollection
Exceptions
DmException
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListAllContacts ( )

Lists all the contacts in the dotMailer account, by accessing the special 'All Contacts' address book

Returns
DmContactCollection
Exceptions
DmException
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListAllContactsWithContactData ( )

Lists all the contacts, with full data, in the dotMailer account, by accessing the special 'All Contacts' address book

Returns
DmContactCollection
Exceptions
DmException
DmCampaignCollection dotMailer.Sdk.AddressBookFactory.ListCampaignsForAddressBook ( int  addressBookId)

Returns a DmCampaignCollection of campaigns that have sent emails using the specified address book

Parameters
addressBookIdthe address book id
Returns
DmCampaignCollection
Exceptions
DmException
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListContactsInAddressBook ( string  addressbookName,
ListContactOptions  listOptions 
)

Returns an DmContactCollection of contacts that exist in the specified address book

Parameters
addressbookNameThe name of the address book
listOptionsEmail only or full data
Returns
DmContactCollection
Exceptions
DmException
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListContactsInAddressBook ( int  addressBookId,
ListContactOptions  listOptions 
)

Returns an DmContactCollection of contacts that exist in the specified address book

Parameters
addressBookIdId of the address book
listOptionsEmail only or full data
Returns
DmContactCollection
Exceptions
DmException
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListContactsInAddressBookModifiedSince ( int  addressBookId,
DateTime  sinceDate 
)

Returns a DmContactCollection of the contacts that have been modified since the specified data in the specified address book.

Parameters
addressBookIdID of the address book
sinceDateContacts modified since this date
Returns
DmContactCollection
Exceptions
DmException
DmAddressBookCollection dotMailer.Sdk.AddressBookFactory.ListPrivateAddressBooks ( )

Lists all private address books for the current account.

Only the account holder can add or remove contacts from private address books

Returns
DmAddressBookCollection dotMailer.Sdk.AddressBookFactory.ListPublicAddressBooks ( )

Lists all public address books for the current account.

Contacts can join/unsubscribe from public address books via the unsubscribe page

Returns
DmContactCollection dotMailer.Sdk.AddressBookFactory.ListUnsubscribedContactsInAddressBookSinceDate ( int  addressBookId,
DateTime  sinceDate 
)

Returns a DmContactCollection of contacts that have unsubscribed from the specified address book

Parameters
addressBookIdId of the address book
sinceDateStarting date
Returns
DmContactCollection
Exceptions
DmException
bool dotMailer.Sdk.AddressBookFactory.RemoveAddressBookContact ( int  addressBookId,
string  contactEmail,
bool  preventResubscribe,
bool  totalUnsubscribe 
)

Removes a single the contacts from the specified address book

Parameters
addressBookIdId of the address book
contactEmailThe email of the contact
preventResubscribeIf this is set to true the contacts will be added to the address book specific suppression list
totalUnsubscribeIf this is set to true the contacts will be added to the account suppression list.
Returns
Exceptions
DmException
void dotMailer.Sdk.AddressBookFactory.RemoveAddressBookContacts ( int  addressBookId,
IDmContactCollection  contactsToRemove 
)

Removes a collection of contacts from the specified address book

Parameters
addressBookIdId of the address book
contactsToRemoveThe collection to remove
Returns
void dotMailer.Sdk.AddressBookFactory.RemoveAddressBookContacts ( int  addressBookId,
IEnumerable< string >  emailAddressToRemove 
)

Removes the specified email addresses from the specified addressbook.

Parameters
addressBookIdthe id of the address book
emailAddressToRemovelist of email addresses to remove
void dotMailer.Sdk.AddressBookFactory.RemoveAddressBookContacts ( string  addressBookName,
IEnumerable< string >  emailAddressToRemove 
)

Removes the specified email addresses from the specified addressbook.

Parameters
addressBookNamethe name of the address book
emailAddressToRemovelist of email addresses to remove
bool dotMailer.Sdk.AddressBookFactory.RemoveAllAddressBookContacts ( int  addressBookId,
bool  preventResubscribe,
bool  totalUnsubscribe 
)

Removes all contacts from the specified address book

Parameters
addressBookIdThe id of the address book
preventResubscribeIf this is set to true the contacts will be added to the address book specific suppression list
totalUnsubscribeIf this is set to true the contacts will be added to the account suppression list.
Returns
true if all of the contacts were removed
Exceptions
DmException
void dotMailer.Sdk.AddressBookFactory.UpdateContactsResult ( ImportContactResult  result)

Updates an existing ImportContactResult object. Will poll each import session from the web service, in order to update the overall status

Parameters
resultImportContactResult instance that was obtained from ImportContactsIntoAddressBook
Exceptions
DmException
Generated by   doxygen 1.8.3