ZenMagick 0.9.8


org.zenmagick.store.model.ZMTaxRate
\store\model\ZMTaxRate.php at line 36

Class ZMTaxRate

ZMObject
└─ZMTaxRate

public class ZMTaxRate
extends ZMObject

Info for a single tax rate.

The tax rate id is build from the tax classId, countryId and zoneId to make it unique.

Author:
DerManoMann
Version:
$Id: ZMTaxRate.php 2694 2009-12-03 22:32:18Z dermanomann $

Field Summary
mixed

$classId_

mixed

$countryId_

mixed

$description_

mixed

$id_

mixed

$rate_

mixed

$zoneId_

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMTaxRate()

Create new instance.

Method Summary
double

addTax(double amount)

Add tax to the given amount.

double

calculateTax(double amount)

Caclulate tax for the given amount.

int

getClassId()

Get the tax class id.

int

getCountryId()

Get the country id.

string

getDescription()

Get the tax descrption.

string

getId()

Get the tax rate idendtifier

float

getRate()

Get the tax rate.

int

getZoneId()

Get the zone id.

void

setClassId(int classId)

Set the tax class id.

void

setCountryId(int countryId)

Set the country id.

void

setDescription(string description)

Set the tax description.

void

setId(string id)

Set the tax rate idendtifier

void

setRate(float rate)

Set the tax rate.

void

setZoneId(int zoneId)

Set the zone id.

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

Field Detail

\store\model\ZMTaxRate.php at line 38

classId_

public mixed $classId_

\store\model\ZMTaxRate.php at line 39

countryId_

public mixed $countryId_

\store\model\ZMTaxRate.php at line 42

description_

public mixed $description_

\store\model\ZMTaxRate.php at line 37

id_

public mixed $id_

\store\model\ZMTaxRate.php at line 41

rate_

public mixed $rate_

\store\model\ZMTaxRate.php at line 40

zoneId_

public mixed $zoneId_

Constructor Detail

\store\model\ZMTaxRate.php at line 48

ZMTaxRate

public ZMTaxRate()

Create new instance.


Method Detail

\store\model\ZMTaxRate.php at line 161

addTax

public double addTax(double amount)

Add tax to the given amount.

Parameters:
amount - The amount.
Returns:
The amount incl. tax.

\store\model\ZMTaxRate.php at line 176

calculateTax

public double calculateTax(double amount)

Caclulate tax for the given amount.

Parameters:
amount - The amount.
Returns:
The tax value.

\store\model\ZMTaxRate.php at line 118

getClassId

public int getClassId()

Get the tax class id.

Returns:
The tax class id or 0.

\store\model\ZMTaxRate.php at line 132

getCountryId

public int getCountryId()

Get the country id.

Returns:
The country id or 0.

\store\model\ZMTaxRate.php at line 85

getDescription

public string getDescription()

Get the tax descrption.

Returns:
The tax description.

\store\model\ZMTaxRate.php at line 71

getId

public string getId()

Get the tax rate idendtifier

Returns:
The tax rate idendtifier.

\store\model\ZMTaxRate.php at line 97

getRate

public float getRate()

Get the tax rate.

Returns:
The tax rate.

\store\model\ZMTaxRate.php at line 146

getZoneId

public int getZoneId()

Get the zone id.

Returns:
The zone id or 0.

\store\model\ZMTaxRate.php at line 125

setClassId

public void setClassId(int classId)

Set the tax class id.

Parameters:
classId - The tax class id.

\store\model\ZMTaxRate.php at line 139

setCountryId

public void setCountryId(int countryId)

Set the country id.

Parameters:
countryId - The country id.

\store\model\ZMTaxRate.php at line 104

setDescription

public void setDescription(string description)

Set the tax description.

Parameters:
description - The tax description.

\store\model\ZMTaxRate.php at line 78

setId

public void setId(string id)

Set the tax rate idendtifier

Parameters:
id - The tax rate idendtifier.

\store\model\ZMTaxRate.php at line 111

setRate

public void setRate(float rate)

Set the tax rate.

Parameters:
rate - The tax rate.

\store\model\ZMTaxRate.php at line 153

setZoneId

public void setZoneId(int zoneId)

Set the zone id.

Parameters:
zoneId - The zone id.

ZenMagick 0.9.8