Skip to content

Update generated code for beta #1599

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

Merged
merged 45 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
22ba74e
Bump version to 15.1.0
mbroshi-stripe Apr 30, 2025
bd7db67
Merge upstream and update generated code for v1722
stripe-openapi[bot] May 1, 2025
a294b4a
Update generated code for v1723
stripe-openapi[bot] May 2, 2025
e3660ff
Update generated code for v1724
stripe-openapi[bot] May 2, 2025
e55cf39
Update generated code for v1725
stripe-openapi[bot] May 2, 2025
ed56001
Update generated code for v1726
stripe-openapi[bot] May 2, 2025
5a685de
Update generated code for v1727
stripe-openapi[bot] May 2, 2025
ff7e445
Require merge commit for merge PR (+ new rules.yml file) (#1600)
jar-stripe May 2, 2025
74a5d1d
adds CONTRIBUTING.md (#1601)
jar-stripe May 2, 2025
e964a6b
Merge upstream and update generated code for v1728
stripe-openapi[bot] May 4, 2025
a0f23d3
Update generated code for v1729
stripe-openapi[bot] May 5, 2025
8a5cfaa
Update generated code for v1735
stripe-openapi[bot] May 6, 2025
a89df85
Rename beta SDKs to public preview SDKs in readme (#1603)
ramya-stripe May 8, 2025
ce64b9b
Merge upstream and update generated code for v1738
stripe-openapi[bot] May 8, 2025
80586a7
Update generated code for v1739
stripe-openapi[bot] May 8, 2025
30cd50b
Update generated code for v1740
stripe-openapi[bot] May 8, 2025
3bd053f
Update generated code for v1741
stripe-openapi[bot] May 8, 2025
6a2a9dc
Simplify public preview SDK instructions (#1604)
ramya-stripe May 9, 2025
c3bfe50
Merge upstream and update generated code for v1741
stripe-openapi[bot] May 9, 2025
8380ddf
Update generated code for v1742
stripe-openapi[bot] May 9, 2025
b57fa68
Update generated code for v1743
stripe-openapi[bot] May 9, 2025
5e22c85
Update generated code for v1745
stripe-openapi[bot] May 9, 2025
b9d4de7
Update generated code for v1746
stripe-openapi[bot] May 10, 2025
6703e70
Update generated code for v1747
stripe-openapi[bot] May 12, 2025
ca7f364
Update generated code for v1748
stripe-openapi[bot] May 13, 2025
a0ffd30
Update generated code for v1751
stripe-openapi[bot] May 13, 2025
5600195
Update generated code for v1752
stripe-openapi[bot] May 14, 2025
6d89ccb
Update generated code for v1754
stripe-openapi[bot] May 14, 2025
ebab104
Update generated code for v1755
stripe-openapi[bot] May 14, 2025
89d8e38
Update generated code for v1756
stripe-openapi[bot] May 15, 2025
8d40bbf
Update generated code for v1757
stripe-openapi[bot] May 15, 2025
9055854
Update generated code for v1758
stripe-openapi[bot] May 15, 2025
1f5eb68
Update generated code for v1759
stripe-openapi[bot] May 15, 2025
e22c744
Update generated code for v1760
stripe-openapi[bot] May 15, 2025
2ac85d3
Update generated code for v1762
stripe-openapi[bot] May 15, 2025
dbe91ae
Update generated code for v1763
stripe-openapi[bot] May 16, 2025
edcb082
Update generated code for v1764
stripe-openapi[bot] May 16, 2025
3d51e06
Update generated code for v1765
stripe-openapi[bot] May 16, 2025
f8ce1a7
Update generated code for v1766
stripe-openapi[bot] May 16, 2025
4e4f3c3
Update generated code for v1768
stripe-openapi[bot] May 16, 2025
18862c7
Update generated code for v1769
stripe-openapi[bot] May 16, 2025
a4901f6
Update generated code for v1770
stripe-openapi[bot] May 19, 2025
1200cf2
Update generated code for v1770
stripe-openapi[bot] May 20, 2025
ad36eea
Update generated code for v1772
stripe-openapi[bot] May 21, 2025
3c3a2c4
Update generated code for v1773
stripe-openapi[bot] May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .github/workflows/rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: rules

on:
workflow_dispatch: {}
pull_request:
types:
- auto_merge_enabled

jobs:
require_merge_commit_on_merge_script_pr:
name: Merge script PRs must create merge commits
if: ${{ contains(github.head_ref, '/merge-') }}
runs-on: ubuntu-latest
steps:
- run: |
if ${{ github.event.pull_request.auto_merge.merge_method != 'merge' }}; then
echo "Auto-merge method must be 'merge' instead of '${{github.event.pull_request.auto_merge.merge_method}}'"
exit 1
fi

25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@
* Change `Checkout::Session::AutomaticTax.provider`, `Invoice::AutomaticTax.provider`, `Quote::AutomaticTax.provider`, and `QuotePreviewInvoice::AutomaticTax.provider` to be required
* Add support for `account_number` on `ConfirmationToken::PaymentMethodPreview::AcssDebit` and `PaymentMethod::AcssDebit`

## 15.1.0 - 2025-04-30

This release changes the pinned API version to `2025-04-30.basil`.

* [#1566](https://github.com/stripe/stripe-ruby/pull/1566) Update generated code
* Add support for `minority_owned_business_designation` on `Account::BusinessProfile`, `Account::CreateParams::BusinessProfile`, and `Account::UpdateParams::BusinessProfile`
* Add support for `registration_date` on `Account::Company`, `Account::CreateParams::Company`, `Account::UpdateParams::Company`, and `Token::CreateParams::Account::Company`
* Add support for `us_cfpb_data` on `Account::CreateParams`, `Account::UpdateParams`, `AccountPerson::CreateParams`, `AccountPerson::UpdateParams`, `Person`, and `Token::CreateParams::Person`
* Add support for `tax_id` on `Charge::BillingDetail`, `ConfirmationToken::CreateParams::PaymentMethodDatum::BillingDetail`, `ConfirmationToken::PaymentMethodPreview::BillingDetail`, `PaymentIntent::ConfirmParams::PaymentMethodDatum::BillingDetail`, `PaymentIntent::CreateParams::PaymentMethodDatum::BillingDetail`, `PaymentIntent::UpdateParams::PaymentMethodDatum::BillingDetail`, `PaymentMethod::BillingDetail`, `PaymentMethod::CreateParams::BillingDetail`, `PaymentMethod::UpdateParams::BillingDetail`, `SetupIntent::ConfirmParams::PaymentMethodDatum::BillingDetail`, `SetupIntent::CreateParams::PaymentMethodDatum::BillingDetail`, `SetupIntent::UpdateParams::PaymentMethodDatum::BillingDetail`, `TestHelpers::ConfirmationToken::CreateParams::PaymentMethodDatum::BillingDetail`, and `Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodDatum::BillingDetail`
* Add support for `wallet_options` on `Checkout::Session::CreateParams` and `Checkout::Session`
* Add support for `provider` on `Checkout::Session::AutomaticTax`, `Invoice::AutomaticTax`, and `Quote::AutomaticTax`
* Add support for `payment_method_options` on `ConfirmationToken::CreateParams` and `TestHelpers::ConfirmationToken::CreateParams`
* Add support for `installments` on `ConfirmationToken::PaymentMethodOption::Card`
* Add support for `context` on `Event`
* Change type of `InvoiceLineItem::Parent::SubscriptionItemDetail.subscription` from `string` to `nullable(string)`
* Add support for `billie` on `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, and `PaymentIntent::UpdateParams::PaymentMethodOption`
* Add support for `pix` on `PaymentMethodConfiguration::CreateParams`, `PaymentMethodConfiguration::UpdateParams`, and `PaymentMethodConfiguration`
* Add support for `klarna` on `PaymentMethodDomain`
* Add support for `pending_reason` on `Refund`
* Change type of `Tax::CalculationLineItem.reference` from `nullable(string)` to `string`
* Add support for `aw`, `az`, `bd`, `bf`, `bj`, `cm`, `cv`, `et`, `in`, `kg`, `la`, and `ph` on `Tax::Registration::CountryOption` and `Tax::Registration::CreateParams::CountryOption`
* [#1585](https://github.com/stripe/stripe-ruby/pull/1585) Updated rubocop from 1.57.2 to 1.75.2
* [#1583](https://github.com/stripe/stripe-ruby/pull/1583) Include new Ruby 3.4 in CI
* [#1581](https://github.com/stripe/stripe-ruby/pull/1581) Added rubocop exclusion for generated tests

## 15.1.0-beta.2 - 2025-04-17
* [#1578](https://github.com/stripe/stripe-ruby/pull/1578) Update generated code for beta
* Add support for new resources `FxQuote` and `PaymentIntentAmountDetailsLineItem`
Expand Down
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Contributing

We welcome bug reports, feature requests, and code contributions in a pull request.

For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-ruby/issues/new/choose).

## Contributor License Agreement

All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant.

## Generated code

This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution.

To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`.

## Compatibility with supported language and runtime versions

This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward.

## Set up your dev environment

Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1719
v1773
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,22 +353,25 @@ by default. If you are overriding `Stripe.api_version` / `stripe_version` on the
or using a webhook endpoint tied to an older version, be aware that the data
you see at runtime may not match the types.

### Beta SDKs
### Public Preview SDKs

Stripe has features in the beta phase that can be accessed via the beta version of this package.
We would love for you to try these and share feedback with us before these features reach the stable phase.
To install a beta version use `gem install` with the exact version you'd like to use:
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `11.2.0-beta.2`.
We would love for you to try these as we incrementally release new features and improve them based on your feedback.

To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-ruby/releases/) and use it in the `gem install` command:

```sh
gem install stripe -v 7.1.0.pre.beta.2
gem install stripe -v <replace-with-the-version-of-your-choice>
```

You can find the latest version to use in this command from the [releases page](https://github.com/stripe/stripe-ruby/releases/)

> **Note**
> There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your Gemfile. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
> There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your Gemfile. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest version of the public preview SDK.

We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.

If your beta feature requires a `Stripe-Version` header to be sent, set the `Stripe.api_version` field using `Stripe.add_beta_version`:
Some preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If your preview feature has this requirement, use the `Stripe.add_beta_version` function (available only in the public preview SDKs):

```python
Stripe.add_beta_version("feature_beta", "v3")
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

module Stripe
module ApiVersion
CURRENT = "2025-04-30.preview"
CURRENT = "2025-05-28.preview"
end
end
9 changes: 9 additions & 0 deletions lib/stripe/event_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ def self.thin_event_names_to_classes
V2MoneyManagementReceivedDebitUpdatedEvent,
V2MoneyManagementTransactionCreatedEvent.lookup_type => V2MoneyManagementTransactionCreatedEvent,
V2MoneyManagementTransactionUpdatedEvent.lookup_type => V2MoneyManagementTransactionUpdatedEvent,
V2OffSessionPaymentRequiresCaptureEvent.lookup_type => V2OffSessionPaymentRequiresCaptureEvent,
V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.lookup_type =>
V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent,
V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.lookup_type =>
V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent,
V2PaymentsOffSessionPaymentCanceledEvent.lookup_type => V2PaymentsOffSessionPaymentCanceledEvent,
V2PaymentsOffSessionPaymentCreatedEvent.lookup_type => V2PaymentsOffSessionPaymentCreatedEvent,
V2PaymentsOffSessionPaymentFailedEvent.lookup_type => V2PaymentsOffSessionPaymentFailedEvent,
V2PaymentsOffSessionPaymentSucceededEvent.lookup_type => V2PaymentsOffSessionPaymentSucceededEvent,
# The end of the section generated from our OpenAPI spec
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# The generated account link has been completed.
# Occurs when the generated AccountLink is completed.
class V2CoreAccountLinkCompletedEvent < Stripe::V2::Event
def self.lookup_type
"v2.core.account_link.completed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An InboundTransfer failed.
# Occurs when an InboundTransfer fails.
class V2MoneyManagementInboundTransferBankDebitFailedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.inbound_transfer.bank_debit_failed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An InboundTransfer is now processing.
# Occurs when an InboundTransfer starts processing.
class V2MoneyManagementInboundTransferBankDebitProcessingEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.inbound_transfer.bank_debit_processing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An InboundTransfer has been queued.
# Occurs when an InboundTransfer is queued.
class V2MoneyManagementInboundTransferBankDebitQueuedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.inbound_transfer.bank_debit_queued"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An InboundTransfer was returned.
# Occurs when an InboundTransfer is returned.
class V2MoneyManagementInboundTransferBankDebitReturnedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.inbound_transfer.bank_debit_returned"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An InboundTransfer succeeded.
# Occurs when an InboundTransfer succeeds.
class V2MoneyManagementInboundTransferBankDebitSucceededEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.inbound_transfer.bank_debit_succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An OutboundPayment has transitioned into the canceled state.
# Occurs when an OutboundPayment transitions into the canceled state.
class V2MoneyManagementOutboundPaymentCanceledEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.outbound_payment.canceled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An OutboundPayment has transitioned into the failed state.
# Occurs when an OutboundPayment transitions into the failed state.
class V2MoneyManagementOutboundPaymentFailedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.outbound_payment.failed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An OutboundPayment has transitioned into the posted state.
# Occurs when an OutboundPayment transitions into the posted state.
class V2MoneyManagementOutboundPaymentPostedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.outbound_payment.posted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# An OutboundPayment has transitioned into the returned state.
# Occurs when an OutboundPayment transitions into the returned state.
class V2MoneyManagementOutboundPaymentReturnedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.outbound_payment.returned"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

module Stripe
# Event that is emitted every time an Outbound Payment is updated.
# Occurs when an OutboundPayment is updated.
class V2MoneyManagementOutboundPaymentUpdatedEvent < Stripe::V2::Event
def self.lookup_type
"v2.money_management.outbound_payment.updated"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment requires capture event definition.
class V2OffSessionPaymentRequiresCaptureEvent < Stripe::V2::Event
def self.lookup_type
"v2.off_session_payment.requires_capture"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment authorization attempt failed event definition.
class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_failed"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment authorization attempt started event definition.
class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.authorization_attempt_started"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment canceled event definition.
class V2PaymentsOffSessionPaymentCanceledEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.canceled"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment created event definition.
class V2PaymentsOffSessionPaymentCreatedEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.created"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment failed event definition.
class V2PaymentsOffSessionPaymentFailedEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.failed"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
# Off session payment succeeded event definition.
class V2PaymentsOffSessionPaymentSucceededEvent < Stripe::V2::Event
def self.lookup_type
"v2.payments.off_session_payment.succeeded"
end

# Retrieves the related object from the API. Make an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_account: context }
)
end
end
end
Loading