Passed
Push — main ( 6bf038...55787e )
by Aleksandr
08:10
created

Price   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 85
ccs 10
cts 10
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrice() 0 3 1
A getZone() 0 3 1
A getService() 0 3 1
A getMsg() 0 3 1
A getDeliveryPeriod() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Models;
6
7
use DalliSDK\Traits\Fillable;
8
use JMS\Serializer\Annotation as JMS;
9
10
/**
11
 * Модель стоимости доставки для соответствующего запроса калькуляции
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/cost-delivery
14
 * @JMS\XmlRoot("price")
15
 */
16
class Price
17
{
18
    use Fillable;
19
20
    /**
21
     * Режим доставки (тип услуги) передается код из соответствующего справочника
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("int")
25
     */
26
    private ?int $service = null;
27
28
    /**
29
     * Стоимость доставки
30
     *
31
     * @JMS\XmlAttribute()
32
     * @JMS\Type("int")
33
     */
34
    private ?int $price = null;
35
36
    /**
37
     * Срок доставки
38
     *
39
     * @JMS\XmlAttribute()
40
     * @JMS\Type("string")
41
     * @JMS\SerializedName("delivery_period")
42
     */
43
    private ?string $deliveryPeriod = null;
44
45
    /**
46
     * Дополнительная информация о доставке
47
     *
48
     * @JMS\XmlAttribute()
49
     * @JMS\Type("string")
50
     */
51
    private ?string $msg = null;
52
53
    /**
54
     * Зона, в которую попадает адрес
55
     *
56
     * @JMS\XmlAttribute()
57
     * @JMS\Type("string")
58
     */
59
    private ?string $zone = null;
60
61
62
    /**
63
     * @return int|null
64
     */
65 3
    public function getService(): ?int
66
    {
67 3
        return $this->service;
68
    }
69
70
    /**
71
     * @return int|null
72
     */
73 3
    public function getPrice(): ?int
74
    {
75 3
        return $this->price;
76
    }
77
78
    /**
79
     * @return string|null
80
     */
81 3
    public function getDeliveryPeriod(): ?string
82
    {
83 3
        return $this->deliveryPeriod;
84
    }
85
86
87
    /**
88
     * @return string|null
89
     */
90 3
    public function getMsg(): ?string
91
    {
92 3
        return $this->msg;
93
    }
94
95
    /**
96
     * @return string|null
97
     */
98 3
    public function getZone(): ?string
99
    {
100 3
        return $this->zone;
101
    }
102
}
103