Skip to content

Commit

Permalink
Merge pull request #1738 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Sep 5, 2024
2 parents cf55a50 + 705be7b commit 89398f2
Show file tree
Hide file tree
Showing 27 changed files with 140 additions and 12 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Changelog

## 15.8.0 - 2024-08-29
* [#1742](https://github.com/stripe/stripe-php/pull/1742) Generate SDK for OpenAPI spec version 1230
* Add support for new value `issuing_regulatory_reporting` on enum `File.purpose`
* Add support for new value `hr_oib` on enum `TaxId.type`
* Add support for `status_details` on `TestHelpers.TestClock`

## 15.8.0-beta.1 - 2024-08-15
* [#1735](https://github.com/stripe/stripe-php/pull/1735) Update generated code for beta
* Add support for `collected_information` and `permissions` on `Checkout.Session`

## 15.7.0 - 2024-08-15
* [#1736](https://github.com/stripe/stripe-php/pull/1736) Update generated code

## 15.7.0-beta.1 - 2024-08-12
* [#1730](https://github.com/stripe/stripe-php/pull/1730) Update generated code for beta
* Add support for new value `custom` on enum `Checkout.Session.ui_mode`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1201
v1247
3 changes: 3 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
require __DIR__ . '/lib/Billing/Alert.php';
require __DIR__ . '/lib/Billing/AlertTriggered.php';
require __DIR__ . '/lib/Billing/Meter.php';
require __DIR__ . '/lib/Billing/MeterErrorReport.php';
require __DIR__ . '/lib/Billing/MeterEvent.php';
require __DIR__ . '/lib/Billing/MeterEventAdjustment.php';
require __DIR__ . '/lib/Billing/MeterEventSummary.php';
Expand Down Expand Up @@ -305,6 +306,7 @@
require __DIR__ . '/lib/Service/Terminal/ConfigurationService.php';
require __DIR__ . '/lib/Service/Terminal/ConnectionTokenService.php';
require __DIR__ . '/lib/Service/Terminal/LocationService.php';
require __DIR__ . '/lib/Service/Terminal/ReaderCollectedDataService.php';
require __DIR__ . '/lib/Service/Terminal/ReaderService.php';
require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
require __DIR__ . '/lib/Service/TestHelpers/ConfirmationTokenService.php';
Expand Down Expand Up @@ -366,6 +368,7 @@
require __DIR__ . '/lib/Terminal/ConnectionToken.php';
require __DIR__ . '/lib/Terminal/Location.php';
require __DIR__ . '/lib/Terminal/Reader.php';
require __DIR__ . '/lib/Terminal/ReaderCollectedData.php';
require __DIR__ . '/lib/TestHelpers/TestClock.php';
require __DIR__ . '/lib/Token.php';
require __DIR__ . '/lib/Topup.php';
Expand Down
19 changes: 19 additions & 0 deletions lib/Billing/MeterErrorReport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Billing;

/**
* @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 $reason
* @property null|\Stripe\StripeObject $related_object The related objects about the error
* @property string $summary Summary of invalid events
* @property int $validation_end Time when validation ended. Measured in seconds since the Unix epoch
* @property int $validation_start Time when validation started. Measured in seconds since the Unix epoch
*/
class MeterErrorReport extends \Stripe\ApiResource
{
const OBJECT_NAME = 'billing.meter_error_report';
}
2 changes: 1 addition & 1 deletion lib/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* @property null|\Stripe\StripeObject $shipping Shipping information for the charge.
* @property null|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to <code>payment_method</code> or <code>payment_method_details</code> instead.
* @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. <a href="https://docs.stripe.com/connect/destination-charges">See the Connect documentation</a> for details.
* @property null|string $statement_descriptor For a non-card charge, text that appears on the customer's statement as the <a href="https://docs.stripe.com/get-started/account/statement-descriptors">statement descriptor</a>. This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a <code>statement_descriptor_suffix</code>, in which case this value is used as the suffix.
* @property null|string $statement_descriptor <p>For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see <a href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement Descriptor docs</a>.</p><p>For a card charge, this value is ignored unless you don't specify a <code>statement_descriptor_suffix</code>, in which case this value is used as the suffix.</p>
* @property null|string $statement_descriptor_suffix Provides information about a card charge. Concatenated to the account's <a href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement descriptor prefix</a> to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
* @property string $status The status of the payment is either <code>succeeded</code>, <code>pending</code>, or <code>failed</code>.
* @property null|string|\Stripe\Transfer $transfer ID of the transfer to the <code>destination</code> account (only applicable if the charge was created using the <code>destination</code> parameter).
Expand Down
2 changes: 1 addition & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @property null|\Stripe\StripeObject $permissions <p>This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.</p><p>For specific permissions, please refer to their dedicated subsections, such as <code>permissions.update.shipping_details</code>.</p>
* @property null|\Stripe\StripeObject $phone_number_collection
* @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow.
* @property null|string $redirect_on_completion This parameter applies to <code>ui_mode: embedded</code>. Learn more about the <a href="https://stripe.com/docs/payments/checkout/custom-redirect-behavior">redirect behavior</a> of embedded sessions. Defaults to <code>always</code>.
* @property null|string $redirect_on_completion This parameter applies to <code>ui_mode: embedded</code>. Learn more about the <a href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect behavior</a> of embedded sessions. Defaults to <code>always</code>.
* @property null|string $return_url Applies to Checkout Sessions with <code>ui_mode: embedded</code> or <code>ui_mode: custom</code>. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
* @property null|\Stripe\StripeObject $saved_payment_method_options Controls saved payment method settings for the session. Only available in <code>payment</code> and <code>subscription</code> mode.
* @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, <a href="https://stripe.com/docs/api/checkout/sessions/expire">expire the Checkout Session</a> instead.
Expand Down
4 changes: 4 additions & 0 deletions lib/CustomerSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
* control over a Customer.
*
* Related guides: <a href="/payments/accept-a-payment-deferred?platform=web&amp;type=payment#save-payment-methods">Customer Session with the Payment Element</a>,
* <a href="/payments/checkout/pricing-table#customer-session">Customer Session with the Pricing Table</a>,
* <a href="/payment-links/buy-button#pass-an-existing-customer">Customer Session with the Buy Button</a>.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string $client_secret <p>The client secret of this Customer Session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
* @property null|\Stripe\StripeObject $components Configuration for the components supported by this Customer Session.
Expand Down
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class ErrorObject extends StripeObject
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
const CODE_TERMINAL_READER_BUSY = 'terminal_reader_busy';
const CODE_TERMINAL_READER_COLLECTED_DATA_INVALID = 'terminal_reader_collected_data_invalid';
const CODE_TERMINAL_READER_HARDWARE_FAULT = 'terminal_reader_hardware_fault';
const CODE_TERMINAL_READER_INVALID_LOCATION_FOR_PAYMENT = 'terminal_reader_invalid_location_for_payment';
const CODE_TERMINAL_READER_OFFLINE = 'terminal_reader_offline';
Expand Down
2 changes: 2 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Event extends ApiResource
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
const BALANCE_AVAILABLE = 'balance.available';
const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
const BILLING_METER_ERROR_REPORT_TRIGGERED = 'billing.meter_error_report.triggered';
const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
Expand Down Expand Up @@ -333,6 +334,7 @@ class Event extends ApiResource
const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
const TYPE_BALANCE_AVAILABLE = 'balance.available';
const TYPE_BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
const TYPE_BILLING_METER_ERROR_REPORT_TRIGGERED = 'billing.meter_error_report.triggered';
const TYPE_BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
const TYPE_BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const TYPE_BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
Expand Down
1 change: 1 addition & 0 deletions lib/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class File extends ApiResource
const PURPOSE_FINANCE_REPORT_RUN = 'finance_report_run';
const PURPOSE_IDENTITY_DOCUMENT = 'identity_document';
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
const PURPOSE_ISSUING_REGULATORY_REPORTING = 'issuing_regulatory_reporting';
const PURPOSE_PCI_DOCUMENT = 'pci_document';
const PURPOSE_SELFIE = 'selfie';
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
Expand Down
4 changes: 4 additions & 0 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
namespace Stripe;

/**
* Invoice Line Items represent the individual lines within an <a href="https://stripe.com/docs/api/invoices">invoice</a> and only exist within the context of an invoice.
*
* Each line item is backed by either an <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> or a <a href="https://stripe.com/docs/api/subscription_items">subscription item</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 int $amount The amount, in cents (or local equivalent).
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/CreditUnderwritingRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* @property null|int $decision_deadline For underwriting initiated by an application, a decision must be taken 30 days after the submission.
* @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 $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 $regulatory_reporting_file File containing regulatory reporting data for the decision. Required if you are subject to this <a href="https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions">reporting requirement</a>.
* @property null|\Stripe\StripeObject $underwriting_exception If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance.
*/
class CreditUnderwritingRecord extends \Stripe\ApiResource
Expand Down
2 changes: 1 addition & 1 deletion lib/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @property int $amount_tax Total tax amount applied. If no tax was applied, defaults to 0.
* @property int $amount_total Total after discounts and taxes.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
* @property null|\Stripe\StripeObject[] $discounts The discounts applied to the line item.
* @property null|\Stripe\Price $price The price used to generate the line item.
* @property null|string|\Stripe\Product $product <p>The ID of the product for this line item.</p><p>This will always be the same as <code>price.product</code>.</p>
Expand Down
2 changes: 1 addition & 1 deletion lib/PaymentIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
* @property null|string $setup_future_usage <p>Indicates that you intend to make future payments with this PaymentIntent's payment method.</p><p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a href="/payments/save-during-payment">attach the payment method</a> to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still <a href="/api/payment_methods/attach">attach</a> the payment method to a Customer after the transaction completes.</p><p>If the payment method is <code>card_present</code> and isn't a digital wallet, Stripe creates and attaches a <a href="/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a> payment method representing the card to the Customer instead.</p><p>When processing card payments, Stripe uses <code>setup_future_usage</code> to help you comply with regional legislation and network rules, such as <a href="/strong-customer-authentication">SCA</a>.</p>
* @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent.
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
* @property null|string $statement_descriptor Text that appears on the customer's statement as the <a href="https://docs.stripe.com/get-started/account/statement-descriptors">statement descriptor</a> for a non-card charge. This value overrides the account's default statement descriptor. Setting this value for a card charge returns an error. For card charges, set the <a href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a> instead.
* @property null|string $statement_descriptor <p>Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see <a href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement Descriptor docs</a>.</p><p>Setting this value for a card charge returns an error. For card charges, set the <a href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a> instead.</p>
* @property null|string $statement_descriptor_suffix Provides information about a card charge. Concatenated to the account's <a href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement descriptor prefix</a> to form the complete statement descriptor that appears on the customer's statement.
* @property string $status Status of this PaymentIntent, one of <code>requires_payment_method</code>, <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>requires_capture</code>, <code>canceled</code>, or <code>succeeded</code>. Read more about each PaymentIntent <a href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>.
* @property null|\Stripe\StripeObject $transfer_data The data that automatically creates a Transfer after the payment finalizes. Learn more about the <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a>.
Expand Down
2 changes: 2 additions & 0 deletions lib/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @property null|\Stripe\StripeObject $konbini
* @property null|\Stripe\StripeObject $link
* @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 $mb_way
* @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|\Stripe\StripeObject $mobilepay
* @property null|\Stripe\StripeObject $multibanco
Expand Down Expand Up @@ -96,6 +97,7 @@ class PaymentMethod extends ApiResource
const TYPE_KLARNA = 'klarna';
const TYPE_KONBINI = 'konbini';
const TYPE_LINK = 'link';
const TYPE_MB_WAY = 'mb_way';
const TYPE_MOBILEPAY = 'mobilepay';
const TYPE_MULTIBANCO = 'multibanco';
const TYPE_OXXO = 'oxxo';
Expand Down
5 changes: 4 additions & 1 deletion lib/Service/PaymentIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function capture($id, $params = null, $opts = null)
* If any actions are required for the payment, the PaymentIntent will return to
* the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate
* the next payment attempt.
* the next payment attempt. There is a variable upper limit on how many times a
* PaymentIntent can be confirmed. After this limit is reached, any further calls
* to this endpoint will transition the PaymentIntent to the <code>canceled</code>
* state.
*
* @param string $id
* @param null|array $params
Expand Down
28 changes: 28 additions & 0 deletions lib/Service/Terminal/ReaderCollectedDataService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Terminal;

/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class ReaderCollectedDataService extends \Stripe\Service\AbstractService
{
/**
* Retrieve data collected using Reader hardware.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Terminal\ReaderCollectedData
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/terminal/reader_collected_data/%s', $id), $params, $opts);
}
}
Loading

0 comments on commit 89398f2

Please sign in to comment.