Passed
Push — develop ( f8140e...dbb7b9 )
by Jens
10:17
created

fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Model\Message;
6
7
use Commercetools\Core\Model\Common\DiscountedPrice;
8
use Commercetools\Core\Model\Common\JsonObject;
9
10
/**
11
 * @package Commercetools\Core\Model\Message
12
 * @link https://docs.commercetools.com/http-api-message-types.html#productpricediscountsset-message
13
 * @method int getVariantId()
14
 * @method ProductPriceDiscountsSetUpdatedPrice setVariantId(int $variantId = null)
15
 * @method string getVariantKey()
16
 * @method ProductPriceDiscountsSetUpdatedPrice setVariantKey(string $variantKey = null)
17
 * @method string getSku()
18
 * @method ProductPriceDiscountsSetUpdatedPrice setSku(string $sku = null)
19
 * @method string getPriceId()
20
 * @method ProductPriceDiscountsSetUpdatedPrice setPriceId(string $priceId = null)
21
 * @method DiscountedPrice getDiscounted()
22
 * @method ProductPriceDiscountsSetUpdatedPrice setDiscounted(DiscountedPrice $discounted = null)
23
 * @method bool getStaged()
24
 * @method ProductPriceDiscountsSetUpdatedPrice setStaged(bool $staged = null)
25
 */
26
class ProductPriceDiscountsSetUpdatedPrice extends JsonObject
27
{
28 2
    public function fieldDefinitions()
29
    {
30
        return [
31 2
            'variantId' => [static::TYPE => 'int'],
32 2
            'variantKey' => [static::TYPE => 'string'],
33 2
            'sku' => [static::TYPE => 'string'],
34 2
            'priceId' => [static::TYPE => 'string'],
35 2
            'discounted' => [static::TYPE => DiscountedPrice::class],
36 2
            'staged' => [static::TYPE => 'bool'],
37
        ];
38
    }
39
}
40