• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 9308533534

30 May 2024 08:07PM UTC coverage: 65.24% (-0.9%) from 66.176%
9308533534

push

github

web-flow
Added PHPDocs for `create`, `update`, `delete`, `all`, `retrieve` methods after moving them out of traits.  (#1701)

* Demagiced crudl operation

* Improvements from codegen#1452

* Updated override to fix indents

1080 of 1682 new or added lines in 106 files covered. (64.21%)

15 existing lines in 3 files now uncovered.

3444 of 5279 relevant lines covered (65.24%)

2.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Entitlements/ActiveEntitlement.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Entitlements;
6

7
/**
8
 * An active entitlement describes access to a feature for a customer.
9
 *
10
 * @property string $id Unique identifier for the object.
11
 * @property string $object String representing the object's type. Objects of the same type share the same value.
12
 * @property string|\Stripe\Entitlements\Feature $feature The <a href="https://stripe.com/docs/api/entitlements/feature">Feature</a> that the customer is entitled to.
13
 * @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.
14
 * @property string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters.
15
 */
16
class ActiveEntitlement extends \Stripe\ApiResource
17
{
18
    const OBJECT_NAME = 'entitlements.active_entitlement';
19

20
    /**
21
     * Retrieve a list of active entitlements for a customer.
22
     *
23
     * @param null|array $params
24
     * @param null|array|string $opts
25
     *
26
     * @throws \Stripe\Exception\ApiErrorException if the request fails
27
     *
28
     * @return \Stripe\Collection<\Stripe\Entitlements\ActiveEntitlement> of ApiResources
29
     */
NEW
30
    public static function all($params = null, $opts = null)
×
31
    {
NEW
32
        $url = static::classUrl();
×
33

NEW
34
        return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
×
35
    }
36

37
    /**
38
     * Retrieve an active entitlement.
39
     *
40
     * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
41
     * @param null|array|string $opts
42
     *
43
     * @throws \Stripe\Exception\ApiErrorException if the request fails
44
     *
45
     * @return \Stripe\Entitlements\ActiveEntitlement
46
     */
NEW
47
    public static function retrieve($id, $opts = null)
×
48
    {
NEW
49
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
50
        $instance = new static($id, $opts);
×
NEW
51
        $instance->refresh();
×
52

NEW
53
        return $instance;
×
54
    }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc