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

ShippingRateDraft   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 6 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