PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 All 211 releases
charitable / vendor / stripe / stripe-php / lib / EphemeralKey.php

EphemeralKey.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/stripe/stripe-php/lib/EphemeralKey.php

43 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // File generated from our OpenAPI spec
4
5 namespace Stripe;
6
7 /**
8 * @property string $id Unique identifier for the object.
9 * @property string $object String representing the object's type. Objects of the same type share the same value.
10 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
11 * @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch.
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 $secret The key's secret. You can use this value to make authorized requests to the Stripe API.
14 */
15 class EphemeralKey extends ApiResource
16 {
17 const OBJECT_NAME = 'ephemeral_key';
18
19 use ApiOperations\Create {
20 create as protected _create;
21 }
22
23 use ApiOperations\Delete;
24
25 /**
26 * @param null|array $params
27 * @param null|array|string $opts
28 *
29 * @throws \Stripe\Exception\InvalidArgumentException if stripe_version is missing
30 * @throws \Stripe\Exception\ApiErrorException if the request fails
31 *
32 * @return \Stripe\EphemeralKey the created key
33 */
34 public static function create($params = null, $opts = null)
35 {
36 if (!$opts || !isset($opts['stripe_version'])) {
37 throw new Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key');
38 }
39
40 return self::_create($params, $opts);
41 }
42 }
43