Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1524

Merged
merged 10 commits into from
Jul 13, 2023
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v406
v417
4 changes: 3 additions & 1 deletion init.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
require __DIR__ . '/lib/PaymentIntent.php';
require __DIR__ . '/lib/PaymentLink.php';
require __DIR__ . '/lib/PaymentMethod.php';
require __DIR__ . '/lib/PaymentMethodConfiguration.php';
require __DIR__ . '/lib/Payout.php';
require __DIR__ . '/lib/Person.php';
require __DIR__ . '/lib/Plan.php';
Expand Down Expand Up @@ -216,6 +217,7 @@
require __DIR__ . '/lib/Service/OrderService.php';
require __DIR__ . '/lib/Service/PaymentIntentService.php';
require __DIR__ . '/lib/Service/PaymentLinkService.php';
require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.php';
require __DIR__ . '/lib/Service/PaymentMethodService.php';
require __DIR__ . '/lib/Service/PayoutService.php';
require __DIR__ . '/lib/Service/PlanService.php';
Expand Down Expand Up @@ -244,7 +246,7 @@
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
require __DIR__ . '/lib/Service/Tax/SettingService.php';
require __DIR__ . '/lib/Service/Tax/SettingsService.php';
require __DIR__ . '/lib/Service/Tax/TaxServiceFactory.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
require __DIR__ . '/lib/Service/TaxCodeService.php';
Expand Down
1 change: 1 addition & 0 deletions lib/PaymentIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details.
* @property null|\Stripe\StripeObject $payment_details
* @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent.
* @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent.
* @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent.
* @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
* @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment.
Expand Down
63 changes: 63 additions & 0 deletions lib/PaymentMethodConfiguration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* An object detailing payment method configurations.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|\Stripe\StripeObject $acss_debit
* @property bool $active Whether the configuration can be used for new payments.
* @property null|\Stripe\StripeObject $affirm
* @property null|\Stripe\StripeObject $afterpay_clearpay
* @property null|\Stripe\StripeObject $alipay
* @property null|\Stripe\StripeObject $apple_pay
* @property null|string $application The Connect application associated with this configuration.
* @property null|\Stripe\StripeObject $au_becs_debit
* @property null|\Stripe\StripeObject $bacs_debit
* @property null|\Stripe\StripeObject $bancontact
* @property null|\Stripe\StripeObject $blik
* @property null|\Stripe\StripeObject $boleto
* @property null|\Stripe\StripeObject $card
* @property null|\Stripe\StripeObject $cartes_bancaires
* @property null|\Stripe\StripeObject $cashapp
* @property null|\Stripe\StripeObject $eps
* @property null|\Stripe\StripeObject $fpx
* @property null|\Stripe\StripeObject $giropay
* @property null|\Stripe\StripeObject $google_pay
* @property null|\Stripe\StripeObject $grabpay
* @property null|\Stripe\StripeObject $id_bank_transfer
* @property null|\Stripe\StripeObject $ideal
* @property bool $is_default The default configuration is used whenever no payment method configuration is specified.
* @property null|\Stripe\StripeObject $jcb
* @property null|\Stripe\StripeObject $klarna
* @property null|\Stripe\StripeObject $konbini
* @property null|\Stripe\StripeObject $link
* @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 $multibanco
* @property string $name Configuration name.
* @property null|\Stripe\StripeObject $netbanking
* @property null|\Stripe\StripeObject $oxxo
* @property null|\Stripe\StripeObject $p24
* @property null|string $parent The configuration's parent configuration.
* @property null|\Stripe\StripeObject $pay_by_bank
* @property null|\Stripe\StripeObject $paynow
* @property null|\Stripe\StripeObject $promptpay
* @property null|\Stripe\StripeObject $sepa_debit
* @property null|\Stripe\StripeObject $sofort
* @property null|\Stripe\StripeObject $upi
* @property null|\Stripe\StripeObject $us_bank_account
* @property null|\Stripe\StripeObject $wechat_pay
*/
class PaymentMethodConfiguration extends ApiResource
{
const OBJECT_NAME = 'payment_method_configuration';

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Retrieve;
use ApiOperations\Update;
}
2 changes: 2 additions & 0 deletions lib/Service/CoreServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @property OrderService $orders
* @property PaymentIntentService $paymentIntents
* @property PaymentLinkService $paymentLinks
* @property PaymentMethodConfigurationService $paymentMethodConfigurations
* @property PaymentMethodService $paymentMethods
* @property PayoutService $payouts
* @property PlanService $plans
Expand Down Expand Up @@ -112,6 +113,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'orders' => OrderService::class,
'paymentIntents' => PaymentIntentService::class,
'paymentLinks' => PaymentLinkService::class,
'paymentMethodConfigurations' => PaymentMethodConfigurationService::class,
'paymentMethods' => PaymentMethodService::class,
'payouts' => PayoutService::class,
'plans' => PlanService::class,
Expand Down
70 changes: 70 additions & 0 deletions lib/Service/PaymentMethodConfigurationService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service;

class PaymentMethodConfigurationService extends \Stripe\Service\AbstractService
{
/**
* List payment method configurations.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethodConfiguration>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/payment_method_configurations', $params, $opts);
}

/**
* Creates a payment method configuration.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/payment_method_configurations', $params, $opts);
}

/**
* Retrieve payment method configuration.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts);
}

/**
* Update payment method configuration.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodConfiguration
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Stripe\Service\Tax;

class SettingService extends \Stripe\Service\AbstractService
class SettingsService extends \Stripe\Service\AbstractService
{
/**
* Retrieves Tax <code>Settings</code> for a merchant.
Expand Down
4 changes: 2 additions & 2 deletions lib/Service/Tax/TaxServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @property CalculationService $calculations
* @property RegistrationService $registrations
* @property SettingService $settings
* @property SettingsService $settings
* @property TransactionService $transactions
*/
class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -20,7 +20,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
private static $classMap = [
'calculations' => CalculationService::class,
'registrations' => RegistrationService::class,
'settings' => SettingService::class,
'settings' => SettingsService::class,
'transactions' => TransactionService::class,
];

Expand Down
1 change: 1 addition & 0 deletions lib/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @property \Stripe\Service\OrderService $orders
* @property \Stripe\Service\PaymentIntentService $paymentIntents
* @property \Stripe\Service\PaymentLinkService $paymentLinks
* @property \Stripe\Service\PaymentMethodConfigurationService $paymentMethodConfigurations
* @property \Stripe\Service\PaymentMethodService $paymentMethods
* @property \Stripe\Service\PayoutService $payouts
* @property \Stripe\Service\PlanService $plans
Expand Down
2 changes: 1 addition & 1 deletion lib/Tax/CalculationLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @property int $amount The line item amount in integer cents. If <code>tax_behavior=inclusive</code>, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
* @property int $amount_tax The amount of tax calculated for this line item, in integer cents.
* @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|string $product A Product ID.
* @property null|string $product The ID of an existing <a href="https://stripe.com/docs/api/products/object">Product</a>.
* @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
* @property null|string $reference A custom identifier for this line item.
* @property string $tax_behavior Specifies whether the <code>amount</code> includes taxes. If <code>tax_behavior=inclusive</code>, then the amount includes taxes.
Expand Down
1 change: 1 addition & 0 deletions lib/Tax/TransactionLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @property int $amount_tax The amount of tax calculated for this line item, in integer cents.
* @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 $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.
* @property null|string $product The ID of an existing <a href="https://stripe.com/docs/api/products/object">Product</a>.
* @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
* @property string $reference A custom identifier for this line item in the transaction.
* @property null|\Stripe\StripeObject $reversal If <code>type=reversal</code>, contains information about what was reversed.
Expand Down
2 changes: 1 addition & 1 deletion lib/Util/ApiVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
class ApiVersion
{
const CURRENT = '2022-11-15';
const PREVIEW = '2023-06-08.preview-v2';
const PREVIEW = '20230712T200515';
}
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class ObjectTypes
\Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class,
\Stripe\PaymentLink::OBJECT_NAME => \Stripe\PaymentLink::class,
\Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class,
\Stripe\PaymentMethodConfiguration::OBJECT_NAME => \Stripe\PaymentMethodConfiguration::class,
\Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class,
\Stripe\Person::OBJECT_NAME => \Stripe\Person::class,
\Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class,
Expand Down