|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Onend\PayPal\Payment\Model; |
|
4
|
|
|
|
|
5
|
|
|
use JMS\Serializer\Annotation as JMS; |
|
6
|
|
|
|
|
7
|
|
|
class Sale extends AbstractRelatedResource |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* @JMS\Type("string") |
|
11
|
|
|
* |
|
12
|
|
|
* @var string |
|
13
|
|
|
*/ |
|
14
|
|
|
protected $id; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* @JMS\Type("string") |
|
18
|
|
|
* @JMS\SerializedName("create_time") |
|
19
|
|
|
* |
|
20
|
|
|
* @var string |
|
21
|
|
|
*/ |
|
22
|
|
|
protected $createTime; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @JMS\Type("string") |
|
26
|
|
|
* @JMS\SerializedName("update_time") |
|
27
|
|
|
* |
|
28
|
|
|
* @var string |
|
29
|
|
|
*/ |
|
30
|
|
|
protected $updateTime; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @JMS\Type("string") |
|
34
|
|
|
* @JMS\SerializedName("state") |
|
35
|
|
|
* |
|
36
|
|
|
* @var string |
|
37
|
|
|
*/ |
|
38
|
|
|
protected $status; |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* @JMS\Type("Onend\PayPal\Payment\Model\Amount") |
|
42
|
|
|
* |
|
43
|
|
|
* @var Amount |
|
44
|
|
|
*/ |
|
45
|
|
|
protected $amount; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @JMS\Type("string") |
|
49
|
|
|
* @JMS\SerializedName("parent_payment") |
|
50
|
|
|
* |
|
51
|
|
|
* @var string |
|
52
|
|
|
*/ |
|
53
|
|
|
protected $parentPayment; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @JMS\Type("array<Onend\PayPal\Payment\Model\Link>") |
|
57
|
|
|
* |
|
58
|
|
|
* @var array |
|
59
|
|
|
*/ |
|
60
|
|
|
protected $links; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @param Amount $amount |
|
64
|
|
|
*/ |
|
65
|
|
|
public function setAmount(Amount $amount) |
|
66
|
|
|
{ |
|
67
|
|
|
$this->amount = $amount; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @return Amount |
|
72
|
|
|
*/ |
|
73
|
|
|
public function getAmount() |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->amount; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @param string $createTime |
|
80
|
|
|
*/ |
|
81
|
|
|
public function setCreateTime($createTime) |
|
82
|
|
|
{ |
|
83
|
|
|
$this->createTime = $createTime; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @return string |
|
88
|
|
|
*/ |
|
89
|
|
|
public function getCreateTime() |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->createTime; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @param string $id |
|
96
|
|
|
*/ |
|
97
|
|
|
public function setId($id) |
|
98
|
|
|
{ |
|
99
|
|
|
$this->id = $id; |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* @return string |
|
104
|
|
|
*/ |
|
105
|
|
|
public function getId() |
|
106
|
|
|
{ |
|
107
|
|
|
return $this->id; |
|
108
|
|
|
} |
|
109
|
|
|
|
|
110
|
|
|
/** |
|
111
|
|
|
* @param Link[] $links |
|
112
|
|
|
*/ |
|
113
|
|
|
public function setLinks(array $links) |
|
114
|
|
|
{ |
|
115
|
|
|
$this->links = $links; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* @return Link[] |
|
120
|
|
|
*/ |
|
121
|
|
|
public function getLinks() |
|
122
|
|
|
{ |
|
123
|
|
|
return $this->links; |
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
/** |
|
127
|
|
|
* @param string $parentPayment |
|
128
|
|
|
*/ |
|
129
|
|
|
public function setParentPayment($parentPayment) |
|
130
|
|
|
{ |
|
131
|
|
|
$this->parentPayment = $parentPayment; |
|
132
|
|
|
} |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* @return string |
|
136
|
|
|
*/ |
|
137
|
|
|
public function getParentPayment() |
|
138
|
|
|
{ |
|
139
|
|
|
return $this->parentPayment; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* @param string $state |
|
144
|
|
|
*/ |
|
145
|
|
|
public function setStatus($state) |
|
146
|
|
|
{ |
|
147
|
|
|
$this->status = $state; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* @return string |
|
152
|
|
|
*/ |
|
153
|
|
|
public function getStatus() |
|
154
|
|
|
{ |
|
155
|
|
|
return $this->status; |
|
156
|
|
|
} |
|
157
|
|
|
|
|
158
|
|
|
/** |
|
159
|
|
|
* @param string $updateTime |
|
160
|
|
|
*/ |
|
161
|
|
|
public function setUpdateTime($updateTime) |
|
162
|
|
|
{ |
|
163
|
|
|
$this->updateTime = $updateTime; |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
/** |
|
167
|
|
|
* @return string |
|
168
|
|
|
*/ |
|
169
|
|
|
public function getUpdateTime() |
|
170
|
|
|
{ |
|
171
|
|
|
return $this->updateTime; |
|
172
|
|
|
} |
|
173
|
|
|
} |
|
174
|
|
|
|