| 1 |
<?php |
| 2 |
/** |
| 3 |
* CreatePaymentRequest |
| 4 |
* |
| 5 |
* PHP version 5 |
| 6 |
* |
| 7 |
* @category Class |
| 8 |
* @package OpenAPI\Client |
| 9 |
* @author OpenAPI Generator team |
| 10 |
* @link https://openapi-generator.tech |
| 11 |
*/ |
| 12 |
|
| 13 |
/** |
| 14 |
* MONEI API v1 |
| 15 |
* |
| 16 |
* The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. |
| 17 |
* |
| 18 |
* The version of the OpenAPI document: 1.0.0 |
| 19 |
* |
| 20 |
* Generated by: https://openapi-generator.tech |
| 21 |
* OpenAPI Generator version: 4.3.1 |
| 22 |
*/ |
| 23 |
|
| 24 |
/** |
| 25 |
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 26 |
* https://openapi-generator.tech |
| 27 |
* Do not edit the class manually. |
| 28 |
*/ |
| 29 |
|
| 30 |
namespace OpenAPI\Client\Model; |
| 31 |
|
| 32 |
use \ArrayAccess; |
| 33 |
use \OpenAPI\Client\ObjectSerializer; |
| 34 |
|
| 35 |
/** |
| 36 |
* CreatePaymentRequest Class Doc Comment |
| 37 |
* |
| 38 |
* @category Class |
| 39 |
* @package OpenAPI\Client |
| 40 |
* @author OpenAPI Generator team |
| 41 |
* @link https://openapi-generator.tech |
| 42 |
*/ |
| 43 |
class CreatePaymentRequest implements ModelInterface, ArrayAccess |
| 44 |
{ |
| 45 |
const DISCRIMINATOR = null; |
| 46 |
|
| 47 |
/** |
| 48 |
* The original name of the model. |
| 49 |
* |
| 50 |
* @var string |
| 51 |
*/ |
| 52 |
protected static $openAPIModelName = 'CreatePaymentRequest'; |
| 53 |
|
| 54 |
/** |
| 55 |
* Array of property to type mappings. Used for (de)serialization |
| 56 |
* |
| 57 |
* @var string[] |
| 58 |
*/ |
| 59 |
protected static $openAPITypes = [ |
| 60 |
'amount' => 'int', |
| 61 |
'currency' => 'string', |
| 62 |
'order_id' => 'string', |
| 63 |
'callback_url' => 'string', |
| 64 |
'complete_url' => 'string', |
| 65 |
'fail_url' => 'string', |
| 66 |
'cancel_url' => 'string', |
| 67 |
'payment_token' => 'string', |
| 68 |
'session_id' => 'string', |
| 69 |
'generate_payment_token' => 'bool', |
| 70 |
'payment_method' => '\OpenAPI\Client\Model\PaymentPaymentMethodInput', |
| 71 |
'allowed_payment_methods' => '\OpenAPI\Client\Model\PaymentAllowedPaymentMethods', |
| 72 |
'transaction_type' => '\OpenAPI\Client\Model\PaymentTransactionType', |
| 73 |
'description' => 'string', |
| 74 |
'customer' => '\OpenAPI\Client\Model\PaymentCustomer', |
| 75 |
'billing_details' => '\OpenAPI\Client\Model\PaymentBillingDetails', |
| 76 |
'shipping_details' => '\OpenAPI\Client\Model\PaymentShippingDetails', |
| 77 |
'session_details' => '\OpenAPI\Client\Model\PaymentSessionDetails' |
| 78 |
]; |
| 79 |
|
| 80 |
/** |
| 81 |
* Array of property to format mappings. Used for (de)serialization |
| 82 |
* |
| 83 |
* @var string[] |
| 84 |
*/ |
| 85 |
protected static $openAPIFormats = [ |
| 86 |
'amount' => 'int32', |
| 87 |
'currency' => null, |
| 88 |
'order_id' => null, |
| 89 |
'callback_url' => null, |
| 90 |
'complete_url' => null, |
| 91 |
'fail_url' => null, |
| 92 |
'cancel_url' => null, |
| 93 |
'payment_token' => null, |
| 94 |
'session_id' => null, |
| 95 |
'generate_payment_token' => null, |
| 96 |
'payment_method' => null, |
| 97 |
'allowed_payment_methods' => null, |
| 98 |
'transaction_type' => null, |
| 99 |
'description' => null, |
| 100 |
'customer' => null, |
| 101 |
'billing_details' => null, |
| 102 |
'shipping_details' => null, |
| 103 |
'session_details' => null |
| 104 |
]; |
| 105 |
|
| 106 |
/** |
| 107 |
* Array of property to type mappings. Used for (de)serialization |
| 108 |
* |
| 109 |
* @return array |
| 110 |
*/ |
| 111 |
public static function openAPITypes() |
| 112 |
{ |
| 113 |
return self::$openAPITypes; |
| 114 |
} |
| 115 |
|
| 116 |
/** |
| 117 |
* Array of property to format mappings. Used for (de)serialization |
| 118 |
* |
| 119 |
* @return array |
| 120 |
*/ |
| 121 |
public static function openAPIFormats() |
| 122 |
{ |
| 123 |
return self::$openAPIFormats; |
| 124 |
} |
| 125 |
|
| 126 |
/** |
| 127 |
* Array of attributes where the key is the local name, |
| 128 |
* and the value is the original name |
| 129 |
* |
| 130 |
* @var string[] |
| 131 |
*/ |
| 132 |
protected static $attributeMap = [ |
| 133 |
'amount' => 'amount', |
| 134 |
'currency' => 'currency', |
| 135 |
'order_id' => 'orderId', |
| 136 |
'callback_url' => 'callbackUrl', |
| 137 |
'complete_url' => 'completeUrl', |
| 138 |
'fail_url' => 'failUrl', |
| 139 |
'cancel_url' => 'cancelUrl', |
| 140 |
'payment_token' => 'paymentToken', |
| 141 |
'session_id' => 'sessionId', |
| 142 |
'generate_payment_token' => 'generatePaymentToken', |
| 143 |
'payment_method' => 'paymentMethod', |
| 144 |
'allowed_payment_methods' => 'allowedPaymentMethods', |
| 145 |
'transaction_type' => 'transactionType', |
| 146 |
'description' => 'description', |
| 147 |
'customer' => 'customer', |
| 148 |
'billing_details' => 'billingDetails', |
| 149 |
'shipping_details' => 'shippingDetails', |
| 150 |
'session_details' => 'sessionDetails' |
| 151 |
]; |
| 152 |
|
| 153 |
/** |
| 154 |
* Array of attributes to setter functions (for deserialization of responses) |
| 155 |
* |
| 156 |
* @var string[] |
| 157 |
*/ |
| 158 |
protected static $setters = [ |
| 159 |
'amount' => 'setAmount', |
| 160 |
'currency' => 'setCurrency', |
| 161 |
'order_id' => 'setOrderId', |
| 162 |
'callback_url' => 'setCallbackUrl', |
| 163 |
'complete_url' => 'setCompleteUrl', |
| 164 |
'fail_url' => 'setFailUrl', |
| 165 |
'cancel_url' => 'setCancelUrl', |
| 166 |
'payment_token' => 'setPaymentToken', |
| 167 |
'session_id' => 'setSessionId', |
| 168 |
'generate_payment_token' => 'setGeneratePaymentToken', |
| 169 |
'payment_method' => 'setPaymentMethod', |
| 170 |
'allowed_payment_methods' => 'setAllowedPaymentMethods', |
| 171 |
'transaction_type' => 'setTransactionType', |
| 172 |
'description' => 'setDescription', |
| 173 |
'customer' => 'setCustomer', |
| 174 |
'billing_details' => 'setBillingDetails', |
| 175 |
'shipping_details' => 'setShippingDetails', |
| 176 |
'session_details' => 'setSessionDetails' |
| 177 |
]; |
| 178 |
|
| 179 |
/** |
| 180 |
* Array of attributes to getter functions (for serialization of requests) |
| 181 |
* |
| 182 |
* @var string[] |
| 183 |
*/ |
| 184 |
protected static $getters = [ |
| 185 |
'amount' => 'getAmount', |
| 186 |
'currency' => 'getCurrency', |
| 187 |
'order_id' => 'getOrderId', |
| 188 |
'callback_url' => 'getCallbackUrl', |
| 189 |
'complete_url' => 'getCompleteUrl', |
| 190 |
'fail_url' => 'getFailUrl', |
| 191 |
'cancel_url' => 'getCancelUrl', |
| 192 |
'payment_token' => 'getPaymentToken', |
| 193 |
'session_id' => 'getSessionId', |
| 194 |
'generate_payment_token' => 'getGeneratePaymentToken', |
| 195 |
'payment_method' => 'getPaymentMethod', |
| 196 |
'allowed_payment_methods' => 'getAllowedPaymentMethods', |
| 197 |
'transaction_type' => 'getTransactionType', |
| 198 |
'description' => 'getDescription', |
| 199 |
'customer' => 'getCustomer', |
| 200 |
'billing_details' => 'getBillingDetails', |
| 201 |
'shipping_details' => 'getShippingDetails', |
| 202 |
'session_details' => 'getSessionDetails' |
| 203 |
]; |
| 204 |
|
| 205 |
/** |
| 206 |
* Array of attributes where the key is the local name, |
| 207 |
* and the value is the original name |
| 208 |
* |
| 209 |
* @return array |
| 210 |
*/ |
| 211 |
public static function attributeMap() |
| 212 |
{ |
| 213 |
return self::$attributeMap; |
| 214 |
} |
| 215 |
|
| 216 |
/** |
| 217 |
* Array of attributes to setter functions (for deserialization of responses) |
| 218 |
* |
| 219 |
* @return array |
| 220 |
*/ |
| 221 |
public static function setters() |
| 222 |
{ |
| 223 |
return self::$setters; |
| 224 |
} |
| 225 |
|
| 226 |
/** |
| 227 |
* Array of attributes to getter functions (for serialization of requests) |
| 228 |
* |
| 229 |
* @return array |
| 230 |
*/ |
| 231 |
public static function getters() |
| 232 |
{ |
| 233 |
return self::$getters; |
| 234 |
} |
| 235 |
|
| 236 |
/** |
| 237 |
* The original name of the model. |
| 238 |
* |
| 239 |
* @return string |
| 240 |
*/ |
| 241 |
public function getModelName() |
| 242 |
{ |
| 243 |
return self::$openAPIModelName; |
| 244 |
} |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
/** |
| 251 |
* Associative array for storing property values |
| 252 |
* |
| 253 |
* @var mixed[] |
| 254 |
*/ |
| 255 |
protected $container = []; |
| 256 |
|
| 257 |
/** |
| 258 |
* Constructor |
| 259 |
* |
| 260 |
* @param mixed[] $data Associated array of property values |
| 261 |
* initializing the model |
| 262 |
*/ |
| 263 |
public function __construct(array $data = null) |
| 264 |
{ |
| 265 |
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; |
| 266 |
$this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; |
| 267 |
$this->container['order_id'] = isset($data['order_id']) ? $data['order_id'] : null; |
| 268 |
$this->container['callback_url'] = isset($data['callback_url']) ? $data['callback_url'] : null; |
| 269 |
$this->container['complete_url'] = isset($data['complete_url']) ? $data['complete_url'] : null; |
| 270 |
$this->container['fail_url'] = isset($data['fail_url']) ? $data['fail_url'] : null; |
| 271 |
$this->container['cancel_url'] = isset($data['cancel_url']) ? $data['cancel_url'] : null; |
| 272 |
$this->container['payment_token'] = isset($data['payment_token']) ? $data['payment_token'] : null; |
| 273 |
$this->container['session_id'] = isset($data['session_id']) ? $data['session_id'] : null; |
| 274 |
$this->container['generate_payment_token'] = isset($data['generate_payment_token']) ? $data['generate_payment_token'] : false; |
| 275 |
$this->container['payment_method'] = isset($data['payment_method']) ? $data['payment_method'] : null; |
| 276 |
$this->container['allowed_payment_methods'] = isset($data['allowed_payment_methods']) ? $data['allowed_payment_methods'] : null; |
| 277 |
$this->container['transaction_type'] = isset($data['transaction_type']) ? $data['transaction_type'] : null; |
| 278 |
$this->container['description'] = isset($data['description']) ? $data['description'] : null; |
| 279 |
$this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; |
| 280 |
$this->container['billing_details'] = isset($data['billing_details']) ? $data['billing_details'] : null; |
| 281 |
$this->container['shipping_details'] = isset($data['shipping_details']) ? $data['shipping_details'] : null; |
| 282 |
$this->container['session_details'] = isset($data['session_details']) ? $data['session_details'] : null; |
| 283 |
} |
| 284 |
|
| 285 |
/** |
| 286 |
* Show all the invalid properties with reasons. |
| 287 |
* |
| 288 |
* @return array invalid properties with reasons |
| 289 |
*/ |
| 290 |
public function listInvalidProperties() |
| 291 |
{ |
| 292 |
$invalidProperties = []; |
| 293 |
|
| 294 |
if ($this->container['amount'] === null) { |
| 295 |
$invalidProperties[] = "'amount' can't be null"; |
| 296 |
} |
| 297 |
if ($this->container['currency'] === null) { |
| 298 |
$invalidProperties[] = "'currency' can't be null"; |
| 299 |
} |
| 300 |
if ($this->container['order_id'] === null) { |
| 301 |
$invalidProperties[] = "'order_id' can't be null"; |
| 302 |
} |
| 303 |
if ($this->container['callback_url'] === null) { |
| 304 |
$invalidProperties[] = "'callback_url' can't be null"; |
| 305 |
} |
| 306 |
if ($this->container['complete_url'] === null) { |
| 307 |
$invalidProperties[] = "'complete_url' can't be null"; |
| 308 |
} |
| 309 |
return $invalidProperties; |
| 310 |
} |
| 311 |
|
| 312 |
/** |
| 313 |
* Validate all the properties in the model |
| 314 |
* return true if all passed |
| 315 |
* |
| 316 |
* @return bool True if all properties are valid |
| 317 |
*/ |
| 318 |
public function valid() |
| 319 |
{ |
| 320 |
return count($this->listInvalidProperties()) === 0; |
| 321 |
} |
| 322 |
|
| 323 |
|
| 324 |
/** |
| 325 |
* Gets amount |
| 326 |
* |
| 327 |
* @return int |
| 328 |
*/ |
| 329 |
public function getAmount() |
| 330 |
{ |
| 331 |
return $this->container['amount']; |
| 332 |
} |
| 333 |
|
| 334 |
/** |
| 335 |
* Sets amount |
| 336 |
* |
| 337 |
* @param int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). |
| 338 |
* |
| 339 |
* @return $this |
| 340 |
*/ |
| 341 |
public function setAmount($amount) |
| 342 |
{ |
| 343 |
$this->container['amount'] = $amount; |
| 344 |
|
| 345 |
return $this; |
| 346 |
} |
| 347 |
|
| 348 |
/** |
| 349 |
* Gets currency |
| 350 |
* |
| 351 |
* @return string |
| 352 |
*/ |
| 353 |
public function getCurrency() |
| 354 |
{ |
| 355 |
return $this->container['currency']; |
| 356 |
} |
| 357 |
|
| 358 |
/** |
| 359 |
* Sets currency |
| 360 |
* |
| 361 |
* @param string $currency Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. |
| 362 |
* |
| 363 |
* @return $this |
| 364 |
*/ |
| 365 |
public function setCurrency($currency) |
| 366 |
{ |
| 367 |
$this->container['currency'] = $currency; |
| 368 |
|
| 369 |
return $this; |
| 370 |
} |
| 371 |
|
| 372 |
/** |
| 373 |
* Gets order_id |
| 374 |
* |
| 375 |
* @return string |
| 376 |
*/ |
| 377 |
public function getOrderId() |
| 378 |
{ |
| 379 |
return $this->container['order_id']; |
| 380 |
} |
| 381 |
|
| 382 |
/** |
| 383 |
* Sets order_id |
| 384 |
* |
| 385 |
* @param string $order_id An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. |
| 386 |
* |
| 387 |
* @return $this |
| 388 |
*/ |
| 389 |
public function setOrderId($order_id) |
| 390 |
{ |
| 391 |
$this->container['order_id'] = $order_id; |
| 392 |
|
| 393 |
return $this; |
| 394 |
} |
| 395 |
|
| 396 |
/** |
| 397 |
* Gets callback_url |
| 398 |
* |
| 399 |
* @return string |
| 400 |
*/ |
| 401 |
public function getCallbackUrl() |
| 402 |
{ |
| 403 |
return $this->container['callback_url']; |
| 404 |
} |
| 405 |
|
| 406 |
/** |
| 407 |
* Sets callback_url |
| 408 |
* |
| 409 |
* @param string $callback_url The URL to which a payment result should be sent asynchronously. |
| 410 |
* |
| 411 |
* @return $this |
| 412 |
*/ |
| 413 |
public function setCallbackUrl($callback_url) |
| 414 |
{ |
| 415 |
$this->container['callback_url'] = $callback_url; |
| 416 |
|
| 417 |
return $this; |
| 418 |
} |
| 419 |
|
| 420 |
/** |
| 421 |
* Gets complete_url |
| 422 |
* |
| 423 |
* @return string |
| 424 |
*/ |
| 425 |
public function getCompleteUrl() |
| 426 |
{ |
| 427 |
return $this->container['complete_url']; |
| 428 |
} |
| 429 |
|
| 430 |
/** |
| 431 |
* Sets complete_url |
| 432 |
* |
| 433 |
* @param string $complete_url The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). |
| 434 |
* |
| 435 |
* @return $this |
| 436 |
*/ |
| 437 |
public function setCompleteUrl($complete_url) |
| 438 |
{ |
| 439 |
$this->container['complete_url'] = $complete_url; |
| 440 |
|
| 441 |
return $this; |
| 442 |
} |
| 443 |
|
| 444 |
/** |
| 445 |
* Gets fail_url |
| 446 |
* |
| 447 |
* @return string|null |
| 448 |
*/ |
| 449 |
public function getFailUrl() |
| 450 |
{ |
| 451 |
return $this->container['fail_url']; |
| 452 |
} |
| 453 |
|
| 454 |
/** |
| 455 |
* Sets fail_url |
| 456 |
* |
| 457 |
* @param string|null $fail_url The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. |
| 458 |
* |
| 459 |
* @return $this |
| 460 |
*/ |
| 461 |
public function setFailUrl($fail_url) |
| 462 |
{ |
| 463 |
$this->container['fail_url'] = $fail_url; |
| 464 |
|
| 465 |
return $this; |
| 466 |
} |
| 467 |
|
| 468 |
/** |
| 469 |
* Gets cancel_url |
| 470 |
* |
| 471 |
* @return string|null |
| 472 |
*/ |
| 473 |
public function getCancelUrl() |
| 474 |
{ |
| 475 |
return $this->container['cancel_url']; |
| 476 |
} |
| 477 |
|
| 478 |
/** |
| 479 |
* Sets cancel_url |
| 480 |
* |
| 481 |
* @param string|null $cancel_url The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). |
| 482 |
* |
| 483 |
* @return $this |
| 484 |
*/ |
| 485 |
public function setCancelUrl($cancel_url) |
| 486 |
{ |
| 487 |
$this->container['cancel_url'] = $cancel_url; |
| 488 |
|
| 489 |
return $this; |
| 490 |
} |
| 491 |
|
| 492 |
/** |
| 493 |
* Gets payment_token |
| 494 |
* |
| 495 |
* @return string|null |
| 496 |
*/ |
| 497 |
public function getPaymentToken() |
| 498 |
{ |
| 499 |
return $this->container['payment_token']; |
| 500 |
} |
| 501 |
|
| 502 |
/** |
| 503 |
* Sets payment_token |
| 504 |
* |
| 505 |
* @param string|null $payment_token A payment token generated by monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.net/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. |
| 506 |
* |
| 507 |
* @return $this |
| 508 |
*/ |
| 509 |
public function setPaymentToken($payment_token) |
| 510 |
{ |
| 511 |
$this->container['payment_token'] = $payment_token; |
| 512 |
|
| 513 |
return $this; |
| 514 |
} |
| 515 |
|
| 516 |
/** |
| 517 |
* Gets session_id |
| 518 |
* |
| 519 |
* @return string|null |
| 520 |
*/ |
| 521 |
public function getSessionId() |
| 522 |
{ |
| 523 |
return $this->container['session_id']; |
| 524 |
} |
| 525 |
|
| 526 |
/** |
| 527 |
* Sets session_id |
| 528 |
* |
| 529 |
* @param string|null $session_id A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. |
| 530 |
* |
| 531 |
* @return $this |
| 532 |
*/ |
| 533 |
public function setSessionId($session_id) |
| 534 |
{ |
| 535 |
$this->container['session_id'] = $session_id; |
| 536 |
|
| 537 |
return $this; |
| 538 |
} |
| 539 |
|
| 540 |
/** |
| 541 |
* Gets generate_payment_token |
| 542 |
* |
| 543 |
* @return bool|null |
| 544 |
*/ |
| 545 |
public function getGeneratePaymentToken() |
| 546 |
{ |
| 547 |
return $this->container['generate_payment_token']; |
| 548 |
} |
| 549 |
|
| 550 |
/** |
| 551 |
* Sets generate_payment_token |
| 552 |
* |
| 553 |
* @param bool|null $generate_payment_token If set to true a permanent token that represents a payment method used in the payment will be generated. |
| 554 |
* |
| 555 |
* @return $this |
| 556 |
*/ |
| 557 |
public function setGeneratePaymentToken($generate_payment_token) |
| 558 |
{ |
| 559 |
$this->container['generate_payment_token'] = $generate_payment_token; |
| 560 |
|
| 561 |
return $this; |
| 562 |
} |
| 563 |
|
| 564 |
/** |
| 565 |
* Gets payment_method |
| 566 |
* |
| 567 |
* @return \OpenAPI\Client\Model\PaymentPaymentMethodInput|null |
| 568 |
*/ |
| 569 |
public function getPaymentMethod() |
| 570 |
{ |
| 571 |
return $this->container['payment_method']; |
| 572 |
} |
| 573 |
|
| 574 |
/** |
| 575 |
* Sets payment_method |
| 576 |
* |
| 577 |
* @param \OpenAPI\Client\Model\PaymentPaymentMethodInput|null $payment_method payment_method |
| 578 |
* |
| 579 |
* @return $this |
| 580 |
*/ |
| 581 |
public function setPaymentMethod($payment_method) |
| 582 |
{ |
| 583 |
$this->container['payment_method'] = $payment_method; |
| 584 |
|
| 585 |
return $this; |
| 586 |
} |
| 587 |
|
| 588 |
/** |
| 589 |
* Gets allowed_payment_methods |
| 590 |
* |
| 591 |
* @return \OpenAPI\Client\Model\PaymentAllowedPaymentMethods|null |
| 592 |
*/ |
| 593 |
public function getAllowedPaymentMethods() |
| 594 |
{ |
| 595 |
return $this->container['allowed_payment_methods']; |
| 596 |
} |
| 597 |
|
| 598 |
/** |
| 599 |
* Sets allowed_payment_methods |
| 600 |
* |
| 601 |
* @param \OpenAPI\Client\Model\PaymentAllowedPaymentMethods|null $allowed_payment_methods allowed_payment_methods |
| 602 |
* |
| 603 |
* @return $this |
| 604 |
*/ |
| 605 |
public function setAllowedPaymentMethods($allowed_payment_methods) |
| 606 |
{ |
| 607 |
$this->container['allowed_payment_methods'] = $allowed_payment_methods; |
| 608 |
|
| 609 |
return $this; |
| 610 |
} |
| 611 |
|
| 612 |
/** |
| 613 |
* Gets transaction_type |
| 614 |
* |
| 615 |
* @return \OpenAPI\Client\Model\PaymentTransactionType|null |
| 616 |
*/ |
| 617 |
public function getTransactionType() |
| 618 |
{ |
| 619 |
return $this->container['transaction_type']; |
| 620 |
} |
| 621 |
|
| 622 |
/** |
| 623 |
* Sets transaction_type |
| 624 |
* |
| 625 |
* @param \OpenAPI\Client\Model\PaymentTransactionType|null $transaction_type transaction_type |
| 626 |
* |
| 627 |
* @return $this |
| 628 |
*/ |
| 629 |
public function setTransactionType($transaction_type) |
| 630 |
{ |
| 631 |
$this->container['transaction_type'] = $transaction_type; |
| 632 |
|
| 633 |
return $this; |
| 634 |
} |
| 635 |
|
| 636 |
/** |
| 637 |
* Gets description |
| 638 |
* |
| 639 |
* @return string|null |
| 640 |
*/ |
| 641 |
public function getDescription() |
| 642 |
{ |
| 643 |
return $this->container['description']; |
| 644 |
} |
| 645 |
|
| 646 |
/** |
| 647 |
* Sets description |
| 648 |
* |
| 649 |
* @param string|null $description An arbitrary string attached to the payment. Often useful for displaying to users. |
| 650 |
* |
| 651 |
* @return $this |
| 652 |
*/ |
| 653 |
public function setDescription($description) |
| 654 |
{ |
| 655 |
$this->container['description'] = $description; |
| 656 |
|
| 657 |
return $this; |
| 658 |
} |
| 659 |
|
| 660 |
/** |
| 661 |
* Gets customer |
| 662 |
* |
| 663 |
* @return \OpenAPI\Client\Model\PaymentCustomer|null |
| 664 |
*/ |
| 665 |
public function getCustomer() |
| 666 |
{ |
| 667 |
return $this->container['customer']; |
| 668 |
} |
| 669 |
|
| 670 |
/** |
| 671 |
* Sets customer |
| 672 |
* |
| 673 |
* @param \OpenAPI\Client\Model\PaymentCustomer|null $customer customer |
| 674 |
* |
| 675 |
* @return $this |
| 676 |
*/ |
| 677 |
public function setCustomer($customer) |
| 678 |
{ |
| 679 |
$this->container['customer'] = $customer; |
| 680 |
|
| 681 |
return $this; |
| 682 |
} |
| 683 |
|
| 684 |
/** |
| 685 |
* Gets billing_details |
| 686 |
* |
| 687 |
* @return \OpenAPI\Client\Model\PaymentBillingDetails|null |
| 688 |
*/ |
| 689 |
public function getBillingDetails() |
| 690 |
{ |
| 691 |
return $this->container['billing_details']; |
| 692 |
} |
| 693 |
|
| 694 |
/** |
| 695 |
* Sets billing_details |
| 696 |
* |
| 697 |
* @param \OpenAPI\Client\Model\PaymentBillingDetails|null $billing_details billing_details |
| 698 |
* |
| 699 |
* @return $this |
| 700 |
*/ |
| 701 |
public function setBillingDetails($billing_details) |
| 702 |
{ |
| 703 |
$this->container['billing_details'] = $billing_details; |
| 704 |
|
| 705 |
return $this; |
| 706 |
} |
| 707 |
|
| 708 |
/** |
| 709 |
* Gets shipping_details |
| 710 |
* |
| 711 |
* @return \OpenAPI\Client\Model\PaymentShippingDetails|null |
| 712 |
*/ |
| 713 |
public function getShippingDetails() |
| 714 |
{ |
| 715 |
return $this->container['shipping_details']; |
| 716 |
} |
| 717 |
|
| 718 |
/** |
| 719 |
* Sets shipping_details |
| 720 |
* |
| 721 |
* @param \OpenAPI\Client\Model\PaymentShippingDetails|null $shipping_details shipping_details |
| 722 |
* |
| 723 |
* @return $this |
| 724 |
*/ |
| 725 |
public function setShippingDetails($shipping_details) |
| 726 |
{ |
| 727 |
$this->container['shipping_details'] = $shipping_details; |
| 728 |
|
| 729 |
return $this; |
| 730 |
} |
| 731 |
|
| 732 |
/** |
| 733 |
* Gets session_details |
| 734 |
* |
| 735 |
* @return \OpenAPI\Client\Model\PaymentSessionDetails|null |
| 736 |
*/ |
| 737 |
public function getSessionDetails() |
| 738 |
{ |
| 739 |
return $this->container['session_details']; |
| 740 |
} |
| 741 |
|
| 742 |
/** |
| 743 |
* Sets session_details |
| 744 |
* |
| 745 |
* @param \OpenAPI\Client\Model\PaymentSessionDetails|null $session_details session_details |
| 746 |
* |
| 747 |
* @return $this |
| 748 |
*/ |
| 749 |
public function setSessionDetails($session_details) |
| 750 |
{ |
| 751 |
$this->container['session_details'] = $session_details; |
| 752 |
|
| 753 |
return $this; |
| 754 |
} |
| 755 |
/** |
| 756 |
* Returns true if offset exists. False otherwise. |
| 757 |
* |
| 758 |
* @param integer $offset Offset |
| 759 |
* |
| 760 |
* @return boolean |
| 761 |
*/ |
| 762 |
public function offsetExists($offset) |
| 763 |
{ |
| 764 |
return isset($this->container[$offset]); |
| 765 |
} |
| 766 |
|
| 767 |
/** |
| 768 |
* Gets offset. |
| 769 |
* |
| 770 |
* @param integer $offset Offset |
| 771 |
* |
| 772 |
* @return mixed |
| 773 |
*/ |
| 774 |
public function offsetGet($offset) |
| 775 |
{ |
| 776 |
return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 777 |
} |
| 778 |
|
| 779 |
/** |
| 780 |
* Sets value based on offset. |
| 781 |
* |
| 782 |
* @param integer $offset Offset |
| 783 |
* @param mixed $value Value to be set |
| 784 |
* |
| 785 |
* @return void |
| 786 |
*/ |
| 787 |
public function offsetSet($offset, $value) |
| 788 |
{ |
| 789 |
if (is_null($offset)) { |
| 790 |
$this->container[] = $value; |
| 791 |
} else { |
| 792 |
$this->container[$offset] = $value; |
| 793 |
} |
| 794 |
} |
| 795 |
|
| 796 |
/** |
| 797 |
* Unsets offset. |
| 798 |
* |
| 799 |
* @param integer $offset Offset |
| 800 |
* |
| 801 |
* @return void |
| 802 |
*/ |
| 803 |
public function offsetUnset($offset) |
| 804 |
{ |
| 805 |
unset($this->container[$offset]); |
| 806 |
} |
| 807 |
|
| 808 |
/** |
| 809 |
* Gets the string presentation of the object |
| 810 |
* |
| 811 |
* @return string |
| 812 |
*/ |
| 813 |
public function __toString() |
| 814 |
{ |
| 815 |
return json_encode( |
| 816 |
ObjectSerializer::sanitizeForSerialization($this), |
| 817 |
JSON_PRETTY_PRINT |
| 818 |
); |
| 819 |
} |
| 820 |
|
| 821 |
/** |
| 822 |
* Gets a header-safe presentation of the object |
| 823 |
* |
| 824 |
* @return string |
| 825 |
*/ |
| 826 |
public function toHeaderValue() |
| 827 |
{ |
| 828 |
return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 829 |
} |
| 830 |
} |
| 831 |
|
| 832 |
|
| 833 |
|