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 #1572

Merged
merged 10 commits into from
Sep 7, 2023
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@
* [#1559](https://github.com/stripe/stripe-php/pull/1559) Update generated code for beta
* Rename `Quote.previewInvoices` to `Quote.allPreviewInvoices` and `Quote.previewSubscriptionSchedules` to `Quote.allSubscriptionSchedules`

## 12.1.0 - 2023-08-31
* [#1560](https://github.com/stripe/stripe-php/pull/1560) Update generated code
* Add support for new resource `AccountSession`
* Add support for `create` method on resource `AccountSession`
* Add support for new values `obligation_inbound`, `obligation_outbound`, `obligation_payout_failure`, `obligation_payout`, `obligation_reversal_inbound`, and `obligation_reversal_outbound` on enum `BalanceTransaction.type`
* Change type of `Event.type` from `string` to `enum`
* Add support for `application` on `PaymentLink`
* [#1562](https://github.com/stripe/stripe-php/pull/1562) Nicer ApiErrorException::__toString()
* [#1558](https://github.com/stripe/stripe-php/pull/1558) Update generated code
* Add support for `payment_method_details` on `Dispute`
* Add support for `prefetch` on `FinancialConnections.Session`

## 12.0.0 - 2023-08-18
**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**

## 12.0.0-beta.1 - 2023-08-24
* [#1549](https://github.com/stripe/stripe-php/pull/1549) Update generated code for beta
* Add support for new resources `QuotePreviewInvoice` and `QuotePreviewSchedule`
* Remove support for `applies_to` on `Invoice` and `SubscriptionSchedule`
* [#1556](https://github.com/stripe/stripe-php/pull/1556) Merge master into beta

## 12.0.0 - 2023-08-18
**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**

## 11.0.0 - 2023-08-16
Please do not use stripe-php v11. It did not correctly apply the [pinning behavior](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#version-pinning) and was removed from packagist

Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v499
v513
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
require __DIR__ . '/lib/PaymentLink.php';
require __DIR__ . '/lib/PaymentMethod.php';
require __DIR__ . '/lib/PaymentMethodConfiguration.php';
require __DIR__ . '/lib/PaymentMethodDomain.php';
require __DIR__ . '/lib/Payout.php';
require __DIR__ . '/lib/Person.php';
require __DIR__ . '/lib/Plan.php';
Expand Down Expand Up @@ -220,6 +221,7 @@
require __DIR__ . '/lib/Service/PaymentIntentService.php';
require __DIR__ . '/lib/Service/PaymentLinkService.php';
require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.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';
Expand Down
2 changes: 1 addition & 1 deletion lib/AccountLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <a href="https://stripe.com/docs/connect/connect-onboarding">Connect Onboarding</a>
* Related guide: <a href="https://stripe.com/docs/connect/custom/hosted-onboarding">Connect Onboarding</a>
*
* @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.
Expand Down
54 changes: 53 additions & 1 deletion lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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';
Expand Down Expand Up @@ -319,6 +318,15 @@ class Event extends ApiResource
const TYPE_BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const TYPE_BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
const TYPE_CAPABILITY_UPDATED = 'capability.updated';
const TYPE_CAPITAL_FINANCING_OFFER_ACCEPTED = 'capital.financing_offer.accepted';
const TYPE_CAPITAL_FINANCING_OFFER_CANCELED = 'capital.financing_offer.canceled';
const TYPE_CAPITAL_FINANCING_OFFER_CREATED = 'capital.financing_offer.created';
const TYPE_CAPITAL_FINANCING_OFFER_EXPIRED = 'capital.financing_offer.expired';
const TYPE_CAPITAL_FINANCING_OFFER_FULLY_REPAID = 'capital.financing_offer.fully_repaid';
const TYPE_CAPITAL_FINANCING_OFFER_PAID_OUT = 'capital.financing_offer.paid_out';
const TYPE_CAPITAL_FINANCING_OFFER_REJECTED = 'capital.financing_offer.rejected';
const TYPE_CAPITAL_FINANCING_OFFER_REPLACEMENT_CREATED = 'capital.financing_offer.replacement_created';
const TYPE_CAPITAL_FINANCING_TRANSACTION_CREATED = 'capital.financing_transaction.created';
const TYPE_CASH_BALANCE_FUNDS_AVAILABLE = 'cash_balance.funds_available';
const TYPE_CHARGE_CAPTURED = 'charge.captured';
const TYPE_CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed';
Expand Down Expand Up @@ -353,6 +361,8 @@ class Event extends ApiResource
const TYPE_CUSTOMER_SOURCE_DELETED = 'customer.source.deleted';
const TYPE_CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring';
const TYPE_CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
const TYPE_CUSTOMER_SUBSCRIPTION_COLLECTION_PAUSED = 'customer.subscription.collection_paused';
const TYPE_CUSTOMER_SUBSCRIPTION_COLLECTION_RESUMED = 'customer.subscription.collection_resumed';
const TYPE_CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
const TYPE_CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
const TYPE_CUSTOMER_SUBSCRIPTION_PAUSED = 'customer.subscription.paused';
Expand All @@ -371,6 +381,10 @@ class Event extends ApiResource
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_DISCONNECTED = 'financial_connections.account.disconnected';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REACTIVATED = 'financial_connections.account.reactivated';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_BALANCE = 'financial_connections.account.refreshed_balance';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_INFERRED_BALANCES = 'financial_connections.account.refreshed_inferred_balances';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_OWNERSHIP = 'financial_connections.account.refreshed_ownership';
const TYPE_FINANCIAL_CONNECTIONS_ACCOUNT_REFRESHED_TRANSACTIONS = 'financial_connections.account.refreshed_transactions';
const TYPE_FINANCIAL_CONNECTIONS_SESSION_UPDATED = 'financial_connections.session.updated';
const TYPE_IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const TYPE_IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const TYPE_IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
Expand Down Expand Up @@ -399,6 +413,9 @@ class Event extends ApiResource
const TYPE_ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
const TYPE_ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
const TYPE_ISSUING_CARD_CREATED = 'issuing_card.created';
const TYPE_ISSUING_CARD_DESIGN_ACTIVATED = 'issuing_card_design.activated';
const TYPE_ISSUING_CARD_DESIGN_DEACTIVATED = 'issuing_card_design.deactivated';
const TYPE_ISSUING_CARD_DESIGN_UPDATED = 'issuing_card_design.updated';
const TYPE_ISSUING_CARD_UPDATED = 'issuing_card.updated';
const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
Expand Down Expand Up @@ -444,9 +461,14 @@ class Event extends ApiResource
const TYPE_PROMOTION_CODE_CREATED = 'promotion_code.created';
const TYPE_PROMOTION_CODE_UPDATED = 'promotion_code.updated';
const TYPE_QUOTE_ACCEPTED = 'quote.accepted';
const TYPE_QUOTE_ACCEPTING = 'quote.accepting';
const TYPE_QUOTE_ACCEPT_FAILED = 'quote.accept_failed';
const TYPE_QUOTE_CANCELED = 'quote.canceled';
const TYPE_QUOTE_CREATED = 'quote.created';
const TYPE_QUOTE_DRAFT = 'quote.draft';
const TYPE_QUOTE_FINALIZED = 'quote.finalized';
const TYPE_QUOTE_REESTIMATED = 'quote.reestimated';
const TYPE_QUOTE_STALE = 'quote.stale';
const TYPE_RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
const TYPE_RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
const TYPE_RECIPIENT_CREATED = 'recipient.created';
Expand Down Expand Up @@ -482,11 +504,13 @@ class Event extends ApiResource
const TYPE_SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring';
const TYPE_SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released';
const TYPE_SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated';
const TYPE_TAX_FORM_UPDATED = 'tax.form.updated';
const TYPE_TAX_RATE_CREATED = 'tax_rate.created';
const TYPE_TAX_RATE_UPDATED = 'tax_rate.updated';
const TYPE_TAX_SETTINGS_UPDATED = 'tax.settings.updated';
const TYPE_TERMINAL_READER_ACTION_FAILED = 'terminal.reader.action_failed';
const TYPE_TERMINAL_READER_ACTION_SUCCEEDED = 'terminal.reader.action_succeeded';
const TYPE_TERMINAL_READER_ACTION_UPDATED = 'terminal.reader.action_updated';
const TYPE_TEST_HELPERS_TEST_CLOCK_ADVANCING = 'test_helpers.test_clock.advancing';
const TYPE_TEST_HELPERS_TEST_CLOCK_CREATED = 'test_helpers.test_clock.created';
const TYPE_TEST_HELPERS_TEST_CLOCK_DELETED = 'test_helpers.test_clock.deleted';
Expand All @@ -500,4 +524,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';
}
1 change: 1 addition & 0 deletions lib/Issuing/CardDesign.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CardDesign extends \Stripe\ApiResource

const PREFERENCE_DEFAULT = 'default';
const PREFERENCE_NONE = 'none';
const PREFERENCE_PLATFORM_DEFAULT = 'platform_default';

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
Expand Down
49 changes: 49 additions & 0 deletions lib/PaymentMethodDomain.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* A payment method domain represents a web domain that you have registered with Stripe.
* Stripe Elements use registered payment method domains to control where certain payment methods are shown.
*
* Related guides: <a href="https://stripe.com/docs/payments/payment-methods/pmd-registration">Payment method domains</a>.
*
* @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 <code>true</code> if the object exists in live mode or the value <code>false</code> 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;
}
}
2 changes: 1 addition & 1 deletion lib/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://stripe.com/docs/connect/custom-accounts/future-requirements">upcoming new requirements for this person</a>, including what information needs to be collected, and by when.
* @property null|string $gender The person's gender (International regulations require either &quot;male&quot; or &quot;female&quot;).
* @property null|bool $id_number_provided Whether the person's <code>id_number</code> was provided.
* @property null|bool $id_number_provided Whether the person's <code>id_number</code> 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 <code>ssn_last_4_provided</code>).
* @property null|bool $id_number_secondary_provided Whether the person's <code>id_number_secondary</code> 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).
Expand Down
1 change: 1 addition & 0 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://stripe.com/docs/api/prices">Price</a> 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 <a href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables</a>.
* @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 <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \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.
Expand Down
2 changes: 1 addition & 1 deletion lib/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @property null|string|\Stripe\Invoice $invoice The invoice that was created from this quote.
* @property null|\Stripe\StripeObject $invoice_settings All invoices will be billed using the specified settings.
* @property null|\Stripe\Collection<\Stripe\LineItem> $line_items A list of items the customer is being quoted for.
* @property null|string[] $lines A list of lines on the quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* @property null|string[] $lines A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* @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 \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 $number A unique number that identifies this particular quote. This number is assigned once the quote is <a href="https://stripe.com/docs/quotes/overview#finalize">finalized</a>.
Expand Down
2 changes: 1 addition & 1 deletion lib/QuoteLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Stripe;

/**
* A quote line defines a set of changes that will be applied upon quote acceptance.
* A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance.
*
* @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.
Expand Down
Loading
Loading