| 1 | <?php |
||
| 10 | class Order implements \JsonSerializable |
||
| 11 | { |
||
| 12 | const PRODUCT_TYPE_CASH_CARRY = "cash_carry"; |
||
| 13 | const PRODUCT_TYPE_DIGITAL_CONTENT = "digital_content"; |
||
| 14 | const PRODUCT_TYPE_DIGITAL_GOODS = "digital_goods"; |
||
| 15 | const PRODUCT_TYPE_DIGITAL_PHYSICAL = "digital_physical"; |
||
| 16 | const PRODUCT_TYPE_GIFT_CARD = "gift_card"; |
||
| 17 | const PRODUCT_TYPE_PHISICAL_GOODS = "phisical_goods"; |
||
| 18 | const PRODUCT_TYPE_RENEW_SUBS = "renew_subs"; |
||
| 19 | const PRODUCT_TYPE_SHAREWARE = "shareware"; |
||
| 20 | const PRODUCT_TYPE_SERVICE = "service"; |
||
| 21 | |||
| 22 | /** @var */ |
||
| 23 | private $order_id; |
||
| 24 | |||
| 25 | /** @var */ |
||
| 26 | private $product_type; |
||
| 27 | |||
| 28 | /** @var int */ |
||
| 29 | private $sales_tax = 0; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Order constructor. |
||
| 33 | * @param $order_id |
||
| 34 | */ |
||
| 35 | public function __construct($order_id) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return array|mixed |
||
| 42 | */ |
||
| 43 | public function jsonSerialize() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public function getOrderId() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param $order_id |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function setOrderId($order_id) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return mixed |
||
| 69 | */ |
||
| 70 | public function getProductType() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param $product_type |
||
| 77 | * @return $this |
||
| 78 | */ |
||
| 79 | public function setProductType($product_type) |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return mixed |
||
| 88 | */ |
||
| 89 | public function getSalesTax() |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @param $sales_tax |
||
| 96 | * @return $this |
||
| 97 | */ |
||
| 98 | public function setSalesTax($sales_tax) |
||
| 104 | } |
||
| 105 |