Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/tutor-stripe/vendor/stripe/stripe-php/lib/Token.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
// File generated from our OpenAPI spec
4
+
5
+
namespace Stripe;
6
+
7
+
/**
8
+
* Tokenization is the process Stripe uses to collect sensitive card or bank
9
+
* account details, or personally identifiable information (PII), directly from
10
+
* your customers in a secure manner. A token representing this information is
11
+
* returned to your server to use. Use our
12
+
* <a href="https://stripe.com/docs/payments">recommended payments integrations</a> to perform this process
13
+
* on the client-side. This guarantees that no sensitive card data touches your server,
14
+
* and allows your integration to operate in a PCI-compliant way.
15
+
*
16
+
* If you can't use client-side tokenization, you can also create tokens using
17
+
* the API with either your publishable or secret API key. If
18
+
* your integration uses this method, you're responsible for any PCI compliance
19
+
* that it might require, and you must keep your secret API key safe. Unlike with
20
+
* client-side tokenization, your customer's information isn't sent directly to
21
+
* Stripe, so we can't determine how it's handled or stored.
22
+
*
23
+
* You can't store or use tokens more than once. To store card or bank account
24
+
* information for later use, create <a href="https://stripe.com/docs/api#customers">Customer</a>
25
+
* objects or <a href="/api#external_accounts">External accounts</a>.
26
+
* <a href="https://stripe.com/docs/radar">Radar</a>, our integrated solution for automatic fraud protection,
27
+
* performs best with integrations that use client-side tokenization.
28
+
*
29
+
* @property string $id Unique identifier for the object.
30
+
* @property string $object String representing the object's type. Objects of the same type share the same value.
31
+
* @property null|BankAccount $bank_account <p>These bank accounts are payment methods on <code>Customer</code> objects.</p><p>On the other hand <a href="/api#external_accounts">External Accounts</a> are transfer destinations on <code>Account</code> objects for connected accounts. They can be bank accounts or debit cards as well, and are documented in the links above.</p><p>Related guide: <a href="/payments/bank-debits-transfers">Bank debits and transfers</a></p>
32
+
* @property null|Card $card <p>You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.</p><p>Related guide: <a href="https://stripe.com/docs/sources/cards">Card payments with Sources</a></p>
33
+
* @property null|string $client_ip IP address of the client that generates the token.
34
+
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
35
+
* @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.
36
+
* @property string $type Type of the token: <code>account</code>, <code>bank_account</code>, <code>card</code>, or <code>pii</code>.
37
+
* @property bool $used Determines if you have already used this token (you can only use tokens once).
38
+
*/
39
+
class Token extends ApiResource
40
+
{
41
+
const OBJECT_NAME = 'token';
42
+
43
+
const TYPE_ACCOUNT = 'account';
44
+
const TYPE_BANK_ACCOUNT = 'bank_account';
45
+
const TYPE_CARD = 'card';
46
+
const TYPE_PII = 'pii';
47
+
48
+
/**
49
+
* Creates a single-use token that represents a bank account’s details. You can use
50
+
* this token with any v1 API method in place of a bank account dictionary. You can
51
+
* only use this token once. To do so, attach it to a <a href="#accounts">connected
52
+
* account</a> where <a
53
+
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
54
+
* is <code>application</code>, which includes Custom accounts.
55
+
*
56
+
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
57
+
* @param null|array|string $options
58
+
*
59
+
* @return Token the created resource
60
+
*
61
+
* @throws Exception\ApiErrorException if the request fails
62
+
*/
63
+
public static function create($params = null, $options = null)
64
+
{
65
+
self::_validateParams($params);
66
+
$url = static::classUrl();
67
+
68
+
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
69
+
$obj = Util\Util::convertToStripeObject($response->json, $opts);
70
+
$obj->setLastResponse($response);
71
+
72
+
return $obj;
73
+
}
74
+
75
+
/**
76
+
* Retrieves the token with the given ID.
77
+
*
78
+
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
79
+
* @param null|array|string $opts
80
+
*
81
+
* @return Token
82
+
*
83
+
* @throws Exception\ApiErrorException if the request fails
84
+
*/
85
+
public static function retrieve($id, $opts = null)
86
+
{
87
+
$opts = Util\RequestOptions::parse($opts);
88
+
$instance = new static($id, $opts);
89
+
$instance->refresh();
90
+
91
+
return $instance;
92
+
}
93
+
}
94
+