commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartDiscountValueRelativeDraftModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'relative';
27 protected $type;
28
33 protected $permyriad;
34
40
41
45 public function __construct(
46 ?int $permyriad = null,
47 ?string $applicationMode = null,
48 ?string $type = null
49 ) {
50 $this->permyriad = $permyriad;
51 $this->applicationMode = $applicationMode;
52 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
53 }
54
59 public function getType()
60 {
61 if (is_null($this->type)) {
63 $data = $this->raw(self::FIELD_TYPE);
64 if (is_null($data)) {
65 return null;
66 }
67 $this->type = (string) $data;
68 }
69
70 return $this->type;
71 }
72
79 public function getPermyriad()
80 {
81 if (is_null($this->permyriad)) {
83 $data = $this->raw(self::FIELD_PERMYRIAD);
84 if (is_null($data)) {
85 return null;
86 }
87 $this->permyriad = (int) $data;
88 }
89
90 return $this->permyriad;
91 }
92
103 public function getApplicationMode()
104 {
105 if (is_null($this->applicationMode)) {
107 $data = $this->raw(self::FIELD_APPLICATION_MODE);
108 if (is_null($data)) {
109 return null;
110 }
111 $this->applicationMode = (string) $data;
112 }
113
115 }
116
117
121 public function setPermyriad(?int $permyriad): void
122 {
123 $this->permyriad = $permyriad;
124 }
125
129 public function setApplicationMode(?string $applicationMode): void
130 {
131 $this->applicationMode = $applicationMode;
132 }
133}
__construct(?int $permyriad=null, ?string $applicationMode=null, ?string $type=null)