![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/Corals/modules/Payment/Stripe/Message/ |
<?php /** * Stripe Update Order Request. */ namespace Corals\Modules\Payment\Stripe\Message; /** * Stripe Update Order Request * * @see Corals\Modules\Payment\Stripe\Gateway * @link https://stripe.com/docs/api#update_order */ class UpdateOrderRequest extends AbstractRequest { /** * Set the order id * * @return UpdateProductRequest provides a fluent interface. */ public function setId($id) { return $this->setParameter('id', $id); } /** * Get the order id * * @return string */ public function getId() { return $this->getParameter('id'); } /** * Get the order coupon * * @return array */ public function getCoupon() { return $this->getParameter('coupon'); } /** * Set the order coupon value * * @return UpdateOrderRequest provides a fluent interface. */ public function setCoupon($coupon) { return $this->setParameter('coupon', $coupon); } /** * Get the order status * * @return array */ public function getStatus() { return $this->getParameter('status'); } /** * Set the order status value * * @return UpdateOrderRequest provides a fluent interface. */ public function setStatus($status) { return $this->setParameter('status', $status); } /** * Set the order id value * * @return UpdateOrderRequest provides a fluent interface. */ public function setCustomer($id) { return $this->setParameter('id', $id); } /** * @return array|mixed * @throws \Corals\Modules\Payment\Common\Exception\InvalidRequestException */ public function getData() { $this->validate('id'); $data = []; $coupon = $this->getCoupon(); if ($coupon != null) { $data['coupon'] = $coupon; } $status = $this->getStatus(); if ($coupon != null) { $data['status'] = $status; } return $data; } public function getEndpoint() { return $this->endpoint . '/orders/' . $this->getId(); } }