commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
CustomLineItemTaxedPriceModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
28  protected $totalNet;
29 
34  protected $totalGross;
35 
36 
40  public function __construct(
41  ?TypedMoney $totalNet = null,
42  ?TypedMoney $totalGross = null
43  ) {
44  $this->totalNet = $totalNet;
45  $this->totalGross = $totalGross;
46  }
47 
52  public function getTotalNet()
53  {
54  if (is_null($this->totalNet)) {
56  $data = $this->raw(self::FIELD_TOTAL_NET);
57  if (is_null($data)) {
58  return null;
59  }
61  $this->totalNet = $className::of($data);
62  }
63 
64  return $this->totalNet;
65  }
66 
71  public function getTotalGross()
72  {
73  if (is_null($this->totalGross)) {
75  $data = $this->raw(self::FIELD_TOTAL_GROSS);
76  if (is_null($data)) {
77  return null;
78  }
80  $this->totalGross = $className::of($data);
81  }
82 
83  return $this->totalGross;
84  }
85 
86 
90  public function setTotalNet(?TypedMoney $totalNet): void
91  {
92  $this->totalNet = $totalNet;
93  }
94 
98  public function setTotalGross(?TypedMoney $totalGross): void
99  {
100  $this->totalGross = $totalGross;
101  }
102 }
__construct(?TypedMoney $totalNet=null, ?TypedMoney $totalGross=null)