Click or drag to resize
TaxAddressServiceGetTaxAddress Method
Returns an address which should be used for the tax calculation.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 11.0.0
Syntax
C#
public virtual IAddress GetTaxAddress(
	IAddress billingAddress,
	IAddress shippingAddress,
	TaxClassInfo taxClass,
	CustomerInfo customer
)

Parameters

billingAddress
Type: CMS.EcommerceIAddress
A billing address.
shippingAddress
Type: CMS.EcommerceIAddress
An address where the goods are delivered.
taxClass
Type: CMS.EcommerceTaxClassInfo
A tax class to get an address for.
customer
Type: CMS.EcommerceCustomerInfo
A customer making a purchase.

Return Value

Type: IAddress

Implements

ITaxAddressServiceGetTaxAddress(IAddress, IAddress, TaxClassInfo, CustomerInfo)
Remarks

This method picks one of the supplied addresses according to the 'CMSStoreApplyTaxBasedOn' ecommerce setting (ApplyTaxesBasedOn(SiteInfoIdentifier)). The default address is returned when both billingAddress and shippingAddress are null. Returns null when the DefaultCountryName(SiteInfoIdentifier) settings is empty.

The taxClass and customer are ignored by default, but you can override this method and leverage these parameters to customize the decision logic. Use the GetDefaultAddress method to get the site's default address or the CreateAddress(Int32, Int32, String, String, String, String) method to create a completely new address (e.g. address of your store).

See Also