| 1 |
<?php |
| 2 |
/** |
| 3 |
* Payment |
| 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 |
* Payment 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 Payment 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 = 'Payment'; |
| 53 |
|
| 54 |
/** |
| 55 |
* Array of property to type mappings. Used for (de)serialization |
| 56 |
* |
| 57 |
* @var string[] |
| 58 |
*/ |
| 59 |
protected static $openAPITypes = [ |
| 60 |
'id' => 'string', |
| 61 |
'amount' => 'int', |
| 62 |
'currency' => 'string', |
| 63 |
'order_id' => 'string', |
| 64 |
'description' => 'string', |
| 65 |
'account_id' => 'string', |
| 66 |
'authorization_code' => 'string', |
| 67 |
'livemode' => 'bool', |
| 68 |
'status' => '\OpenAPI\Client\Model\PaymentStatus', |
| 69 |
'status_code' => 'string', |
| 70 |
'status_message' => 'string', |
| 71 |
'customer' => '\OpenAPI\Client\Model\PaymentCustomer', |
| 72 |
'payment_token' => 'string', |
| 73 |
'payment_method' => '\OpenAPI\Client\Model\PaymentPaymentMethod', |
| 74 |
'shop' => '\OpenAPI\Client\Model\PaymentShop', |
| 75 |
'billing_details' => '\OpenAPI\Client\Model\PaymentBillingDetails', |
| 76 |
'shipping_details' => '\OpenAPI\Client\Model\PaymentShippingDetails', |
| 77 |
'refunded_amount' => 'int', |
| 78 |
'last_refund_amount' => 'int', |
| 79 |
'last_refund_reason' => 'string', |
| 80 |
'cancellation_reason' => '\OpenAPI\Client\Model\PaymentCancellationReason', |
| 81 |
'session_details' => '\OpenAPI\Client\Model\PaymentSessionDetails', |
| 82 |
'next_action' => '\OpenAPI\Client\Model\PaymentNextAction', |
| 83 |
'created_at' => 'int', |
| 84 |
'updated_at' => 'int' |
| 85 |
]; |
| 86 |
|
| 87 |
/** |
| 88 |
* Array of property to format mappings. Used for (de)serialization |
| 89 |
* |
| 90 |
* @var string[] |
| 91 |
*/ |
| 92 |
protected static $openAPIFormats = [ |
| 93 |
'id' => null, |
| 94 |
'amount' => 'int32', |
| 95 |
'currency' => null, |
| 96 |
'order_id' => null, |
| 97 |
'description' => null, |
| 98 |
'account_id' => null, |
| 99 |
'authorization_code' => null, |
| 100 |
'livemode' => null, |
| 101 |
'status' => null, |
| 102 |
'status_code' => null, |
| 103 |
'status_message' => null, |
| 104 |
'customer' => null, |
| 105 |
'payment_token' => null, |
| 106 |
'payment_method' => null, |
| 107 |
'shop' => null, |
| 108 |
'billing_details' => null, |
| 109 |
'shipping_details' => null, |
| 110 |
'refunded_amount' => 'int32', |
| 111 |
'last_refund_amount' => 'int32', |
| 112 |
'last_refund_reason' => null, |
| 113 |
'cancellation_reason' => null, |
| 114 |
'session_details' => null, |
| 115 |
'next_action' => null, |
| 116 |
'created_at' => 'int64', |
| 117 |
'updated_at' => 'int64' |
| 118 |
]; |
| 119 |
|
| 120 |
/** |
| 121 |
* Array of property to type mappings. Used for (de)serialization |
| 122 |
* |
| 123 |
* @return array |
| 124 |
*/ |
| 125 |
public static function openAPITypes() |
| 126 |
{ |
| 127 |
return self::$openAPITypes; |
| 128 |
} |
| 129 |
|
| 130 |
/** |
| 131 |
* Array of property to format mappings. Used for (de)serialization |
| 132 |
* |
| 133 |
* @return array |
| 134 |
*/ |
| 135 |
public static function openAPIFormats() |
| 136 |
{ |
| 137 |
return self::$openAPIFormats; |
| 138 |
} |
| 139 |
|
| 140 |
/** |
| 141 |
* Array of attributes where the key is the local name, |
| 142 |
* and the value is the original name |
| 143 |
* |
| 144 |
* @var string[] |
| 145 |
*/ |
| 146 |
protected static $attributeMap = [ |
| 147 |
'id' => 'id', |
| 148 |
'amount' => 'amount', |
| 149 |
'currency' => 'currency', |
| 150 |
'order_id' => 'orderId', |
| 151 |
'description' => 'description', |
| 152 |
'account_id' => 'accountId', |
| 153 |
'authorization_code' => 'authorizationCode', |
| 154 |
'livemode' => 'livemode', |
| 155 |
'status' => 'status', |
| 156 |
'status_code' => 'statusCode', |
| 157 |
'status_message' => 'statusMessage', |
| 158 |
'customer' => 'customer', |
| 159 |
'payment_token' => 'paymentToken', |
| 160 |
'payment_method' => 'paymentMethod', |
| 161 |
'shop' => 'shop', |
| 162 |
'billing_details' => 'billingDetails', |
| 163 |
'shipping_details' => 'shippingDetails', |
| 164 |
'refunded_amount' => 'refundedAmount', |
| 165 |
'last_refund_amount' => 'lastRefundAmount', |
| 166 |
'last_refund_reason' => 'lastRefundReason', |
| 167 |
'cancellation_reason' => 'cancellationReason', |
| 168 |
'session_details' => 'sessionDetails', |
| 169 |
'next_action' => 'nextAction', |
| 170 |
'created_at' => 'createdAt', |
| 171 |
'updated_at' => 'updatedAt' |
| 172 |
]; |
| 173 |
|
| 174 |
/** |
| 175 |
* Array of attributes to setter functions (for deserialization of responses) |
| 176 |
* |
| 177 |
* @var string[] |
| 178 |
*/ |
| 179 |
protected static $setters = [ |
| 180 |
'id' => 'setId', |
| 181 |
'amount' => 'setAmount', |
| 182 |
'currency' => 'setCurrency', |
| 183 |
'order_id' => 'setOrderId', |
| 184 |
'description' => 'setDescription', |
| 185 |
'account_id' => 'setAccountId', |
| 186 |
'authorization_code' => 'setAuthorizationCode', |
| 187 |
'livemode' => 'setLivemode', |
| 188 |
'status' => 'setStatus', |
| 189 |
'status_code' => 'setStatusCode', |
| 190 |
'status_message' => 'setStatusMessage', |
| 191 |
'customer' => 'setCustomer', |
| 192 |
'payment_token' => 'setPaymentToken', |
| 193 |
'payment_method' => 'setPaymentMethod', |
| 194 |
'shop' => 'setShop', |
| 195 |
'billing_details' => 'setBillingDetails', |
| 196 |
'shipping_details' => 'setShippingDetails', |
| 197 |
'refunded_amount' => 'setRefundedAmount', |
| 198 |
'last_refund_amount' => 'setLastRefundAmount', |
| 199 |
'last_refund_reason' => 'setLastRefundReason', |
| 200 |
'cancellation_reason' => 'setCancellationReason', |
| 201 |
'session_details' => 'setSessionDetails', |
| 202 |
'next_action' => 'setNextAction', |
| 203 |
'created_at' => 'setCreatedAt', |
| 204 |
'updated_at' => 'setUpdatedAt' |
| 205 |
]; |
| 206 |
|
| 207 |
/** |
| 208 |
* Array of attributes to getter functions (for serialization of requests) |
| 209 |
* |
| 210 |
* @var string[] |
| 211 |
*/ |
| 212 |
protected static $getters = [ |
| 213 |
'id' => 'getId', |
| 214 |
'amount' => 'getAmount', |
| 215 |
'currency' => 'getCurrency', |
| 216 |
'order_id' => 'getOrderId', |
| 217 |
'description' => 'getDescription', |
| 218 |
'account_id' => 'getAccountId', |
| 219 |
'authorization_code' => 'getAuthorizationCode', |
| 220 |
'livemode' => 'getLivemode', |
| 221 |
'status' => 'getStatus', |
| 222 |
'status_code' => 'getStatusCode', |
| 223 |
'status_message' => 'getStatusMessage', |
| 224 |
'customer' => 'getCustomer', |
| 225 |
'payment_token' => 'getPaymentToken', |
| 226 |
'payment_method' => 'getPaymentMethod', |
| 227 |
'shop' => 'getShop', |
| 228 |
'billing_details' => 'getBillingDetails', |
| 229 |
'shipping_details' => 'getShippingDetails', |
| 230 |
'refunded_amount' => 'getRefundedAmount', |
| 231 |
'last_refund_amount' => 'getLastRefundAmount', |
| 232 |
'last_refund_reason' => 'getLastRefundReason', |
| 233 |
'cancellation_reason' => 'getCancellationReason', |
| 234 |
'session_details' => 'getSessionDetails', |
| 235 |
'next_action' => 'getNextAction', |
| 236 |
'created_at' => 'getCreatedAt', |
| 237 |
'updated_at' => 'getUpdatedAt' |
| 238 |
]; |
| 239 |
|
| 240 |
/** |
| 241 |
* Array of attributes where the key is the local name, |
| 242 |
* and the value is the original name |
| 243 |
* |
| 244 |
* @return array |
| 245 |
*/ |
| 246 |
public static function attributeMap() |
| 247 |
{ |
| 248 |
return self::$attributeMap; |
| 249 |
} |
| 250 |
|
| 251 |
/** |
| 252 |
* Array of attributes to setter functions (for deserialization of responses) |
| 253 |
* |
| 254 |
* @return array |
| 255 |
*/ |
| 256 |
public static function setters() |
| 257 |
{ |
| 258 |
return self::$setters; |
| 259 |
} |
| 260 |
|
| 261 |
/** |
| 262 |
* Array of attributes to getter functions (for serialization of requests) |
| 263 |
* |
| 264 |
* @return array |
| 265 |
*/ |
| 266 |
public static function getters() |
| 267 |
{ |
| 268 |
return self::$getters; |
| 269 |
} |
| 270 |
|
| 271 |
/** |
| 272 |
* The original name of the model. |
| 273 |
* |
| 274 |
* @return string |
| 275 |
*/ |
| 276 |
public function getModelName() |
| 277 |
{ |
| 278 |
return self::$openAPIModelName; |
| 279 |
} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
/** |
| 286 |
* Associative array for storing property values |
| 287 |
* |
| 288 |
* @var mixed[] |
| 289 |
*/ |
| 290 |
protected $container = []; |
| 291 |
|
| 292 |
/** |
| 293 |
* Constructor |
| 294 |
* |
| 295 |
* @param mixed[] $data Associated array of property values |
| 296 |
* initializing the model |
| 297 |
*/ |
| 298 |
public function __construct(array $data = null) |
| 299 |
{ |
| 300 |
$this->container['id'] = isset($data['id']) ? $data['id'] : null; |
| 301 |
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; |
| 302 |
$this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; |
| 303 |
$this->container['order_id'] = isset($data['order_id']) ? $data['order_id'] : null; |
| 304 |
$this->container['description'] = isset($data['description']) ? $data['description'] : null; |
| 305 |
$this->container['account_id'] = isset($data['account_id']) ? $data['account_id'] : null; |
| 306 |
$this->container['authorization_code'] = isset($data['authorization_code']) ? $data['authorization_code'] : null; |
| 307 |
$this->container['livemode'] = isset($data['livemode']) ? $data['livemode'] : null; |
| 308 |
$this->container['status'] = isset($data['status']) ? $data['status'] : null; |
| 309 |
$this->container['status_code'] = isset($data['status_code']) ? $data['status_code'] : null; |
| 310 |
$this->container['status_message'] = isset($data['status_message']) ? $data['status_message'] : null; |
| 311 |
$this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; |
| 312 |
$this->container['payment_token'] = isset($data['payment_token']) ? $data['payment_token'] : null; |
| 313 |
$this->container['payment_method'] = isset($data['payment_method']) ? $data['payment_method'] : null; |
| 314 |
$this->container['shop'] = isset($data['shop']) ? $data['shop'] : null; |
| 315 |
$this->container['billing_details'] = isset($data['billing_details']) ? $data['billing_details'] : null; |
| 316 |
$this->container['shipping_details'] = isset($data['shipping_details']) ? $data['shipping_details'] : null; |
| 317 |
$this->container['refunded_amount'] = isset($data['refunded_amount']) ? $data['refunded_amount'] : null; |
| 318 |
$this->container['last_refund_amount'] = isset($data['last_refund_amount']) ? $data['last_refund_amount'] : null; |
| 319 |
$this->container['last_refund_reason'] = isset($data['last_refund_reason']) ? $data['last_refund_reason'] : null; |
| 320 |
$this->container['cancellation_reason'] = isset($data['cancellation_reason']) ? $data['cancellation_reason'] : null; |
| 321 |
$this->container['session_details'] = isset($data['session_details']) ? $data['session_details'] : null; |
| 322 |
$this->container['next_action'] = isset($data['next_action']) ? $data['next_action'] : null; |
| 323 |
$this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; |
| 324 |
$this->container['updated_at'] = isset($data['updated_at']) ? $data['updated_at'] : null; |
| 325 |
} |
| 326 |
|
| 327 |
/** |
| 328 |
* Show all the invalid properties with reasons. |
| 329 |
* |
| 330 |
* @return array invalid properties with reasons |
| 331 |
*/ |
| 332 |
public function listInvalidProperties() |
| 333 |
{ |
| 334 |
$invalidProperties = []; |
| 335 |
|
| 336 |
return $invalidProperties; |
| 337 |
} |
| 338 |
|
| 339 |
/** |
| 340 |
* Validate all the properties in the model |
| 341 |
* return true if all passed |
| 342 |
* |
| 343 |
* @return bool True if all properties are valid |
| 344 |
*/ |
| 345 |
public function valid() |
| 346 |
{ |
| 347 |
return count($this->listInvalidProperties()) === 0; |
| 348 |
} |
| 349 |
|
| 350 |
|
| 351 |
/** |
| 352 |
* Gets id |
| 353 |
* |
| 354 |
* @return string|null |
| 355 |
*/ |
| 356 |
public function getId() |
| 357 |
{ |
| 358 |
return $this->container['id']; |
| 359 |
} |
| 360 |
|
| 361 |
/** |
| 362 |
* Sets id |
| 363 |
* |
| 364 |
* @param string|null $id Unique identifier for the payment. |
| 365 |
* |
| 366 |
* @return $this |
| 367 |
*/ |
| 368 |
public function setId($id) |
| 369 |
{ |
| 370 |
$this->container['id'] = $id; |
| 371 |
|
| 372 |
return $this; |
| 373 |
} |
| 374 |
|
| 375 |
/** |
| 376 |
* Gets amount |
| 377 |
* |
| 378 |
* @return int|null |
| 379 |
*/ |
| 380 |
public function getAmount() |
| 381 |
{ |
| 382 |
return $this->container['amount']; |
| 383 |
} |
| 384 |
|
| 385 |
/** |
| 386 |
* Sets amount |
| 387 |
* |
| 388 |
* @param int|null $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). |
| 389 |
* |
| 390 |
* @return $this |
| 391 |
*/ |
| 392 |
public function setAmount($amount) |
| 393 |
{ |
| 394 |
$this->container['amount'] = $amount; |
| 395 |
|
| 396 |
return $this; |
| 397 |
} |
| 398 |
|
| 399 |
/** |
| 400 |
* Gets currency |
| 401 |
* |
| 402 |
* @return string|null |
| 403 |
*/ |
| 404 |
public function getCurrency() |
| 405 |
{ |
| 406 |
return $this->container['currency']; |
| 407 |
} |
| 408 |
|
| 409 |
/** |
| 410 |
* Sets currency |
| 411 |
* |
| 412 |
* @param string|null $currency Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. |
| 413 |
* |
| 414 |
* @return $this |
| 415 |
*/ |
| 416 |
public function setCurrency($currency) |
| 417 |
{ |
| 418 |
$this->container['currency'] = $currency; |
| 419 |
|
| 420 |
return $this; |
| 421 |
} |
| 422 |
|
| 423 |
/** |
| 424 |
* Gets order_id |
| 425 |
* |
| 426 |
* @return string|null |
| 427 |
*/ |
| 428 |
public function getOrderId() |
| 429 |
{ |
| 430 |
return $this->container['order_id']; |
| 431 |
} |
| 432 |
|
| 433 |
/** |
| 434 |
* Sets order_id |
| 435 |
* |
| 436 |
* @param string|null $order_id An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. |
| 437 |
* |
| 438 |
* @return $this |
| 439 |
*/ |
| 440 |
public function setOrderId($order_id) |
| 441 |
{ |
| 442 |
$this->container['order_id'] = $order_id; |
| 443 |
|
| 444 |
return $this; |
| 445 |
} |
| 446 |
|
| 447 |
/** |
| 448 |
* Gets description |
| 449 |
* |
| 450 |
* @return string|null |
| 451 |
*/ |
| 452 |
public function getDescription() |
| 453 |
{ |
| 454 |
return $this->container['description']; |
| 455 |
} |
| 456 |
|
| 457 |
/** |
| 458 |
* Sets description |
| 459 |
* |
| 460 |
* @param string|null $description An arbitrary string attached to the payment. Often useful for displaying to users. |
| 461 |
* |
| 462 |
* @return $this |
| 463 |
*/ |
| 464 |
public function setDescription($description) |
| 465 |
{ |
| 466 |
$this->container['description'] = $description; |
| 467 |
|
| 468 |
return $this; |
| 469 |
} |
| 470 |
|
| 471 |
/** |
| 472 |
* Gets account_id |
| 473 |
* |
| 474 |
* @return string|null |
| 475 |
*/ |
| 476 |
public function getAccountId() |
| 477 |
{ |
| 478 |
return $this->container['account_id']; |
| 479 |
} |
| 480 |
|
| 481 |
/** |
| 482 |
* Sets account_id |
| 483 |
* |
| 484 |
* @param string|null $account_id MONEI Account identifier. |
| 485 |
* |
| 486 |
* @return $this |
| 487 |
*/ |
| 488 |
public function setAccountId($account_id) |
| 489 |
{ |
| 490 |
$this->container['account_id'] = $account_id; |
| 491 |
|
| 492 |
return $this; |
| 493 |
} |
| 494 |
|
| 495 |
/** |
| 496 |
* Gets authorization_code |
| 497 |
* |
| 498 |
* @return string|null |
| 499 |
*/ |
| 500 |
public function getAuthorizationCode() |
| 501 |
{ |
| 502 |
return $this->container['authorization_code']; |
| 503 |
} |
| 504 |
|
| 505 |
/** |
| 506 |
* Sets authorization_code |
| 507 |
* |
| 508 |
* @param string|null $authorization_code Unique identifier provided by the bank performing transaction. |
| 509 |
* |
| 510 |
* @return $this |
| 511 |
*/ |
| 512 |
public function setAuthorizationCode($authorization_code) |
| 513 |
{ |
| 514 |
$this->container['authorization_code'] = $authorization_code; |
| 515 |
|
| 516 |
return $this; |
| 517 |
} |
| 518 |
|
| 519 |
/** |
| 520 |
* Gets livemode |
| 521 |
* |
| 522 |
* @return bool|null |
| 523 |
*/ |
| 524 |
public function getLivemode() |
| 525 |
{ |
| 526 |
return $this->container['livemode']; |
| 527 |
} |
| 528 |
|
| 529 |
/** |
| 530 |
* Sets livemode |
| 531 |
* |
| 532 |
* @param bool|null $livemode Has the value `true` if the payment exists in live mode or the value `false` if the payment exists in test mode. |
| 533 |
* |
| 534 |
* @return $this |
| 535 |
*/ |
| 536 |
public function setLivemode($livemode) |
| 537 |
{ |
| 538 |
$this->container['livemode'] = $livemode; |
| 539 |
|
| 540 |
return $this; |
| 541 |
} |
| 542 |
|
| 543 |
/** |
| 544 |
* Gets status |
| 545 |
* |
| 546 |
* @return \OpenAPI\Client\Model\PaymentStatus|null |
| 547 |
*/ |
| 548 |
public function getStatus() |
| 549 |
{ |
| 550 |
return $this->container['status']; |
| 551 |
} |
| 552 |
|
| 553 |
/** |
| 554 |
* Sets status |
| 555 |
* |
| 556 |
* @param \OpenAPI\Client\Model\PaymentStatus|null $status status |
| 557 |
* |
| 558 |
* @return $this |
| 559 |
*/ |
| 560 |
public function setStatus($status) |
| 561 |
{ |
| 562 |
$this->container['status'] = $status; |
| 563 |
|
| 564 |
return $this; |
| 565 |
} |
| 566 |
|
| 567 |
/** |
| 568 |
* Gets status_code |
| 569 |
* |
| 570 |
* @return string|null |
| 571 |
*/ |
| 572 |
public function getStatusCode() |
| 573 |
{ |
| 574 |
return $this->container['status_code']; |
| 575 |
} |
| 576 |
|
| 577 |
/** |
| 578 |
* Sets status_code |
| 579 |
* |
| 580 |
* @param string|null $status_code Payment status code. |
| 581 |
* |
| 582 |
* @return $this |
| 583 |
*/ |
| 584 |
public function setStatusCode($status_code) |
| 585 |
{ |
| 586 |
$this->container['status_code'] = $status_code; |
| 587 |
|
| 588 |
return $this; |
| 589 |
} |
| 590 |
|
| 591 |
/** |
| 592 |
* Gets status_message |
| 593 |
* |
| 594 |
* @return string|null |
| 595 |
*/ |
| 596 |
public function getStatusMessage() |
| 597 |
{ |
| 598 |
return $this->container['status_message']; |
| 599 |
} |
| 600 |
|
| 601 |
/** |
| 602 |
* Sets status_message |
| 603 |
* |
| 604 |
* @param string|null $status_message Human readable status message, can be displayed to a user. |
| 605 |
* |
| 606 |
* @return $this |
| 607 |
*/ |
| 608 |
public function setStatusMessage($status_message) |
| 609 |
{ |
| 610 |
$this->container['status_message'] = $status_message; |
| 611 |
|
| 612 |
return $this; |
| 613 |
} |
| 614 |
|
| 615 |
/** |
| 616 |
* Gets customer |
| 617 |
* |
| 618 |
* @return \OpenAPI\Client\Model\PaymentCustomer|null |
| 619 |
*/ |
| 620 |
public function getCustomer() |
| 621 |
{ |
| 622 |
return $this->container['customer']; |
| 623 |
} |
| 624 |
|
| 625 |
/** |
| 626 |
* Sets customer |
| 627 |
* |
| 628 |
* @param \OpenAPI\Client\Model\PaymentCustomer|null $customer customer |
| 629 |
* |
| 630 |
* @return $this |
| 631 |
*/ |
| 632 |
public function setCustomer($customer) |
| 633 |
{ |
| 634 |
$this->container['customer'] = $customer; |
| 635 |
|
| 636 |
return $this; |
| 637 |
} |
| 638 |
|
| 639 |
/** |
| 640 |
* Gets payment_token |
| 641 |
* |
| 642 |
* @return string|null |
| 643 |
*/ |
| 644 |
public function getPaymentToken() |
| 645 |
{ |
| 646 |
return $this->container['payment_token']; |
| 647 |
} |
| 648 |
|
| 649 |
/** |
| 650 |
* Sets payment_token |
| 651 |
* |
| 652 |
* @param string|null $payment_token A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. |
| 653 |
* |
| 654 |
* @return $this |
| 655 |
*/ |
| 656 |
public function setPaymentToken($payment_token) |
| 657 |
{ |
| 658 |
$this->container['payment_token'] = $payment_token; |
| 659 |
|
| 660 |
return $this; |
| 661 |
} |
| 662 |
|
| 663 |
/** |
| 664 |
* Gets payment_method |
| 665 |
* |
| 666 |
* @return \OpenAPI\Client\Model\PaymentPaymentMethod|null |
| 667 |
*/ |
| 668 |
public function getPaymentMethod() |
| 669 |
{ |
| 670 |
return $this->container['payment_method']; |
| 671 |
} |
| 672 |
|
| 673 |
/** |
| 674 |
* Sets payment_method |
| 675 |
* |
| 676 |
* @param \OpenAPI\Client\Model\PaymentPaymentMethod|null $payment_method payment_method |
| 677 |
* |
| 678 |
* @return $this |
| 679 |
*/ |
| 680 |
public function setPaymentMethod($payment_method) |
| 681 |
{ |
| 682 |
$this->container['payment_method'] = $payment_method; |
| 683 |
|
| 684 |
return $this; |
| 685 |
} |
| 686 |
|
| 687 |
/** |
| 688 |
* Gets shop |
| 689 |
* |
| 690 |
* @return \OpenAPI\Client\Model\PaymentShop|null |
| 691 |
*/ |
| 692 |
public function getShop() |
| 693 |
{ |
| 694 |
return $this->container['shop']; |
| 695 |
} |
| 696 |
|
| 697 |
/** |
| 698 |
* Sets shop |
| 699 |
* |
| 700 |
* @param \OpenAPI\Client\Model\PaymentShop|null $shop shop |
| 701 |
* |
| 702 |
* @return $this |
| 703 |
*/ |
| 704 |
public function setShop($shop) |
| 705 |
{ |
| 706 |
$this->container['shop'] = $shop; |
| 707 |
|
| 708 |
return $this; |
| 709 |
} |
| 710 |
|
| 711 |
/** |
| 712 |
* Gets billing_details |
| 713 |
* |
| 714 |
* @return \OpenAPI\Client\Model\PaymentBillingDetails|null |
| 715 |
*/ |
| 716 |
public function getBillingDetails() |
| 717 |
{ |
| 718 |
return $this->container['billing_details']; |
| 719 |
} |
| 720 |
|
| 721 |
/** |
| 722 |
* Sets billing_details |
| 723 |
* |
| 724 |
* @param \OpenAPI\Client\Model\PaymentBillingDetails|null $billing_details billing_details |
| 725 |
* |
| 726 |
* @return $this |
| 727 |
*/ |
| 728 |
public function setBillingDetails($billing_details) |
| 729 |
{ |
| 730 |
$this->container['billing_details'] = $billing_details; |
| 731 |
|
| 732 |
return $this; |
| 733 |
} |
| 734 |
|
| 735 |
/** |
| 736 |
* Gets shipping_details |
| 737 |
* |
| 738 |
* @return \OpenAPI\Client\Model\PaymentShippingDetails|null |
| 739 |
*/ |
| 740 |
public function getShippingDetails() |
| 741 |
{ |
| 742 |
return $this->container['shipping_details']; |
| 743 |
} |
| 744 |
|
| 745 |
/** |
| 746 |
* Sets shipping_details |
| 747 |
* |
| 748 |
* @param \OpenAPI\Client\Model\PaymentShippingDetails|null $shipping_details shipping_details |
| 749 |
* |
| 750 |
* @return $this |
| 751 |
*/ |
| 752 |
public function setShippingDetails($shipping_details) |
| 753 |
{ |
| 754 |
$this->container['shipping_details'] = $shipping_details; |
| 755 |
|
| 756 |
return $this; |
| 757 |
} |
| 758 |
|
| 759 |
/** |
| 760 |
* Gets refunded_amount |
| 761 |
* |
| 762 |
* @return int|null |
| 763 |
*/ |
| 764 |
public function getRefundedAmount() |
| 765 |
{ |
| 766 |
return $this->container['refunded_amount']; |
| 767 |
} |
| 768 |
|
| 769 |
/** |
| 770 |
* Sets refunded_amount |
| 771 |
* |
| 772 |
* @param int|null $refunded_amount Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). |
| 773 |
* |
| 774 |
* @return $this |
| 775 |
*/ |
| 776 |
public function setRefundedAmount($refunded_amount) |
| 777 |
{ |
| 778 |
$this->container['refunded_amount'] = $refunded_amount; |
| 779 |
|
| 780 |
return $this; |
| 781 |
} |
| 782 |
|
| 783 |
/** |
| 784 |
* Gets last_refund_amount |
| 785 |
* |
| 786 |
* @return int|null |
| 787 |
*/ |
| 788 |
public function getLastRefundAmount() |
| 789 |
{ |
| 790 |
return $this->container['last_refund_amount']; |
| 791 |
} |
| 792 |
|
| 793 |
/** |
| 794 |
* Sets last_refund_amount |
| 795 |
* |
| 796 |
* @param int|null $last_refund_amount Amount in cents refunded in the last transaction. |
| 797 |
* |
| 798 |
* @return $this |
| 799 |
*/ |
| 800 |
public function setLastRefundAmount($last_refund_amount) |
| 801 |
{ |
| 802 |
$this->container['last_refund_amount'] = $last_refund_amount; |
| 803 |
|
| 804 |
return $this; |
| 805 |
} |
| 806 |
|
| 807 |
/** |
| 808 |
* Gets last_refund_reason |
| 809 |
* |
| 810 |
* @return string|null |
| 811 |
*/ |
| 812 |
public function getLastRefundReason() |
| 813 |
{ |
| 814 |
return $this->container['last_refund_reason']; |
| 815 |
} |
| 816 |
|
| 817 |
/** |
| 818 |
* Sets last_refund_reason |
| 819 |
* |
| 820 |
* @param string|null $last_refund_reason The reason of the last refund transaction. |
| 821 |
* |
| 822 |
* @return $this |
| 823 |
*/ |
| 824 |
public function setLastRefundReason($last_refund_reason) |
| 825 |
{ |
| 826 |
$this->container['last_refund_reason'] = $last_refund_reason; |
| 827 |
|
| 828 |
return $this; |
| 829 |
} |
| 830 |
|
| 831 |
/** |
| 832 |
* Gets cancellation_reason |
| 833 |
* |
| 834 |
* @return \OpenAPI\Client\Model\PaymentCancellationReason|null |
| 835 |
*/ |
| 836 |
public function getCancellationReason() |
| 837 |
{ |
| 838 |
return $this->container['cancellation_reason']; |
| 839 |
} |
| 840 |
|
| 841 |
/** |
| 842 |
* Sets cancellation_reason |
| 843 |
* |
| 844 |
* @param \OpenAPI\Client\Model\PaymentCancellationReason|null $cancellation_reason cancellation_reason |
| 845 |
* |
| 846 |
* @return $this |
| 847 |
*/ |
| 848 |
public function setCancellationReason($cancellation_reason) |
| 849 |
{ |
| 850 |
$this->container['cancellation_reason'] = $cancellation_reason; |
| 851 |
|
| 852 |
return $this; |
| 853 |
} |
| 854 |
|
| 855 |
/** |
| 856 |
* Gets session_details |
| 857 |
* |
| 858 |
* @return \OpenAPI\Client\Model\PaymentSessionDetails|null |
| 859 |
*/ |
| 860 |
public function getSessionDetails() |
| 861 |
{ |
| 862 |
return $this->container['session_details']; |
| 863 |
} |
| 864 |
|
| 865 |
/** |
| 866 |
* Sets session_details |
| 867 |
* |
| 868 |
* @param \OpenAPI\Client\Model\PaymentSessionDetails|null $session_details session_details |
| 869 |
* |
| 870 |
* @return $this |
| 871 |
*/ |
| 872 |
public function setSessionDetails($session_details) |
| 873 |
{ |
| 874 |
$this->container['session_details'] = $session_details; |
| 875 |
|
| 876 |
return $this; |
| 877 |
} |
| 878 |
|
| 879 |
/** |
| 880 |
* Gets next_action |
| 881 |
* |
| 882 |
* @return \OpenAPI\Client\Model\PaymentNextAction|null |
| 883 |
*/ |
| 884 |
public function getNextAction() |
| 885 |
{ |
| 886 |
return $this->container['next_action']; |
| 887 |
} |
| 888 |
|
| 889 |
/** |
| 890 |
* Sets next_action |
| 891 |
* |
| 892 |
* @param \OpenAPI\Client\Model\PaymentNextAction|null $next_action next_action |
| 893 |
* |
| 894 |
* @return $this |
| 895 |
*/ |
| 896 |
public function setNextAction($next_action) |
| 897 |
{ |
| 898 |
$this->container['next_action'] = $next_action; |
| 899 |
|
| 900 |
return $this; |
| 901 |
} |
| 902 |
|
| 903 |
/** |
| 904 |
* Gets created_at |
| 905 |
* |
| 906 |
* @return int|null |
| 907 |
*/ |
| 908 |
public function getCreatedAt() |
| 909 |
{ |
| 910 |
return $this->container['created_at']; |
| 911 |
} |
| 912 |
|
| 913 |
/** |
| 914 |
* Sets created_at |
| 915 |
* |
| 916 |
* @param int|null $created_at Time at which the resource was created. Measured in seconds since the Unix epoch. |
| 917 |
* |
| 918 |
* @return $this |
| 919 |
*/ |
| 920 |
public function setCreatedAt($created_at) |
| 921 |
{ |
| 922 |
$this->container['created_at'] = $created_at; |
| 923 |
|
| 924 |
return $this; |
| 925 |
} |
| 926 |
|
| 927 |
/** |
| 928 |
* Gets updated_at |
| 929 |
* |
| 930 |
* @return int|null |
| 931 |
*/ |
| 932 |
public function getUpdatedAt() |
| 933 |
{ |
| 934 |
return $this->container['updated_at']; |
| 935 |
} |
| 936 |
|
| 937 |
/** |
| 938 |
* Sets updated_at |
| 939 |
* |
| 940 |
* @param int|null $updated_at Time at which the resource updated last time. Measured in seconds since the Unix epoch. |
| 941 |
* |
| 942 |
* @return $this |
| 943 |
*/ |
| 944 |
public function setUpdatedAt($updated_at) |
| 945 |
{ |
| 946 |
$this->container['updated_at'] = $updated_at; |
| 947 |
|
| 948 |
return $this; |
| 949 |
} |
| 950 |
/** |
| 951 |
* Returns true if offset exists. False otherwise. |
| 952 |
* |
| 953 |
* @param integer $offset Offset |
| 954 |
* |
| 955 |
* @return boolean |
| 956 |
*/ |
| 957 |
public function offsetExists($offset) |
| 958 |
{ |
| 959 |
return isset($this->container[$offset]); |
| 960 |
} |
| 961 |
|
| 962 |
/** |
| 963 |
* Gets offset. |
| 964 |
* |
| 965 |
* @param integer $offset Offset |
| 966 |
* |
| 967 |
* @return mixed |
| 968 |
*/ |
| 969 |
public function offsetGet($offset) |
| 970 |
{ |
| 971 |
return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 972 |
} |
| 973 |
|
| 974 |
/** |
| 975 |
* Sets value based on offset. |
| 976 |
* |
| 977 |
* @param integer $offset Offset |
| 978 |
* @param mixed $value Value to be set |
| 979 |
* |
| 980 |
* @return void |
| 981 |
*/ |
| 982 |
public function offsetSet($offset, $value) |
| 983 |
{ |
| 984 |
if (is_null($offset)) { |
| 985 |
$this->container[] = $value; |
| 986 |
} else { |
| 987 |
$this->container[$offset] = $value; |
| 988 |
} |
| 989 |
} |
| 990 |
|
| 991 |
/** |
| 992 |
* Unsets offset. |
| 993 |
* |
| 994 |
* @param integer $offset Offset |
| 995 |
* |
| 996 |
* @return void |
| 997 |
*/ |
| 998 |
public function offsetUnset($offset) |
| 999 |
{ |
| 1000 |
unset($this->container[$offset]); |
| 1001 |
} |
| 1002 |
|
| 1003 |
/** |
| 1004 |
* Gets the string presentation of the object |
| 1005 |
* |
| 1006 |
* @return string |
| 1007 |
*/ |
| 1008 |
public function __toString() |
| 1009 |
{ |
| 1010 |
return json_encode( |
| 1011 |
ObjectSerializer::sanitizeForSerialization($this), |
| 1012 |
JSON_PRETTY_PRINT |
| 1013 |
); |
| 1014 |
} |
| 1015 |
|
| 1016 |
/** |
| 1017 |
* Gets a header-safe presentation of the object |
| 1018 |
* |
| 1019 |
* @return string |
| 1020 |
*/ |
| 1021 |
public function toHeaderValue() |
| 1022 |
{ |
| 1023 |
return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 1024 |
} |
| 1025 |
} |
| 1026 |
|
| 1027 |
|
| 1028 |
|