Completed
Push — master ( 3dc30b...6a0dc0 )
by Jhao
04:34 queued 02:01
created

CalculationResponse::getTotal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses;
6
7
use JMS\Serializer\Annotation AS JMS;
8
9
final class CalculationResponse
10
{
11
    /**
12
     * @JMS\SerializedName("avia-rate")
13
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
14
     * @var Tariff|null
15
     */
16
    private $aviaRate;
17
18
    /**
19
     * @JMS\SerializedName("ground-rate")
20
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
21
     * @var Tariff|null
22
     */
23
    private $groundRate;
24
25
    /**
26
     * @JMS\SerializedName("fragile-rate")
27
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
28
     * @var Tariff|null
29
     */
30
    private $fragileRate;
31
32
    /**
33
     * @JMS\SerializedName("insurance-rate")
34
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
35
     * @var Tariff|null
36
     */
37
    private $insuranceRate;
38
39
    /**
40
     * @JMS\SerializedName("oversize-rate")
41
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
42
     * @var Tariff|null
43
     */
44
    private $oversizeRate;
45
46
    /**
47
     * @JMS\SerializedName("completeness-checking-rate")
48
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
49
     * @var Tariff|null
50
     */
51
    private $completenessCheckingRate;
52
53
    /**
54
     * @JMS\SerializedName("notice-rate")
55
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
56
     * @var Tariff|null
57
     */
58
    private $noticeRate;
59
60
    /**
61
     * @JMS\SerializedName("sms-notice-recipient-rate")
62
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\Tariff")
63
     * @var Tariff|null
64
     */
65
    private $smsNoticeRate;
66
67
    /**
68
     * @JMS\SerializedName("delivery-time")
69
     * @JMS\Type("Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses\DeliveryTime")
70
     * @var DeliveryTime
71
     */
72
    private $deliveryTime;
73
74
    /**
75
     * @JMS\SerializedName("total-rate")
76
     * @JMS\Type("int")
77
     */
78
    private $totalCost;
79
80
    /**
81
     * @JMS\SerializedName("total-vat")
82
     * @JMS\Type("int")
83
     */
84
    private $totalVat;
85
86
    public function getTotal(): Tariff
87
    {
88
        return new Tariff($this->totalCost, $this->totalVat);
89
    }
90
91
    public function getDeliveryTime(): DeliveryTime
92
    {
93
        return $this->deliveryTime;
94
    }
95
96
    public function getSmsNoticeRate(): ?Tariff
97
    {
98
        return $this->smsNoticeRate;
99
    }
100
101
    public function getNoticeRate(): ?Tariff
102
    {
103
        return $this->noticeRate;
104
    }
105
106
    public function getCompletenessCheckingRate(): ?Tariff
107
    {
108
        return $this->completenessCheckingRate;
109
    }
110
111
    public function getOversizeRate(): ?Tariff
112
    {
113
        return $this->oversizeRate;
114
    }
115
116
    public function getInsuranceRate(): ?Tariff
117
    {
118
        return $this->insuranceRate;
119
    }
120
121
    public function getAviaRate(): ?Tariff
122
    {
123
        return $this->aviaRate;
124
    }
125
126
    public function getGroundRate(): ?Tariff
127
    {
128
        return $this->groundRate;
129
    }
130
131
    public function getFragileRate(): ?Tariff
132
    {
133
        return $this->fragileRate;
134
    }
135
}
136