Skip to content

Commit

Permalink
Merge pull request #1515 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Jun 22, 2023
2 parents 24ca613 + aa99a9b commit 68db3f9
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v387
v393
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
require __DIR__ . '/lib/Customer.php';
require __DIR__ . '/lib/CustomerBalanceTransaction.php';
require __DIR__ . '/lib/CustomerCashBalanceTransaction.php';
require __DIR__ . '/lib/CustomerSession.php';
require __DIR__ . '/lib/Discount.php';
require __DIR__ . '/lib/Dispute.php';
require __DIR__ . '/lib/EphemeralKey.php';
Expand Down Expand Up @@ -223,6 +224,7 @@
require __DIR__ . '/lib/Service/CouponService.php';
require __DIR__ . '/lib/Service/CreditNoteService.php';
require __DIR__ . '/lib/Service/CustomerService.php';
require __DIR__ . '/lib/Service/CustomerSessionService.php';
require __DIR__ . '/lib/Service/DisputeService.php';
require __DIR__ . '/lib/Service/EphemeralKeyService.php';
require __DIR__ . '/lib/Service/EventService.php';
Expand Down
22 changes: 22 additions & 0 deletions lib/CustomerSession.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* A customer session allows you to grant client access to Stripe's frontend SDKs (like BillingJs)
* control over a customer.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string $client_secret <p>The client secret of this customer session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
* @property string|\Stripe\Customer $customer The customer the customer session was created for.
* @property int $expires_at The timestamp at which this customer session will expire.
* @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.
*/
class CustomerSession extends ApiResource
{
const OBJECT_NAME = 'customer_session';

use ApiOperations\Create;
}
1 change: 1 addition & 0 deletions lib/Mandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @property \Stripe\StripeObject $customer_acceptance
* @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.
* @property null|\Stripe\StripeObject $multi_use
* @property null|string $on_behalf_of The account (if any) for which the mandate is intended.
* @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate.
* @property \Stripe\StripeObject $payment_method_details
* @property null|\Stripe\StripeObject $single_use
Expand Down
2 changes: 2 additions & 0 deletions lib/Service/CoreServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @property CouponService $coupons
* @property CreditNoteService $creditNotes
* @property CustomerService $customers
* @property CustomerSessionService $customerSessions
* @property DisputeService $disputes
* @property EphemeralKeyService $ephemeralKeys
* @property EventService $events
Expand Down Expand Up @@ -93,6 +94,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'coupons' => CouponService::class,
'creditNotes' => CreditNoteService::class,
'customers' => CustomerService::class,
'customerSessions' => CustomerSessionService::class,
'disputes' => DisputeService::class,
'ephemeralKeys' => EphemeralKeyService::class,
'events' => EventService::class,
Expand Down
25 changes: 25 additions & 0 deletions lib/Service/CustomerSessionService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service;

class CustomerSessionService extends \Stripe\Service\AbstractService
{
/**
* Creates a customer session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\CustomerSession
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/customer_sessions', $params, $opts);
}
}
1 change: 1 addition & 0 deletions lib/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @property \Stripe\Service\CountrySpecService $countrySpecs
* @property \Stripe\Service\CouponService $coupons
* @property \Stripe\Service\CreditNoteService $creditNotes
* @property \Stripe\Service\CustomerSessionService $customerSessions
* @property \Stripe\Service\CustomerService $customers
* @property \Stripe\Service\DisputeService $disputes
* @property \Stripe\Service\EphemeralKeyService $ephemeralKeys
Expand Down
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ObjectTypes
\Stripe\Customer::OBJECT_NAME => \Stripe\Customer::class,
\Stripe\CustomerBalanceTransaction::OBJECT_NAME => \Stripe\CustomerBalanceTransaction::class,
\Stripe\CustomerCashBalanceTransaction::OBJECT_NAME => \Stripe\CustomerCashBalanceTransaction::class,
\Stripe\CustomerSession::OBJECT_NAME => \Stripe\CustomerSession::class,
\Stripe\Discount::OBJECT_NAME => \Stripe\Discount::class,
\Stripe\Dispute::OBJECT_NAME => \Stripe\Dispute::class,
\Stripe\EphemeralKey::OBJECT_NAME => \Stripe\EphemeralKey::class,
Expand Down

0 comments on commit 68db3f9

Please sign in to comment.