commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
TooManyRequestsErrorModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
23{
24
25 public const DISCRIMINATOR_VALUE = 'TooManyRequests';
30 protected $code;
31
36 protected $message;
37
38
42 public function __construct(
43 ?string $code = null,
44 ?string $message = null
45 ) {
46 $this->code = $code;
47 $this->message = $message;
48
49 }
50
57 public function getCode()
58 {
59 if (is_null($this->code)) {
61 $data = $this->raw(self::FIELD_CODE);
62 if (is_null($data)) {
63 return null;
64 }
65 $this->code = (string) $data;
66 }
67
68 return $this->code;
69 }
70
77 public function getMessage()
78 {
79 if (is_null($this->message)) {
81 $data = $this->raw(self::FIELD_MESSAGE);
82 if (is_null($data)) {
83 return null;
84 }
85 $this->message = (string) $data;
86 }
87
88 return $this->message;
89 }
90
91
95 public function setCode(?string $code): void
96 {
97 $this->code = $code;
98 }
99
103 public function setMessage(?string $message): void
104 {
105 $this->message = $message;
106 }
107
108
109
110}