Completed
Push — master ( 9be2e3...3a8fde )
by Gaël
14:21
created

ShippingAddressResource::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 5
nc 1
nop 4
dl 0
loc 7
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace DansMaCulotte\Monetico\Resources;
4
5
use DansMaCulotte\Monetico\Exceptions\Exception;
6
7
class ShippingAddressResource extends Ressource
8
{
9
    /** @var array */
10
    protected $keys = [
11
        'civility',
12
        'name',
13
        'firstName',
14
        'lastName',
15
        'middleName',
16
        'address',
17
        'addressLine1',
18
        'addressLine2',
19
        'addressLine3',
20
        'city',
21
        'postalCode',
22
        'country',
23
        'stateOrProvince',
24
        'countrySubdivision',
25
        'email',
26
        'phone',
27
        'shipIndicator',
28
        'deliveryTimeframe',
29
        'firstUseDate',
30
        'matchBillingAddress',
31
    ];
32
33
    /**
34
     * Client constructor.
35
     *
36
     * @param string $addressLine
37
     * @param string $city
38
     * @param string $postalCode
39
     * @param string $country
40
     * @throws Exception
41
     */
42
    public function __construct(string $addressLine, string $city, string $postalCode, string $country)
43
    {
44
        parent::__construct([
45
            'addressLine1' => $addressLine,
46
            'city' => $city,
47
            'postalCode' => $postalCode,
48
            'country' => $country,
49
        ]);
50
    }
51
}
52