Transaction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 135
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 135
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createInstance() 0 10 2
1
<?php
2
3
namespace Padosoft\AffiliateNetwork;
4
5
/**
6
 * Class Transaction
7
 * @package Padosoft\AffiliateNetwork
8
 */
9
class Transaction
10
{
11
    /**
12
     * @var string
13
     */
14
    public $currency = '';
15
16
    /**
17
     * @var string
18
     */
19
    public $status = '';
20
21
    /**
22
     * @var float
23
     */
24
    public $amount = 0.00;
25
26
    /**
27
     * @var string
28
     */
29
    public $custom_ID = '';
30
31
    /**
32
     * @var string
33
     */
34
    public $title = '';
35
36
    /**
37
     * @var string
38
     */
39
    public $unique_ID = '';
40
41
    /**
42
     * @var double
43
     */
44
    public $commission = 0.00;
45
46
    /**
47
     * @var string
48
     */
49
    public $date = '';
50
51
    /**
52
     * @var string
53
     */
54
    public $click_date = '';        // Future use - <PN>
55
56
    /**
57
     * @var string
58
     */
59
    public $update_date = '';       // Future use - <PN>
60
61
    /**
62
     * @var int
63
     */
64
    public $merchant_ID = 0;
65
66
    /**
67
     * @var boolean
68
     */
69
    public $approved = false;
70
71
    /**
72
     * @var boolean
73
     */
74
    public $paid = false;       // Future use - <PN>
75
76
    /**
77
     * @var string
78
     */
79
    public $paid_date = '';       // Future use - <PN>
80
81
    /**
82
     * @var array
83
     */
84
    public $reportItems = array();
85
86
    /**
87
     * @var string
88
     */
89
    public $transaction_ID = '';
90
91
    /**
92
     * @var integer
93
     */
94
    public $affiliate_ID = 0;
95
96
    /**
97
     * @var string
98
     */
99
    public $campaign_name = '';
100
101
    /**
102
     * @var string
103
     */
104
    public $program_name = '';
105
106
    /**
107
     * @var string
108
     */
109
    public $referrer = '';
110
111
    /**
112
     * @var string
113
     */
114
    public $IP = '';       // Future use - <PN>
115
116
    /**
117
     * @var string
118
     */
119
    public $user_ID = '';   // Future use - <PN>
120
121
    /**
122
     * @var bool
123
     */
124
    public $original = true;    // Used by Commission Junction - added 2018-07-13 <PN>
125
126
    public $commission_ID = ''; // Used by Publicideas - added 2019-08-12 <JC>
127
128
    /**
129
     * @method createInstance
130
     * @return obj istance
131
     */
132
    public static function createInstance()
133
    {
134
        $obj = null;
135
        try {
136
            $obj = new Transaction();
137
        } catch (\Exception $e) {
138
            throw new \Exception('Error creating instance Transaction - ' . $e->getMessage());
139
        }
140
        return $obj;
141
    }
142
143
}
144