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

stripe / stripe-php / #7087

pending completion
#7087

push

php-coveralls

pakrym-stripe
Bump version to 10.14.0-beta.2

1831 of 2732 relevant lines covered (67.02%)

3.81 hits per line

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

0.0
/lib/Apps/Secret.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Apps;
6

7
/**
8
 * Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
9
 *
10
 * The primary resource in Secret Store is a <code>secret</code>. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
11
 *
12
 * All Dashboard users and the app backend share <code>account</code> scoped secrets. Use the <code>account</code> scope for secrets that don't change per-user, like a third-party API key.
13
 *
14
 * A <code>user</code> scoped secret is accessible by the app backend and one specific Dashboard user. Use the <code>user</code> scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
15
 *
16
 * Related guide: <a href="https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects">Store data between page reloads</a>
17
 *
18
 * @property string $id Unique identifier for the object.
19
 * @property string $object String representing the object's type. Objects of the same type share the same value.
20
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
21
 * @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes.
22
 * @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.
23
 * @property string $name A name for the secret that's unique within the scope.
24
 * @property null|string $payload The plaintext secret value to be stored.
25
 * @property \Stripe\StripeObject $scope
26
 */
27
class Secret extends \Stripe\ApiResource
28
{
29
    const OBJECT_NAME = 'apps.secret';
30

31
    use \Stripe\ApiOperations\All;
32
    use \Stripe\ApiOperations\Create;
33

34
    /**
35
     * @param null|array $params
36
     * @param null|array|string $opts
37
     *
38
     * @throws \Stripe\Exception\ApiErrorException if the request fails
39
     *
40
     * @return \Stripe\Apps\Secret the deleted secret
41
     */
42
    public static function deleteWhere($params = null, $opts = null)
43
    {
44
        $url = static::classUrl() . '/delete';
×
45
        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
×
46
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
47
        $obj->setLastResponse($response);
×
48

49
        return $obj;
×
50
    }
51

52
    /**
53
     * @param null|array $params
54
     * @param null|array|string $opts
55
     *
56
     * @throws \Stripe\Exception\ApiErrorException if the request fails
57
     *
58
     * @return \Stripe\Apps\Secret the finded secret
59
     */
60
    public static function find($params = null, $opts = null)
61
    {
62
        $url = static::classUrl() . '/find';
×
63
        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
×
64
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
65
        $obj->setLastResponse($response);
×
66

67
        return $obj;
×
68
    }
69
}
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