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

ShippingRateDraft::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
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\JsonObject;
9
use Commercetools\Core\Model\Common\Money;
10
11
/**
12
 * @package Commercetools\Core\Model\ShippingMethod
13
 * @link https://dev.commercetools.com/http-api-projects-shippingMethods.html#shippingratedraft
14
 * @method Money getPrice()
15
 * @method ShippingRateDraft setPrice(Money $price = null)
16
 * @method Money getFreeAbove()
17
 * @method ShippingRateDraft setFreeAbove(Money $freeAbove = null)
18
 * @method ShippingRatePriceTierCollection getTiers()
19
 * @method ShippingRateDraft setTiers(ShippingRatePriceTierCollection $tiers = null)
20
 */
21
class ShippingRateDraft extends JsonObject
22
{
23 60
    public function fieldDefinitions()
24
    {
25
        return [
26 60
            'price' => [static::TYPE => Money::class],
27 60
            'freeAbove' => [static::TYPE => Money::class],
28 60
            'tiers' => [static::TYPE => ShippingRatePriceTierCollection::class]
29
        ];
30
    }
31
}
32