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

BillingAddressResource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 26
dl 0
loc 41
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace DansMaCulotte\Monetico\Resources;
4
5
use DansMaCulotte\Monetico\Exceptions\Exception;
6
7
class BillingAddressResource 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
        'mobilePhone',
28
        'homePhone',
29
        'workPhone',
30
    ];
31
32
    /**
33
     * Client constructor.
34
     *
35
     * @param string $addressLine
36
     * @param string $city
37
     * @param string $postalCode
38
     * @param string $country
39
     * @throws Exception
40
     */
41
    public function __construct(string $addressLine, string $city, string $postalCode, string $country)
42
    {
43
        parent::__construct([
44
            'addressLine1' => $addressLine,
45
            'city' => $city,
46
            'postalCode' => $postalCode,
47
            'country' => $country,
48
        ]);
49
    }
50
}
51