wp-user-avatar
/
third-party
/
vendor
/
stripe
/
stripe-php
/
lib
/
Entitlements
/
ActiveEntitlement.php
ActiveEntitlement.php
2 months ago
ActiveEntitlementSummary.php
2 months ago
Feature.php
2 months ago
ActiveEntitlement.php
51 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace ProfilePressVendor\Stripe\Entitlements; |
| 5 | |
| 6 | /** |
| 7 | * An active entitlement describes access to a feature for a customer. |
| 8 | * |
| 9 | * @property string $id Unique identifier for the object. |
| 10 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 11 | * @property string|\Stripe\Entitlements\Feature $feature The <a href="https://stripe.com/docs/api/entitlements/feature">Feature</a> that the customer is entitled to. |
| 12 | * @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. |
| 13 | * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters. |
| 14 | */ |
| 15 | class ActiveEntitlement extends \ProfilePressVendor\Stripe\ApiResource |
| 16 | { |
| 17 | const OBJECT_NAME = 'entitlements.active_entitlement'; |
| 18 | /** |
| 19 | * Retrieve a list of active entitlements for a customer. |
| 20 | * |
| 21 | * @param null|array $params |
| 22 | * @param null|array|string $opts |
| 23 | * |
| 24 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 25 | * |
| 26 | * @return \Stripe\Collection<\Stripe\Entitlements\ActiveEntitlement> of ApiResources |
| 27 | */ |
| 28 | public static function all($params = null, $opts = null) |
| 29 | { |
| 30 | $url = static::classUrl(); |
| 31 | return static::_requestPage($url, \ProfilePressVendor\Stripe\Collection::class, $params, $opts); |
| 32 | } |
| 33 | /** |
| 34 | * Retrieve an active entitlement. |
| 35 | * |
| 36 | * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key |
| 37 | * @param null|array|string $opts |
| 38 | * |
| 39 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 40 | * |
| 41 | * @return \Stripe\Entitlements\ActiveEntitlement |
| 42 | */ |
| 43 | public static function retrieve($id, $opts = null) |
| 44 | { |
| 45 | $opts = \ProfilePressVendor\Stripe\Util\RequestOptions::parse($opts); |
| 46 | $instance = new static($id, $opts); |
| 47 | $instance->refresh(); |
| 48 | return $instance; |
| 49 | } |
| 50 | } |
| 51 |