|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace PayPal\StructType; |
|
4
|
|
|
|
|
5
|
|
|
use \WsdlToPhp\PackageBase\AbstractStructBase; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* This class stands for BillingAgreementDetailsType StructType |
|
9
|
|
|
* @subpackage Structs |
|
10
|
|
|
* @author WsdlToPhp <[email protected]> |
|
11
|
|
|
*/ |
|
12
|
|
|
class BillingAgreementDetailsType extends AbstractStructBase |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* The BillingType |
|
16
|
|
|
* Meta information extracted from the WSDL |
|
17
|
|
|
* - maxOccurs: 1 |
|
18
|
|
|
* - minOccurs: 1 |
|
19
|
|
|
* @var string |
|
20
|
|
|
*/ |
|
21
|
|
|
public $BillingType; |
|
22
|
|
|
/** |
|
23
|
|
|
* The BillingAgreementDescription |
|
24
|
|
|
* Meta information extracted from the WSDL |
|
25
|
|
|
* - documentation: Only needed for AutoBill billinng type. |
|
26
|
|
|
* - maxOccurs: 1 |
|
27
|
|
|
* - minOccurs: 0 |
|
28
|
|
|
* @var string |
|
29
|
|
|
*/ |
|
30
|
|
|
public $BillingAgreementDescription; |
|
31
|
|
|
/** |
|
32
|
|
|
* The PaymentType |
|
33
|
|
|
* Meta information extracted from the WSDL |
|
34
|
|
|
* - maxOccurs: 1 |
|
35
|
|
|
* - minOccurs: 0 |
|
36
|
|
|
* @var string |
|
37
|
|
|
*/ |
|
38
|
|
|
public $PaymentType; |
|
39
|
|
|
/** |
|
40
|
|
|
* The BillingAgreementCustom |
|
41
|
|
|
* Meta information extracted from the WSDL |
|
42
|
|
|
* - documentation: Custom annotation field for your exclusive use. |
|
43
|
|
|
* - maxOccurs: 1 |
|
44
|
|
|
* - minOccurs: 0 |
|
45
|
|
|
* @var string |
|
46
|
|
|
*/ |
|
47
|
|
|
public $BillingAgreementCustom; |
|
48
|
|
|
/** |
|
49
|
|
|
* The ProductCode |
|
50
|
|
|
* Meta information extracted from the WSDL |
|
51
|
|
|
* - documentation: Businesses will define a code for a product service. In v2/vault endpoint, product_label should be set to the value of product code to retrieve name and desc in the Risk OOB Data request |
|
52
|
|
|
* - maxOccurs: 1 |
|
53
|
|
|
* - minOccurs: 0 |
|
54
|
|
|
* @var string |
|
55
|
|
|
*/ |
|
56
|
|
|
public $ProductCode; |
|
57
|
|
|
/** |
|
58
|
|
|
* The Name |
|
59
|
|
|
* Meta information extracted from the WSDL |
|
60
|
|
|
* - documentation: Free flowing text, a product service name that Business wants to be identify the product service to its buyers. Used in 8Ball for display purpose against the BA/PMT. |
|
61
|
|
|
* - maxOccurs: 1 |
|
62
|
|
|
* - minOccurs: 0 |
|
63
|
|
|
* @var string |
|
64
|
|
|
*/ |
|
65
|
|
|
public $Name; |
|
66
|
|
|
/** |
|
67
|
|
|
* The ChargePattern |
|
68
|
|
|
* Meta information extracted from the WSDL |
|
69
|
|
|
* - documentation: The chargePattern attribute determines the type of FIs to display while setting up Billing Agreement |
|
70
|
|
|
* - maxOccurs: 1 |
|
71
|
|
|
* - minOccurs: 0 |
|
72
|
|
|
* @var string |
|
73
|
|
|
*/ |
|
74
|
|
|
public $ChargePattern; |
|
75
|
|
|
/** |
|
76
|
|
|
* Constructor method for BillingAgreementDetailsType |
|
77
|
|
|
* @uses BillingAgreementDetailsType::setBillingType() |
|
78
|
|
|
* @uses BillingAgreementDetailsType::setBillingAgreementDescription() |
|
79
|
|
|
* @uses BillingAgreementDetailsType::setPaymentType() |
|
80
|
|
|
* @uses BillingAgreementDetailsType::setBillingAgreementCustom() |
|
81
|
|
|
* @uses BillingAgreementDetailsType::setProductCode() |
|
82
|
|
|
* @uses BillingAgreementDetailsType::setName() |
|
83
|
|
|
* @uses BillingAgreementDetailsType::setChargePattern() |
|
84
|
|
|
* @param string $billingType |
|
85
|
|
|
* @param string $billingAgreementDescription |
|
86
|
|
|
* @param string $paymentType |
|
87
|
|
|
* @param string $billingAgreementCustom |
|
88
|
|
|
* @param string $productCode |
|
89
|
|
|
* @param string $name |
|
90
|
|
|
* @param string $chargePattern |
|
91
|
|
|
*/ |
|
92
|
|
|
public function __construct($billingType = null, $billingAgreementDescription = null, $paymentType = null, $billingAgreementCustom = null, $productCode = null, $name = null, $chargePattern = null) |
|
93
|
|
|
{ |
|
94
|
|
|
$this |
|
95
|
|
|
->setBillingType($billingType) |
|
96
|
|
|
->setBillingAgreementDescription($billingAgreementDescription) |
|
97
|
|
|
->setPaymentType($paymentType) |
|
98
|
|
|
->setBillingAgreementCustom($billingAgreementCustom) |
|
99
|
|
|
->setProductCode($productCode) |
|
100
|
|
|
->setName($name) |
|
101
|
|
|
->setChargePattern($chargePattern); |
|
102
|
|
|
} |
|
103
|
|
|
/** |
|
104
|
|
|
* Get BillingType value |
|
105
|
|
|
* @return string |
|
106
|
|
|
*/ |
|
107
|
|
|
public function getBillingType() |
|
108
|
|
|
{ |
|
109
|
|
|
return $this->BillingType; |
|
110
|
|
|
} |
|
111
|
|
|
/** |
|
112
|
|
|
* Set BillingType value |
|
113
|
|
|
* @uses \PayPal\EnumType\BillingCodeType::valueIsValid() |
|
114
|
|
|
* @uses \PayPal\EnumType\BillingCodeType::getValidValues() |
|
115
|
|
|
* @throws \InvalidArgumentException |
|
116
|
|
|
* @param string $billingType |
|
117
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
118
|
|
|
*/ |
|
119
|
|
|
public function setBillingType($billingType = null) |
|
120
|
|
|
{ |
|
121
|
|
|
// validation for constraint: enumeration |
|
122
|
|
|
if (!\PayPal\EnumType\BillingCodeType::valueIsValid($billingType)) { |
|
123
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\BillingCodeType', is_array($billingType) ? implode(', ', $billingType) : var_export($billingType, true), implode(', ', \PayPal\EnumType\BillingCodeType::getValidValues())), __LINE__); |
|
|
|
|
|
|
124
|
|
|
} |
|
125
|
|
|
$this->BillingType = $billingType; |
|
126
|
|
|
return $this; |
|
127
|
|
|
} |
|
128
|
|
|
/** |
|
129
|
|
|
* Get BillingAgreementDescription value |
|
130
|
|
|
* @return string|null |
|
131
|
|
|
*/ |
|
132
|
|
|
public function getBillingAgreementDescription() |
|
133
|
|
|
{ |
|
134
|
|
|
return $this->BillingAgreementDescription; |
|
135
|
|
|
} |
|
136
|
|
|
/** |
|
137
|
|
|
* Set BillingAgreementDescription value |
|
138
|
|
|
* @param string $billingAgreementDescription |
|
139
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
140
|
|
|
*/ |
|
141
|
|
|
public function setBillingAgreementDescription($billingAgreementDescription = null) |
|
142
|
|
|
{ |
|
143
|
|
|
// validation for constraint: string |
|
144
|
|
|
if (!is_null($billingAgreementDescription) && !is_string($billingAgreementDescription)) { |
|
|
|
|
|
|
145
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($billingAgreementDescription, true), gettype($billingAgreementDescription)), __LINE__); |
|
146
|
|
|
} |
|
147
|
|
|
$this->BillingAgreementDescription = $billingAgreementDescription; |
|
148
|
|
|
return $this; |
|
149
|
|
|
} |
|
150
|
|
|
/** |
|
151
|
|
|
* Get PaymentType value |
|
152
|
|
|
* @return string|null |
|
153
|
|
|
*/ |
|
154
|
|
|
public function getPaymentType() |
|
155
|
|
|
{ |
|
156
|
|
|
return $this->PaymentType; |
|
157
|
|
|
} |
|
158
|
|
|
/** |
|
159
|
|
|
* Set PaymentType value |
|
160
|
|
|
* @uses \PayPal\EnumType\MerchantPullPaymentCodeType::valueIsValid() |
|
161
|
|
|
* @uses \PayPal\EnumType\MerchantPullPaymentCodeType::getValidValues() |
|
162
|
|
|
* @throws \InvalidArgumentException |
|
163
|
|
|
* @param string $paymentType |
|
164
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
165
|
|
|
*/ |
|
166
|
|
|
public function setPaymentType($paymentType = null) |
|
167
|
|
|
{ |
|
168
|
|
|
// validation for constraint: enumeration |
|
169
|
|
|
if (!\PayPal\EnumType\MerchantPullPaymentCodeType::valueIsValid($paymentType)) { |
|
170
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\MerchantPullPaymentCodeType', is_array($paymentType) ? implode(', ', $paymentType) : var_export($paymentType, true), implode(', ', \PayPal\EnumType\MerchantPullPaymentCodeType::getValidValues())), __LINE__); |
|
|
|
|
|
|
171
|
|
|
} |
|
172
|
|
|
$this->PaymentType = $paymentType; |
|
173
|
|
|
return $this; |
|
174
|
|
|
} |
|
175
|
|
|
/** |
|
176
|
|
|
* Get BillingAgreementCustom value |
|
177
|
|
|
* @return string|null |
|
178
|
|
|
*/ |
|
179
|
|
|
public function getBillingAgreementCustom() |
|
180
|
|
|
{ |
|
181
|
|
|
return $this->BillingAgreementCustom; |
|
182
|
|
|
} |
|
183
|
|
|
/** |
|
184
|
|
|
* Set BillingAgreementCustom value |
|
185
|
|
|
* @param string $billingAgreementCustom |
|
186
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
187
|
|
|
*/ |
|
188
|
|
|
public function setBillingAgreementCustom($billingAgreementCustom = null) |
|
189
|
|
|
{ |
|
190
|
|
|
// validation for constraint: string |
|
191
|
|
|
if (!is_null($billingAgreementCustom) && !is_string($billingAgreementCustom)) { |
|
|
|
|
|
|
192
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($billingAgreementCustom, true), gettype($billingAgreementCustom)), __LINE__); |
|
193
|
|
|
} |
|
194
|
|
|
$this->BillingAgreementCustom = $billingAgreementCustom; |
|
195
|
|
|
return $this; |
|
196
|
|
|
} |
|
197
|
|
|
/** |
|
198
|
|
|
* Get ProductCode value |
|
199
|
|
|
* @return string|null |
|
200
|
|
|
*/ |
|
201
|
|
|
public function getProductCode() |
|
202
|
|
|
{ |
|
203
|
|
|
return $this->ProductCode; |
|
204
|
|
|
} |
|
205
|
|
|
/** |
|
206
|
|
|
* Set ProductCode value |
|
207
|
|
|
* @param string $productCode |
|
208
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
209
|
|
|
*/ |
|
210
|
|
|
public function setProductCode($productCode = null) |
|
211
|
|
|
{ |
|
212
|
|
|
// validation for constraint: string |
|
213
|
|
|
if (!is_null($productCode) && !is_string($productCode)) { |
|
|
|
|
|
|
214
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productCode, true), gettype($productCode)), __LINE__); |
|
215
|
|
|
} |
|
216
|
|
|
$this->ProductCode = $productCode; |
|
217
|
|
|
return $this; |
|
218
|
|
|
} |
|
219
|
|
|
/** |
|
220
|
|
|
* Get Name value |
|
221
|
|
|
* @return string|null |
|
222
|
|
|
*/ |
|
223
|
|
|
public function getName() |
|
224
|
|
|
{ |
|
225
|
|
|
return $this->Name; |
|
226
|
|
|
} |
|
227
|
|
|
/** |
|
228
|
|
|
* Set Name value |
|
229
|
|
|
* @param string $name |
|
230
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
231
|
|
|
*/ |
|
232
|
|
|
public function setName($name = null) |
|
233
|
|
|
{ |
|
234
|
|
|
// validation for constraint: string |
|
235
|
|
|
if (!is_null($name) && !is_string($name)) { |
|
|
|
|
|
|
236
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__); |
|
237
|
|
|
} |
|
238
|
|
|
$this->Name = $name; |
|
239
|
|
|
return $this; |
|
240
|
|
|
} |
|
241
|
|
|
/** |
|
242
|
|
|
* Get ChargePattern value |
|
243
|
|
|
* @return string|null |
|
244
|
|
|
*/ |
|
245
|
|
|
public function getChargePattern() |
|
246
|
|
|
{ |
|
247
|
|
|
return $this->ChargePattern; |
|
248
|
|
|
} |
|
249
|
|
|
/** |
|
250
|
|
|
* Set ChargePattern value |
|
251
|
|
|
* @uses \PayPal\EnumType\ChargePatternType::valueIsValid() |
|
252
|
|
|
* @uses \PayPal\EnumType\ChargePatternType::getValidValues() |
|
253
|
|
|
* @throws \InvalidArgumentException |
|
254
|
|
|
* @param string $chargePattern |
|
255
|
|
|
* @return \PayPal\StructType\BillingAgreementDetailsType |
|
256
|
|
|
*/ |
|
257
|
|
|
public function setChargePattern($chargePattern = null) |
|
258
|
|
|
{ |
|
259
|
|
|
// validation for constraint: enumeration |
|
260
|
|
|
if (!\PayPal\EnumType\ChargePatternType::valueIsValid($chargePattern)) { |
|
261
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\ChargePatternType', is_array($chargePattern) ? implode(', ', $chargePattern) : var_export($chargePattern, true), implode(', ', \PayPal\EnumType\ChargePatternType::getValidValues())), __LINE__); |
|
|
|
|
|
|
262
|
|
|
} |
|
263
|
|
|
$this->ChargePattern = $chargePattern; |
|
264
|
|
|
return $this; |
|
265
|
|
|
} |
|
266
|
|
|
} |
|
267
|
|
|
|