Completed
Push — master ( 1f7e67...a1b9db )
by
unknown
07:31
created

ShippingAddress::setStreetLine1()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
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
    static protected $requiredParams = ['country_code', 'state', 'city', 'street_line1', 'street_line2', 'post_code'];
19
20
    /**
21
     * @var array
22
     */
23
    static protected $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 integer
64
     */
65
    protected $streetLine2;
66
67
    /**
68
     * Address post code
69
     *
70
     * @var integer
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
     * @param string $countryCode
86
     */
87
    public function setCountryCode($countryCode)
88
    {
89
        $this->countryCode = $countryCode;
90
    }
91
92
    /**
93
     * @author MY
94
     * @return string
95
     */
96
    public function getState()
97
    {
98
        return $this->state;
99
    }
100
101
    /**
102
     * @author MY
103
     * @param string $state
104
     */
105
    public function setState($state)
106
    {
107
        $this->state = $state;
108
    }
109
110
    /**
111
     * @author MY
112
     * @return string
113
     */
114
    public function getCity()
115
    {
116
        return $this->city;
117
    }
118
119
    /**
120
     * @author MY
121
     * @param string $city
122
     */
123
    public function setCity($city)
124
    {
125
        $this->city = $city;
126
    }
127
128
    /**
129
     * @author MY
130
     * @return string
131
     */
132
    public function getStreetLine1()
133
    {
134
        return $this->streetLine1;
135
    }
136
137
    /**
138
     * @author MY
139
     * @param string $streetLine1
140
     */
141
    public function setStreetLine1($streetLine1)
142
    {
143
        $this->streetLine1 = $streetLine1;
144
    }
145
146
    /**
147
     * @author MY
148
     * @return int
149
     */
150
    public function getStreetLine2()
151
    {
152
        return $this->streetLine2;
153
    }
154
155
    /**
156
     * @author MY
157
     * @param int $streetLine2
158
     */
159
    public function setStreetLine2($streetLine2)
160
    {
161
        $this->streetLine2 = $streetLine2;
162
    }
163
164
    /**
165
     * @author MY
166
     * @return int
167
     */
168
    public function getPostCode()
169
    {
170
        return $this->postCode;
171
    }
172
173
    /**
174
     * @author MY
175
     * @param int $postCode
176
     */
177
    public function setPostCode($postCode)
178
    {
179
        $this->postCode = $postCode;
180
    }
181
}
182