commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AgentResponsesCartSuccessBuilder.php
1<?php
2
3declare(strict_types=1);
10
19use stdClass;
20
25{
30 private $warnings;
31
36 private $threadId;
37
42 private $entity;
43
50 public function getWarnings()
51 {
52 return $this->warnings;
53 }
54
61 public function getThreadId()
62 {
63 return $this->threadId;
64 }
65
72 public function getEntity()
73 {
74 return $this->entity instanceof CartBuilder ? $this->entity->build() : $this->entity;
75 }
76
81 public function withWarnings(?WarningObjectCollection $warnings)
82 {
83 $this->warnings = $warnings;
84
85 return $this;
86 }
87
92 public function withThreadId(?string $threadId)
93 {
94 $this->threadId = $threadId;
95
96 return $this;
97 }
98
103 public function withEntity(?Cart $entity)
104 {
105 $this->entity = $entity;
106
107 return $this;
108 }
109
114 public function withEntityBuilder(?CartBuilder $entity)
115 {
116 $this->entity = $entity;
117
118 return $this;
119 }
120
122 {
124 $this->warnings,
125 $this->threadId,
126 $this->entity instanceof CartBuilder ? $this->entity->build() : $this->entity
127 );
128 }
129
130 public static function of(): AgentResponsesCartSuccessBuilder
131 {
132 return new self();
133 }
134}