| 1 |
<?php |
| 2 |
|
| 3 |
// File generated from our OpenAPI spec |
| 4 |
|
| 5 |
namespace Stripe; |
| 6 |
|
| 7 |
/** |
| 8 |
* A Promotion Code represents a customer-redeemable code for a coupon. It can be |
| 9 |
* used to create multiple codes for a single coupon. |
| 10 |
* |
| 11 |
* @property string $id Unique identifier for the object. |
| 12 |
* @property string $object String representing the object's type. Objects of the same type share the same value. |
| 13 |
* @property bool $active Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. |
| 14 |
* @property string $code The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. |
| 15 |
* @property \Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#invoices">invoices</a> or <a href="https://stripe.com/docs/api#create_order_legacy-coupon">orders</a>. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a>. |
| 16 |
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. |
| 17 |
* @property null|string|\Stripe\Customer $customer The customer that this promotion code can be used by. |
| 18 |
* @property null|int $expires_at Date at which the promotion code can no longer be redeemed. |
| 19 |
* @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. |
| 20 |
* @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed. |
| 21 |
* @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. |
| 22 |
* @property \Stripe\StripeObject $restrictions |
| 23 |
* @property int $times_redeemed Number of times this promotion code has been used. |
| 24 |
*/ |
| 25 |
class PromotionCode extends ApiResource |
| 26 |
{ |
| 27 |
const OBJECT_NAME = 'promotion_code'; |
| 28 |
|
| 29 |
use ApiOperations\All; |
| 30 |
use ApiOperations\Create; |
| 31 |
use ApiOperations\Retrieve; |
| 32 |
use ApiOperations\Update; |
| 33 |
} |
| 34 |
|