| @@ 42-64 (lines=23) @@ | ||
| 39 | * @method DateTimeDecorator getLastModifiedAt() |
|
| 40 | * @method CustomLineItemStateTransitionMessage setLastModifiedAt(\DateTime $lastModifiedAt = null) |
|
| 41 | */ |
|
| 42 | class CustomLineItemStateTransitionMessage extends Message |
|
| 43 | { |
|
| 44 | const MESSAGE_TYPE = 'CustomLineItemStateTransition'; |
|
| 45 | ||
| 46 | public function fieldDefinitions() |
|
| 47 | { |
|
| 48 | $definitions = array_merge( |
|
| 49 | parent::fieldDefinitions(), |
|
| 50 | [ |
|
| 51 | 'customLineItemId' => [static::TYPE => 'string'], |
|
| 52 | 'transitionDate' => [ |
|
| 53 | static::TYPE => '\DateTime', |
|
| 54 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 55 | ], |
|
| 56 | 'quantity' => [static::TYPE => 'int'], |
|
| 57 | 'fromState' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 58 | 'toState' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 59 | ] |
|
| 60 | ); |
|
| 61 | ||
| 62 | return $definitions; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 42-64 (lines=23) @@ | ||
| 39 | * @method DateTimeDecorator getLastModifiedAt() |
|
| 40 | * @method LineItemStateTransitionMessage setLastModifiedAt(\DateTime $lastModifiedAt = null) |
|
| 41 | */ |
|
| 42 | class LineItemStateTransitionMessage extends Message |
|
| 43 | { |
|
| 44 | const MESSAGE_TYPE = 'LineItemStateTransition'; |
|
| 45 | ||
| 46 | public function fieldDefinitions() |
|
| 47 | { |
|
| 48 | $definitions = array_merge( |
|
| 49 | parent::fieldDefinitions(), |
|
| 50 | [ |
|
| 51 | 'lineItemId' => [static::TYPE => 'string'], |
|
| 52 | 'transitionDate' => [ |
|
| 53 | static::TYPE => '\DateTime', |
|
| 54 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 55 | ], |
|
| 56 | 'quantity' => [static::TYPE => 'int'], |
|
| 57 | 'fromState' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 58 | 'toState' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 59 | ] |
|
| 60 | ); |
|
| 61 | ||
| 62 | return $definitions; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||