ShippingAddress::getState()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types\Payments;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class ShippingAddress
9
 * This object represents a shipping address.
10
 *
11
 * @package TelegramBot\Api\Types\Payments
12
 */
13
class ShippingAddress extends BaseType
14
{
15
    /**
16
     * @var array
17
     */
18
    protected static $requiredParams = ['country_code', 'state', 'city', 'street_line1', 'street_line2', 'post_code'];
19
20
    /**
21
     * @var array
22
     */
23
    protected static $map = [
24
        'country_code' => true,
25
        'state' => true,
26
        'city' => true,
27
        'street_line1' => true,
28
        'street_line2' => true,
29
        'post_code' => true,
30
    ];
31
32
    /**
33
     * ISO 3166-1 alpha-2 country code
34
     *
35
     * @var string
36
     */
37
    protected $countryCode;
38
39
    /**
40
     * State, if applicable
41
     *
42
     * @var string
43
     */
44
    protected $state;
45
46
    /**
47
     * City
48
     *
49
     * @var string
50
     */
51
    protected $city;
52
53
    /**
54
     * First line for the address
55
     *
56
     * @var string
57
     */
58
    protected $streetLine1;
59
60
    /**
61
     * Second line for the address
62
     *
63
     * @var string
64
     */
65
    protected $streetLine2;
66
67
    /**
68
     * Address post code
69
     *
70
     * @var string
71
     */
72
    protected $postCode;
73
74
    /**
75
     * @author MY
76
     * @return string
77
     */
78
    public function getCountryCode()
79
    {
80
        return $this->countryCode;
81
    }
82
83
    /**
84
     * @author MY
85
     *
86
     * @param string $countryCode
87
     *
88
     * @return void
89
     */
90
    public function setCountryCode($countryCode)
91
    {
92
        $this->countryCode = $countryCode;
93
    }
94
95
    /**
96
     * @author MY
97
     * @return string
98
     */
99
    public function getState()
100
    {
101
        return $this->state;
102
    }
103
104
    /**
105
     * @author MY
106
     *
107
     * @param string $state
108
     *
109
     * @return void
110
     */
111
    public function setState($state)
112
    {
113
        $this->state = $state;
114
    }
115
116
    /**
117
     * @author MY
118
     * @return string
119
     */
120
    public function getCity()
121
    {
122
        return $this->city;
123
    }
124
125
    /**
126
     * @author MY
127
     *
128
     * @param string $city
129
     *
130
     * @return void
131
     */
132
    public function setCity($city)
133
    {
134
        $this->city = $city;
135
    }
136
137
    /**
138
     * @author MY
139
     * @return string
140
     */
141
    public function getStreetLine1()
142
    {
143
        return $this->streetLine1;
144
    }
145
146
    /**
147
     * @author MY
148
     *
149
     * @param string $streetLine1
150
     *
151
     * @return void
152
     */
153
    public function setStreetLine1($streetLine1)
154
    {
155
        $this->streetLine1 = $streetLine1;
156
    }
157
158
    /**
159
     * @author MY
160
     * @return string
161
     */
162
    public function getStreetLine2()
163
    {
164
        return $this->streetLine2;
165
    }
166
167
    /**
168
     * @author MY
169
     *
170
     * @param string $streetLine2
171
     *
172
     * @return void
173
     */
174
    public function setStreetLine2($streetLine2)
175
    {
176
        $this->streetLine2 = $streetLine2;
177
    }
178
179
    /**
180
     * @author MY
181
     * @return string
182
     */
183
    public function getPostCode()
184
    {
185
        return $this->postCode;
186
    }
187
188
    /**
189
     * @author MY
190
     *
191
     * @param string $postCode
192
     *
193
     * @return void
194
     */
195
    public function setPostCode($postCode)
196
    {
197
        $this->postCode = $postCode;
198
    }
199
}
200