dotmailer SDK: dotMailer.Sdk.Contacts.DmContact Class Reference

dotmailer SDK

dotmailer SDK
Tools to access and manage an account in the dotMailer system

Class that represents a contact. More...

Inheritance diagram for dotMailer.Sdk.Contacts.DmContact:
dotMailer.Sdk.Interfaces.IDmContact dotMailer.Sdk.Interfaces.IDmObject dotMailer.Sdk.Cache.IDmCacheableObject dotMailer.Sdk.Objects.Contacts.DmSuppressedContact

Public Member Functions

ResubscribeContactResult Resubscribe (IDmAddressBook addressBook, string preferredLocale, string returnUrlToUseIfChallenged)
 re-subscribes a previously unsubscribed contact.
 
void SetContactEmail (string email)
 Sets the contact email address
 
void SetContactId (int newId)
 Sets the Id of the contact, only if it has not been set before
 

Static Public Member Functions

static long CalculatePopulatedCrcHash (IDmContact iContact)
 returns the crc value for the populated fields
 
static List< string > GetPopulatedDataFieldNames (IDmContact iContact)
 Builds a list of the populated fields for an IDmContact interface
 

Protected Member Functions

virtual DmDataFieldValueCollection LazyLoadDataFields ()
 Loads the data fields for the current contact
 
void SetDataFields (DmDataFieldValueCollection dataFields)
 Sets the data field value collection
 

Properties

int AccountId [get, set]
 The parent account id
 
int Id [get, set]
 The system Id of the contact
 
string Email [get, set]
 The contact email - this is read only from the database
 
string Notes [get, set]
 Contact Notes
 
EmailContentTypes EmailType [get, set]
 Email Type
 
EmailOptIn OptIn [get, set]
 Opt In Flag
 
ContactAudience Audience [get, set]
 Audience flag
 
string UserTag1 [get, set]
 User Tag
 
string UserTag2 [get, set]
 User Tag
 
string UserTag3 [get, set]
 User Tag
 
object this[string index] [get, set]
 Get the value of one of the data fields
 
virtual DmDataFieldValueCollection DataFields [get, set]
 Returns the collection of DataField Values
 
bool IsDirty [get]
 Returns true if the object has changed
 
string ObjectType [get, set]
 Returns the type name of the class Used by the serialisation process
 
string ExternalId [get]
 Gets/Sets the generated Id that uniquely identifies this record
 
string FirstName [get, set]
 Gets/Sets the system data field FirstName
 
string Fullname [get, set]
 Gets/Sets the system data field Full name
 
string Gender [get, set]
 Gets/Sets the system data field Gender
 
string LastName [get, set]
 Gets/Sets the system data field Last name
 
string Postcode [get, set]
 Gets/Sets the system data field Post code
 
bool HasDataFields [get]
 Return true if the datafields have been loaded from the web service
 
- Properties inherited from dotMailer.Sdk.Interfaces.IDmContact
int Id [get]
 Gets the ID of the contact
 
string Email [get]
 Gets the email of the contact
 
ContactAudience Audience [get]
 Get the audience type
 
EmailContentTypes EmailType [get]
 Gets the email type
 
EmailOptIn OptIn [get]
 Gets the opt-in type for the contact
 
string Notes [get]
 gets the notes
 
DmDataFieldValueCollection DataFields [get]
 Gets and enumeration of the data fields for the contact
 
bool HasDataFields [get]
 Flag to indicate the datafields have been loaded
 
- Properties inherited from dotMailer.Sdk.Interfaces.IDmObject
int AccountId [get]
 The DotMailer account Id for this object
 
string ExternalId [get]
 A key that represents this object, used for synching with external applications
 
bool IsDirty [get]
 has the data of the object changed
 

Detailed Description

Class that represents a contact.

Member Function Documentation

static long dotMailer.Sdk.Contacts.DmContact.CalculatePopulatedCrcHash ( IDmContact  iContact)
static

returns the crc value for the populated fields

Parameters
iContact
Returns
static List<string> dotMailer.Sdk.Contacts.DmContact.GetPopulatedDataFieldNames ( IDmContact  iContact)
static

Builds a list of the populated fields for an IDmContact interface

Parameters
iContact
Returns
virtual DmDataFieldValueCollection dotMailer.Sdk.Contacts.DmContact.LazyLoadDataFields ( )
protectedvirtual

Loads the data fields for the current contact

Returns

Reimplemented in dotMailer.Sdk.Objects.Contacts.DmSuppressedContact.

ResubscribeContactResult dotMailer.Sdk.Contacts.DmContact.Resubscribe ( IDmAddressBook  addressBook,
string  preferredLocale,
string  returnUrlToUseIfChallenged 
)

re-subscribes a previously unsubscribed contact.

Parameters
addressBookThe book to add the contact to (if the contact is challenged, they'll only be added after responding to the challenge).
preferredLocaleThe locale of the contact (such as en-GB or en-US). If the one supplied isn't available in dotMailer, it will fall back to en-GB.
returnUrlToUseIfChallengedIf the contact is challenged before being permitted to resubscribe, this is the page they'll end up on if they successfully complete the resubscribe.
Returns
ContactAdded, ContactChallenged or ContactCannotBeUnsuppressed
void dotMailer.Sdk.Contacts.DmContact.SetContactEmail ( string  email)

Sets the contact email address

Parameters
email
void dotMailer.Sdk.Contacts.DmContact.SetContactId ( int  newId)

Sets the Id of the contact, only if it has not been set before

Parameters
newId

Implements dotMailer.Sdk.Interfaces.IDmContact.

void dotMailer.Sdk.Contacts.DmContact.SetDataFields ( DmDataFieldValueCollection  dataFields)
protected

Sets the data field value collection

Parameters
dataFields

Property Documentation

int dotMailer.Sdk.Contacts.DmContact.AccountId
getset

The parent account id

ContactAudience dotMailer.Sdk.Contacts.DmContact.Audience
getset

Audience flag

virtual DmDataFieldValueCollection dotMailer.Sdk.Contacts.DmContact.DataFields
getset

Returns the collection of DataField Values

string dotMailer.Sdk.Contacts.DmContact.Email
getset

The contact email - this is read only from the database

EmailContentTypes dotMailer.Sdk.Contacts.DmContact.EmailType
getset

Email Type

string dotMailer.Sdk.Contacts.DmContact.ExternalId
get

Gets/Sets the generated Id that uniquely identifies this record

string dotMailer.Sdk.Contacts.DmContact.FirstName
getset

Gets/Sets the system data field FirstName

string dotMailer.Sdk.Contacts.DmContact.Fullname
getset

Gets/Sets the system data field Full name

string dotMailer.Sdk.Contacts.DmContact.Gender
getset

Gets/Sets the system data field Gender

bool dotMailer.Sdk.Contacts.DmContact.HasDataFields
get

Return true if the datafields have been loaded from the web service

int dotMailer.Sdk.Contacts.DmContact.Id
getset

The system Id of the contact

bool dotMailer.Sdk.Contacts.DmContact.IsDirty
get

Returns true if the object has changed

string dotMailer.Sdk.Contacts.DmContact.LastName
getset

Gets/Sets the system data field Last name

string dotMailer.Sdk.Contacts.DmContact.Notes
getset

Contact Notes

string dotMailer.Sdk.Contacts.DmContact.ObjectType
getset

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

EmailOptIn dotMailer.Sdk.Contacts.DmContact.OptIn
getset

Opt In Flag

string dotMailer.Sdk.Contacts.DmContact.Postcode
getset

Gets/Sets the system data field Post code

object dotMailer.Sdk.Contacts.DmContact.this[string index]
getset

Get the value of one of the data fields

Parameters
indexthe name of the data field
Returns
string dotMailer.Sdk.Contacts.DmContact.UserTag1
getset

User Tag

string dotMailer.Sdk.Contacts.DmContact.UserTag2
getset

User Tag

string dotMailer.Sdk.Contacts.DmContact.UserTag3
getset

User Tag

Generated by   doxygen 1.8.3