@@ 22-35 (lines=14) @@ | ||
19 | * @method array getAllowedValues() |
|
20 | * @method InvalidFieldError setAllowedValues(array $allowedValues = null) |
|
21 | */ |
|
22 | class InvalidFieldError extends ApiError |
|
23 | { |
|
24 | const CODE = 'InvalidField'; |
|
25 | ||
26 | public function fieldDefinitions() |
|
27 | { |
|
28 | $definitions = parent::fieldDefinitions(); |
|
29 | $definitions['field'] = [static::TYPE => 'string']; |
|
30 | $definitions['invalidValue'] = [static::TYPE => null]; |
|
31 | $definitions['allowedValues'] = [static::TYPE => 'array']; |
|
32 | ||
33 | return $definitions; |
|
34 | } |
|
35 | } |
|
36 |
@@ 40-53 (lines=14) @@ | ||
37 | * @method bool getStaged() |
|
38 | * @method ProductImageAddedMessage setStaged(bool $staged = null) |
|
39 | */ |
|
40 | class ProductImageAddedMessage extends Message |
|
41 | { |
|
42 | const MESSAGE_TYPE = 'ProductImageAdded'; |
|
43 | ||
44 | public function fieldDefinitions() |
|
45 | { |
|
46 | $definitions = parent::fieldDefinitions(); |
|
47 | $definitions['variantId'] = [static::TYPE => 'int']; |
|
48 | $definitions['image'] = [static::TYPE => Image::class]; |
|
49 | $definitions['staged'] = [static::TYPE => 'bool']; |
|
50 | ||
51 | return $definitions; |
|
52 | } |
|
53 | } |
|
54 |