Completed
Push — gocardless-upgrade ( ab99fa )
by Arthur
02:58
created

GoCardlessWebhookParser::setBills()   B

Complexity

Conditions 5
Paths 9

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 9
nc 9
nop 1
1
<?php namespace BB\Services\Payment;
2
3
class GoCardlessWebhookParser
4
{
5
6
    /**
7
     * @var array
8
     */
9
    private $response;
10
11
    /**
12
     * @var string
13
     */
14
    private $action = null;
15
16
    /**
17
     * @var string
18
     */
19
    private $resourceType = null;
20
21
    /**
22
     * @var array
23
     */
24
    private $bills = [];
25
26
    /**
27
     * @var array
28
     */
29
    private $subscriptions = [];
30
31
    /**
32
     * @var array
33
     */
34
    private $preAuthList = [];
35
36
    public function parseResponse(array $response)
37
    {
38
        $this->response = $response;
39
40
        $this->action = $this->response['action'];
41
        $this->resourceType = $this->response['resource_type'];
42
    }
43
44
    /**
45
     * @return null
46
     */
47
    public function getAction()
48
    {
49
        return $this->action;
50
    }
51
52
    /**
53
     * @return null
54
     */
55
    public function getResourceType()
56
    {
57
        return $this->resourceType;
58
    }
59
60
    /**
61
     * @return array
62
     */
63
    public function getBills()
64
    {
65
        return $this->bills;
66
    }
67
68
    /**
69
     * @return array
70
     */
71
    public function getSubscriptions()
72
    {
73
        return $this->subscriptions;
74
    }
75
76
    /**
77
     * @return array
78
     */
79
    public function getPreAuthList()
80
    {
81
        return $this->preAuthList;
82
    }
83
}
84