Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- added type `AgentFeatureDisabledError`
- added type `AgentFileNotProcessedWarning`
- added type `AgentMissingCountryError`
- added type `AgentMissingCurrencyError`
- added type `AgentMissingCustomerEmailError`
- added type `AgentMissingEntityTypeError`
- added type `AgentMissingShoppingListNameError`
Expand All @@ -68,6 +69,7 @@
- added type `AgentResponsesShoppingListSuccess`
- added type `AgentResponsesSuccess`
- added type `AgentShoppingListCreationFailedError`
- added type `AgentShoppingListUnresolvedError`
- added type `AgentStoreAmbiguousError`
- added type `AgentStoreDistributionChannelsUnsupportedError`
- added type `AgentStoreUnresolvedError`
Expand All @@ -77,6 +79,7 @@
- added type `GraphQLAgentExtractionFailedError`
- added type `GraphQLAgentFeatureDisabledError`
- added type `GraphQLAgentMissingCountryError`
- added type `GraphQLAgentMissingCurrencyError`
- added type `GraphQLAgentMissingCustomerEmailError`
- added type `GraphQLAgentMissingEntityTypeError`
- added type `GraphQLAgentMissingShoppingListNameError`
Expand All @@ -86,6 +89,7 @@
- added type `GraphQLAgentProductsNotFoundError`
- added type `GraphQLAgentQuoteRequestCreationFailedError`
- added type `GraphQLAgentShoppingListCreationFailedError`
- added type `GraphQLAgentShoppingListUnresolvedError`
- added type `GraphQLAgentStoreAmbiguousError`
- added type `GraphQLAgentStoreDistributionChannelsUnsupportedError`
- added type `GraphQLAgentStoreUnresolvedError`
Expand Down Expand Up @@ -866,6 +870,7 @@
- :warning: changed property `paymentMethodInfo` of type `MyPaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft`
- :warning: changed property `paymentMethodInfo` of type `PaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft`
- :warning: changed property `expand` of type `ProductSearchProjectionParams` from type `Expansion[]` to `string[]`
- :warning: changed property `count` of type `ReviewRatingStatistics` from type `integer` to `number`
- :warning: changed property `filter` of type `SearchSorting` from type `SearchQueryExpression` to `SearchQuery`
</details>

Expand Down Expand Up @@ -1314,6 +1319,8 @@
<summary>Added Type(s)</summary>

- added type `TooManyRequestsError`
- added type `Attribution`
- added type `AttributionSource`
- added type `GraphQLTooManyRequestsError`
- added type `ChangeSavedToLineItemChange`
- added type `DirectDiscount`
Expand Down Expand Up @@ -1583,6 +1590,8 @@
<details>
<summary>Added Property(s)</summary>

- added property `externalUserId` to type `ModifiedBy`
- added property `attributedTo` to type `ModifiedBy`
- added property `catalogData` to type `AddAssetChange`
- added property `variant` to type `AddAssetChange`
- added property `shippingKey` to type `AddDeliveryChange`
Expand Down Expand Up @@ -1869,6 +1878,12 @@
- added enum `setLineItemDeactivatedAt` to type `PlatformInitiatedChange`
- added enum `setProductCount` to type `PlatformInitiatedChange`
- added enum `setReservations` to type `PlatformInitiatedChange`
- added enum `Import` to type `Source`
- added enum `Export` to type `Source`
- added enum `IntakeAgent` to type `Source`
- added enum `PromotionsAgent` to type `Source`
- added enum `ManagedCommerceMCP` to type `Source`
- added enum `ProductEnrichmentAgent` to type `Source`
- added enum `addShipping` to type `UpdateType`
- added enum `addShippingRate` to type `UpdateType`
- added enum `addZone` to type `UpdateType`
Expand Down
58 changes: 29 additions & 29 deletions lib/commercetools-api/docs/RequestBuilder.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

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

namespace Commercetools\Api\Models\Agent;

use Commercetools\Api\Models\Error\ErrorObject;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;

interface AgentMissingCurrencyError extends ErrorObject
{
/**

* @return null|string
*/
public function getCode();

/**
* <p>Plain text description of the error.</p>
*

* @return null|string
*/
public function getMessage();

/**
* @param ?string $message
*/
public function setMessage(?string $message): void;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

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

namespace Commercetools\Api\Models\Agent;

use Commercetools\Api\Models\Error\ErrorObject;
use Commercetools\Api\Models\Error\ErrorObjectBuilder;
use Commercetools\Base\Builder;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;

/**
* @implements Builder<AgentMissingCurrencyError>
*/
final class AgentMissingCurrencyErrorBuilder implements Builder
{
/**

* @var ?string
*/
private $message;

/**
* <p>Plain text description of the error.</p>
*

* @return null|string
*/
public function getMessage()
{
return $this->message;
}

/**
* @param ?string $message
* @return $this
*/
public function withMessage(?string $message)
{
$this->message = $message;

return $this;
}


public function build(): AgentMissingCurrencyError
{
return new AgentMissingCurrencyErrorModel(
$this->message
);
}

public static function of(): AgentMissingCurrencyErrorBuilder
{
return new self();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

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

namespace Commercetools\Api\Models\Agent;

use Commercetools\Api\Models\Error\ErrorObjectCollection;
use Commercetools\Exception\InvalidArgumentException;
use stdClass;

/**
* @extends ErrorObjectCollection<AgentMissingCurrencyError>
* @method AgentMissingCurrencyError current()
* @method AgentMissingCurrencyError end()
* @method AgentMissingCurrencyError at($offset)
*/
class AgentMissingCurrencyErrorCollection extends ErrorObjectCollection
{
/**
* @psalm-assert AgentMissingCurrencyError $value
* @psalm-param AgentMissingCurrencyError|stdClass $value
* @throws InvalidArgumentException
*
* @return AgentMissingCurrencyErrorCollection
*/
public function add($value)
{
if (!$value instanceof AgentMissingCurrencyError) {
throw new InvalidArgumentException();
}
$this->store($value);

return $this;
}

/**
* @psalm-return callable(int):?AgentMissingCurrencyError
*/
protected function mapper()
{
return function (?int $index): ?AgentMissingCurrencyError {
$data = $this->get($index);
if ($data instanceof stdClass) {
/** @var AgentMissingCurrencyError $data */
$data = AgentMissingCurrencyErrorModel::of($data);
$this->set($data, $index);
}

return $data;
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php

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

namespace Commercetools\Api\Models\Agent;

use Commercetools\Api\Models\Error\ErrorObject;
use Commercetools\Api\Models\Error\ErrorObjectModel;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;

/**
* @internal
*/
final class AgentMissingCurrencyErrorModel extends JsonObjectModel implements AgentMissingCurrencyError
{
public const DISCRIMINATOR_VALUE = 'MissingCurrency';
/**
*
* @var ?string
*/
protected $code;

/**
*
* @var ?string
*/
protected $message;


/**
* @psalm-suppress MissingParamType
*/
public function __construct(
?string $message = null,
?string $code = null
) {
$this->message = $message;
$this->code = $code ?? self::DISCRIMINATOR_VALUE;
}

/**
*
* @return null|string
*/
public function getCode()
{
if (is_null($this->code)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_CODE);
if (is_null($data)) {
return null;
}
$this->code = (string) $data;
}

return $this->code;
}

/**
* <p>Plain text description of the error.</p>
*
*
* @return null|string
*/
public function getMessage()
{
if (is_null($this->message)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_MESSAGE);
if (is_null($data)) {
return null;
}
$this->message = (string) $data;
}

return $this->message;
}


/**
* @param ?string $message
*/
public function setMessage(?string $message): void
{
$this->message = $message;
}

/**
* @return mixed
*/
public function by(string $key)
{
$data = $this->raw($key);
if (is_null($data)) {
return null;
}

return $data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface AgentResponsesMultipartRequest extends JsonObject
public const FIELD_FILES = 'files';

/**
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code> or <code>files</code> must be provided.</p>
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code>, <code>files</code>, or <code>shoppingList</code> must be provided.</p>
*

* @return null|AgentResponsesPayload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class AgentResponsesMultipartRequestBuilder implements Builder
private $files;

/**
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code> or <code>files</code> must be provided.</p>
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code>, <code>files</code>, or <code>shoppingList</code> must be provided.</p>
*

* @return null|AgentResponsesPayload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
}

/**
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code> or <code>files</code> must be provided.</p>
* <p>JSON document matching <a href="ctp:api:type:AgentResponsesPayload">AgentResponsesPayload</a>. Must include <code>outputType</code> and <code>locale</code>. At least one of <code>prompt</code>, <code>files</code>, or <code>shoppingList</code> must be provided.</p>
*
*
* @return null|AgentResponsesPayload
Expand Down
Loading
Loading