commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartSetEstimatedDeliveryActionBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
22{
27 private $shippingKey;
28
33 private $estimatedDelivery;
34
43 public function getShippingKey()
44 {
45 return $this->shippingKey;
46 }
47
54 public function getEstimatedDelivery()
55 {
56 return $this->estimatedDelivery instanceof EstimatedDeliveryBuilder ? $this->estimatedDelivery->build() : $this->estimatedDelivery;
57 }
58
63 public function withShippingKey(?string $shippingKey)
64 {
65 $this->shippingKey = $shippingKey;
66
67 return $this;
68 }
69
74 public function withEstimatedDelivery(?EstimatedDelivery $estimatedDelivery)
75 {
76 $this->estimatedDelivery = $estimatedDelivery;
77
78 return $this;
79 }
80
85 public function withEstimatedDeliveryBuilder(?EstimatedDeliveryBuilder $estimatedDelivery)
86 {
87 $this->estimatedDelivery = $estimatedDelivery;
88
89 return $this;
90 }
91
93 {
95 $this->shippingKey,
96 $this->estimatedDelivery instanceof EstimatedDeliveryBuilder ? $this->estimatedDelivery->build() : $this->estimatedDelivery
97 );
98 }
99
101 {
102 return new self();
103 }
104}