|
| 1 | +<?php |
| 2 | +/** |
| 3 | + */ |
| 4 | + |
| 5 | +namespace Commercetools\Core\Model\ShoppingList; |
| 6 | + |
| 7 | +use Commercetools\Core\Model\Common\Context; |
| 8 | +use Commercetools\Core\Model\Common\Resource; |
| 9 | +use Commercetools\Core\Model\Common\LocalizedString; |
| 10 | +use Commercetools\Core\Model\CustomField\CustomFieldObjectDraft; |
| 11 | + |
| 12 | +/** |
| 13 | + * @package Commercetools\Core\Model\ShoppingList |
| 14 | + * @link https://docs.commercetools.com/http-api-projects-me-shoppingLists#myshoppinglistdraft |
| 15 | + * @method LocalizedString getName() |
| 16 | + * @method MyShoppingListDraft setName(LocalizedString $name = null) |
| 17 | + * @method LocalizedString getDescription() |
| 18 | + * @method MyShoppingListDraft setDescription(LocalizedString $description = null) |
| 19 | + * @method LineItemDraftCollection getLineItems() |
| 20 | + * @method MyShoppingListDraft setLineItems(LineItemDraftCollection $lineItems = null) |
| 21 | + * @method TextLineItemDraftCollection getTextLineItems() |
| 22 | + * @method MyShoppingListDraft setTextLineItems(TextLineItemDraftCollection $textLineItems = null) |
| 23 | + * @method CustomFieldObjectDraft getCustom() |
| 24 | + * @method MyShoppingListDraft setCustom(CustomFieldObjectDraft $custom = null) |
| 25 | + * @method int getDeleteDaysAfterLastModification() |
| 26 | + * @method MyShoppingListDraft setDeleteDaysAfterLastModification(int $deleteDaysAfterLastModification = null) |
| 27 | + */ |
| 28 | +class MyShoppingListDraft extends Resource |
| 29 | +{ |
| 30 | + public function fieldDefinitions() |
| 31 | + { |
| 32 | + return [ |
| 33 | + 'name' => [static::TYPE => LocalizedString::class], |
| 34 | + 'description' => [static::TYPE => LocalizedString::class], |
| 35 | + 'lineItems' => [static::TYPE => LineItemDraftCollection::class], |
| 36 | + 'textLineItems' => [static::TYPE => TextLineItemDraftCollection::class], |
| 37 | + 'custom' => [static::TYPE => CustomFieldObjectDraft::class], |
| 38 | + 'deleteDaysAfterLastModification' => [static::TYPE => 'int'], |
| 39 | + ]; |
| 40 | + } |
| 41 | + |
| 42 | + /** |
| 43 | + * @param LocalizedString $name |
| 44 | + * @param Context|null $context |
| 45 | + * @return MyShoppingListDraft |
| 46 | + */ |
| 47 | + public static function ofName(LocalizedString $name, $context = null) |
| 48 | + { |
| 49 | + return static::of($context)->setName($name); |
| 50 | + } |
| 51 | +} |
0 commit comments