From 9971800e49dba8b7a76fe14eba19186494ad2eeb Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 7 Sep 2023 09:06:34 -0700
Subject: [PATCH 1/2] Update generated code (#1571)
* Update generated code for v500
* Update generated code for v503
* Update generated code for v504
* Update generated code for v507
* Update generated code for v510
---------
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
init.php | 2 +
lib/AccountLink.php | 2 +-
lib/Event.php | 29 ++++++-
lib/PaymentMethodDomain.php | 49 +++++++++++
lib/Person.php | 2 +-
lib/Product.php | 1 +
lib/Service/CoreServiceFactory.php | 2 +
lib/Service/PaymentMethodDomainService.php | 97 ++++++++++++++++++++++
lib/StripeClient.php | 1 +
lib/Util/ObjectTypes.php | 1 +
11 files changed, 184 insertions(+), 4 deletions(-)
create mode 100644 lib/PaymentMethodDomain.php
create mode 100644 lib/Service/PaymentMethodDomainService.php
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 04aaf95dc..811498793 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v499
\ No newline at end of file
+v510
\ No newline at end of file
diff --git a/init.php b/init.php
index 377928f56..2fc416939 100644
--- a/init.php
+++ b/init.php
@@ -132,6 +132,7 @@
require __DIR__ . '/lib/PaymentIntent.php';
require __DIR__ . '/lib/PaymentLink.php';
require __DIR__ . '/lib/PaymentMethod.php';
+require __DIR__ . '/lib/PaymentMethodDomain.php';
require __DIR__ . '/lib/Payout.php';
require __DIR__ . '/lib/Person.php';
require __DIR__ . '/lib/Plan.php';
@@ -190,6 +191,7 @@
require __DIR__ . '/lib/Service/MandateService.php';
require __DIR__ . '/lib/Service/PaymentIntentService.php';
require __DIR__ . '/lib/Service/PaymentLinkService.php';
+require __DIR__ . '/lib/Service/PaymentMethodDomainService.php';
require __DIR__ . '/lib/Service/PaymentMethodService.php';
require __DIR__ . '/lib/Service/PayoutService.php';
require __DIR__ . '/lib/Service/PlanService.php';
diff --git a/lib/AccountLink.php b/lib/AccountLink.php
index a0c82203c..2671cbe2a 100644
--- a/lib/AccountLink.php
+++ b/lib/AccountLink.php
@@ -8,7 +8,7 @@
* Account Links are the means by which a Connect platform grants a connected account permission to access
* Stripe-hosted applications, such as Connect Onboarding.
*
- * Related guide: Connect Onboarding
+ * Related guide: Connect Onboarding
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
diff --git a/lib/Event.php b/lib/Event.php
index 76e93870b..77354f3b4 100644
--- a/lib/Event.php
+++ b/lib/Event.php
@@ -130,7 +130,6 @@ class Event extends ApiResource
const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
const INVOICEITEM_CREATED = 'invoiceitem.created';
const INVOICEITEM_DELETED = 'invoiceitem.deleted';
- const INVOICEITEM_UPDATED = 'invoiceitem.updated';
const INVOICE_CREATED = 'invoice.created';
const INVOICE_DELETED = 'invoice.deleted';
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
@@ -475,4 +474,32 @@ class Event extends ApiResource
const TYPE_TRANSFER_CREATED = 'transfer.created';
const TYPE_TRANSFER_REVERSED = 'transfer.reversed';
const TYPE_TRANSFER_UPDATED = 'transfer.updated';
+ const TYPE_TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
+ const TYPE_TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
+ const TYPE_TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
+ const TYPE_TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
+ const TYPE_TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
+ const TYPE_TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
+ const TYPE_TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
+ const TYPE_TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
+ const TYPE_TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
+ const TYPE_TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
+ const TYPE_TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
+ const TYPE_TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
+ const TYPE_TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
+ const TYPE_TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
+ const TYPE_TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
+ const TYPE_TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
}
diff --git a/lib/PaymentMethodDomain.php b/lib/PaymentMethodDomain.php
new file mode 100644
index 000000000..15920b7c9
--- /dev/null
+++ b/lib/PaymentMethodDomain.php
@@ -0,0 +1,49 @@
+Payment method domains.
+ *
+ * @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 \Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain.
+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
+ * @property string $domain_name The domain name that this payment method domain object represents.
+ * @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
+ * @property \Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain.
+ * @property \Stripe\StripeObject $link Indicates the status of a specific payment method on a payment method domain.
+ * @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 \Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain.
+ */
+class PaymentMethodDomain extends ApiResource
+{
+ const OBJECT_NAME = 'payment_method_domain';
+
+ use ApiOperations\All;
+ use ApiOperations\Create;
+ use ApiOperations\Retrieve;
+ use ApiOperations\Update;
+
+ /**
+ * @param null|array $params
+ * @param null|array|string $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain the validated payment method domain
+ */
+ public function validate($params = null, $opts = null)
+ {
+ $url = $this->instanceUrl() . '/validate';
+ list($response, $opts) = $this->_request('post', $url, $params, $opts);
+ $this->refreshFrom($response, $opts);
+
+ return $this;
+ }
+}
diff --git a/lib/Person.php b/lib/Person.php
index b3e0208c8..d026788a8 100644
--- a/lib/Person.php
+++ b/lib/Person.php
@@ -27,7 +27,7 @@
* @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
* @property null|\Stripe\StripeObject $future_requirements Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
* @property null|string $gender The person's gender (International regulations require either "male" or "female").
- * @property null|bool $id_number_provided Whether the person's id_number
was provided.
+ * @property null|bool $id_number_provided Whether the person's id_number
was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by ssn_last_4_provided
).
* @property null|bool $id_number_secondary_provided Whether the person's id_number_secondary
was provided.
* @property null|string $last_name The person's last name.
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
diff --git a/lib/Product.php b/lib/Product.php
index 3c60b1444..7401a11d5 100644
--- a/lib/Product.php
+++ b/lib/Product.php
@@ -20,6 +20,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
* @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ * @property \Stripe\StripeObject[] $features A list of up to 15 features for this product. These are displayed in pricing tables.
* @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
* @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 \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
diff --git a/lib/Service/CoreServiceFactory.php b/lib/Service/CoreServiceFactory.php
index c97759c2e..2082398b9 100644
--- a/lib/Service/CoreServiceFactory.php
+++ b/lib/Service/CoreServiceFactory.php
@@ -37,6 +37,7 @@
* @property OAuthService $oauth
* @property PaymentIntentService $paymentIntents
* @property PaymentLinkService $paymentLinks
+ * @property PaymentMethodDomainService $paymentMethodDomains
* @property PaymentMethodService $paymentMethods
* @property PayoutService $payouts
* @property PlanService $plans
@@ -103,6 +104,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'oauth' => OAuthService::class,
'paymentIntents' => PaymentIntentService::class,
'paymentLinks' => PaymentLinkService::class,
+ 'paymentMethodDomains' => PaymentMethodDomainService::class,
'paymentMethods' => PaymentMethodService::class,
'payouts' => PayoutService::class,
'plans' => PlanService::class,
diff --git a/lib/Service/PaymentMethodDomainService.php b/lib/Service/PaymentMethodDomainService.php
new file mode 100644
index 000000000..aabcd9885
--- /dev/null
+++ b/lib/Service/PaymentMethodDomainService.php
@@ -0,0 +1,97 @@
+
+ */
+ public function all($params = null, $opts = null)
+ {
+ return $this->requestCollection('get', '/v1/payment_method_domains', $params, $opts);
+ }
+
+ /**
+ * Creates a payment method domain.
+ *
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function create($params = null, $opts = null)
+ {
+ return $this->request('post', '/v1/payment_method_domains', $params, $opts);
+ }
+
+ /**
+ * Retrieves the details of an existing payment method domain.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function retrieve($id, $params = null, $opts = null)
+ {
+ return $this->request('get', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Updates an existing payment method domain.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function update($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
+ }
+
+ /**
+ * Some payment methods such as Apple Pay require additional steps to verify a
+ * domain. If the requirements weren’t satisfied when the domain was created, the
+ * payment method will be inactive on the domain. The payment method doesn’t appear
+ * in Elements for this domain until it is active.
+ *
+ * To activate a payment method on an existing payment method domain, complete the
+ * required validation steps specific to the payment method, and then validate the
+ * payment method domain with this endpoint.
+ *
+ * Related guides: Payment method
+ * domains.
+ *
+ * @param string $id
+ * @param null|array $params
+ * @param null|array|\Stripe\Util\RequestOptions $opts
+ *
+ * @throws \Stripe\Exception\ApiErrorException if the request fails
+ *
+ * @return \Stripe\PaymentMethodDomain
+ */
+ public function validate($id, $params = null, $opts = null)
+ {
+ return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s/validate', $id), $params, $opts);
+ }
+}
diff --git a/lib/StripeClient.php b/lib/StripeClient.php
index d5e1e3c2f..8d3eb413d 100644
--- a/lib/StripeClient.php
+++ b/lib/StripeClient.php
@@ -37,6 +37,7 @@
* @property \Stripe\Service\OAuthService $oauth
* @property \Stripe\Service\PaymentIntentService $paymentIntents
* @property \Stripe\Service\PaymentLinkService $paymentLinks
+ * @property \Stripe\Service\PaymentMethodDomainService $paymentMethodDomains
* @property \Stripe\Service\PaymentMethodService $paymentMethods
* @property \Stripe\Service\PayoutService $payouts
* @property \Stripe\Service\PlanService $plans
diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php
index 16e38aea0..b1e4b5098 100644
--- a/lib/Util/ObjectTypes.php
+++ b/lib/Util/ObjectTypes.php
@@ -65,6 +65,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\PaymentMethodDomain::OBJECT_NAME => \Stripe\PaymentMethodDomain::class,
\Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class,
\Stripe\Person::OBJECT_NAME => \Stripe\Person::class,
\Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class,
From 07829f2102362b0bfe0b680dab801e00cc4dce89 Mon Sep 17 00:00:00 2001
From: Pavel Krymets
Date: Thu, 7 Sep 2023 11:03:22 -0700
Subject: [PATCH 2/2] Bump version to 12.2.0
---
CHANGELOG.md | 8 ++++++++
VERSION | 2 +-
lib/Stripe.php | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b7d4a297c..a6411111d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 12.2.0 - 2023-09-07
+* [#1571](https://github.com/stripe/stripe-php/pull/1571) Update generated code
+ * Add support for new resource `PaymentMethodDomain`
+ * Add support for `all`, `create`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
+ * Add support for new values `treasury.credit_reversal.created`, `treasury.credit_reversal.posted`, `treasury.debit_reversal.completed`, `treasury.debit_reversal.created`, `treasury.debit_reversal.initial_credit_granted`, `treasury.financial_account.closed`, `treasury.financial_account.created`, `treasury.financial_account.features_status_updated`, `treasury.inbound_transfer.canceled`, `treasury.inbound_transfer.created`, `treasury.inbound_transfer.failed`, `treasury.inbound_transfer.succeeded`, `treasury.outbound_payment.canceled`, `treasury.outbound_payment.created`, `treasury.outbound_payment.expected_arrival_date_updated`, `treasury.outbound_payment.failed`, `treasury.outbound_payment.posted`, `treasury.outbound_payment.returned`, `treasury.outbound_transfer.canceled`, `treasury.outbound_transfer.created`, `treasury.outbound_transfer.expected_arrival_date_updated`, `treasury.outbound_transfer.failed`, `treasury.outbound_transfer.posted`, `treasury.outbound_transfer.returned`, `treasury.received_credit.created`, `treasury.received_credit.failed`, `treasury.received_credit.succeeded`, and `treasury.received_debit.created` on enum `Event.type`
+ * Remove support for value `invoiceitem.updated` from enum `Event.type`
+ * Add support for `features` on `Product`
+
## 12.1.0 - 2023-08-31
* [#1560](https://github.com/stripe/stripe-php/pull/1560) Update generated code
* Add support for new resource `AccountSession`
diff --git a/VERSION b/VERSION
index 77903b35f..685332623 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.1.0
+12.2.0
diff --git a/lib/Stripe.php b/lib/Stripe.php
index 20b3b119a..0b4c1811c 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 = '12.1.0';
+ const VERSION = '12.2.0';
/**
* @return string the API key used for requests