mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Bump stripe-php from 16.4.0 to 17.2.1
This commit is contained in:
@@ -12,15 +12,15 @@ namespace Stripe;
|
||||
* @property string $id Unique identifier for the object.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value.
|
||||
* @property null|int $amount_off Amount (in the <code>currency</code> specified) that will be taken off the subtotal of any invoices for this customer.
|
||||
* @property null|\Stripe\StripeObject $applies_to
|
||||
* @property null|(object{products: string[]}&StripeObject) $applies_to
|
||||
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
* @property null|string $currency If <code>amount_off</code> has been set, the three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> of the amount to take off.
|
||||
* @property null|\Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $duration One of <code>forever</code>, <code>once</code>, and <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
|
||||
* @property null|StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
|
||||
* @property string $duration One of <code>forever</code>, <code>once</code>, or <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
|
||||
* @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>.
|
||||
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
|
||||
* @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
|
||||
* @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
* @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts.
|
||||
* @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
|
||||
* @property null|int $redeem_by Date after which the coupon can no longer be redeemed.
|
||||
@@ -53,12 +53,12 @@ class Coupon extends ApiResource
|
||||
* a coupon with an <code>amount_off</code> of <amount>200</amount> is applied to
|
||||
* it.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array{amount_off?: int, applies_to?: array{products?: string[]}, currency?: string, currency_options?: array<string, array{amount_off: int}>, duration?: string, duration_in_months?: int, expand?: string[], id?: string, max_redemptions?: int, metadata?: null|array<string, string>, name?: string, percent_off?: float, redeem_by?: int} $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Coupon the created resource
|
||||
*
|
||||
* @return \Stripe\Coupon the created resource
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function create($params = null, $options = null)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ class Coupon extends ApiResource
|
||||
$url = static::classUrl();
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
@@ -82,9 +82,9 @@ class Coupon extends ApiResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Coupon the deleted resource
|
||||
*
|
||||
* @return \Stripe\Coupon the deleted resource
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function delete($params = null, $opts = null)
|
||||
{
|
||||
@@ -100,18 +100,18 @@ class Coupon extends ApiResource
|
||||
/**
|
||||
* Returns a list of your coupons.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Collection<Coupon> of ApiResources
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Coupon> of ApiResources
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function all($params = null, $opts = null)
|
||||
{
|
||||
$url = static::classUrl();
|
||||
|
||||
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
|
||||
return static::_requestPage($url, Collection::class, $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,13 +120,13 @@ class Coupon extends ApiResource
|
||||
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Coupon
|
||||
*
|
||||
* @return \Stripe\Coupon
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function retrieve($id, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
$opts = Util\RequestOptions::parse($opts);
|
||||
$instance = new static($id, $opts);
|
||||
$instance->refresh();
|
||||
|
||||
@@ -138,12 +138,12 @@ class Coupon extends ApiResource
|
||||
* amount_off) are, by design, not editable.
|
||||
*
|
||||
* @param string $id the ID of the resource to update
|
||||
* @param null|array $params
|
||||
* @param null|array{currency_options?: array<string, array{amount_off: int}>, expand?: string[], metadata?: null|array<string, string>, name?: string} $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
* @return Coupon the updated resource
|
||||
*
|
||||
* @return \Stripe\Coupon the updated resource
|
||||
* @throws Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function update($id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ class Coupon extends ApiResource
|
||||
$url = static::resourceUrl($id);
|
||||
|
||||
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj = Util\Util::convertToStripeObject($response->json, $opts);
|
||||
$obj->setLastResponse($response);
|
||||
|
||||
return $obj;
|
||||
|
||||
Reference in New Issue
Block a user