|
34 | 34 | * @method Money getCurrentValue() |
35 | 35 | * @method ScopedPrice setCurrentValue(Money $currentValue = null) |
36 | 36 | */ |
37 | | -class ScopedPrice extends Price |
| 37 | +class ScopedPrice extends JsonObject |
38 | 38 | { |
| 39 | + const ID = 'id'; |
| 40 | + const VALUE = 'value'; |
39 | 41 | const CURRENT_VALUE = 'currentValue'; |
| 42 | + const COUNTRY = 'country'; |
| 43 | + const CUSTOMER_GROUP = 'customerGroup'; |
| 44 | + const CHANNEL = 'channel'; |
| 45 | + const VALID_FROM = 'validFrom'; |
| 46 | + const VALID_UNTIL = 'validUntil'; |
| 47 | + const DISCOUNTED = 'discounted'; |
| 48 | + const CUSTOM = 'custom'; |
40 | 49 |
|
41 | 50 | public function fieldDefinitions() |
42 | 51 | { |
43 | | - $definitions = parent::fieldDefinitions(); |
44 | | - $definitions[static::CURRENT_VALUE] = [static::TYPE => '\Commercetools\Core\Model\Common\Money']; |
45 | | - |
46 | | - return $definitions; |
| 52 | + return [ |
| 53 | + static::ID => [static::TYPE => 'string'], |
| 54 | + static::VALUE => [self::TYPE => '\Commercetools\Core\Model\Common\Money'], |
| 55 | + static::CURRENT_VALUE => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
| 56 | + static::COUNTRY => [self::TYPE => 'string'], |
| 57 | + static::CUSTOMER_GROUP => [self::TYPE => '\Commercetools\Core\Model\CustomerGroup\CustomerGroupReference'], |
| 58 | + static::CHANNEL => [self::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
| 59 | + static::VALID_FROM => [ |
| 60 | + self::TYPE => '\DateTime', |
| 61 | + self::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
| 62 | + ], |
| 63 | + static::VALID_UNTIL => [ |
| 64 | + self::TYPE => '\DateTime', |
| 65 | + self::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
| 66 | + ], |
| 67 | + static::DISCOUNTED => [self::TYPE => '\Commercetools\Core\Model\Common\DiscountedPrice'], |
| 68 | + static::CUSTOM => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'], |
| 69 | + ]; |
47 | 70 | } |
48 | 71 |
|
49 | 72 | /** |
|
0 commit comments