From e7f857f2557c471f4778e6481c322deddc69970f Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Thu, 21 Jul 2022 15:00:37 -0400 Subject: [PATCH 1/3] Set version to 8.11.0 to simplify merge --- VERSION | 2 +- lib/Stripe.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index e5c15102d..db3905bf8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.9.0 +8.11.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index e3d74d3c2..99cf7ae31 100644 --- a/lib/Stripe.php +++ b/lib/Stripe.php @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '8.9.0'; + const VERSION = '8.11.0'; /** * @return string the API key used for requests From d4a3ccd589fef21104449b63d765760b1b45de8f Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Thu, 21 Jul 2022 15:00:37 -0400 Subject: [PATCH 2/3] Reset version to 8.9.0 --- VERSION | 2 +- lib/Stripe.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index db3905bf8..e5c15102d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.11.0 +8.9.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 99cf7ae31..e3d74d3c2 100644 --- a/lib/Stripe.php +++ b/lib/Stripe.php @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '8.11.0'; + const VERSION = '8.9.0'; /** * @return string the API key used for requests From 7f6a1524a2ce352e75e1d0ee2c180fac9f37bcb9 Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Thu, 21 Jul 2022 15:01:04 -0400 Subject: [PATCH 3/3] Codegen for openapi v170 --- OPENAPI_VERSION | 2 +- init.php | 4 ++-- lib/Customer.php | 2 ++ lib/{QuotePhaseConfiguration.php => QuotePhase.php} | 2 +- lib/Service/CoreServiceFactory.php | 4 ++-- ...ePhaseConfigurationService.php => QuotePhaseService.php} | 6 +++--- lib/StripeClient.php | 2 +- lib/SubscriptionItem.php | 1 + lib/Util/ObjectTypes.php | 2 +- 9 files changed, 14 insertions(+), 11 deletions(-) rename lib/{QuotePhaseConfiguration.php => QuotePhase.php} (98%) rename lib/Service/{QuotePhaseConfigurationService.php => QuotePhaseService.php} (89%) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6cd1357ca..48af0461c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v166 \ No newline at end of file +v170 \ No newline at end of file diff --git a/init.php b/init.php index 77935a8f7..29fe2323f 100644 --- a/init.php +++ b/init.php @@ -141,7 +141,7 @@ require __DIR__ . '/lib/Product.php'; require __DIR__ . '/lib/PromotionCode.php'; require __DIR__ . '/lib/Quote.php'; -require __DIR__ . '/lib/QuotePhaseConfiguration.php'; +require __DIR__ . '/lib/QuotePhase.php'; require __DIR__ . '/lib/Radar/EarlyFraudWarning.php'; require __DIR__ . '/lib/Radar/ValueList.php'; require __DIR__ . '/lib/Radar/ValueListItem.php'; @@ -234,7 +234,7 @@ require __DIR__ . '/lib/Service/ProductService.php'; require __DIR__ . '/lib/Service/PromotionCodeService.php'; require __DIR__ . '/lib/Service/QuoteService.php'; -require __DIR__ . '/lib/Service/QuotePhaseConfigurationService.php'; +require __DIR__ . '/lib/Service/QuotePhaseService.php'; require __DIR__ . '/lib/Service/Radar/EarlyFraudWarningService.php'; require __DIR__ . '/lib/Service/Radar/ValueListService.php'; require __DIR__ . '/lib/Service/Radar/ValueListItemService.php'; diff --git a/lib/Customer.php b/lib/Customer.php index 4ea4df4c9..a75ba63fc 100644 --- a/lib/Customer.php +++ b/lib/Customer.php @@ -19,11 +19,13 @@ * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes. + * @property null|string $default_currency The default three-letter ISO code for the currency that the customer will be charged in for billing purposes. * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source

ID of the default payment source for the customer.

If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

* @property null|bool $delinquent

When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.

If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.

* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one. * @property null|string $email The customer's email address. + * @property \Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers. * @property \Stripe\StripeObject $invoice_settings * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. diff --git a/lib/QuotePhaseConfiguration.php b/lib/QuotePhase.php similarity index 98% rename from lib/QuotePhaseConfiguration.php rename to lib/QuotePhase.php index 6ec742b72..3fa9e6a38 100644 --- a/lib/QuotePhaseConfiguration.php +++ b/lib/QuotePhase.php @@ -25,7 +25,7 @@ * @property null|bool $trial If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees. * @property null|int $trial_end When the trial ends within the phase. */ -class QuotePhaseConfiguration extends ApiResource +class QuotePhase extends ApiResource { const OBJECT_NAME = 'quote_phase'; diff --git a/lib/Service/CoreServiceFactory.php b/lib/Service/CoreServiceFactory.php index dda893896..dd9f0a66c 100644 --- a/lib/Service/CoreServiceFactory.php +++ b/lib/Service/CoreServiceFactory.php @@ -43,7 +43,7 @@ * @property PriceService $prices * @property ProductService $products * @property PromotionCodeService $promotionCodes - * @property QuotePhaseConfigurationService $quotePhaseConfigurations + * @property QuotePhaseService $quotePhases * @property QuoteService $quotes * @property Radar\RadarServiceFactory $radar * @property RefundService $refunds @@ -110,7 +110,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory 'prices' => PriceService::class, 'products' => ProductService::class, 'promotionCodes' => PromotionCodeService::class, - 'quotePhaseConfigurations' => QuotePhaseConfigurationService::class, + 'quotePhases' => QuotePhaseService::class, 'quotes' => QuoteService::class, 'radar' => Radar\RadarServiceFactory::class, 'refunds' => RefundService::class, diff --git a/lib/Service/QuotePhaseConfigurationService.php b/lib/Service/QuotePhaseService.php similarity index 89% rename from lib/Service/QuotePhaseConfigurationService.php rename to lib/Service/QuotePhaseService.php index f168312e5..d2925bb07 100644 --- a/lib/Service/QuotePhaseConfigurationService.php +++ b/lib/Service/QuotePhaseService.php @@ -4,7 +4,7 @@ namespace Stripe\Service; -class QuotePhaseConfigurationService extends \Stripe\Service\AbstractService +class QuotePhaseService extends \Stripe\Service\AbstractService { /** * Returns a list of quote phases. @@ -14,7 +14,7 @@ class QuotePhaseConfigurationService extends \Stripe\Service\AbstractService * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\Collection<\Stripe\QuotePhaseConfiguration> + * @return \Stripe\Collection<\Stripe\QuotePhase> */ public function all($params = null, $opts = null) { @@ -49,7 +49,7 @@ public function allLineItems($id, $params = null, $opts = null) * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\QuotePhaseConfiguration + * @return \Stripe\QuotePhase */ public function retrieve($id, $params = null, $opts = null) { diff --git a/lib/StripeClient.php b/lib/StripeClient.php index 872338bf6..bc0fcd613 100644 --- a/lib/StripeClient.php +++ b/lib/StripeClient.php @@ -43,7 +43,7 @@ * @property \Stripe\Service\PriceService $prices * @property \Stripe\Service\ProductService $products * @property \Stripe\Service\PromotionCodeService $promotionCodes - * @property \Stripe\Service\QuotePhaseConfigurationService $quotePhaseConfigurations + * @property \Stripe\Service\QuotePhaseService $quotePhases * @property \Stripe\Service\QuoteService $quotes * @property \Stripe\Service\Radar\RadarServiceFactory $radar * @property \Stripe\Service\RefundService $refunds diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index 01f07539f..871a21eb0 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -19,6 +19,7 @@ * @property int $quantity The quantity of the plan to which the customer should be subscribed. * @property string $subscription The subscription this subscription_item belongs to. * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item. + * @property null|\Stripe\StripeObject $trial Current trial configuration on this item. */ class SubscriptionItem extends ApiResource { diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 806fec9a2..2c9218998 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -74,7 +74,7 @@ class ObjectTypes \Stripe\Product::OBJECT_NAME => \Stripe\Product::class, \Stripe\PromotionCode::OBJECT_NAME => \Stripe\PromotionCode::class, \Stripe\Quote::OBJECT_NAME => \Stripe\Quote::class, - \Stripe\QuotePhaseConfiguration::OBJECT_NAME => \Stripe\QuotePhaseConfiguration::class, + \Stripe\QuotePhase::OBJECT_NAME => \Stripe\QuotePhase::class, \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \Stripe\Radar\EarlyFraudWarning::class, \Stripe\Radar\ValueList::OBJECT_NAME => \Stripe\Radar\ValueList::class, \Stripe\Radar\ValueListItem::OBJECT_NAME => \Stripe\Radar\ValueListItem::class,