-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathTaxRateInterface.php
63 lines (55 loc) · 1.47 KB
/
TaxRateInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace CommerceGuys\Tax\Model;
interface TaxRateInterface
{
/**
* Gets the tax type.
*
* @return TaxTypeInterface The tax type.
*/
public function getType();
/**
* Gets the tax rate id.
*
* @return string The tax rate id.
*/
public function getId();
/**
* Gets the tax rate name.
*
* Used to identify the tax rate on administration pages.
* For example, "Standard".
*
* @return string The tax rate name.
*/
public function getName();
/**
* Gets whether the tax rate is the default for its tax type.
*
* When resolving the tax rate for a specific tax type, the default tax
* rate is returned if no other resolver provides a more applicable one.
*
* @return bool True if the tax rate is the default, false otherwise.
*/
public function isDefault();
/**
* Gets the tax rate amounts.
*
* @return TaxRateAmountInterface[] The tax rate amounts.
*/
public function getAmounts();
/**
* Gets the tax rate amount valid for the provided date.
*
* @param \DateTime $date The date.
*
* @return TaxRateAmountInterface|null The tax rate amount, if matched.
*/
public function getAmount(\DateTime $date);
/**
* Checks whether the tax rate has tax rate amounts.
*
* @return bool True if the tax rate has tax rate amounts, false otherwise.
*/
public function hasAmounts();
}