ApiOperations
6 months ago
Apps
6 months ago
Billing
6 months ago
BillingPortal
6 months ago
Checkout
6 months ago
Climate
6 months ago
Entitlements
6 months ago
EventData
6 months ago
Events
6 months ago
Exception
6 months ago
FinancialConnections
6 months ago
Forwarding
6 months ago
HttpClient
6 months ago
Identity
6 months ago
Issuing
6 months ago
Radar
6 months ago
Reporting
6 months ago
Service
6 months ago
Sigma
6 months ago
Tax
6 months ago
Terminal
6 months ago
TestHelpers
6 months ago
Treasury
6 months ago
Util
6 months ago
V2
6 months ago
Account.php
6 months ago
AccountLink.php
6 months ago
AccountSession.php
6 months ago
ApiRequestor.php
6 months ago
ApiResource.php
6 months ago
ApiResponse.php
6 months ago
ApplePayDomain.php
6 months ago
Application.php
6 months ago
ApplicationFee.php
6 months ago
ApplicationFeeRefund.php
6 months ago
Balance.php
6 months ago
BalanceTransaction.php
6 months ago
BankAccount.php
6 months ago
BaseStripeClient.php
6 months ago
BaseStripeClientInterface.php
6 months ago
Capability.php
6 months ago
Card.php
6 months ago
CashBalance.php
6 months ago
Charge.php
6 months ago
Collection.php
6 months ago
ConfirmationToken.php
6 months ago
ConnectCollectionTransfer.php
6 months ago
CountrySpec.php
6 months ago
Coupon.php
6 months ago
CreditNote.php
6 months ago
CreditNoteLineItem.php
6 months ago
Customer.php
6 months ago
CustomerBalanceTransaction.php
6 months ago
CustomerCashBalanceTransaction.php
6 months ago
CustomerSession.php
6 months ago
Discount.php
6 months ago
Dispute.php
6 months ago
EphemeralKey.php
6 months ago
ErrorObject.php
6 months ago
Event.php
6 months ago
ExchangeRate.php
6 months ago
File.php
6 months ago
FileLink.php
6 months ago
FundingInstructions.php
6 months ago
Invoice.php
6 months ago
InvoiceItem.php
6 months ago
InvoiceLineItem.php
6 months ago
InvoicePayment.php
6 months ago
InvoiceRenderingTemplate.php
6 months ago
LineItem.php
6 months ago
LoginLink.php
6 months ago
Mandate.php
6 months ago
OAuth.php
6 months ago
OAuthErrorObject.php
6 months ago
PaymentIntent.php
6 months ago
PaymentLink.php
6 months ago
PaymentMethod.php
6 months ago
PaymentMethodConfiguration.php
6 months ago
PaymentMethodDomain.php
6 months ago
Payout.php
6 months ago
Person.php
6 months ago
Plan.php
6 months ago
Price.php
6 months ago
Product.php
6 months ago
ProductFeature.php
6 months ago
PromotionCode.php
6 months ago
Quote.php
6 months ago
Reason.php
6 months ago
RecipientTransfer.php
6 months ago
Refund.php
6 months ago
RelatedObject.php
6 months ago
RequestTelemetry.php
6 months ago
ReserveTransaction.php
6 months ago
Review.php
6 months ago
SearchResult.php
6 months ago
SetupAttempt.php
6 months ago
SetupIntent.php
6 months ago
ShippingRate.php
6 months ago
SingletonApiResource.php
6 months ago
Source.php
6 months ago
SourceMandateNotification.php
6 months ago
SourceTransaction.php
6 months ago
Stripe.php
6 months ago
StripeClient.php
6 months ago
StripeClientInterface.php
6 months ago
StripeObject.php
6 months ago
StripeStreamingClientInterface.php
6 months ago
Subscription.php
6 months ago
SubscriptionItem.php
6 months ago
SubscriptionSchedule.php
6 months ago
TaxCode.php
6 months ago
TaxDeductedAtSource.php
6 months ago
TaxId.php
6 months ago
TaxRate.php
6 months ago
ThinEvent.php
6 months ago
Token.php
6 months ago
Topup.php
6 months ago
Transfer.php
6 months ago
TransferReversal.php
6 months ago
Webhook.php
6 months ago
WebhookEndpoint.php
6 months ago
WebhookSignature.php
6 months ago
AccountSession.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | namespace AmeliaVendor\Stripe; |
| 5 | |
| 6 | /** |
| 7 | * An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. |
| 8 | * |
| 9 | * We recommend that you create an AccountSession each time you need to display an embedded component |
| 10 | * to your user. Do not save AccountSessions to your database as they expire relatively |
| 11 | * quickly, and cannot be used more than once. |
| 12 | * |
| 13 | * Related guide: <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">Connect embedded components</a> |
| 14 | * |
| 15 | * @property string $object String representing the object's type. Objects of the same type share the same value. |
| 16 | * @property string $account The ID of the account the AccountSession was created for |
| 17 | * @property string $client_secret <p>The client secret of this AccountSession. Used on the client to set up secure access to the given <code>account</code>.</p><p>The client secret can be used to provide access to <code>account</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/connect/get-started-connect-embedded-components">setup Connect embedded components</a> and learn about how <code>client_secret</code> should be handled.</p> |
| 18 | * @property (object{account_management: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), account_onboarding: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), balances: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), documents: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), financial_account: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool, send_money: bool, transfer_balance: bool}&StripeObject)}&StripeObject), financial_account_transactions: (object{enabled: bool, features: (object{card_spend_dispute_management: bool}&StripeObject)}&StripeObject), issuing_card: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, spend_control_management: bool}&StripeObject)}&StripeObject), issuing_cards_list: (object{enabled: bool, features: (object{card_management: bool, card_spend_dispute_management: bool, cardholder_management: bool, disable_stripe_user_authentication: bool, spend_control_management: bool}&StripeObject)}&StripeObject), notification_banner: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, external_account_collection: bool}&StripeObject)}&StripeObject), payment_details: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payments: (object{enabled: bool, features: (object{capture_payments: bool, destination_on_behalf_of_charge_management: bool, dispute_management: bool, refund_management: bool}&StripeObject)}&StripeObject), payouts: (object{enabled: bool, features: (object{disable_stripe_user_authentication: bool, edit_payout_schedule: bool, external_account_collection: bool, instant_payouts: bool, standard_payouts: bool}&StripeObject)}&StripeObject), payouts_list: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_registrations: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject), tax_settings: (object{enabled: bool, features: (object{}&StripeObject)}&StripeObject)}&StripeObject) $components |
| 19 | * @property int $expires_at The timestamp at which this AccountSession will expire. |
| 20 | * @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. |
| 21 | */ |
| 22 | class AccountSession extends ApiResource |
| 23 | { |
| 24 | const OBJECT_NAME = 'account_session'; |
| 25 | /** |
| 26 | * Creates a AccountSession object that includes a single-use token that the |
| 27 | * platform can use on their front-end to grant client-side API access. |
| 28 | * |
| 29 | * @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params |
| 30 | * @param null|array|string $options |
| 31 | * |
| 32 | * @return AccountSession the created resource |
| 33 | * |
| 34 | * @throws Exception\ApiErrorException if the request fails |
| 35 | */ |
| 36 | public static function create($params = null, $options = null) |
| 37 | { |
| 38 | self::_validateParams($params); |
| 39 | $url = static::classUrl(); |
| 40 | list($response, $opts) = static::_staticRequest('post', $url, $params, $options); |
| 41 | $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts); |
| 42 | $obj->setLastResponse($response); |
| 43 | return $obj; |
| 44 | } |
| 45 | } |