ZenMagick 0.9.6


org.zenmagick.model.account.ZMAccount

Class ZMAccount

ZMObject
|
+--ZMAccount

public class ZMAccount
extends ZMObject

A single user account.

Author:
DerManoMann
Version:
$Id: ZMAccount.php 2100 2009-03-23 04:24:25Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMAccount()

Create new instance.

Method Summary
string

getAuthorization()

Get authorization.

int

getDefaultAddressId()

Get the default address id (primary address).

string

getDob()

Get the date of birth.

string

getEmail()

Get the email address.

string

getEmailFormat()

Get the preferred email format.

string

getFax()

Get the fax number.

string

getFirstName()

Get the first name.

string

getFullName()

Get the formatted full name.

string

getGender()

Get the gender.

int

getId()

Get the account id.

string

getLastName()

Get the last name.

string

getNickName()

Get the nick name.

string

getPassword()

Get the password.

string

getPhone()

Get the phone number.

ZMPriceGroup

getPriceGroup()

Get a price group.

int

getPriceGroupId()

Get the price group id.

string

getReferral()

Get the referral.

array

getSubscribedProducts()

Get the subscribed product ids.

char

getType()

Get the account type.

float

getVoucherBalance()

Get the voucher balance.

boolean

hasProductSubscriptions()

Checks if the user has product subscriptions.

boolean

isEmailDisabled()

Check if email notification is disabled.

boolean

isGlobalProductSubscriber()

Checks if the user is a global product subscriber.

boolean

isHtmlEmail()

Check if the account is set up to receive HTML formatted emails.

boolean

isNewsletterSubscriber()

Returns true if the account has subscribed to newsletter.

void

setAuthorization(string authorization)

Set authorization.

void

setDefaultAddressId(int addressId)

Set the default address id (primary address).

void

setDob(string dob)

Set the date of birth.

void

setEmail(mixed email)

Set the email address.

void

setEmailFormat(string emailFormat)

Set the preferred email format.

void

setFax(string fax)

Set the fax number.

void

setFirstName(string firstName)

Set the first name.

void

setGender(string gender)

Set the gender.

void

setGlobalProductSubscriber(boolean globalProductSubscriber)

Set the global product subscriber status.

void

setId(int id)

Set the account id.

void

setLastName(string lastName)

Set the last name.

void

setNewsletterSubscriber(boolean newsletterSubscriber)

Set the newsletter subscription status.

void

setNickName(string nickName)

Set the nick name.

void

setPassword(string password)

Set the password.

void

setPhone(string phone)

Set the phone number.

void

setPriceGroupId(int priceGroupId)

Set the price group id.

void

setReferral(string referral)

Set the referral.

void

setSubscribedProducts(array products)

Set the subscribed product ids.

void

setType(char type)

Set the account type.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMAccount

public ZMAccount()

Create new instance. /


Method Detail

getAuthorization

public string getAuthorization()

Get authorization.

Returns:
The authorization.

getDefaultAddressId

public int getDefaultAddressId()

Get the default address id (primary address).

Returns:
The primary address id.

getDob

public string getDob()

Get the date of birth.

Returns:
The date of birth.

getEmail

public string getEmail()

Get the email address.

Returns:
The email address.

getEmailFormat

public string getEmailFormat()

Get the preferred email format.

Returns:
The selected email format.

getFax

public string getFax()

Get the fax number.

Returns:
The fax number.

getFirstName

public string getFirstName()

Get the first name.

Returns:
The first name.

getFullName

public string getFullName()

Get the formatted full name.

Returns:
The full name.

getGender

public string getGender()

Get the gender.

Returns:
The gender ('f' or 'm').

getId

public int getId()

Get the account id.

Returns:
The account id.

getLastName

public string getLastName()

Get the last name.

Returns:
The last name.

getNickName

public string getNickName()

Get the nick name.

Returns:
The nick name.

getPassword

public string getPassword()

Get the password.

Returns:
The password.

getPhone

public string getPhone()

Get the phone number.

Returns:
The phone number.

getPriceGroup

public ZMPriceGroup getPriceGroup()

Get a price group.

Returns:
The group or null.

getPriceGroupId

public int getPriceGroupId()

Get the price group id.

Returns:
The price group id.

getReferral

public string getReferral()

Get the referral.

Returns:
The referral.

getSubscribedProducts

public array getSubscribedProducts()

Get the subscribed product ids.

Returns:
A list of product ids.

getType

public char getType()

Get the account type.

Returns:
The account type.

getVoucherBalance

public float getVoucherBalance()

Get the voucher balance.

Returns:
The voucher balance.

hasProductSubscriptions

public boolean hasProductSubscriptions()

Checks if the user has product subscriptions.

Returns:
true if the user has product subscriptions, false if not.

isEmailDisabled

public boolean isEmailDisabled()

Check if email notification is disabled.

Returns:
true if email notification is disabled, false if not.

isGlobalProductSubscriber

public boolean isGlobalProductSubscriber()

Checks if the user is a global product subscriber.

Returns:
true if the user is subscribed, false if not.

isHtmlEmail

public boolean isHtmlEmail()

Check if the account is set up to receive HTML formatted emails.

Returns:
true if HTML is selected as email format, false if not.

isNewsletterSubscriber

public boolean isNewsletterSubscriber()

Returns true if the account has subscribed to newsletter.

Returns:
true if newsletter subsricption ias active, false if not.

setAuthorization

public void setAuthorization(string authorization)

Set authorization.

Parameters:
authorization - The authorization.

setDefaultAddressId

public void setDefaultAddressId(int addressId)

Set the default address id (primary address).

Parameters:
addressId - The primary address id.

setDob

public void setDob(string dob)

Set the date of birth.

Parameters:
dob - The date of birth.

setEmail

public void setEmail(mixed email)

Set the email address.

Parm:
string email The email address.

setEmailFormat

public void setEmailFormat(string emailFormat)

Set the preferred email format.

Parameters:
emailFormat - The selected email format.

setFax

public void setFax(string fax)

Set the fax number.

Parameters:
fax - The fax number.

setFirstName

public void setFirstName(string firstName)

Set the first name.

Parameters:
firstName - The first name.

setGender

public void setGender(string gender)

Set the gender.

Parameters:
gender - The gender ('f' or 'm').

setGlobalProductSubscriber

public void setGlobalProductSubscriber(boolean globalProductSubscriber)

Set the global product subscriber status.

Parameters:
globalProductSubscriber - true if global product is selected, false if not.

setId

public void setId(int id)

Set the account id.

Parameters:
id - The account id.

setLastName

public void setLastName(string lastName)

Set the last name.

Parameters:
lastName - The last name.

setNewsletterSubscriber

public void setNewsletterSubscriber(boolean newsletterSubscriber)

Set the newsletter subscription status.

Parameters:
newsletterSubscriber - true if newsletter subsricption is selected, false if not.

setNickName

public void setNickName(string nickName)

Set the nick name.

Parameters:
nickName - The nick name.

setPassword

public void setPassword(string password)

Set the password.

Parameters:
password - The (encrypted) password.

setPhone

public void setPhone(string phone)

Set the phone number.

Parameters:
phone - The phone number.

setPriceGroupId

public void setPriceGroupId(int priceGroupId)

Set the price group id.

Parameters:
priceGroupId - The price group id.

setReferral

public void setReferral(string referral)

Set the referral.

Parameters:
referral - The referral.

setSubscribedProducts

public void setSubscribedProducts(array products)

Set the subscribed product ids.

Parameters:
products - A list of product ids.

setType

public void setType(char type)

Set the account type.

Parameters:
type - The account type.

ZenMagick 0.9.6