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 / PaymentMethod.php

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

101 lines 4.3 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 * PaymentMethod objects represent your customer's payment instruments. You can use
9 * them with <a
10 * href="https://stripe.com/docs/payments/payment-intents">PaymentIntents</a> to
11 * collect payments or save them to Customer objects to store instrument details
12 * for future payments.
13 *
14 * Related guides: <a
15 * href="https://stripe.com/docs/payments/payment-methods">Payment Methods</a> and
16 * <a href="https://stripe.com/docs/payments/more-payment-scenarios">More Payment
17 * Scenarios</a>.
18 *
19 * @property string $id Unique identifier for the object.
20 * @property string $object String representing the object's type. Objects of the same type share the same value.
21 * @property \Stripe\StripeObject $acss_debit
22 * @property \Stripe\StripeObject $affirm
23 * @property \Stripe\StripeObject $afterpay_clearpay
24 * @property \Stripe\StripeObject $alipay
25 * @property \Stripe\StripeObject $au_becs_debit
26 * @property \Stripe\StripeObject $bacs_debit
27 * @property \Stripe\StripeObject $bancontact
28 * @property \Stripe\StripeObject $billing_details
29 * @property \Stripe\StripeObject $blik
30 * @property \Stripe\StripeObject $boleto
31 * @property \Stripe\StripeObject $card
32 * @property \Stripe\StripeObject $card_present
33 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
34 * @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
35 * @property \Stripe\StripeObject $customer_balance
36 * @property \Stripe\StripeObject $eps
37 * @property \Stripe\StripeObject $fpx
38 * @property \Stripe\StripeObject $giropay
39 * @property \Stripe\StripeObject $grabpay
40 * @property \Stripe\StripeObject $ideal
41 * @property \Stripe\StripeObject $interac_present
42 * @property \Stripe\StripeObject $klarna
43 * @property \Stripe\StripeObject $konbini
44 * @property \Stripe\StripeObject $link
45 * @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.
46 * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
47 * @property \Stripe\StripeObject $oxxo
48 * @property \Stripe\StripeObject $p24
49 * @property \Stripe\StripeObject $paynow
50 * @property \Stripe\StripeObject $promptpay
51 * @property \Stripe\StripeObject $radar_options Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more information.
52 * @property \Stripe\StripeObject $sepa_debit
53 * @property \Stripe\StripeObject $sofort
54 * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
55 * @property \Stripe\StripeObject $us_bank_account
56 * @property \Stripe\StripeObject $wechat_pay
57 */
58 class PaymentMethod extends ApiResource
59 {
60 const OBJECT_NAME = 'payment_method';
61
62 use ApiOperations\All;
63 use ApiOperations\Create;
64 use ApiOperations\Retrieve;
65 use ApiOperations\Update;
66
67 /**
68 * @param null|array $params
69 * @param null|array|string $opts
70 *
71 * @throws \Stripe\Exception\ApiErrorException if the request fails
72 *
73 * @return \Stripe\PaymentMethod the attached payment method
74 */
75 public function attach($params = null, $opts = null)
76 {
77 $url = $this->instanceUrl() . '/attach';
78 list($response, $opts) = $this->_request('post', $url, $params, $opts);
79 $this->refreshFrom($response, $opts);
80
81 return $this;
82 }
83
84 /**
85 * @param null|array $params
86 * @param null|array|string $opts
87 *
88 * @throws \Stripe\Exception\ApiErrorException if the request fails
89 *
90 * @return \Stripe\PaymentMethod the detached payment method
91 */
92 public function detach($params = null, $opts = null)
93 {
94 $url = $this->instanceUrl() . '/detach';
95 list($response, $opts) = $this->_request('post', $url, $params, $opts);
96 $this->refreshFrom($response, $opts);
97
98 return $this;
99 }
100 }
101