-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from commercetools/gen-sdk-updates
- Loading branch information
Showing
134 changed files
with
8,979 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
27 changes: 27 additions & 0 deletions
27
lib/commercetools-api/src/Models/Me/MyCartSetCustomerEmailAction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\Me; | ||
|
||
use Commercetools\Base\DateTimeImmutableCollection; | ||
use Commercetools\Base\JsonObject; | ||
|
||
interface MyCartSetCustomerEmailAction extends MyCartUpdateAction | ||
{ | ||
public const FIELD_EMAIL = 'email'; | ||
|
||
/** | ||
* @return null|string | ||
*/ | ||
public function getEmail(); | ||
|
||
/** | ||
* @param ?string $email | ||
*/ | ||
public function setEmail(?string $email): void; | ||
} |
59 changes: 59 additions & 0 deletions
59
lib/commercetools-api/src/Models/Me/MyCartSetCustomerEmailActionBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\Me; | ||
|
||
use Commercetools\Base\Builder; | ||
use Commercetools\Base\DateTimeImmutableCollection; | ||
use Commercetools\Base\JsonObject; | ||
use Commercetools\Base\JsonObjectModel; | ||
use Commercetools\Base\MapperFactory; | ||
use stdClass; | ||
|
||
/** | ||
* @implements Builder<MyCartSetCustomerEmailAction> | ||
*/ | ||
final class MyCartSetCustomerEmailActionBuilder implements Builder | ||
{ | ||
/** | ||
* @var ?string | ||
*/ | ||
private $email; | ||
|
||
/** | ||
* @return null|string | ||
*/ | ||
public function getEmail() | ||
{ | ||
return $this->email; | ||
} | ||
|
||
/** | ||
* @param ?string $email | ||
* @return $this | ||
*/ | ||
public function withEmail(?string $email) | ||
{ | ||
$this->email = $email; | ||
|
||
return $this; | ||
} | ||
|
||
|
||
public function build(): MyCartSetCustomerEmailAction | ||
{ | ||
return new MyCartSetCustomerEmailActionModel( | ||
$this->email | ||
); | ||
} | ||
|
||
public static function of(): MyCartSetCustomerEmailActionBuilder | ||
{ | ||
return new self(); | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
lib/commercetools-api/src/Models/Me/MyCartSetCustomerEmailActionCollection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\Me; | ||
|
||
use Commercetools\Api\Models\Me\MyCartUpdateActionCollection; | ||
use Commercetools\Exception\InvalidArgumentException; | ||
use stdClass; | ||
|
||
/** | ||
* @extends MyCartUpdateActionCollection<MyCartSetCustomerEmailAction> | ||
* @method MyCartSetCustomerEmailAction current() | ||
* @method MyCartSetCustomerEmailAction at($offset) | ||
*/ | ||
class MyCartSetCustomerEmailActionCollection extends MyCartUpdateActionCollection | ||
{ | ||
/** | ||
* @psalm-assert MyCartSetCustomerEmailAction $value | ||
* @psalm-param MyCartSetCustomerEmailAction|stdClass $value | ||
* @throws InvalidArgumentException | ||
* | ||
* @return MyCartSetCustomerEmailActionCollection | ||
*/ | ||
public function add($value) | ||
{ | ||
if (!$value instanceof MyCartSetCustomerEmailAction) { | ||
throw new InvalidArgumentException(); | ||
} | ||
$this->store($value); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @psalm-return callable(int):?MyCartSetCustomerEmailAction | ||
*/ | ||
protected function mapper() | ||
{ | ||
return function (int $index): ?MyCartSetCustomerEmailAction { | ||
$data = $this->get($index); | ||
if ($data instanceof stdClass) { | ||
/** @var MyCartSetCustomerEmailAction $data */ | ||
$data = MyCartSetCustomerEmailActionModel::of($data); | ||
$this->set($data, $index); | ||
} | ||
|
||
return $data; | ||
}; | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
lib/commercetools-api/src/Models/Me/MyCartSetCustomerEmailActionModel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\Me; | ||
|
||
use Commercetools\Base\DateTimeImmutableCollection; | ||
use Commercetools\Base\JsonObject; | ||
use Commercetools\Base\JsonObjectModel; | ||
use Commercetools\Base\MapperFactory; | ||
use stdClass; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class MyCartSetCustomerEmailActionModel extends JsonObjectModel implements MyCartSetCustomerEmailAction | ||
{ | ||
public const DISCRIMINATOR_VALUE = 'setCustomerEmail'; | ||
/** | ||
* @var ?string | ||
*/ | ||
protected $action; | ||
|
||
/** | ||
* @var ?string | ||
*/ | ||
protected $email; | ||
|
||
|
||
/** | ||
* @psalm-suppress MissingParamType | ||
*/ | ||
public function __construct( | ||
?string $email = null | ||
) { | ||
$this->email = $email; | ||
$this->action = static::DISCRIMINATOR_VALUE; | ||
} | ||
|
||
/** | ||
* @return null|string | ||
*/ | ||
public function getAction() | ||
{ | ||
if (is_null($this->action)) { | ||
/** @psalm-var ?string $data */ | ||
$data = $this->raw(self::FIELD_ACTION); | ||
if (is_null($data)) { | ||
return null; | ||
} | ||
$this->action = (string) $data; | ||
} | ||
|
||
return $this->action; | ||
} | ||
|
||
/** | ||
* @return null|string | ||
*/ | ||
public function getEmail() | ||
{ | ||
if (is_null($this->email)) { | ||
/** @psalm-var ?string $data */ | ||
$data = $this->raw(self::FIELD_EMAIL); | ||
if (is_null($data)) { | ||
return null; | ||
} | ||
$this->email = (string) $data; | ||
} | ||
|
||
return $this->email; | ||
} | ||
|
||
|
||
/** | ||
* @param ?string $email | ||
*/ | ||
public function setEmail(?string $email): void | ||
{ | ||
$this->email = $email; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hash=05a877634096132acd39e22070622c84161d8ff3 | ||
hash=2ad3d6c01ca5cf8f6f2cee54062ae5755e592837 |
Oops, something went wrong.