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

stripe / stripe-php / 9276393583

28 May 2024 09:10PM UTC coverage: 65.291% (-0.8%) from 66.119%
9276393583

Pull #1702

github

web-flow
Merge 8a5208ad2 into 7038876e7
Pull Request #1702: Update generated code

1026 of 1594 new or added lines in 106 files covered. (64.37%)

15 existing lines in 3 files now uncovered.

3386 of 5186 relevant lines covered (65.29%)

2.26 hits per line

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

0.0
/lib/Issuing/Token.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\Issuing;
6

7
/**
8
 * An issuing token object is created when an issued card is added to a digital wallet. As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can <a href="https://stripe.com/docs/issuing/controls/token-management">view and manage these tokens</a> through Stripe.
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\Issuing\Card $card Card associated with this token.
13
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
14
 * @property null|string $device_fingerprint The hashed ID derived from the device ID from the card network associated with the token.
15
 * @property null|string $last4 The last four digits of the token.
16
 * @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.
17
 * @property string $network The token service provider / card network associated with the token.
18
 * @property null|\Stripe\StripeObject $network_data
19
 * @property int $network_updated_at Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
20
 * @property string $status The usage state of the token.
21
 * @property null|string $wallet_provider The digital wallet for this token, if one was used.
22
 */
23
class Token extends \Stripe\ApiResource
24
{
25
    const OBJECT_NAME = 'issuing.token';
26

27
    use \Stripe\ApiOperations\Update;
28

29
    const NETWORK_MASTERCARD = 'mastercard';
30
    const NETWORK_VISA = 'visa';
31

32
    const STATUS_ACTIVE = 'active';
33
    const STATUS_DELETED = 'deleted';
34
    const STATUS_REQUESTED = 'requested';
35
    const STATUS_SUSPENDED = 'suspended';
36

37
    const WALLET_PROVIDER_APPLE_PAY = 'apple_pay';
38
    const WALLET_PROVIDER_GOOGLE_PAY = 'google_pay';
39
    const WALLET_PROVIDER_SAMSUNG_PAY = 'samsung_pay';
40

41
    /**
42
     * Lists all Issuing <code>Token</code> objects for a given card.
43
     *
44
     * @param null|mixed $params
45
     * @param null|mixed $opts
46
     */
NEW
47
    public static function all($params = null, $opts = null)
×
48
    {
NEW
49
        return static::_requestPage('/v1/issuing/tokens', \Stripe\Collection::class, $params, $opts);
×
50
    }
51

52
    /**
53
     * Retrieves an Issuing <code>Token</code> object.
54
     *
55
     * @param mixed $id
56
     * @param null|mixed $opts
57
     */
NEW
58
    public static function retrieve($id, $opts = null)
×
59
    {
NEW
60
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
NEW
61
        $instance = new static($id, $opts);
×
NEW
62
        $instance->refresh();
×
63

NEW
64
        return $instance;
×
65
    }
66

67
    /**
68
     * Attempts to update the specified Issuing <code>Token</code> object to the status
69
     * specified.
70
     *
71
     * @param mixed $id
72
     * @param null|mixed $params
73
     * @param null|mixed $opts
74
     */
NEW
75
    public static function update($id, $params = null, $opts = null)
×
76
    {
NEW
77
        self::_validateParams($params);
×
NEW
78
        $url = static::resourceUrl($id);
×
NEW
79
        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
×
NEW
80
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
×
NEW
81
        $obj->setLastResponse($response);
×
82

NEW
83
        return $obj;
×
84
    }
85
}
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

© 2024 Coveralls, Inc