Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Dec 20, 2024
1 parent 4c5abdd commit b70347a
Show file tree
Hide file tree
Showing 9 changed files with 658 additions and 28 deletions.
32 changes: 20 additions & 12 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
**Api changes**

<details>
<summary>Changed Property(s)</summary>

- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
- added property `businessUnits` to type `SearchIndexingConfiguration`
</details>


<details>
<summary>Added Resource(s)</summary>

Expand Down Expand Up @@ -43,6 +62,7 @@
- added type `ShoppingListMessagePayload`
- added type `BusinessUnitSearchStatus`
- added type `ProjectChangeBusinessUnitSearchStatusAction`
- added type `SearchExactValue`
</details>


Expand All @@ -53,18 +73,6 @@
- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
- added property `businessUnits` to type `SearchIndexingConfiguration`
</details>

**History changes**

<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ interface SearchExactExpression extends SearchQueryExpression

/**
* @return null|SearchAnyValue
* @return null|SearchExactValue
*/
public function getExact();

/**
* @param ?SearchAnyValue $exact
* @param ?SearchExactValue $exact
*/
public function setExact(?SearchAnyValue $exact): void;
public function setExact(?SearchExactValue $exact): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ final class SearchExactExpressionBuilder implements Builder
{
/**
* @var null|SearchAnyValue|SearchAnyValueBuilder
* @var null|SearchExactValue|SearchExactValueBuilder
*/
private $exact;

/**
* @return null|SearchAnyValue
* @return null|SearchExactValue
*/
public function getExact()
{
return $this->exact instanceof SearchAnyValueBuilder ? $this->exact->build() : $this->exact;
return $this->exact instanceof SearchExactValueBuilder ? $this->exact->build() : $this->exact;

Check warning on line 35 in lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php

View check run for this annotation

Codecov / codecov/patch

lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php#L35

Added line #L35 was not covered by tests
}

/**
* @param ?SearchAnyValue $exact
* @param ?SearchExactValue $exact
* @return $this
*/
public function withExact(?SearchAnyValue $exact)
public function withExact(?SearchExactValue $exact)

Check warning on line 42 in lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php

View check run for this annotation

Codecov / codecov/patch

lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php#L42

Added line #L42 was not covered by tests
{
$this->exact = $exact;

Expand All @@ -50,7 +50,7 @@ public function withExact(?SearchAnyValue $exact)
* @deprecated use withExact() instead
* @return $this
*/
public function withExactBuilder(?SearchAnyValueBuilder $exact)
public function withExactBuilder(?SearchExactValueBuilder $exact)
{
$this->exact = $exact;

Expand All @@ -60,7 +60,7 @@ public function withExactBuilder(?SearchAnyValueBuilder $exact)
public function build(): SearchExactExpression
{
return new SearchExactExpressionModel(
$this->exact instanceof SearchAnyValueBuilder ? $this->exact->build() : $this->exact
$this->exact instanceof SearchExactValueBuilder ? $this->exact->build() : $this->exact

Check warning on line 63 in lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php

View check run for this annotation

Codecov / codecov/patch

lib/commercetools-api/src/Models/Search/SearchExactExpressionBuilder.php#L63

Added line #L63 was not covered by tests
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class SearchExactExpressionModel extends JsonObjectModel implements Search
{
/**
*
* @var ?SearchAnyValue
* @var ?SearchExactValue
*/
protected $exact;

Expand All @@ -30,14 +30,14 @@ final class SearchExactExpressionModel extends JsonObjectModel implements Search
* @psalm-suppress MissingParamType
*/
public function __construct(
?SearchAnyValue $exact = null
?SearchExactValue $exact = null
) {
$this->exact = $exact;
}

/**
*
* @return null|SearchAnyValue
* @return null|SearchExactValue
*/
public function getExact()
{
Expand All @@ -48,17 +48,17 @@ public function getExact()
return null;
}

$this->exact = SearchAnyValueModel::of($data);
$this->exact = SearchExactValueModel::of($data);

Check warning on line 51 in lib/commercetools-api/src/Models/Search/SearchExactExpressionModel.php

View check run for this annotation

Codecov / codecov/patch

lib/commercetools-api/src/Models/Search/SearchExactExpressionModel.php#L51

Added line #L51 was not covered by tests
}

return $this->exact;
}


/**
* @param ?SearchAnyValue $exact
* @param ?SearchExactValue $exact
*/
public function setExact(?SearchAnyValue $exact): void
public function setExact(?SearchExactValue $exact): void

Check warning on line 61 in lib/commercetools-api/src/Models/Search/SearchExactExpressionModel.php

View check run for this annotation

Codecov / codecov/patch

lib/commercetools-api/src/Models/Search/SearchExactExpressionModel.php#L61

Added line #L61 was not covered by tests
{
$this->exact = $exact;
}
Expand Down
66 changes: 66 additions & 0 deletions lib/commercetools-api/src/Models/Search/SearchExactValue.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\Api\Models\Search;

use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;

interface SearchExactValue extends SearchQueryExpressionValue
{
public const FIELD_VALUE = 'value';
public const FIELD_VALUES = 'values';
public const FIELD_LANGUAGE = 'language';
public const FIELD_CASE_INSENSITIVE = 'caseInsensitive';

/**
* @return null|mixed
*/
public function getValue();

/**
* @return null|array
*/
public function getValues();

/**
* <p>String value specifying linguistic and regional preferences using the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag format</a>, as described in <a href="https://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</a>. The format combines language, script, and region using hyphen-separated subtags. For example: <code>en</code>, <code>en-US</code>, <code>zh-Hans-SG</code>.</p>
*
* @return null|string
*/
public function getLanguage();

/**
* @return null|bool
*/
public function getCaseInsensitive();

/**
* @param mixed $value
*/
public function setValue($value): void;

/**
* @param ?array $values
*/
public function setValues(?array $values): void;

/**
* @param ?string $language
*/
public function setLanguage(?string $language): void;

/**
* @param ?bool $caseInsensitive
*/
public function setCaseInsensitive(?bool $caseInsensitive): void;
}
Loading

0 comments on commit b70347a

Please sign in to comment.