1
|
|
|
<?php |
2
|
|
|
namespace Paranoia\Request; |
3
|
|
|
|
4
|
|
|
use Paranoia\Request\Resource\ResourceInterface; |
5
|
|
|
use Paranoia\TransferInterface; |
6
|
|
|
|
7
|
|
|
class Request implements TransferInterface |
8
|
|
|
{ |
9
|
|
|
/** @var string */ |
10
|
|
|
private $orderId; |
11
|
|
|
|
12
|
|
|
/** @var float */ |
13
|
|
|
private $amount; |
14
|
|
|
|
15
|
|
|
/** @var string */ |
16
|
|
|
private $currency; |
17
|
|
|
|
18
|
|
|
/** @var integer */ |
19
|
|
|
private $installment; |
20
|
|
|
|
21
|
|
|
/** @var string */ |
22
|
|
|
private $transactionId; |
23
|
|
|
|
24
|
|
|
/** @var string */ |
25
|
|
|
private $authCode; |
26
|
|
|
|
27
|
|
|
/** @var ResourceInterface */ |
28
|
|
|
private $resource; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public function getOrderId() |
34
|
|
|
{ |
35
|
|
|
return $this->orderId; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param string $orderId |
40
|
|
|
* @return Request |
41
|
|
|
*/ |
42
|
|
|
public function setOrderId($orderId) |
43
|
|
|
{ |
44
|
|
|
$this->orderId = $orderId; |
45
|
|
|
return $this; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return float |
50
|
|
|
*/ |
51
|
|
|
public function getAmount() |
52
|
|
|
{ |
53
|
|
|
return $this->amount; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @param float $amount |
58
|
|
|
* @return Request |
59
|
|
|
*/ |
60
|
|
|
public function setAmount($amount) |
61
|
|
|
{ |
62
|
|
|
$this->amount = $amount; |
63
|
|
|
return $this; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return string |
68
|
|
|
*/ |
69
|
|
|
public function getCurrency() |
70
|
|
|
{ |
71
|
|
|
return $this->currency; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param string $currency |
76
|
|
|
* @return Request |
77
|
|
|
*/ |
78
|
|
|
public function setCurrency($currency) |
79
|
|
|
{ |
80
|
|
|
$this->currency = $currency; |
81
|
|
|
return $this; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @return int |
86
|
|
|
*/ |
87
|
|
|
public function getInstallment() |
88
|
|
|
{ |
89
|
|
|
return $this->installment; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @param int $installment |
94
|
|
|
* @return Request |
95
|
|
|
*/ |
96
|
|
|
public function setInstallment($installment) |
97
|
|
|
{ |
98
|
|
|
$this->installment = $installment; |
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return string |
104
|
|
|
*/ |
105
|
|
|
public function getTransactionId() |
106
|
|
|
{ |
107
|
|
|
return $this->transactionId; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param string $transactionId |
112
|
|
|
* @return Request |
113
|
|
|
*/ |
114
|
|
|
public function setTransactionId($transactionId) |
115
|
|
|
{ |
116
|
|
|
$this->transactionId = $transactionId; |
117
|
|
|
return $this; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return string |
122
|
|
|
*/ |
123
|
|
|
public function getAuthCode() |
124
|
|
|
{ |
125
|
|
|
return $this->authCode; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param string $authCode |
130
|
|
|
* @return Request |
131
|
|
|
*/ |
132
|
|
|
public function setAuthCode($authCode) |
133
|
|
|
{ |
134
|
|
|
$this->authCode = $authCode; |
135
|
|
|
return $this; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return ResourceInterface |
140
|
|
|
*/ |
141
|
|
|
public function getResource() |
142
|
|
|
{ |
143
|
|
|
return $this->resource; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param ResourceInterface $resource |
148
|
|
|
* @return Request |
149
|
|
|
*/ |
150
|
|
|
public function setResource($resource) |
151
|
|
|
{ |
152
|
|
|
$this->resource = $resource; |
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
} |
156
|
|
|
|