PHP 클래스 CommerceGuys\Tax\Resolver\Context

Includes customer information, store information, and the calculation date.
파일 보기 프로젝트 열기: commerceguys/tax 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$customerAddress CommerceGuys\Addressing\AddressInterface The customer address.
$customerTaxNumber string The customer's tax number, if provided.
$date DateTime The calculation date.
$storeAddress CommerceGuys\Addressing\AddressInterface The store address.
$storeRegistrations array A list of country codes where the store is additionally registered to collect taxes.

공개 메소드들

메소드 설명
__construct ( CommerceGuys\Addressing\AddressInterface $customerAddress, CommerceGuys\Addressing\AddressInterface $storeAddress, string $customerTaxNumber = '', array $storeRegistrations = [], DateTime $date = null ) Creates a Context instance.
getCustomerAddress ( ) : CommerceGuys\Addressing\AddressInterface Gets the customer address.
getCustomerTaxNumber ( ) : string Gets the customer tax number.
getDate ( ) : DateTime Gets the calculation date.
getStoreAddress ( ) : CommerceGuys\Addressing\AddressInterface Gets the store address.
getStoreRegistrations ( ) : array Gets the store registrations.
setCustomerAddress ( CommerceGuys\Addressing\AddressInterface $customerAddress ) Sets the customer address.
setCustomerTaxNumber ( string $customerTaxNumber ) Sets the customer tax number.
setDate ( DateTime $date ) Sets the calculation date.
setStoreAddress ( CommerceGuys\Addressing\AddressInterface $storeAddress ) Sets the store address.
setStoreRegistrations ( array $storeRegistrations ) Sets the store registrations.

메소드 상세

__construct() 공개 메소드

Creates a Context instance.
public __construct ( CommerceGuys\Addressing\AddressInterface $customerAddress, CommerceGuys\Addressing\AddressInterface $storeAddress, string $customerTaxNumber = '', array $storeRegistrations = [], DateTime $date = null )
$customerAddress CommerceGuys\Addressing\AddressInterface
$storeAddress CommerceGuys\Addressing\AddressInterface
$customerTaxNumber string
$storeRegistrations array
$date DateTime

getCustomerAddress() 공개 메소드

Gets the customer address.
public getCustomerAddress ( ) : CommerceGuys\Addressing\AddressInterface
리턴 CommerceGuys\Addressing\AddressInterface The customer address.

getCustomerTaxNumber() 공개 메소드

Gets the customer tax number.
public getCustomerTaxNumber ( ) : string
리턴 string The customer tax number.

getDate() 공개 메소드

Gets the calculation date.
public getDate ( ) : DateTime
리턴 DateTime The calculation date.

getStoreAddress() 공개 메소드

Gets the store address.
public getStoreAddress ( ) : CommerceGuys\Addressing\AddressInterface
리턴 CommerceGuys\Addressing\AddressInterface The store address.

getStoreRegistrations() 공개 메소드

For example, ['UK'], for a US store registered in the UK to collect EU VAT on digital services.
public getStoreRegistrations ( ) : array
리턴 array An array of country codes where the store is additionally registered to collect taxes.

setCustomerAddress() 공개 메소드

Sets the customer address.
public setCustomerAddress ( CommerceGuys\Addressing\AddressInterface $customerAddress )
$customerAddress CommerceGuys\Addressing\AddressInterface The customer address.

setCustomerTaxNumber() 공개 메소드

Sets the customer tax number.
public setCustomerTaxNumber ( string $customerTaxNumber )
$customerTaxNumber string The customer tax number.

setDate() 공개 메소드

Sets the calculation date.
public setDate ( DateTime $date )
$date DateTime The calculation date.

setStoreAddress() 공개 메소드

Sets the store address.
public setStoreAddress ( CommerceGuys\Addressing\AddressInterface $storeAddress )
$storeAddress CommerceGuys\Addressing\AddressInterface The store address.

setStoreRegistrations() 공개 메소드

Sets the store registrations.
public setStoreRegistrations ( array $storeRegistrations )
$storeRegistrations array An array of country codes.

프로퍼티 상세

$customerAddress 보호되어 있는 프로퍼티

The customer address.
protected AddressInterface,CommerceGuys\Addressing $customerAddress
리턴 CommerceGuys\Addressing\AddressInterface

$customerTaxNumber 보호되어 있는 프로퍼티

The customer's tax number, if provided.
protected string $customerTaxNumber
리턴 string

$date 보호되어 있는 프로퍼티

The calculation date.
protected DateTime $date
리턴 DateTime

$storeAddress 보호되어 있는 프로퍼티

The store address.
protected AddressInterface,CommerceGuys\Addressing $storeAddress
리턴 CommerceGuys\Addressing\AddressInterface

$storeRegistrations 보호되어 있는 프로퍼티

A list of country codes where the store is additionally registered to collect taxes.
protected array $storeRegistrations
리턴 array