TaxAddressServiceGetTaxAddress Method |
Namespace: CMS.Ecommerce
public virtual IAddress GetTaxAddress( IAddress billingAddress, IAddress shippingAddress, TaxClassInfo taxClass, CustomerInfo customer )
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).