commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
EstimatedDeliveryBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use DateTimeImmutable;
17use stdClass;
18
22final class EstimatedDeliveryBuilder implements Builder
23{
28 private $from;
29
34 private $until;
35
42 public function getFrom()
43 {
44 return $this->from;
45 }
46
54 public function getUntil()
55 {
56 return $this->until;
57 }
58
63 public function withFrom(?DateTimeImmutable $from)
64 {
65 $this->from = $from;
66
67 return $this;
68 }
69
74 public function withUntil(?DateTimeImmutable $until)
75 {
76 $this->until = $until;
77
78 return $this;
79 }
80
81
82 public function build(): EstimatedDelivery
83 {
84 return new EstimatedDeliveryModel(
85 $this->from,
86 $this->until
87 );
88 }
89
90 public static function of(): EstimatedDeliveryBuilder
91 {
92 return new self();
93 }
94}