true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $settings
diff --git a/lib/Event.php b/lib/Event.php
index 91a39dd6c..e4c2ce3eb 100644
--- a/lib/Event.php
+++ b/lib/Event.php
@@ -118,6 +118,11 @@ class Event extends ApiResource
const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
const CUSTOMER_UPDATED = 'customer.updated';
const FILE_CREATED = 'file.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_CREATED = 'financial_connections.account.created';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DEACTIVATED = 'financial_connections.account.deactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
+ const FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php
index 0b717130e..f7a9980f2 100644
--- a/lib/Service/CustomerService.php
+++ b/lib/Service/CustomerService.php
@@ -410,7 +410,7 @@ public function updateBalanceTransaction($parentId, $id, $params = null, $opts =
}
/**
- * Updates a customer’s cash balance.
+ * Changes the settings on a customer’s cash balance.
*
* @param string $parentId
* @param null|array $params
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index cd511e19b..6a7e825e5 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -211,6 +211,15 @@ public function testRetrieveSession()
static::assertInstanceOf(\Stripe\FinancialConnections\Session::class, $result);
}
+ public function testUpcomingInvoice()
+ {
+ $this->expectsRequest('get', '/v1/invoices/upcoming');
+ $result = $this->client->invoices->upcoming(
+ ['customer' => 'cus_9utnxg47pWjV1e']
+ );
+ static::assertInstanceOf(\Stripe\Invoice::class, $result);
+ }
+
public function testCreateOrder()
{
$this->expectsRequest('post', '/v1/orders');
@@ -320,6 +329,16 @@ public function testListLineItemsPaymentLink()
static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}
+ public function testListSetupAttempt()
+ {
+ $this->expectsRequest('get', '/v1/setup_attempts');
+ $result = $this->client->setupAttempts->all(
+ ['limit' => 3, 'setup_intent' => 'si_xyz']
+ );
+ static::assertInstanceOf(\Stripe\Collection::class, $result);
+ static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
+ }
+
public function testVerifyMicrodepositsSetupIntent()
{
$this->expectsRequest(
@@ -399,6 +418,58 @@ public function testFundCashBalanceCustomer()
static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
}
+ public function testDeliverCardCard()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
+ );
+ $result = $this->client->testHelpers->issuing->cards->deliverCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ }
+
+ public function testFailCardCard()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/fail'
+ );
+ $result = $this->client->testHelpers->issuing->cards->failCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ }
+
+ public function testReturnCardCard()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/return'
+ );
+ $result = $this->client->testHelpers->issuing->cards->returnCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ }
+
+ public function testShipCardCard()
+ {
+ $this->expectsRequest(
+ 'post',
+ '/v1/test_helpers/issuing/cards/card_123/shipping/ship'
+ );
+ $result = $this->client->testHelpers->issuing->cards->shipCard(
+ 'card_123',
+ []
+ );
+ static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
+ }
+
public function testExpireRefund()
{
$this->expectsRequest('post', '/v1/test_helpers/refunds/re_123/expire');
@@ -572,68 +643,6 @@ public function testCreateToken()
static::assertInstanceOf(\Stripe\Token::class, $result);
}
- public function testListSetupAttempt()
- {
- $this->expectsRequest('get', '/v1/setup_attempts');
- $result = $this->client->setupAttempts->all(
- ['limit' => 3, 'setup_intent' => 'si_xyz']
- );
- static::assertInstanceOf(\Stripe\Collection::class, $result);
- static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
- }
-
- public function testDeliverCardCard()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
- );
- $result = $this->client->testHelpers->issuing->cards->deliverCard(
- 'card_123',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testFailCardCard()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/fail'
- );
- $result = $this->client->testHelpers->issuing->cards->failCard(
- 'card_123',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testReturnCardCard()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/return'
- );
- $result = $this->client->testHelpers->issuing->cards->returnCard(
- 'card_123',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
- public function testShipCardCard()
- {
- $this->expectsRequest(
- 'post',
- '/v1/test_helpers/issuing/cards/card_123/shipping/ship'
- );
- $result = $this->client->testHelpers->issuing->cards->shipCard(
- 'card_123',
- []
- );
- static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
- }
-
public function testCreateAccountLink()
{
$this->expectsRequest('post', '/v1/account_links');
From 83bf6ce0592c2e0ad7ae0a42854bbd767cd07920 Mon Sep 17 00:00:00 2001
From: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com>
Date: Thu, 7 Jul 2022 10:46:33 -0700
Subject: [PATCH 2/6] Codegen for openapi v163 (#1319)
---
OPENAPI_VERSION | 2 +-
lib/Coupon.php | 1 +
lib/Price.php | 1 +
lib/Subscription.php | 1 +
tests/Stripe/GeneratedExamplesTest.php | 20 +++++++++++++++++++-
5 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index b164d836d..1f7b99f73 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v162
\ No newline at end of file
+v163
\ No newline at end of file
diff --git a/lib/Coupon.php b/lib/Coupon.php
index 424c22226..ce9b611d5 100644
--- a/lib/Coupon.php
+++ b/lib/Coupon.php
@@ -21,6 +21,7 @@
* @property \Stripe\StripeObject $applies_to
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency If amount_off
has been set, the three-letter ISO code for the currency of the amount to take off.
+ * @property \Stripe\StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property string $duration One of forever
, once
, and repeating
. Describes how long a customer who applies this coupon will get the discount.
* @property null|int $duration_in_months If duration
is repeating
, the number of months the coupon applies. Null if coupon duration
is forever
or once
.
* @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/Price.php b/lib/Price.php
index 43a651a3a..defb37d57 100644
--- a/lib/Price.php
+++ b/lib/Price.php
@@ -29,6 +29,7 @@
* @property string $billing_scheme Describes how to compute the price per period. Either per_unit
or tiered
. per_unit
indicates that the fixed amount (specified in unit_amount
or unit_amount_decimal
) will be charged per unit in quantity
(for prices with usage_type=licensed
), or per unit of total usage (for prices with usage_type=metered
). tiered
indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers
and tiers_mode
attributes.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
+ * @property \Stripe\StripeObject $currency_options Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
* @property null|\Stripe\StripeObject $custom_unit_amount When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
* @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.
* @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
diff --git a/lib/Subscription.php b/lib/Subscription.php
index 648504130..3166e6d40 100644
--- a/lib/Subscription.php
+++ b/lib/Subscription.php
@@ -23,6 +23,7 @@
* @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end
, canceled_at
will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
* @property string $collection_method Either charge_automatically
, or send_invoice
. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
* @property int $current_period_start Start of the current period that the subscription has been invoiced for.
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php
index 6a7e825e5..5e30052c9 100644
--- a/tests/Stripe/GeneratedExamplesTest.php
+++ b/tests/Stripe/GeneratedExamplesTest.php
@@ -329,6 +329,24 @@ public function testListLineItemsPaymentLink()
static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}
+ public function testCreatePrice()
+ {
+ $this->expectsRequest('post', '/v1/prices');
+ $result = $this->client->prices->create(
+ [
+ 'unit_amount' => 2000,
+ 'currency' => 'usd',
+ 'currency_options' => [
+ 'uah' => ['unit_amount' => 5000],
+ 'eur' => ['unit_amount' => 1800],
+ ],
+ 'recurring' => ['interval' => 'month'],
+ 'product' => 'prod_xxxxxxxxxxxxx',
+ ]
+ );
+ static::assertInstanceOf(\Stripe\Price::class, $result);
+ }
+
public function testListSetupAttempt()
{
$this->expectsRequest('get', '/v1/setup_attempts');
@@ -2312,7 +2330,7 @@ public function testListPrice()
static::assertInstanceOf(\Stripe\Price::class, $result->data[0]);
}
- public function testCreatePrice()
+ public function testCreatePrice2()
{
$this->expectsRequest('post', '/v1/prices');
$result = $this->client->prices->create(
From ae44989a37e0785f325d696719afa46e3503dc7d Mon Sep 17 00:00:00 2001
From: Pavel Krymets receipt_email
is specified for a payment in live mode, a receipt will be sent regardless of your email settings.
* @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any.
+ * @property string $secret_key_confirmation Indicates whether confirmation for this PaymentIntent using a secret key is required
or optional
.
* @property null|string $setup_future_usage Indicates that you intend to make future payments with this PaymentIntent's payment method.
Providing this parameter will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.
When processing card payments, Stripe also uses setup_future_usage
to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.