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

Merged
merged 18 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
## 14.4.0-beta.1 - 2024-04-18
* [#1679](https://github.com/stripe/stripe-php/pull/1679) Update generated code for beta

## 14.3.0 - 2024-04-18
* [#1681](https://github.com/stripe/stripe-php/pull/1681) Update generated code
* Add support for `create_preview` method on resource `Invoice`
* Add support for `saved_payment_method_options` on `Checkout.Session`
* [#1682](https://github.com/stripe/stripe-php/pull/1682) Added @throws to autoPagingIterator. Fixes [#1678](https://github.com/stripe/stripe-php/issues/1678)

## 14.2.0 - 2024-04-16
* [#1680](https://github.com/stripe/stripe-php/pull/1680) Update generated code
* Add support for new resource `Entitlements.ActiveEntitlementSummary`
* Add support for new value `entitlements.active_entitlement_summary.updated` on enum `Event.type`
* Remove support for `config` on `Forwarding.Request`. This field is no longer used by the Forwarding Request API.
* Add support for new resource `Entitlements.ActiveEntitlementSummary`
* Add support for new value `entitlements.active_entitlement_summary.updated` on enum `Event.type`
* Remove support for `config` on `Forwarding.Request`. This field is no longer used by the Forwarding Request API.
* Add support for `swish` on `PaymentMethodConfiguration`

## 14.2.0-beta.1 - 2024-04-11
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v970
v992
19 changes: 12 additions & 7 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,38 @@
* properties on the account like its current requirements or if the account is
* enabled to make live charges or receive payouts.
*
* For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that
* account has started to go through Connect Onboarding. Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a href="https://stripe.com/docs/api/account_sessions">Account Session</a>,
* some properties are only returned for Custom accounts. Learn about the differences <a href="https://stripe.com/docs/connect/accounts">between accounts</a>.
* For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>application</code>, which includes Custom accounts, the properties below are always
* returned.
*
* For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>stripe</code>, which includes Standard and Express accounts, some properties are only returned
* until you create an <a href="/api/account_links">Account Link</a> or <a href="/api/account_sessions">Account Session</a>
* to start Connect Onboarding. Learn about the <a href="/connect/accounts">differences between accounts</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 null|\Stripe\StripeObject $business_profile Business information about the account.
* @property null|string $business_type The business type. Once you create an <a href="https://stripe.com/docs/api/account_links">Account Link</a> or <a href="https://stripe.com/docs/api/account_sessions">Account Session</a>, this property is only returned for Custom accounts.
* @property null|string $business_type The business type. After you create an <a href="/api/account_links">Account Link</a> or <a href="/api/account_sessions">Account Session</a>, this property is only returned for accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.
* @property null|\Stripe\StripeObject $capabilities
* @property null|bool $charges_enabled Whether the account can create live charges.
* @property null|\Stripe\StripeObject $company
* @property null|\Stripe\StripeObject $controller
* @property null|string $country The account's country.
* @property null|int $created Time at which the account was connected. Measured in seconds since the Unix epoch.
* @property null|string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>.
* @property null|bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
* @property null|bool $details_submitted Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
* @property null|string $email An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
* @property null|\Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where <code>controller[is_controller]</code> is true.
* @property null|\Stripe\StripeObject $future_requirements
* @property null|\Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the <a href="https://stripe.com/docs/connect/standard-accounts">Standard onboarding</a> or <a href="https://stripe.com/docs/connect/express-accounts">Express onboarding documentation</a> for information about platform prefilling and account onboarding steps.</p><p>Related guide: <a href="https://stripe.com/docs/connect/handling-api-verification#person-information">Handling identity verification with the API</a></p>
* @property null|\Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>A platform cannot access a person for an account where <a href="/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a> is <code>stripe</code>, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.</p><p>See the <a href="/connect/standard-accounts">Standard onboarding</a> or <a href="/connect/express-accounts">Express onboarding</a> documentation for information about prefilling information and account onboarding steps. Learn more about <a href="/connect/handling-api-verification#person-information">handling identity verification with the API</a>.</p>
* @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|bool $payouts_enabled Whether Stripe can send payouts to this account.
* @property null|\Stripe\StripeObject $requirements
* @property null|\Stripe\StripeObject $risk_controls
* @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe.
* @property null|\Stripe\StripeObject $tos_acceptance
* @property null|string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, or <code>custom</code>.
* @property null|string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, <code>custom</code>, or <code>none</code>.
*/
class Account extends ApiResource
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. You can find the available balance for each currency and payment type in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the <code>source_types</code> property.
* @property null|\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts.
* @property null|\Stripe\StripeObject $issuing
* @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.
Expand Down
7 changes: 4 additions & 3 deletions lib/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
/**
* These bank accounts are payment methods on <code>Customer</code> objects.
*
* On the other hand <a href="https://stripe.com/docs/api#external_accounts">External Accounts</a> are transfer
* destinations on <code>Account</code> objects for <a href="https://stripe.com/docs/connect/custom-accounts">Custom accounts</a>.
* On the other hand <a href="/api#external_accounts">External Accounts</a> are transfer
* destinations on <code>Account</code> objects for accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>application</code>, which includes <a href="/connect/custom-accounts">Custom accounts</a>.
* They can be bank accounts or debit cards as well, and are documented in the links above.
*
* Related guide: <a href="https://stripe.com/docs/payments/bank-debits-transfers">Bank debits and transfers</a>
* Related guide: <a href="/payments/bank-debits-transfers">Bank debits and transfers</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.
Expand Down
6 changes: 3 additions & 3 deletions lib/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @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|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
* @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.
* @property null|string $address_city City/District/Suburb/Town/Village.
* @property null|string $address_country Billing address country, if provided when creating card.
* @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name).
Expand All @@ -25,10 +25,10 @@
* @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the <code>method</code> when creating a payout.
* @property string $brand Card brand. Can be <code>American Express</code>, <code>Diners Club</code>, <code>Discover</code>, <code>Eftpos Australia</code>, <code>JCB</code>, <code>MasterCard</code>, <code>UnionPay</code>, <code>Visa</code>, or <code>Unknown</code>.
* @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
* @property null|string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.
* @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
* @property null|string $cvc_check If a CVC was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see <a href="https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge">Check if a card is valid without a charge</a>.
* @property null|bool $default_for_currency Whether this card is the default external account for its currency.
* @property null|bool $default_for_currency Whether this card is the default external account for its currency. This property is only available for accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.
* @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number.
* @property int $exp_month Two-digit number representing the card's expiration month.
* @property int $exp_year Four-digit number representing the card's expiration year.
Expand Down
6 changes: 6 additions & 0 deletions lib/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ public function getReverseIterator()
}

/**
* @throws Exception\ApiErrorException
*
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
Expand Down Expand Up @@ -228,6 +230,8 @@ public function isEmpty()
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return Collection<TStripeObject>
*/
public function nextPage($params = null, $opts = null)
Expand Down Expand Up @@ -256,6 +260,8 @@ public function nextPage($params = null, $opts = null)
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return Collection<TStripeObject>
*/
public function previousPage($params = null, $opts = null)
Expand Down
2 changes: 1 addition & 1 deletion lib/ConfirmationToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|int $expires_at Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used.
* @property null|int $expires_at Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
* @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 $mandate_data Data used for generating a Mandate.
* @property null|string $payment_intent ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
Expand Down
2 changes: 1 addition & 1 deletion lib/Entitlements/ActiveEntitlement.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @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 string $feature The feature that the customer is entitled to.
* @property string|\Stripe\Entitlements\Feature $feature The <a href="https://stripe.com/docs/api/entitlements/feature">Feature</a> that the customer is entitled to.
* @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 string $lookup_key A unique key you provide as your own system identifier. This may be up to 80 characters.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
* <code>Event</code> objects directly to an endpoint on your server. You can manage
* webhooks in your
* <a href="https://dashboard.stripe.com/account/webhooks">account settings</a>. Learn how
* to <a href="https://stripe.com/docs/webhooks">listen for events</a>
* to <a href="https://docs.stripe.com/webhooks">listen for events</a>
* so that your integration can automatically trigger reactions.
*
* When using <a href="https://stripe.com/docs/connect">Connect</a>, you can also receive event notifications
* When using <a href="https://docs.stripe.com/connect">Connect</a>, you can also receive event notifications
* that occur in connected accounts. For these events, there's an
* additional <code>account</code> attribute in the received <code>Event</code> object.
*
Expand All @@ -47,7 +47,7 @@
* @property \Stripe\StripeObject $data
* @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 int $pending_webhooks Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
* @property null|\Stripe\StripeObject $reason Information about the action that causes the event. Only present when the event is triggered by an API request or an <a href="https://stripe.com/docs/billing/revenue-recovery/automations">Automation</a> action.
* @property null|\Stripe\StripeObject $reason Information about the action that causes the event. Only present when the event is triggered by an API request or an <a href="https://docs.stripe.com/billing/automations">Automation</a> action.
* @property null|\Stripe\StripeObject $request Information on the API request that triggers the event.
* @property string $type Description of the event (for example, <code>invoice.created</code> or <code>charge.refunded</code>).
*/
Expand Down
Loading
Loading