Passed
Push — master ( 259020...d68831 )
by Bruce Pinheiro de
02:13
created
src/Customer/CustomerClient.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
     protected $lastResponse;
19 19
 
20 20
     /**
21
-	 * CheckoutClientInterface constructor.
22
-	 * @param ContextInterface $context
23
-	 */
24
-	public function __construct(ContextInterface $context)
25
-	{
26
-		$this->context = $context;
27
-	}
21
+     * CheckoutClientInterface constructor.
22
+     * @param ContextInterface $context
23
+     */
24
+    public function __construct(ContextInterface $context)
25
+    {
26
+        $this->context = $context;
27
+    }
28 28
 
29 29
     /**
30 30
      * @inheritDoc
@@ -88,47 +88,47 @@  discard block
 block discarded – undo
88 88
         return null;
89 89
     }
90 90
 
91
-	private function request(string $action, CustomerInterface $customer, AccessToken $accessToken, array $scopes):? CustomerInterface
92
-	{
93
-		$accessToken = AuthenticationHelper::getValidToken(
94
-			$this->context,
95
-			$accessToken,
96
-			$scopes??self::getScopes()
97
-		);
98
-
99
-		$client = SumUp::getClient();
100
-		$options = AuthenticationHelper::getOAuthHeader($accessToken);
101
-		$options['form_params'] = self::getCustomerBody($customer);
102
-
103
-		$successCode=200;
104
-		$uri = self::ENDPOINT . '/' . $customer->getCustomerId();
105
-		switch (true){
106
-			case $action==='create': {
107
-				$action='post';
108
-				$successCode=201;
109
-				$uri = self::ENDPOINT;
110
-				break;
111
-			}
112
-			case $action==='complete': {
113
-				$action='put';
114
-				break;
115
-			}
116
-			default:{
117
-				$action='get';
118
-				break;
119
-			}
120
-		}
121
-
122
-		/** @var ResponseInterface $response */
123
-		$response = $client->{$action}($uri, $options);
124
-		$this->lastResponse = $response;
125
-		if($successCode===$response->getStatusCode()){
126
-			$wrapper = new Hydrator($response);
127
-			return $wrapper->hydrate($customer);
128
-		}
129
-
130
-		return null;
131
-	}
91
+    private function request(string $action, CustomerInterface $customer, AccessToken $accessToken, array $scopes):? CustomerInterface
92
+    {
93
+        $accessToken = AuthenticationHelper::getValidToken(
94
+            $this->context,
95
+            $accessToken,
96
+            $scopes??self::getScopes()
97
+        );
98
+
99
+        $client = SumUp::getClient();
100
+        $options = AuthenticationHelper::getOAuthHeader($accessToken);
101
+        $options['form_params'] = self::getCustomerBody($customer);
102
+
103
+        $successCode=200;
104
+        $uri = self::ENDPOINT . '/' . $customer->getCustomerId();
105
+        switch (true){
106
+            case $action==='create': {
107
+                $action='post';
108
+                $successCode=201;
109
+                $uri = self::ENDPOINT;
110
+                break;
111
+            }
112
+            case $action==='complete': {
113
+                $action='put';
114
+                break;
115
+            }
116
+            default:{
117
+                $action='get';
118
+                break;
119
+            }
120
+        }
121
+
122
+        /** @var ResponseInterface $response */
123
+        $response = $client->{$action}($uri, $options);
124
+        $this->lastResponse = $response;
125
+        if($successCode===$response->getStatusCode()){
126
+            $wrapper = new Hydrator($response);
127
+            return $wrapper->hydrate($customer);
128
+        }
129
+
130
+        return null;
131
+    }
132 132
 
133 133
     /**
134 134
      * Validate an customer
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
     }
170 170
 
171 171
     public function setContext(ContextInterface $context): CustomerClientInterface
172
-	{
173
-		$this->context = $context;
174
-	}
172
+    {
173
+        $this->context = $context;
174
+    }
175 175
 
176 176
     /**
177 177
      * @inheritDoc
@@ -183,18 +183,18 @@  discard block
 block discarded – undo
183 183
         ];
184 184
     }
185 185
 
186
-	function getLastResponse(): ResponseInterface
187
-	{
188
-		return $this->lastResponse;
189
-	}
186
+    function getLastResponse(): ResponseInterface
187
+    {
188
+        return $this->lastResponse;
189
+    }
190 190
 
191 191
 
192
-	/**
193
-	 * return the context used to created the client.
194
-	 * @return ContextInterface
195
-	 */
196
-	function getContext(): ContextInterface
197
-	{
198
-		// TODO: Implement getContext() method.
199
-	}
192
+    /**
193
+     * return the context used to created the client.
194
+     * @return ContextInterface
195
+     */
196
+    function getContext(): ContextInterface
197
+    {
198
+        // TODO: Implement getContext() method.
199
+    }
200 200
 }
Please login to merge, or discard this patch.
src/Customer/Customer.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -4,142 +4,142 @@
 block discarded – undo
4 4
 
5 5
 class Customer implements CustomerInterface
6 6
 {
7
-	/**
8
-	 * Customer SumUp ID
9
-	 *
10
-	 * @var string
11
-	 */
12
-	protected $customerId;
13
-
14
-	/**
15
-	 * Customer Name
16
-	 *
17
-	 * @var string
18
-	 */
19
-	protected $name;
20
-
21
-	/**
22
-	 * Customer phone
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $phone;
27
-
28
-	/**
29
-	 * Cusomter address
30
-	 *
31
-	 * @var AddressInterface
32
-	 */
33
-	protected $address;
34
-
35
-	function __construct(?array $data = [])
36
-	{
37
-		$this->setCustomerId($data['customer_id']??null);
38
-		$personal_details = $data['personal_details']??$data;
39
-		$this->setName($personal_details['name']??null);
40
-		$this->setPhone($personal_details['phone']??null);
41
-		$this->setAddress(new Address($personal_details['address']??null));
42
-	}
43
-
44
-	/**
45
-	 * Get customer SumUp ID
46
-	 *
47
-	 * @return  string
48
-	 */
49
-	public function getCustomerId(): ?string
50
-	{
51
-		return $this->customerId;
52
-	}
53
-
54
-	/**
55
-	 * Set customer SumUp ID
56
-	 *
57
-	 * @param  string $customerId Customer SumUp ID
58
-	 * @return CustomerInterface
59
-	 */
60
-	public function setCustomerId(?string $customerId): CustomerInterface
61
-	{
62
-		$this->customerId = $customerId;
63
-
64
-		return $this;
65
-	}
66
-
67
-	/**
68
-	 * Get customer Name
69
-	 *
70
-	 * @return  string
71
-	 */
72
-	public function getName(): ?string
73
-	{
74
-		return $this->name;
75
-	}
76
-
77
-	/**
78
-	 * Set customer Name
79
-	 *
80
-	 * @param  string  $name  Customer Name
81
-	 *
82
-	 * @return  self
83
-	 */
84
-	public function setName(?string $name): CustomerInterface
85
-	{
86
-		$this->name = $name;
87
-
88
-		return $this;
89
-	}
90
-
91
-	/**
92
-	 * Get customer phone
93
-	 *
94
-	 * @return  string
95
-	 */
96
-	public function getPhone(): ?string
97
-	{
98
-		return $this->phone;
99
-	}
100
-
101
-	/**
102
-	 * Set customer phone
103
-	 *
104
-	 * @param  string  $phone  Customer phone
105
-	 *
106
-	 * @return  self
107
-	 */
108
-	public function setPhone(?string $phone): CustomerInterface
109
-	{
110
-		$this->phone = $phone;
111
-
112
-		return $this;
113
-	}
114
-
115
-	/**
116
-	 * Get cusomter address
117
-	 *
118
-	 * @return  AddressInterface
119
-	 */
120
-	public function getAddress(): AddressInterface
121
-	{
122
-		return $this->address;
123
-	}
124
-
125
-	/**
126
-	 * Set cusomter address
127
-	 *
128
-	 * @param AddressInterface $address
129
-	 * @return Customer|CustomerInterface
130
-	 */
131
-	public function setAddress(AddressInterface $address): CustomerInterface
132
-	{
133
-		$this->address = $address;
134
-		return $this;
135
-	}
136
-
137
-	/**
138
-	 * @return bool
139
-	 */
140
-	function isValid():bool
141
-	{
142
-		return $this->getCustomerId()!==null;
143
-	}
7
+    /**
8
+     * Customer SumUp ID
9
+     *
10
+     * @var string
11
+     */
12
+    protected $customerId;
13
+
14
+    /**
15
+     * Customer Name
16
+     *
17
+     * @var string
18
+     */
19
+    protected $name;
20
+
21
+    /**
22
+     * Customer phone
23
+     *
24
+     * @var string
25
+     */
26
+    protected $phone;
27
+
28
+    /**
29
+     * Cusomter address
30
+     *
31
+     * @var AddressInterface
32
+     */
33
+    protected $address;
34
+
35
+    function __construct(?array $data = [])
36
+    {
37
+        $this->setCustomerId($data['customer_id']??null);
38
+        $personal_details = $data['personal_details']??$data;
39
+        $this->setName($personal_details['name']??null);
40
+        $this->setPhone($personal_details['phone']??null);
41
+        $this->setAddress(new Address($personal_details['address']??null));
42
+    }
43
+
44
+    /**
45
+     * Get customer SumUp ID
46
+     *
47
+     * @return  string
48
+     */
49
+    public function getCustomerId(): ?string
50
+    {
51
+        return $this->customerId;
52
+    }
53
+
54
+    /**
55
+     * Set customer SumUp ID
56
+     *
57
+     * @param  string $customerId Customer SumUp ID
58
+     * @return CustomerInterface
59
+     */
60
+    public function setCustomerId(?string $customerId): CustomerInterface
61
+    {
62
+        $this->customerId = $customerId;
63
+
64
+        return $this;
65
+    }
66
+
67
+    /**
68
+     * Get customer Name
69
+     *
70
+     * @return  string
71
+     */
72
+    public function getName(): ?string
73
+    {
74
+        return $this->name;
75
+    }
76
+
77
+    /**
78
+     * Set customer Name
79
+     *
80
+     * @param  string  $name  Customer Name
81
+     *
82
+     * @return  self
83
+     */
84
+    public function setName(?string $name): CustomerInterface
85
+    {
86
+        $this->name = $name;
87
+
88
+        return $this;
89
+    }
90
+
91
+    /**
92
+     * Get customer phone
93
+     *
94
+     * @return  string
95
+     */
96
+    public function getPhone(): ?string
97
+    {
98
+        return $this->phone;
99
+    }
100
+
101
+    /**
102
+     * Set customer phone
103
+     *
104
+     * @param  string  $phone  Customer phone
105
+     *
106
+     * @return  self
107
+     */
108
+    public function setPhone(?string $phone): CustomerInterface
109
+    {
110
+        $this->phone = $phone;
111
+
112
+        return $this;
113
+    }
114
+
115
+    /**
116
+     * Get cusomter address
117
+     *
118
+     * @return  AddressInterface
119
+     */
120
+    public function getAddress(): AddressInterface
121
+    {
122
+        return $this->address;
123
+    }
124
+
125
+    /**
126
+     * Set cusomter address
127
+     *
128
+     * @param AddressInterface $address
129
+     * @return Customer|CustomerInterface
130
+     */
131
+    public function setAddress(AddressInterface $address): CustomerInterface
132
+    {
133
+        $this->address = $address;
134
+        return $this;
135
+    }
136
+
137
+    /**
138
+     * @return bool
139
+     */
140
+    function isValid():bool
141
+    {
142
+        return $this->getCustomerId()!==null;
143
+    }
144 144
 
145 145
 }
Please login to merge, or discard this patch.
src/Customer/Address.php 1 patch
Indentation   +386 added lines, -386 removed lines patch added patch discarded remove patch
@@ -8,390 +8,390 @@
 block discarded – undo
8 8
  */
9 9
 class Address implements AddressInterface
10 10
 {
11
-	/**
12
-	 * First address line
13
-	 *
14
-	 * @var string $line1
15
-	 */
16
-	protected $line1;
17
-	/**
18
-	 * Second address line
19
-	 *
20
-	 * @var string
21
-	 */
22
-	protected $line2;
23
-	/**
24
-	 * Address Country
25
-	 *
26
-	 * @var string
27
-	 */
28
-	protected $country;
29
-	/**
30
-	 * Address postal code
31
-	 *
32
-	 * @var string
33
-	 */
34
-	protected $postalCode;
35
-	/**
36
-	 * Address City
37
-	 *
38
-	 * @var string
39
-	 */
40
-	protected $city;
41
-	/**
42
-	 * @var string
43
-	 */
44
-	protected $countryEnName;
45
-	/**
46
-	 * @var string
47
-	 */
48
-	protected $countryNativeName;
49
-	/**
50
-	 * @var integer
51
-	 */
52
-	protected $regionId;
53
-	/**
54
-	 * @var string
55
-	 */
56
-	protected $regionName;
57
-	/**
58
-	 * @var string
59
-	 */
60
-	protected $postCode;
61
-	/**
62
-	 * @var string
63
-	 */
64
-	protected $landline;
65
-	/**
66
-	 * @var string
67
-	 */
68
-	protected $addressLine1;
69
-	/**
70
-	 * @var string
71
-	 */
72
-	protected $addressLine2;
73
-	/**
74
-	 * Address State
75
-	 *
76
-	 * @var string
77
-	 */
78
-	protected $state;
79
-
80
-	/**
81
-	 * Address constructor.
82
-	 * @param array|null $data
83
-	 */
84
-	function __construct(?array $data = [])
85
-	{
86
-		$this->setAddressLine1($data['address_line1']??null);
87
-		$this->setAddressLine2($data['address_line2']??null);
88
-		$this->setCity($data['city']??null);
89
-		$this->setCountry($data['country']??null);
90
-		$this->setCountryEnName($data['country_en_name']??null);
91
-		$this->setCountryNativeName($data['country_native_name']??null);
92
-		$this->setRegionId($data['region_id']??null);
93
-		$this->setRegionName($data['region_name']??null);
94
-		$this->setPostCode($data['post_code']??null);
95
-		$this->setLandline($data['landline']??null);
96
-		$this->setLine1($data['line1']??null);
97
-		$this->setLine2($data['line2']??null);
98
-		$this->setPostalCode($data['postal_code']??null);
99
-		$this->setState($data['state']??null);
100
-	}
101
-
102
-	/**
103
-	 * Get $line1
104
-	 *
105
-	 * @return  string
106
-	 */
107
-	public function getLine1(): ?string
108
-	{
109
-		return $this->line1;
110
-	}
111
-
112
-	/**
113
-	 * Set $line1
114
-	 *
115
-	 * @param  string  $line1  $line1
116
-	 *
117
-	 * @return  AddressInterface
118
-	 */
119
-	public function setLine1(?string $line1): AddressInterface
120
-	{
121
-		$this->line1 = $line1;
122
-
123
-		return $this;
124
-	}
125
-
126
-	/**
127
-	 * Get second address line
128
-	 *
129
-	 * @return  string
130
-	 */
131
-	public function getLine2(): ?string
132
-	{
133
-		return $this->line2;
134
-	}
135
-
136
-	/**
137
-	 * Set second address line
138
-	 *
139
-	 * @param  string  $line2  Second address line
140
-	 *
141
-	 * @return  AddressInterface
142
-	 */
143
-	public function setLine2(?string $line2): AddressInterface
144
-	{
145
-		$this->line2 = $line2;
146
-
147
-		return $this;
148
-	}
149
-
150
-	/**
151
-	 * Get address Country
152
-	 *
153
-	 * @return  string
154
-	 */
155
-	public function getCountry(): ?string
156
-	{
157
-		return $this->country;
158
-	}
159
-
160
-	/**
161
-	 * Set address Country
162
-	 *
163
-	 * @param  string  $country  Address Country
164
-	 *
165
-	 * @return  AddressInterface
166
-	 */
167
-	public function setCountry(?string $country): AddressInterface
168
-	{
169
-		$this->country = $country;
170
-
171
-		return $this;
172
-	}
173
-
174
-	/**
175
-	 * Get address postal code
176
-	 *
177
-	 * @return  string
178
-	 */
179
-	public function getPostalCode(): ?string
180
-	{
181
-		return $this->postalCode;
182
-	}
183
-
184
-	/**
185
-	 * Set address postal code
186
-	 *
187
-	 * @param  string  $postalCode  Address postal code
188
-	 *
189
-	 * @return  AddressInterface
190
-	 */
191
-	public function setPostalCode(?string $postalCode): AddressInterface
192
-	{
193
-		$this->postalCode = $postalCode;
194
-
195
-		return $this;
196
-	}
197
-
198
-	/**
199
-	 * Get address City
200
-	 *
201
-	 * @return  string
202
-	 */
203
-	public function getCity(): ?string
204
-	{
205
-		return $this->city;
206
-	}
207
-
208
-	/**
209
-	 * Set address City
210
-	 *
211
-	 * @param  string  $city  Address City
212
-	 *
213
-	 * @return  AddressInterface
214
-	 */
215
-	public function setCity(?string $city): AddressInterface
216
-	{
217
-		$this->city = $city;
218
-
219
-		return $this;
220
-	}
221
-
222
-	/**
223
-	 * @return mixed
224
-	 */
225
-	public function getCountryEnName():? string
226
-	{
227
-		return $this->countryEnName;
228
-	}
229
-
230
-	/**
231
-	 * @param mixed $countryEnName
232
-	 * @return AddressInterface
233
-	 */
234
-	public function setCountryEnName($countryEnName): AddressInterface
235
-	{
236
-		$this->countryEnName = $countryEnName;
237
-
238
-		return $this;
239
-	}
240
-
241
-	/**
242
-	 * @return mixed
243
-	 */
244
-	public function getCountryNativeName():? string
245
-	{
246
-		return $this->countryNativeName;
247
-	}
248
-
249
-	/**
250
-	 * @param mixed $countryNativeName
251
-	 * @return Address
252
-	 */
253
-	public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
-	{
255
-		$this->countryNativeName = $countryNativeName;
256
-
257
-		return $this;
258
-	}
259
-
260
-	/**
261
-	 * @return number|null
262
-	 */
263
-	public function getRegionId():? number
264
-	{
265
-		return $this->regionId;
266
-	}
267
-
268
-	/**
269
-	 * @param number|null $regionId
270
-	 * @return Address
271
-	 */
272
-	public function setRegionId(?number $regionId): AddressInterface
273
-	{
274
-		$this->regionId = $regionId;
275
-
276
-		return $this;
277
-	}
278
-
279
-	/**
280
-	 * @return string|null
281
-	 */
282
-	public function getRegionName():? string
283
-	{
284
-		return $this->regionName;
285
-	}
286
-
287
-	/**
288
-	 * @param string|null $regionName
289
-	 * @return AddressInterface
290
-	 */
291
-	public function setRegionName(?string $regionName): AddressInterface
292
-	{
293
-		$this->regionName = $regionName;
294
-
295
-		return $this;
296
-	}
297
-
298
-	/**
299
-	 * @return string|null
300
-	 */
301
-	public function getPostCode():? string
302
-	{
303
-		return $this->postCode;
304
-	}
305
-
306
-	/**
307
-	 * @param string|null $postCode
308
-	 * @return AddressInterface
309
-	 */
310
-	public function setPostCode(?string $postCode): AddressInterface
311
-	{
312
-		$this->postCode = $postCode;
313
-
314
-		return $this;
315
-	}
316
-
317
-	/**
318
-	 * @return string|null
319
-	 */
320
-	public function getLandline():? string
321
-	{
322
-		return $this->landline;
323
-	}
324
-
325
-	/**
326
-	 * @param string|null $landline
327
-	 * @return AddressInterface
328
-	 */
329
-	public function setLandline(?string $landline): AddressInterface
330
-	{
331
-		$this->landline = $landline;
332
-
333
-		return $this;
334
-	}
335
-
336
-	/**
337
-	 * @return string|null
338
-	 */
339
-	public function getAddressLine1():? string
340
-	{
341
-		return $this->addressLine1;
342
-	}
343
-
344
-	/**
345
-	 * @param string|null $addressLine1
346
-	 * @return AddressInterface
347
-	 */
348
-	public function setAddressLine1(?string $addressLine1): AddressInterface
349
-	{
350
-		$this->addressLine1 = $addressLine1;
351
-
352
-		return $this;
353
-	}
354
-
355
-	/**
356
-	 * @return string|null
357
-	 */
358
-	public function getAddressLine2():? string
359
-	{
360
-		return $this->addressLine2;
361
-	}
362
-
363
-	/**
364
-	 * @param string|null $addressLine2
365
-	 * @return AddressInterface
366
-	 */
367
-	public function setAddressLine2(?string $addressLine2): AddressInterface
368
-	{
369
-		$this->addressLine2 = $addressLine2;
370
-
371
-		return $this;
372
-	}
373
-
374
-	/**
375
-	 * Get address State
376
-	 *
377
-	 * @return  string|null
378
-	 */
379
-	public function getState(): ?string
380
-	{
381
-		return $this->state;
382
-	}
383
-
384
-	/**
385
-	 * Set address State
386
-	 *
387
-	 * @param  string|null  $state  Address State
388
-	 *
389
-	 * @return  AddressInterface
390
-	 */
391
-	public function setState(?string $state): AddressInterface
392
-	{
393
-		$this->state = $state;
394
-
395
-		return $this;
396
-	}
11
+    /**
12
+     * First address line
13
+     *
14
+     * @var string $line1
15
+     */
16
+    protected $line1;
17
+    /**
18
+     * Second address line
19
+     *
20
+     * @var string
21
+     */
22
+    protected $line2;
23
+    /**
24
+     * Address Country
25
+     *
26
+     * @var string
27
+     */
28
+    protected $country;
29
+    /**
30
+     * Address postal code
31
+     *
32
+     * @var string
33
+     */
34
+    protected $postalCode;
35
+    /**
36
+     * Address City
37
+     *
38
+     * @var string
39
+     */
40
+    protected $city;
41
+    /**
42
+     * @var string
43
+     */
44
+    protected $countryEnName;
45
+    /**
46
+     * @var string
47
+     */
48
+    protected $countryNativeName;
49
+    /**
50
+     * @var integer
51
+     */
52
+    protected $regionId;
53
+    /**
54
+     * @var string
55
+     */
56
+    protected $regionName;
57
+    /**
58
+     * @var string
59
+     */
60
+    protected $postCode;
61
+    /**
62
+     * @var string
63
+     */
64
+    protected $landline;
65
+    /**
66
+     * @var string
67
+     */
68
+    protected $addressLine1;
69
+    /**
70
+     * @var string
71
+     */
72
+    protected $addressLine2;
73
+    /**
74
+     * Address State
75
+     *
76
+     * @var string
77
+     */
78
+    protected $state;
79
+
80
+    /**
81
+     * Address constructor.
82
+     * @param array|null $data
83
+     */
84
+    function __construct(?array $data = [])
85
+    {
86
+        $this->setAddressLine1($data['address_line1']??null);
87
+        $this->setAddressLine2($data['address_line2']??null);
88
+        $this->setCity($data['city']??null);
89
+        $this->setCountry($data['country']??null);
90
+        $this->setCountryEnName($data['country_en_name']??null);
91
+        $this->setCountryNativeName($data['country_native_name']??null);
92
+        $this->setRegionId($data['region_id']??null);
93
+        $this->setRegionName($data['region_name']??null);
94
+        $this->setPostCode($data['post_code']??null);
95
+        $this->setLandline($data['landline']??null);
96
+        $this->setLine1($data['line1']??null);
97
+        $this->setLine2($data['line2']??null);
98
+        $this->setPostalCode($data['postal_code']??null);
99
+        $this->setState($data['state']??null);
100
+    }
101
+
102
+    /**
103
+     * Get $line1
104
+     *
105
+     * @return  string
106
+     */
107
+    public function getLine1(): ?string
108
+    {
109
+        return $this->line1;
110
+    }
111
+
112
+    /**
113
+     * Set $line1
114
+     *
115
+     * @param  string  $line1  $line1
116
+     *
117
+     * @return  AddressInterface
118
+     */
119
+    public function setLine1(?string $line1): AddressInterface
120
+    {
121
+        $this->line1 = $line1;
122
+
123
+        return $this;
124
+    }
125
+
126
+    /**
127
+     * Get second address line
128
+     *
129
+     * @return  string
130
+     */
131
+    public function getLine2(): ?string
132
+    {
133
+        return $this->line2;
134
+    }
135
+
136
+    /**
137
+     * Set second address line
138
+     *
139
+     * @param  string  $line2  Second address line
140
+     *
141
+     * @return  AddressInterface
142
+     */
143
+    public function setLine2(?string $line2): AddressInterface
144
+    {
145
+        $this->line2 = $line2;
146
+
147
+        return $this;
148
+    }
149
+
150
+    /**
151
+     * Get address Country
152
+     *
153
+     * @return  string
154
+     */
155
+    public function getCountry(): ?string
156
+    {
157
+        return $this->country;
158
+    }
159
+
160
+    /**
161
+     * Set address Country
162
+     *
163
+     * @param  string  $country  Address Country
164
+     *
165
+     * @return  AddressInterface
166
+     */
167
+    public function setCountry(?string $country): AddressInterface
168
+    {
169
+        $this->country = $country;
170
+
171
+        return $this;
172
+    }
173
+
174
+    /**
175
+     * Get address postal code
176
+     *
177
+     * @return  string
178
+     */
179
+    public function getPostalCode(): ?string
180
+    {
181
+        return $this->postalCode;
182
+    }
183
+
184
+    /**
185
+     * Set address postal code
186
+     *
187
+     * @param  string  $postalCode  Address postal code
188
+     *
189
+     * @return  AddressInterface
190
+     */
191
+    public function setPostalCode(?string $postalCode): AddressInterface
192
+    {
193
+        $this->postalCode = $postalCode;
194
+
195
+        return $this;
196
+    }
197
+
198
+    /**
199
+     * Get address City
200
+     *
201
+     * @return  string
202
+     */
203
+    public function getCity(): ?string
204
+    {
205
+        return $this->city;
206
+    }
207
+
208
+    /**
209
+     * Set address City
210
+     *
211
+     * @param  string  $city  Address City
212
+     *
213
+     * @return  AddressInterface
214
+     */
215
+    public function setCity(?string $city): AddressInterface
216
+    {
217
+        $this->city = $city;
218
+
219
+        return $this;
220
+    }
221
+
222
+    /**
223
+     * @return mixed
224
+     */
225
+    public function getCountryEnName():? string
226
+    {
227
+        return $this->countryEnName;
228
+    }
229
+
230
+    /**
231
+     * @param mixed $countryEnName
232
+     * @return AddressInterface
233
+     */
234
+    public function setCountryEnName($countryEnName): AddressInterface
235
+    {
236
+        $this->countryEnName = $countryEnName;
237
+
238
+        return $this;
239
+    }
240
+
241
+    /**
242
+     * @return mixed
243
+     */
244
+    public function getCountryNativeName():? string
245
+    {
246
+        return $this->countryNativeName;
247
+    }
248
+
249
+    /**
250
+     * @param mixed $countryNativeName
251
+     * @return Address
252
+     */
253
+    public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
+    {
255
+        $this->countryNativeName = $countryNativeName;
256
+
257
+        return $this;
258
+    }
259
+
260
+    /**
261
+     * @return number|null
262
+     */
263
+    public function getRegionId():? number
264
+    {
265
+        return $this->regionId;
266
+    }
267
+
268
+    /**
269
+     * @param number|null $regionId
270
+     * @return Address
271
+     */
272
+    public function setRegionId(?number $regionId): AddressInterface
273
+    {
274
+        $this->regionId = $regionId;
275
+
276
+        return $this;
277
+    }
278
+
279
+    /**
280
+     * @return string|null
281
+     */
282
+    public function getRegionName():? string
283
+    {
284
+        return $this->regionName;
285
+    }
286
+
287
+    /**
288
+     * @param string|null $regionName
289
+     * @return AddressInterface
290
+     */
291
+    public function setRegionName(?string $regionName): AddressInterface
292
+    {
293
+        $this->regionName = $regionName;
294
+
295
+        return $this;
296
+    }
297
+
298
+    /**
299
+     * @return string|null
300
+     */
301
+    public function getPostCode():? string
302
+    {
303
+        return $this->postCode;
304
+    }
305
+
306
+    /**
307
+     * @param string|null $postCode
308
+     * @return AddressInterface
309
+     */
310
+    public function setPostCode(?string $postCode): AddressInterface
311
+    {
312
+        $this->postCode = $postCode;
313
+
314
+        return $this;
315
+    }
316
+
317
+    /**
318
+     * @return string|null
319
+     */
320
+    public function getLandline():? string
321
+    {
322
+        return $this->landline;
323
+    }
324
+
325
+    /**
326
+     * @param string|null $landline
327
+     * @return AddressInterface
328
+     */
329
+    public function setLandline(?string $landline): AddressInterface
330
+    {
331
+        $this->landline = $landline;
332
+
333
+        return $this;
334
+    }
335
+
336
+    /**
337
+     * @return string|null
338
+     */
339
+    public function getAddressLine1():? string
340
+    {
341
+        return $this->addressLine1;
342
+    }
343
+
344
+    /**
345
+     * @param string|null $addressLine1
346
+     * @return AddressInterface
347
+     */
348
+    public function setAddressLine1(?string $addressLine1): AddressInterface
349
+    {
350
+        $this->addressLine1 = $addressLine1;
351
+
352
+        return $this;
353
+    }
354
+
355
+    /**
356
+     * @return string|null
357
+     */
358
+    public function getAddressLine2():? string
359
+    {
360
+        return $this->addressLine2;
361
+    }
362
+
363
+    /**
364
+     * @param string|null $addressLine2
365
+     * @return AddressInterface
366
+     */
367
+    public function setAddressLine2(?string $addressLine2): AddressInterface
368
+    {
369
+        $this->addressLine2 = $addressLine2;
370
+
371
+        return $this;
372
+    }
373
+
374
+    /**
375
+     * Get address State
376
+     *
377
+     * @return  string|null
378
+     */
379
+    public function getState(): ?string
380
+    {
381
+        return $this->state;
382
+    }
383
+
384
+    /**
385
+     * Set address State
386
+     *
387
+     * @param  string|null  $state  Address State
388
+     *
389
+     * @return  AddressInterface
390
+     */
391
+    public function setState(?string $state): AddressInterface
392
+    {
393
+        $this->state = $state;
394
+
395
+        return $this;
396
+    }
397 397
 }
Please login to merge, or discard this patch.
src/Customer/Card/CardClient.php 1 patch
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -16,84 +16,84 @@
 block discarded – undo
16 16
         ];
17 17
     }
18 18
 
19
-	/**
20
-	 * Retieve a card from server and fill the $card Object with response.
21
-	 *
22
-	 * @param CardInterface $card
23
-	 * @param CustomerInterface $customer
24
-	 * @param ContextInterface $context
25
-	 * @param AccessToken $accessToken
26
-	 * @return CardInterface
27
-	 */
28
-	public static function get(
29
-		CardInterface $card,
30
-		CustomerInterface $customer,
31
-		ContextInterface $context,
32
-		AccessToken $accessToken
33
-	): CardInterface {
34
-		// TODO: Implement get() method.
35
-	}
19
+    /**
20
+     * Retieve a card from server and fill the $card Object with response.
21
+     *
22
+     * @param CardInterface $card
23
+     * @param CustomerInterface $customer
24
+     * @param ContextInterface $context
25
+     * @param AccessToken $accessToken
26
+     * @return CardInterface
27
+     */
28
+    public static function get(
29
+        CardInterface $card,
30
+        CustomerInterface $customer,
31
+        ContextInterface $context,
32
+        AccessToken $accessToken
33
+    ): CardInterface {
34
+        // TODO: Implement get() method.
35
+    }
36 36
 
37
-	/**
38
-	 * Delete an card from server.
39
-	 *
40
-	 * @param CardInterface $card
41
-	 * @param CustomerInterface $customer
42
-	 * @param ContextInterface $context
43
-	 * @param AccessToken $accessToken
44
-	 * @return void
45
-	 */
46
-	public static function delete(
47
-		CardInterface $card,
48
-		CustomerInterface $customer,
49
-		ContextInterface $context,
50
-		AccessToken $accessToken
51
-	): void {
52
-		// TODO: Implement delete() method.
53
-	}
37
+    /**
38
+     * Delete an card from server.
39
+     *
40
+     * @param CardInterface $card
41
+     * @param CustomerInterface $customer
42
+     * @param ContextInterface $context
43
+     * @param AccessToken $accessToken
44
+     * @return void
45
+     */
46
+    public static function delete(
47
+        CardInterface $card,
48
+        CustomerInterface $customer,
49
+        ContextInterface $context,
50
+        AccessToken $accessToken
51
+    ): void {
52
+        // TODO: Implement delete() method.
53
+    }
54 54
 
55
-	/**
56
-	 * CheckoutClientInterface constructor.
57
-	 * @param ContextInterface $context
58
-	 */
59
-	public function __construct(ContextInterface $context)
60
-	{
61
-		parent::__construct($context);
62
-	}
55
+    /**
56
+     * CheckoutClientInterface constructor.
57
+     * @param ContextInterface $context
58
+     */
59
+    public function __construct(ContextInterface $context)
60
+    {
61
+        parent::__construct($context);
62
+    }
63 63
 
64
-	/**
65
-	 * Return last response of client
66
-	 * @return ResponseInterface
67
-	 */
68
-	function getLastResponse(): ResponseInterface
69
-	{
70
-		// TODO: Implement getLastResponse() method.
71
-	}
64
+    /**
65
+     * Return last response of client
66
+     * @return ResponseInterface
67
+     */
68
+    function getLastResponse(): ResponseInterface
69
+    {
70
+        // TODO: Implement getLastResponse() method.
71
+    }
72 72
 
73
-	/**
74
-	 * return the context used to created the client.
75
-	 * @return ContextInterface
76
-	 */
77
-	function getContext(): ContextInterface
78
-	{
79
-		// TODO: Implement getContext() method.
80
-	}
73
+    /**
74
+     * return the context used to created the client.
75
+     * @return ContextInterface
76
+     */
77
+    function getContext(): ContextInterface
78
+    {
79
+        // TODO: Implement getContext() method.
80
+    }
81 81
 
82
-	/**
83
-	 * Create a new card resource and fill the $card Object with response.
84
-	 *
85
-	 * @param CardInterface $card
86
-	 * @param CustomerInterface $costumer
87
-	 * @param ContextInterface $context
88
-	 * @param AccessToken $accessToken
89
-	 * @return CardInterface
90
-	 */
91
-	public static function create(
92
-		CardInterface $card,
93
-		CustomerInterface $costumer,
94
-		ContextInterface $context,
95
-		AccessToken $accessToken
96
-	): CardInterface {
97
-		// TODO: Implement create() method.
98
-	}
82
+    /**
83
+     * Create a new card resource and fill the $card Object with response.
84
+     *
85
+     * @param CardInterface $card
86
+     * @param CustomerInterface $costumer
87
+     * @param ContextInterface $context
88
+     * @param AccessToken $accessToken
89
+     * @return CardInterface
90
+     */
91
+    public static function create(
92
+        CardInterface $card,
93
+        CustomerInterface $costumer,
94
+        ContextInterface $context,
95
+        AccessToken $accessToken
96
+    ): CardInterface {
97
+        // TODO: Implement create() method.
98
+    }
99 99
 }
Please login to merge, or discard this patch.