commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CounterBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use DateTimeImmutable;
17use stdClass;
18
22final class CounterBuilder implements Builder
23{
28 private $totalToSkip;
29
34 private $skipped;
35
40 private $lastSkippedAt;
41
48 public function getTotalToSkip()
49 {
50 return $this->totalToSkip;
51 }
52
59 public function getSkipped()
60 {
61 return $this->skipped;
62 }
63
70 public function getLastSkippedAt()
71 {
72 return $this->lastSkippedAt;
73 }
74
79 public function withTotalToSkip(?int $totalToSkip)
80 {
81 $this->totalToSkip = $totalToSkip;
82
83 return $this;
84 }
85
90 public function withSkipped(?int $skipped)
91 {
92 $this->skipped = $skipped;
93
94 return $this;
95 }
96
101 public function withLastSkippedAt(?DateTimeImmutable $lastSkippedAt)
102 {
103 $this->lastSkippedAt = $lastSkippedAt;
104
105 return $this;
106 }
107
108
109 public function build(): Counter
110 {
111 return new CounterModel(
112 $this->totalToSkip,
113 $this->skipped,
114 $this->lastSkippedAt
115 );
116 }
117
118 public static function of(): CounterBuilder
119 {
120 return new self();
121 }
122}
withLastSkippedAt(?DateTimeImmutable $lastSkippedAt)