PluginProbe
AliNext – WooCommerce Dropshipping Plugin for AliExpress / trunk
AliNext – WooCommerce Dropshipping Plugin for AliExpress vtrunk
ali2woo-lite / includes / classes / object / PurchaseCodeInfoCount.php

PurchaseCodeInfoCount.php in AliNext – WooCommerce Dropshipping Plugin for AliExpress trunk, at includes/classes/object/PurchaseCodeInfoCount.php

133 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Description of PurchaseCodeInfoCount
5 *
6 * @author Ali2Woo Team
7 */
8
9 namespace AliNext_Lite;;
10
11 class PurchaseCodeInfoCount
12 {
13 public const FIELD_DESCRIPTION = 'description';
14 public const FIELD_PRODUCT = 'product';
15 public const FIELD_PRODUCTS = 'products';
16 public const FIELD_REVIEWS = 'reviews';
17 public const FIELD_CATEGORY = 'category';
18 public const FIELD_SHIPPING = 'shipping';
19 public const FIELD_ORDERS = 'orders';
20
21
22 private ?int $description = null;
23 private ?int $product = null;
24 private ?int $products = null;
25 private ?int $reviews = null;
26 private ?int $category = null;
27 private ?int $shipping = null;
28 private ?int $orders = null;
29
30
31 public function getDescription(): ?int
32 {
33 return $this->description;
34 }
35
36 public function setDescription(?int $description): self
37 {
38 $this->description = $description;
39
40 return $this;
41 }
42
43 public function getProduct(): ?int
44 {
45 return $this->product;
46 }
47
48 public function setProduct(?int $product): self
49 {
50 $this->product = $product;
51
52 return $this;
53 }
54
55 public function getProducts(): ?int
56 {
57 return $this->products;
58 }
59
60 public function setProducts(?int $products): self
61 {
62 $this->products = $products;
63
64 return $this;
65 }
66
67 public function getReviews(): ?int
68 {
69 return $this->reviews;
70 }
71
72 public function setReviews(?int $reviews): self
73 {
74 $this->reviews = $reviews;
75
76 return $this;
77 }
78
79 public function getCategory(): ?int
80 {
81 return $this->category;
82 }
83
84 public function setCategory(?int $category): self
85 {
86 $this->category = $category;
87
88 return $this;
89 }
90
91 public function getShipping(): ?int
92 {
93 return $this->shipping;
94 }
95
96 public function setShipping(?int $shipping): self
97 {
98 $this->shipping = $shipping;
99
100 return $this;
101 }
102
103 public function getOrders(): ?int
104 {
105 return $this->orders;
106 }
107
108 public function setOrders(?int $orders): self
109 {
110 $this->orders = $orders;
111
112 return $this;
113 }
114
115 public function getSum(): int
116 {
117 return $this->getProducts() + $this->getProduct() + $this->getDescription() +
118 $this->getReviews() + $this->getShipping() + $this->getOrders();
119 }
120
121 public function toArray(): array
122 {
123 return [
124 self::FIELD_DESCRIPTION => $this->getDescription(),
125 self::FIELD_PRODUCT => $this->getProduct(),
126 self::FIELD_PRODUCTS => $this->getProducts(),
127 self::FIELD_REVIEWS => $this->getReviews(),
128 self::FIELD_CATEGORY => $this->getCategory(),
129 self::FIELD_SHIPPING => $this->getShipping(),
130 self::FIELD_ORDERS => $this->getOrders(),
131 ];
132 }
133 }