Skip to content

Commit 6b7d304

Browse files
author
Auto Mation
committed
TASK: Updating SDK
1 parent 09a30bb commit 6b7d304

File tree

6 files changed

+71
-3
lines changed

6 files changed

+71
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hash=c1ad1f72032424e0d9e4e48c81aec258aede21f6
1+
hash=61fbca7360c74b724de7b0edd3f30a6592e51a46
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hash=c1ad1f72032424e0d9e4e48c81aec258aede21f6
1+
hash=61fbca7360c74b724de7b0edd3f30a6592e51a46

lib/commercetools-api/src/Models/Product/ProductProjectionPagedSearchResponse.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@
1313

1414
interface ProductProjectionPagedSearchResponse extends JsonObject
1515
{
16+
public const FIELD_LIMIT = 'limit';
1617
public const FIELD_COUNT = 'count';
1718
public const FIELD_TOTAL = 'total';
1819
public const FIELD_OFFSET = 'offset';
1920
public const FIELD_RESULTS = 'results';
2021
public const FIELD_FACETS = 'facets';
2122

23+
/**
24+
* @return null|int
25+
*/
26+
public function getLimit();
27+
2228
/**
2329
* @return null|int
2430
*/
@@ -44,6 +50,11 @@ public function getResults();
4450
*/
4551
public function getFacets();
4652

53+
/**
54+
* @param ?int $limit
55+
*/
56+
public function setLimit(?int $limit): void;
57+
4758
/**
4859
* @param ?int $count
4960
*/

lib/commercetools-api/src/Models/Product/ProductProjectionPagedSearchResponseBuilder.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121
final class ProductProjectionPagedSearchResponseBuilder implements Builder
2222
{
23+
/**
24+
* @var ?int
25+
*/
26+
private $limit;
27+
2328
/**
2429
* @var ?int
2530
*/
@@ -45,6 +50,14 @@ final class ProductProjectionPagedSearchResponseBuilder implements Builder
4550
*/
4651
private $facets;
4752

53+
/**
54+
* @return null|int
55+
*/
56+
public function getLimit()
57+
{
58+
return $this->limit;
59+
}
60+
4861
/**
4962
* @return null|int
5063
*/
@@ -85,6 +98,17 @@ public function getFacets()
8598
return $this->facets instanceof FacetResultsBuilder ? $this->facets->build() : $this->facets;
8699
}
87100

101+
/**
102+
* @param ?int $limit
103+
* @return $this
104+
*/
105+
public function withLimit(?int $limit)
106+
{
107+
$this->limit = $limit;
108+
109+
return $this;
110+
}
111+
88112
/**
89113
* @param ?int $count
90114
* @return $this
@@ -153,6 +177,7 @@ public function withFacetsBuilder(?FacetResultsBuilder $facets)
153177
public function build(): ProductProjectionPagedSearchResponse
154178
{
155179
return new ProductProjectionPagedSearchResponseModel(
180+
$this->limit,
156181
$this->count,
157182
$this->total,
158183
$this->offset,

lib/commercetools-api/src/Models/Product/ProductProjectionPagedSearchResponseModel.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
*/
2020
final class ProductProjectionPagedSearchResponseModel extends JsonObjectModel implements ProductProjectionPagedSearchResponse
2121
{
22+
/**
23+
* @var ?int
24+
*/
25+
protected $limit;
26+
2227
/**
2328
* @var ?int
2429
*/
@@ -49,19 +54,38 @@ final class ProductProjectionPagedSearchResponseModel extends JsonObjectModel im
4954
* @psalm-suppress MissingParamType
5055
*/
5156
public function __construct(
57+
?int $limit = null,
5258
?int $count = null,
5359
?int $total = null,
5460
?int $offset = null,
5561
?ProductProjectionCollection $results = null,
5662
?FacetResults $facets = null
5763
) {
64+
$this->limit = $limit;
5865
$this->count = $count;
5966
$this->total = $total;
6067
$this->offset = $offset;
6168
$this->results = $results;
6269
$this->facets = $facets;
6370
}
6471

72+
/**
73+
* @return null|int
74+
*/
75+
public function getLimit()
76+
{
77+
if (is_null($this->limit)) {
78+
/** @psalm-var ?int $data */
79+
$data = $this->raw(self::FIELD_LIMIT);
80+
if (is_null($data)) {
81+
return null;
82+
}
83+
$this->limit = (int) $data;
84+
}
85+
86+
return $this->limit;
87+
}
88+
6589
/**
6690
* @return null|int
6791
*/
@@ -149,6 +173,14 @@ public function getFacets()
149173
}
150174

151175

176+
/**
177+
* @param ?int $limit
178+
*/
179+
public function setLimit(?int $limit): void
180+
{
181+
$this->limit = $limit;
182+
}
183+
152184
/**
153185
* @param ?int $count
154186
*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hash=6d234bcf15bcf3d1202374c6e2733cbdb7bdcac6
1+
hash=61fbca7360c74b724de7b0edd3f30a6592e51a46

0 commit comments

Comments
 (0)