| @@ 47-81 (lines=35) @@ | ||
| 44 | * @method ReferenceCollection getReferences() |
|
| 45 | * @method CartDiscount setReferences(ReferenceCollection $references = null) |
|
| 46 | */ |
|
| 47 | class CartDiscount extends Resource |
|
| 48 | { |
|
| 49 | public function fieldDefinitions() |
|
| 50 | { |
|
| 51 | return [ |
|
| 52 | 'id' => [static::TYPE => 'string'], |
|
| 53 | 'version' => [static::TYPE => 'int'], |
|
| 54 | 'createdAt' => [ |
|
| 55 | static::TYPE => '\DateTime', |
|
| 56 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 57 | ], |
|
| 58 | 'lastModifiedAt' => [ |
|
| 59 | static::TYPE => '\DateTime', |
|
| 60 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 61 | ], |
|
| 62 | 'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
|
| 63 | 'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
|
| 64 | 'value' => [static::TYPE => '\Commercetools\Core\Model\CartDiscount\CartDiscountValue'], |
|
| 65 | 'cartPredicate' => [static::TYPE => 'string'], |
|
| 66 | 'target' => [static::TYPE => '\Commercetools\Core\Model\CartDiscount\CartDiscountTarget'], |
|
| 67 | 'sortOrder' => [static::TYPE => 'string'], |
|
| 68 | 'isActive' => [static::TYPE => 'bool'], |
|
| 69 | 'validFrom' => [ |
|
| 70 | static::TYPE => '\DateTime', |
|
| 71 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 72 | ], |
|
| 73 | 'validUntil' => [ |
|
| 74 | static::TYPE => '\DateTime', |
|
| 75 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 76 | ], |
|
| 77 | 'requiresDiscountCode' => [static::TYPE => 'bool'], |
|
| 78 | 'references' => [static::TYPE => '\Commercetools\Core\Model\Common\ReferenceCollection'] |
|
| 79 | ]; |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||
| @@ 56-85 (lines=30) @@ | ||
| 53 | * @method CustomFieldObject getCustom() |
|
| 54 | * @method Review setCustom(CustomFieldObject $custom = null) |
|
| 55 | */ |
|
| 56 | class Review extends Resource |
|
| 57 | { |
|
| 58 | public function fieldDefinitions() |
|
| 59 | { |
|
| 60 | return [ |
|
| 61 | 'id' => [static::TYPE => 'string'], |
|
| 62 | 'version' => [static::TYPE => 'int'], |
|
| 63 | 'createdAt' => [ |
|
| 64 | static::TYPE => '\DateTime', |
|
| 65 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 66 | ], |
|
| 67 | 'lastModifiedAt' => [ |
|
| 68 | static::TYPE => '\DateTime', |
|
| 69 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 70 | ], |
|
| 71 | 'key' => [static::TYPE => 'string'], |
|
| 72 | 'uniquenessValue' => [static::TYPE => 'string'], |
|
| 73 | 'locale' => [static::TYPE => 'string'], |
|
| 74 | 'authorName' => [static::TYPE => 'string'], |
|
| 75 | 'title' => [static::TYPE => 'string'], |
|
| 76 | 'text' => [static::TYPE => 'string'], |
|
| 77 | 'target' => [static::TYPE => '\Commercetools\Core\Model\Common\ResourceIdentifier'], |
|
| 78 | 'rating' => [static::TYPE => 'int'], |
|
| 79 | 'state' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 80 | 'includedInStatistics' => [static::TYPE => 'bool'], |
|
| 81 | 'customer' => [static::TYPE => '\Commercetools\Core\Model\Customer\CustomerReference'], |
|
| 82 | 'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'], |
|
| 83 | ]; |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||