Passed
Push — develop ( 30dd04...761131 )
by Jens
07:47
created

CartScore::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\ShippingMethod;
7
8
use Commercetools\Core\Model\Common\Money;
9
10
/**
11
 * @package Commercetools\Core\Model\ShippingMethod
12
 * @link https://dev.commercetools.com/http-api-projects-shippingMethods.html#cartscore-with-fixed-price
13
 * @method string getType()
14
 * @method CartScore setType(string $type = null)
15
 * @method int getScore()
16
 * @method CartScore setScore(int $score = null)
17
 * @method Money getPrice()
18
 * @method CartScore setPrice(Money $price = null)
19
 * @method PriceFunction getPriceFunction()
20
 * @method CartScore setPriceFunction(PriceFunction $priceFunction = null)
21
 * @method bool getIsMatching()
22
 * @method CartScore setIsMatching(bool $isMatching = null)
23
 */
24
class CartScore extends ShippingRatePriceTier
25
{
26
    const INPUT_TYPE = 'CartScore';
27
28 3
    public function fieldDefinitions()
29
    {
30
        return [
31 3
            'type' => [static::TYPE => 'string'],
32 3
            'score' => [static::TYPE => 'int'],
33 3
            'price' => [static::TYPE => Money::class],
34 3
            'priceFunction' => [static::TYPE => PriceFunction::class],
35 3
            'isMatching' => [static::TYPE => 'bool']
36
        ];
37
    }
38
}
39