All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
49 lines
893 B
PHP
49 lines
893 B
PHP
<?php
|
|
|
|
namespace Omnipay\Stripe\Message;
|
|
|
|
/**
|
|
* Stripe Fetch Coupon Request
|
|
*
|
|
* @see \Omnipay\Stripe\Gateway
|
|
* @link https://stripe.com/docs/api/coupons/retrieve
|
|
*/
|
|
class FetchCouponRequest extends AbstractRequest
|
|
{
|
|
/**
|
|
* Get the coupon id.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCouponId()
|
|
{
|
|
return $this->getParameter('couponId');
|
|
}
|
|
|
|
/**
|
|
* Set the coupon id.
|
|
*
|
|
* @param string
|
|
* @return FetchCouponRequest provides a fluent interface.
|
|
*/
|
|
public function setCouponId($value)
|
|
{
|
|
return $this->setParameter('couponId', $value);
|
|
}
|
|
|
|
public function getData()
|
|
{
|
|
$this->validate('couponId');
|
|
}
|
|
|
|
public function getEndpoint()
|
|
{
|
|
return $this->endpoint.'/coupons/'.$this->getCouponId();
|
|
}
|
|
|
|
public function getHttpMethod()
|
|
{
|
|
return 'GET';
|
|
}
|
|
}
|