commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
OrderPagedSearchResponseBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
22 {
27  private $total;
28 
33  private $offset;
34 
39  private $limit;
40 
45  private $hits;
46 
53  public function getTotal()
54  {
55  return $this->total;
56  }
57 
64  public function getOffset()
65  {
66  return $this->offset;
67  }
68 
75  public function getLimit()
76  {
77  return $this->limit;
78  }
79 
86  public function getHits()
87  {
88  return $this->hits;
89  }
90 
95  public function withTotal(?int $total)
96  {
97  $this->total = $total;
98 
99  return $this;
100  }
101 
106  public function withOffset(?int $offset)
107  {
108  $this->offset = $offset;
109 
110  return $this;
111  }
112 
117  public function withLimit(?int $limit)
118  {
119  $this->limit = $limit;
120 
121  return $this;
122  }
123 
128  public function withHits(?HitCollection $hits)
129  {
130  $this->hits = $hits;
131 
132  return $this;
133  }
134 
135 
136  public function build(): OrderPagedSearchResponse
137  {
139  $this->total,
140  $this->offset,
141  $this->limit,
142  $this->hits
143  );
144  }
145 
146  public static function of(): OrderPagedSearchResponseBuilder
147  {
148  return new self();
149  }
150 }