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

stripe / stripe-php / 6471862601

10 Oct 2023 04:02PM UTC coverage: 69.665% (-0.5%) from 70.141%
6471862601

push

github

web-flow
Merge pull request #1570 from localheinz/feature/coveralls

Enhancement: Use `coverallsapp/github-action` to report code coverage

2393 of 3435 relevant lines covered (69.67%)

3.5 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|bool $deleted If true, indicates that this secret has been deleted
22
 * @property null|int $expires_at The Unix timestamp for the expiry time of the secret, after which the secret deletes.
23
 * @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.
24
 * @property string $name A name for the secret that's unique within the scope.
25
 * @property null|string $payload The plaintext secret value to be stored.
26
 * @property \Stripe\StripeObject $scope
27
 */
28
class Secret extends \Stripe\ApiResource
29
{
30
    const OBJECT_NAME = 'apps.secret';
31

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

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

50
        return $obj;
×
51
    }
52

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

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