Passed
Push — main ( 310983...f31b4d )
by Aleksandr
09:34
created

Price::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 $type = null;
27
28
    /**
29
     * Режим доставки (тип услуги) передается код из соответствующего справочника
30
     *
31
     * @JMS\XmlAttribute()
32
     * @JMS\Type("int")
33
     */
34
    private ?int $service = null;
35
36
    /**
37
     * Стоимость доставки
38
     *
39
     * @JMS\XmlAttribute()
40
     * @JMS\Type("int")
41
     */
42
    private ?int $price = null;
43
44
    /**
45
     * Срок доставки
46
     *
47
     * @JMS\XmlAttribute()
48
     * @JMS\Type("string")
49
     * @JMS\SerializedName("delivery_period")
50
     */
51
    private ?string $deliveryPeriod = null;
52
53
    /**
54
     * Дополнительная информация о доставке
55
     *
56
     * @JMS\XmlAttribute()
57
     * @JMS\Type("string")
58
     */
59
    private ?string $msg = null;
60
61
    /**
62
     * Зона, в которую попадает адрес
63
     *
64
     * @JMS\XmlAttribute()
65
     * @JMS\Type("string")
66
     */
67
    private ?string $zone = null;
68
69
    /**
70
     * @return int|null
71
     */
72 2
    public function getType(): ?int
73
    {
74 2
        return $this->type;
75
    }
76
77
    /**
78
     * @return int|null
79
     */
80 3
    public function getService(): ?int
81
    {
82 3
        return $this->service;
83
    }
84
85
    /**
86
     * @return int|null
87
     */
88 3
    public function getPrice(): ?int
89
    {
90 3
        return $this->price;
91
    }
92
93
    /**
94
     * @return string|null
95
     */
96 3
    public function getDeliveryPeriod(): ?string
97
    {
98 3
        return $this->deliveryPeriod;
99
    }
100
101
102
    /**
103
     * @return string|null
104
     */
105 3
    public function getMsg(): ?string
106
    {
107 3
        return $this->msg;
108
    }
109
110
    /**
111
     * @return string|null
112
     */
113 3
    public function getZone(): ?string
114
    {
115 3
        return $this->zone;
116
    }
117
}
118