Completed
Push — master ( 301374...1d98cc )
by Olivier
01:46
created

CustomerDeleted::isDeleted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Shapin\Stripe\Model\Customer;
11
12
use Shapin\Stripe\Exception\LogicException;
13
use Shapin\Stripe\Model\ContainsMetadata;
14
use Shapin\Stripe\Model\CreatableFromArray;
15
use Shapin\Stripe\Model\LivemodeTrait;
16
use Shapin\Stripe\Model\MetadataTrait;
17
use Shapin\Stripe\Model\MetadataCollection;
18
use Shapin\Stripe\Model\Source\Source;
19
use Shapin\Stripe\Model\Source\SourceCollection;
20
use Shapin\Stripe\Model\Subscription\Subscription;
21
use Shapin\Stripe\Model\Subscription\SubscriptionCollection;
22
use Money\Currency;
23
24
final class CustomerDeleted implements CreatableFromArray
25
{
26
    /**
27
     * @var string
28
     */
29
    private $id;
30
31
    /**
32
     * @var bool
33
     */
34
    private $deleted;
35
36 1
    private function __construct()
37
    {
38 1
    }
39
40 1
    public static function createFromArray(array $data): self
41
    {
42 1
        $model = new self();
43 1
        $model->id = $data['id'];
44 1
        $model->deleted = (bool) $data['deleted'];
45
46 1
        return $model;
47
    }
48
49 1
    public function getId(): string
50
    {
51 1
        return $this->id;
52
    }
53
54 1
    public function isDeleted(): bool
55
    {
56 1
        return $this->deleted;
57
    }
58
}
59