commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ApiClientDraftModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $name;
27
32 protected $scope;
33
39
45
51
52
56 public function __construct(
57 ?string $name = null,
58 ?string $scope = null,
59 ?int $deleteDaysAfterCreation = null,
62 ) {
63 $this->name = $name;
64 $this->scope = $scope;
65 $this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
66 $this->accessTokenValiditySeconds = $accessTokenValiditySeconds;
67 $this->refreshTokenValiditySeconds = $refreshTokenValiditySeconds;
68 }
69
76 public function getName()
77 {
78 if (is_null($this->name)) {
80 $data = $this->raw(self::FIELD_NAME);
81 if (is_null($data)) {
82 return null;
83 }
84 $this->name = (string) $data;
85 }
86
87 return $this->name;
88 }
89
96 public function getScope()
97 {
98 if (is_null($this->scope)) {
100 $data = $this->raw(self::FIELD_SCOPE);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->scope = (string) $data;
105 }
106
107 return $this->scope;
108 }
109
117 {
118 if (is_null($this->deleteDaysAfterCreation)) {
120 $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_CREATION);
121 if (is_null($data)) {
122 return null;
123 }
124 $this->deleteDaysAfterCreation = (int) $data;
125 }
126
128 }
129
137 {
138 if (is_null($this->accessTokenValiditySeconds)) {
140 $data = $this->raw(self::FIELD_ACCESS_TOKEN_VALIDITY_SECONDS);
141 if (is_null($data)) {
142 return null;
143 }
144 $this->accessTokenValiditySeconds = (int) $data;
145 }
146
148 }
149
157 {
158 if (is_null($this->refreshTokenValiditySeconds)) {
160 $data = $this->raw(self::FIELD_REFRESH_TOKEN_VALIDITY_SECONDS);
161 if (is_null($data)) {
162 return null;
163 }
164 $this->refreshTokenValiditySeconds = (int) $data;
165 }
166
168 }
169
170
174 public function setName(?string $name): void
175 {
176 $this->name = $name;
177 }
178
182 public function setScope(?string $scope): void
183 {
184 $this->scope = $scope;
185 }
186
191 {
192 $this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
193 }
194
199 {
200 $this->accessTokenValiditySeconds = $accessTokenValiditySeconds;
201 }
202
207 {
208 $this->refreshTokenValiditySeconds = $refreshTokenValiditySeconds;
209 }
210}
__construct(?string $name=null, ?string $scope=null, ?int $deleteDaysAfterCreation=null, ?int $accessTokenValiditySeconds=null, ?int $refreshTokenValiditySeconds=null)
setRefreshTokenValiditySeconds(?int $refreshTokenValiditySeconds)
setAccessTokenValiditySeconds(?int $accessTokenValiditySeconds)