Passed
Push — master ( 96d33b...43186b )
by Gabriel
13:27
created

NotificationData   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace ByTIC\Payments\Actions\GatewayNotifications;
4
5
use ByTIC\Payments\Gateways\Providers\AbstractGateway\Message\Traits\HasModelProcessedResponse;
6
use ByTIC\Payments\Models\Purchase\Traits\IsPurchasableModelTrait;
7
use ByTIC\Payments\Models\PurchaseSessions\PurchaseSessionTrait;
8
use ByTIC\Payments\Models\Subscriptions\Subscription;
9
use ByTIC\Payments\Models\Tokens\Token;
10
use ByTIC\Payments\Models\Transactions\Transaction;
11
12
/**
13
 * Class NotificationData
14
 * @package ByTIC\Payments\Actions\GatewayNotifications
15
 */
16
class NotificationData
17
{
18
    /**
19
     * @var string
20
     */
21
    public $type;
22
23
    /**
24
     * @var \Omnipay\Common\Message\AbstractResponse|HasModelProcessedResponse
25
     */
26
    public $response;
27
28
    /**
29
     * @var IsPurchasableModelTrait
30
     */
31
    public $purchase;
32
33
    /**
34
     * @var PurchaseSessionTrait
35
     */
36
    public $session;
37
38
    /**
39
     * @var Token|null
40
     */
41
    public $token = null;
42
43
    /**
44
     * @var Transaction|null
45
     */
46
    public $transaction = null;
47
48
    /**
49
     * @var Subscription|null
50
     */
51
    public $subscription = null;
52
53
    /**
54
     * NotificationData constructor.
55
     * @param string $type
56
     * @param HasModelProcessedResponse|\Omnipay\Common\Message\AbstractResponse $response
57
     * @param IsPurchasableModelTrait $purchase
58
     */
59
    public function __construct(string $type, $response, $purchase)
60
    {
61
        $this->type = $type;
62
        $this->response = $response;
63
        $this->purchase = $purchase;
64
    }
65
66
}
67