stripe 15.0.0 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -0
- data/CHANGELOG.md +129 -44
- data/CONTRIBUTING.md +25 -0
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +28 -55
- data/VERSION +1 -1
- data/lib/stripe/api_operations/nested_resource.rb +35 -35
- data/lib/stripe/api_requestor.rb +1 -1
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/connection_manager.rb +1 -3
- data/lib/stripe/event_types.rb +1 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
- data/lib/stripe/oauth.rb +1 -1
- data/lib/stripe/resources/account.rb +198 -28
- data/lib/stripe/resources/account_session.rb +176 -72
- data/lib/stripe/resources/apple_pay_domain.rb +1 -2
- data/lib/stripe/resources/balance.rb +42 -0
- data/lib/stripe/resources/balance_transaction.rb +2 -0
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing_portal/session.rb +3 -3
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/charge.rb +43 -20
- data/lib/stripe/resources/checkout/session.rb +120 -19
- data/lib/stripe/resources/confirmation_token.rb +119 -100
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +2 -3
- data/lib/stripe/resources/credit_note.rb +21 -18
- data/lib/stripe/resources/customer.rb +4 -6
- data/lib/stripe/resources/customer_session.rb +5 -5
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +3 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/funding_instructions.rb +1 -1
- data/lib/stripe/resources/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +51 -11
- data/lib/stripe/resources/invoice.rb +146 -32
- data/lib/stripe/resources/invoice_item.rb +3 -7
- data/lib/stripe/resources/invoice_line_item.rb +1 -1
- data/lib/stripe/resources/invoice_payment.rb +9 -2
- data/lib/stripe/resources/issuing/authorization.rb +8 -8
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/issuing/dispute.rb +3 -3
- data/lib/stripe/resources/login_link.rb +2 -1
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +602 -325
- data/lib/stripe/resources/payment_method.rb +76 -117
- data/lib/stripe/resources/payment_method_configuration.rb +356 -2
- data/lib/stripe/resources/payment_method_domain.rb +15 -2
- data/lib/stripe/resources/payout.rb +4 -4
- data/lib/stripe/resources/person.rb +27 -3
- data/lib/stripe/resources/plan.rb +2 -3
- data/lib/stripe/resources/price.rb +1 -1
- data/lib/stripe/resources/product.rb +1 -2
- data/lib/stripe/resources/quote.rb +28 -3
- data/lib/stripe/resources/radar/value_list.rb +1 -2
- data/lib/stripe/resources/radar/value_list_item.rb +1 -2
- data/lib/stripe/resources/refund.rb +8 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +414 -293
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +149 -27
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +141 -4
- data/lib/stripe/resources/tax/calculation.rb +6 -2
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +261 -1
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +3 -4
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +2 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +426 -6
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +63 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/resources/v2/event.rb +2 -2
- data/lib/stripe/resources/v2/event_destination.rb +2 -2
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/services/account_external_account_service.rb +3 -4
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +85 -2
- data/lib/stripe/services/account_service.rb +169 -20
- data/lib/stripe/services/account_session_service.rb +115 -47
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/application_fee_service.rb +1 -1
- data/lib/stripe/services/apps_service.rb +1 -1
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/billing_portal_service.rb +1 -1
- data/lib/stripe/services/billing_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +4 -4
- data/lib/stripe/services/checkout/session_service.rb +94 -15
- data/lib/stripe/services/checkout_service.rb +1 -1
- data/lib/stripe/services/climate_service.rb +1 -1
- data/lib/stripe/services/coupon_service.rb +1 -2
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +14 -15
- data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/customer_payment_method_service.rb +1 -1
- data/lib/stripe/services/customer_payment_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +5 -7
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/customer_tax_id_service.rb +2 -3
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/entitlements_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +1 -1
- data/lib/stripe/services/financial_connections_service.rb +1 -1
- data/lib/stripe/services/forwarding_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +21 -5
- data/lib/stripe/services/identity_service.rb +1 -1
- data/lib/stripe/services/invoice_item_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +122 -28
- data/lib/stripe/services/issuing/authorization_service.rb +4 -4
- data/lib/stripe/services/issuing/card_service.rb +1 -1
- data/lib/stripe/services/issuing/dispute_service.rb +2 -2
- data/lib/stripe/services/issuing_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +563 -313
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +59 -105
- data/lib/stripe/services/payout_service.rb +2 -2
- data/lib/stripe/services/plan_service.rb +2 -3
- data/lib/stripe/services/price_service.rb +2 -2
- data/lib/stripe/services/product_feature_service.rb +1 -2
- data/lib/stripe/services/product_service.rb +3 -4
- data/lib/stripe/services/promotion_code_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +21 -4
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
- data/lib/stripe/services/radar/value_list_service.rb +1 -2
- data/lib/stripe/services/radar_service.rb +1 -1
- data/lib/stripe/services/reporting_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +403 -291
- data/lib/stripe/services/sigma_service.rb +1 -1
- data/lib/stripe/services/source_service.rb +2 -2
- data/lib/stripe/services/subscription_item_service.rb +26 -0
- data/lib/stripe/services/subscription_schedule_service.rb +106 -3
- data/lib/stripe/services/subscription_service.rb +121 -26
- data/lib/stripe/services/tax/calculation_service.rb +6 -2
- data/lib/stripe/services/tax/registration_service.rb +170 -1
- data/lib/stripe/services/tax/transaction_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +2 -3
- data/lib/stripe/services/tax_service.rb +1 -1
- data/lib/stripe/services/terminal/configuration_service.rb +1 -2
- data/lib/stripe/services/terminal/location_service.rb +2 -3
- data/lib/stripe/services/terminal/reader_service.rb +196 -2
- data/lib/stripe/services/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
- data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
- data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
- data/lib/stripe/services/test_helpers_service.rb +1 -1
- data/lib/stripe/services/token_service.rb +62 -1
- data/lib/stripe/services/transfer_service.rb +2 -2
- data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
- data/lib/stripe/services/treasury_service.rb +1 -1
- data/lib/stripe/services/v1_services.rb +1 -1
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/billing_service.rb +3 -3
- data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/v2/core_service.rb +1 -1
- data/lib/stripe/services/v2_services.rb +1 -1
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/rbi/stripe/resources/account.rbi +190 -35
- data/rbi/stripe/resources/account_session.rbi +196 -77
- data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
- data/rbi/stripe/resources/balance.rbi +55 -0
- data/rbi/stripe/resources/balance_transaction.rbi +3 -0
- data/rbi/stripe/resources/bank_account.rbi +2 -2
- data/rbi/stripe/resources/billing/alert.rbi +2 -2
- data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
- data/rbi/stripe/resources/capability.rbi +1 -1
- data/rbi/stripe/resources/charge.rbi +52 -20
- data/rbi/stripe/resources/checkout/session.rbi +133 -24
- data/rbi/stripe/resources/confirmation_token.rbi +140 -115
- data/rbi/stripe/resources/country_spec.rbi +1 -1
- data/rbi/stripe/resources/coupon.rbi +2 -4
- data/rbi/stripe/resources/credit_note.rbi +23 -18
- data/rbi/stripe/resources/customer.rbi +4 -8
- data/rbi/stripe/resources/customer_session.rbi +5 -5
- data/rbi/stripe/resources/dispute.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +4 -1
- data/rbi/stripe/resources/file.rbi +1 -1
- data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
- data/rbi/stripe/resources/invoice.rbi +149 -40
- data/rbi/stripe/resources/invoice_item.rbi +3 -8
- data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
- data/rbi/stripe/resources/invoice_payment.rbi +9 -2
- data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
- data/rbi/stripe/resources/issuing/card.rbi +1 -1
- data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
- data/rbi/stripe/resources/login_link.rbi +2 -1
- data/rbi/stripe/resources/mandate.rbi +4 -0
- data/rbi/stripe/resources/payment_intent.rbi +637 -381
- data/rbi/stripe/resources/payment_method.rbi +81 -133
- data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
- data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
- data/rbi/stripe/resources/payout.rbi +4 -4
- data/rbi/stripe/resources/person.rbi +33 -3
- data/rbi/stripe/resources/plan.rbi +2 -4
- data/rbi/stripe/resources/price.rbi +1 -1
- data/rbi/stripe/resources/product.rbi +1 -3
- data/rbi/stripe/resources/quote.rbi +25 -3
- data/rbi/stripe/resources/radar/value_list.rbi +1 -3
- data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
- data/rbi/stripe/resources/refund.rbi +8 -1
- data/rbi/stripe/resources/reversal.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +1 -1
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +464 -346
- data/rbi/stripe/resources/source.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +150 -34
- data/rbi/stripe/resources/subscription_item.rbi +36 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
- data/rbi/stripe/resources/tax/calculation.rbi +7 -3
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
- data/rbi/stripe/resources/tax/registration.rbi +249 -2
- data/rbi/stripe/resources/tax/transaction.rbi +1 -1
- data/rbi/stripe/resources/tax_id.rbi +3 -5
- data/rbi/stripe/resources/tax_rate.rbi +2 -2
- data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
- data/rbi/stripe/resources/terminal/location.rbi +4 -6
- data/rbi/stripe/resources/terminal/reader.rbi +415 -8
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
- data/rbi/stripe/resources/token.rbi +70 -4
- data/rbi/stripe/resources/transfer.rbi +1 -1
- data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
- data/rbi/stripe/resources/v2/event.rbi +3 -3
- data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
- data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
- data/rbi/stripe/services/account_external_account_service.rbi +3 -5
- data/rbi/stripe/services/account_login_link_service.rbi +1 -1
- data/rbi/stripe/services/account_person_service.rbi +93 -5
- data/rbi/stripe/services/account_service.rbi +166 -28
- data/rbi/stripe/services/account_session_service.rbi +126 -52
- data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
- data/rbi/stripe/services/balance_service.rbi +1 -1
- data/rbi/stripe/services/billing/alert_service.rbi +2 -2
- data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
- data/rbi/stripe/services/charge_service.rbi +4 -4
- data/rbi/stripe/services/checkout/session_service.rbi +104 -19
- data/rbi/stripe/services/coupon_service.rbi +1 -3
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
- data/rbi/stripe/services/credit_note_service.rbi +13 -14
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
- data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
- data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
- data/rbi/stripe/services/customer_service.rbi +4 -8
- data/rbi/stripe/services/customer_session_service.rbi +1 -1
- data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
- data/rbi/stripe/services/dispute_service.rbi +1 -1
- data/rbi/stripe/services/file_service.rbi +1 -1
- data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
- data/rbi/stripe/services/invoice_item_service.rbi +1 -3
- data/rbi/stripe/services/invoice_service.rbi +126 -35
- data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
- data/rbi/stripe/services/issuing/card_service.rbi +1 -1
- data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +599 -369
- data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
- data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
- data/rbi/stripe/services/payment_method_service.rbi +62 -121
- data/rbi/stripe/services/payout_service.rbi +2 -2
- data/rbi/stripe/services/plan_service.rbi +2 -4
- data/rbi/stripe/services/price_service.rbi +2 -2
- data/rbi/stripe/services/product_feature_service.rbi +1 -3
- data/rbi/stripe/services/product_service.rbi +2 -4
- data/rbi/stripe/services/promotion_code_service.rbi +1 -1
- data/rbi/stripe/services/quote_service.rbi +16 -3
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
- data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
- data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
- data/rbi/stripe/services/setup_intent_service.rbi +457 -344
- data/rbi/stripe/services/source_service.rbi +1 -1
- data/rbi/stripe/services/subscription_item_service.rbi +28 -2
- data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
- data/rbi/stripe/services/subscription_service.rbi +121 -33
- data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
- data/rbi/stripe/services/tax/registration_service.rbi +171 -2
- data/rbi/stripe/services/tax_id_service.rbi +2 -4
- data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
- data/rbi/stripe/services/terminal/location_service.rbi +4 -6
- data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
- data/rbi/stripe/services/token_service.rbi +71 -3
- data/rbi/stripe/services/transfer_service.rbi +1 -1
- data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
- data/rbi/stripe/services/v2/billing_service.rbi +1 -1
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
- data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
- data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d72c2e4fa9d62e0defa6c35a5ca4555ab0d0e20afb07eb31b185fe1be8eea1
|
4
|
+
data.tar.gz: a5482622bdb95231f47b7444df5d37402b689fd7771d4a209cb695c89141639d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e5f19aebfc269911a6061214abe943dfe29cbc70f578cf9cdc271ba69c6c42d8f99ac462ef6ffe5450d38fe984fa4970b391b45cd573d6064f0b4acc5b2054
|
7
|
+
data.tar.gz: 5fcd5f114f06a5b050702059942f4d3d7563d82a59b42c84ac8fa6c407022b29ee7e428076646a7a3fde6cf77394143ed920782287a747aedc0be9251d04b290
|
data/API_VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2025-06-30.basil
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,89 @@
|
|
1
1
|
# Changelog
|
2
|
+
## 15.3.0 - 2025-07-01
|
3
|
+
* [#1618](https://github.com/stripe/stripe-ruby/pull/1618) Update generated code
|
4
|
+
* Add support for `migrate` method on resource `Subscription`
|
5
|
+
* Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal::Reader`
|
6
|
+
* Add support for `crypto_payments` on `Account::Capability`, `Account::CreateParams::Capability`, and `Account::UpdateParams::Capability`
|
7
|
+
* Add support for `proof_of_address` on `Account::CreateParams::Document` and `Account::UpdateParams::Document`
|
8
|
+
* Add support for `monthly_payout_days` and `weekly_payout_days` on `Account::CreateParams::Setting::Payout::Schedule`, `Account::Setting::Payout::Schedule`, and `Account::UpdateParams::Setting::Payout::Schedule`
|
9
|
+
* Change `Account::Setting::Invoice.hosted_payment_method_save` to be required
|
10
|
+
* Add support for `crypto` on `Charge::PaymentMethodDetail`, `ConfirmationToken::CreateParams::PaymentMethodDatum`, `ConfirmationToken::PaymentMethodPreview`, `PaymentIntent::ConfirmParams::PaymentMethodDatum`, `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodDatum`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, `PaymentIntent::UpdateParams::PaymentMethodDatum`, `PaymentIntent::UpdateParams::PaymentMethodOption`, `PaymentMethod::CreateParams`, `PaymentMethod`, `SetupIntent::ConfirmParams::PaymentMethodDatum`, `SetupIntent::CreateParams::PaymentMethodDatum`, and `SetupIntent::UpdateParams::PaymentMethodDatum`
|
11
|
+
* Change type of `Charge::PaymentMethodDetail::Card::Installment::Plan.type`, `ConfirmationToken::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `ConfirmationToken::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::CreateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::UpdateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::AvailablePlan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::Plan.type`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Card::Installment::Plan.type` from `literal('fixed_count')` to `enum('bonus'|'fixed_count'|'revolving')`
|
12
|
+
* Add support for `subscriptions` on `Checkout::Session::CreateParams::PaymentMethodOption::Klarna`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna`
|
13
|
+
* Add support for `billing_mode` on `Checkout::Session::CreateParams::SubscriptionDatum`, `Invoice::CreatePreviewParams::ScheduleDetail`, `Invoice::CreatePreviewParams::SubscriptionDetail`, `Quote::CreateParams::SubscriptionDatum`, `Quote::SubscriptionDatum`, `Subscription::CreateParams`, `SubscriptionSchedule::CreateParams`, `SubscriptionSchedule`, and `Subscription`
|
14
|
+
* Change type of `Dispute.enhanced_eligibility_types` from `literal('visa_compelling_evidence_3')` to `enum('visa_compelling_evidence_3'|'visa_compliance')`
|
15
|
+
* Add support for `related_person` on `Identity::VerificationSession::CreateParams` and `Identity::VerificationSession`
|
16
|
+
* Add support for `matching` on `Identity::VerificationSession::Option`
|
17
|
+
* Add support for `klarna` on `Mandate::PaymentMethodDetail`, `SetupIntent::ConfirmParams::PaymentMethodOption`, `SetupIntent::CreateParams::PaymentMethodOption`, `SetupIntent::PaymentMethodOption`, and `SetupIntent::UpdateParams::PaymentMethodOption`
|
18
|
+
* Add support for `on_demand` on `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna`
|
19
|
+
* Change type of `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::PaymentMethodOption::Klarna.setup_future_usage`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna.setup_future_usage` from `literal('none')` to `enum('none'|'off_session'|'on_session')`
|
20
|
+
* Add support for `ua` on `Tax::Registration::CountryOption` and `Tax::Registration::CreateParams::CountryOption`
|
21
|
+
* Change type of `Terminal::Location::UpdateParams.display_name` from `string` to `emptyable(string)`
|
22
|
+
* Add support for `collect_payment_method` and `confirm_payment_intent` on `Terminal::Reader::Action`
|
23
|
+
* Add support for `status` on `Treasury::FinancialAccount::ListParams`
|
24
|
+
* [#1615](https://github.com/stripe/stripe-ruby/pull/1615) Update README to mention that APIResource.request was removed
|
25
|
+
* [#1619](https://github.com/stripe/stripe-ruby/pull/1619) Updated StripeClient snippets in README
|
26
|
+
* [#1621](https://github.com/stripe/stripe-ruby/pull/1621) Disable flaky test in jruby/truffleruby
|
27
|
+
* [#1620](https://github.com/stripe/stripe-ruby/pull/1620) Fix `raw_request` example in README
|
28
|
+
|
29
|
+
## 15.2.1 - 2025-06-04
|
30
|
+
* [#1617](https://github.com/stripe/stripe-ruby/pull/1617) Fix `nil` requestor in `Webhook.construct_event` to allow for event data refresh
|
31
|
+
* Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor
|
32
|
+
* Raised in https://github.com/stripe/stripe-ruby/issues/1616
|
33
|
+
|
34
|
+
## 15.2.0 - 2025-05-29
|
35
|
+
This release changes the pinned API version to `2025-05-28.basil`.
|
36
|
+
|
37
|
+
* [#1605](https://github.com/stripe/stripe-ruby/pull/1605) Update generated code
|
38
|
+
* Add support for `attach_payment` method on resource `Invoice`
|
39
|
+
* Add support for `collect_inputs` method on resource `Terminal::Reader`
|
40
|
+
* Add support for `succeed_input_collection` and `timeout_input_collection` test helper methods on resource `Terminal::Reader`
|
41
|
+
* Add support for `pix_payments` on `Account::Capability`, `Account::CreateParams::Capability`, and `Account::UpdateParams::Capability`
|
42
|
+
* Add support for `disputes_list` and `payment_disputes` on `AccountSession::Component` and `AccountSession::CreateParams::Component`
|
43
|
+
* Add support for `refund_and_dispute_prefunding` on `Balance`
|
44
|
+
* Add support for `balance_type` on `BalanceTransaction`
|
45
|
+
* Change `Billing::Alert::CreateParams::UsageThreshold.meter` to be required
|
46
|
+
* Add support for `location` and `reader` on `Charge::PaymentMethodDetail::Affirm` and `Charge::PaymentMethodDetail::WechatPay`
|
47
|
+
* Add support for `payment_method_remove` on `Checkout::Session::CreateParams::SavedPaymentMethodOption`
|
48
|
+
* Add support for `setup_future_usage` on `Checkout::Session::PaymentMethodOption::NaverPay`
|
49
|
+
* Change `ConfirmationToken::PaymentMethodPreview::NaverPay.buyer_id` and `PaymentMethod::NaverPay.buyer_id` to be required
|
50
|
+
* Add support for `post_payment_amount` and `pre_payment_amount` on `CreditNote`
|
51
|
+
* Add support for `sex`, `unparsed_place_of_birth`, and `unparsed_sex` on `Identity::VerificationReport::Document` and `Identity::VerificationSession::VerifiedOutput`
|
52
|
+
* Add support for `billing_thresholds` on `Invoice::CreatePreviewParams::ScheduleDetail::Phase::Item`, `Invoice::CreatePreviewParams::ScheduleDetail::Phase`, `Invoice::CreatePreviewParams::SubscriptionDetail::Item`, `Subscription::CreateParams::Item`, `Subscription::CreateParams`, `Subscription::UpdateParams::Item`, `Subscription::UpdateParams`, `SubscriptionItem::CreateParams`, `SubscriptionItem::UpdateParams`, `SubscriptionItem`, `SubscriptionSchedule::CreateParams::DefaultSetting`, `SubscriptionSchedule::CreateParams::Phase::Item`, `SubscriptionSchedule::CreateParams::Phase`, `SubscriptionSchedule::DefaultSetting`, `SubscriptionSchedule::Phase::Item`, `SubscriptionSchedule::Phase`, `SubscriptionSchedule::UpdateParams::DefaultSetting`, `SubscriptionSchedule::UpdateParams::Phase::Item`, `SubscriptionSchedule::UpdateParams::Phase`, and `Subscription`
|
53
|
+
* Add support for `satispay` on `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, and `PaymentIntent::UpdateParams::PaymentMethodOption`
|
54
|
+
* Add support for `capture_method` on `PaymentIntent::PaymentMethodOption::Billie`
|
55
|
+
* Add support for `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on `PaymentMethodConfiguration::CreateParams`, `PaymentMethodConfiguration::UpdateParams`, and `PaymentMethodConfiguration`
|
56
|
+
* Add support for `network_decline_code` on `Refund::DestinationDetail::Paypal`
|
57
|
+
* Add support for `metadata` on `Tax::Calculation::CreateParams::LineItem` and `Tax::CalculationLineItem`
|
58
|
+
* Add support for `return_url` on `Terminal::Reader::Action::ProcessPaymentIntent::ProcessConfig` and `Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig`
|
59
|
+
* Add support for `collect_inputs` on `Terminal::Reader::Action`
|
60
|
+
* [#1601](https://github.com/stripe/stripe-ruby/pull/1601) Adds CONTRIBUTING.md
|
61
|
+
|
62
|
+
## 15.1.0 - 2025-04-30
|
63
|
+
|
64
|
+
This release changes the pinned API version to `2025-04-30.basil`.
|
65
|
+
|
66
|
+
* [#1566](https://github.com/stripe/stripe-ruby/pull/1566) Update generated code
|
67
|
+
* Add support for `minority_owned_business_designation` on `Account::BusinessProfile`, `Account::CreateParams::BusinessProfile`, and `Account::UpdateParams::BusinessProfile`
|
68
|
+
* Add support for `registration_date` on `Account::Company`, `Account::CreateParams::Company`, `Account::UpdateParams::Company`, and `Token::CreateParams::Account::Company`
|
69
|
+
* Add support for `us_cfpb_data` on `Account::CreateParams`, `Account::UpdateParams`, `AccountPerson::CreateParams`, `AccountPerson::UpdateParams`, `Person`, and `Token::CreateParams::Person`
|
70
|
+
* 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`
|
71
|
+
* Add support for `wallet_options` on `Checkout::Session::CreateParams` and `Checkout::Session`
|
72
|
+
* Add support for `provider` on `Checkout::Session::AutomaticTax`, `Invoice::AutomaticTax`, and `Quote::AutomaticTax`
|
73
|
+
* Add support for `payment_method_options` on `ConfirmationToken::CreateParams` and `TestHelpers::ConfirmationToken::CreateParams`
|
74
|
+
* Add support for `installments` on `ConfirmationToken::PaymentMethodOption::Card`
|
75
|
+
* Add support for `context` on `Event`
|
76
|
+
* Change type of `InvoiceLineItem::Parent::SubscriptionItemDetail.subscription` from `string` to `nullable(string)`
|
77
|
+
* Add support for `billie` on `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, and `PaymentIntent::UpdateParams::PaymentMethodOption`
|
78
|
+
* Add support for `pix` on `PaymentMethodConfiguration::CreateParams`, `PaymentMethodConfiguration::UpdateParams`, and `PaymentMethodConfiguration`
|
79
|
+
* Add support for `klarna` on `PaymentMethodDomain`
|
80
|
+
* Add support for `pending_reason` on `Refund`
|
81
|
+
* Change type of `Tax::CalculationLineItem.reference` from `nullable(string)` to `string`
|
82
|
+
* 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`
|
83
|
+
* [#1585](https://github.com/stripe/stripe-ruby/pull/1585) Updated rubocop from 1.57.2 to 1.75.2
|
84
|
+
* [#1583](https://github.com/stripe/stripe-ruby/pull/1583) Include new Ruby 3.4 in CI
|
85
|
+
* [#1581](https://github.com/stripe/stripe-ruby/pull/1581) Added rubocop exclusion for generated tests
|
86
|
+
|
2
87
|
## 15.0.0 - 2025-04-09
|
3
88
|
|
4
89
|
### Breaking change
|
@@ -9,12 +94,12 @@
|
|
9
94
|
* [#1576](https://github.com/stripe/stripe-ruby/pull/1576) Explicitly pass through custom headers in retrieve
|
10
95
|
* Fix custom options passing for resource-based retrieve
|
11
96
|
* [#1571](https://github.com/stripe/stripe-ruby/pull/1571) Validate all instance variable keys returned from the API
|
12
|
-
* Validate all keys returned from the API, including custom response fields, to make sure they can be set in an instance variable, as brought up in https://github.com/stripe/stripe-ruby/issues/1564
|
13
|
-
* We do not set instance variables for invalid field names (as defined by the [Ruby spec](https://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html#ident)). We recommend for custom hash map response fields, use the `[]` accessor.
|
14
|
-
```ruby
|
15
|
-
c = client.v1.customers.retrieve("cus_123")
|
16
|
-
c.metadata["invalid-variable-name!"]
|
17
|
-
c.metadata["valid_key_name_works_too"]
|
97
|
+
* Validate all keys returned from the API, including custom response fields, to make sure they can be set in an instance variable, as brought up in https://github.com/stripe/stripe-ruby/issues/1564
|
98
|
+
* We do not set instance variables for invalid field names (as defined by the [Ruby spec](https://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html#ident)). We recommend for custom hash map response fields, use the `[]` accessor.
|
99
|
+
```ruby
|
100
|
+
c = client.v1.customers.retrieve("cus_123")
|
101
|
+
c.metadata["invalid-variable-name!"]
|
102
|
+
c.metadata["valid_key_name_works_too"]
|
18
103
|
```
|
19
104
|
* [#1575](https://github.com/stripe/stripe-ruby/pull/1575) Remove unused youtube playlist link
|
20
105
|
* [#1573](https://github.com/stripe/stripe-ruby/pull/1573) Remove link for stale youtube video playlist
|
@@ -24,15 +109,15 @@
|
|
24
109
|
* Adds explicit field types for resources and parameters for methods, and add RBI static annotations for all resources and services
|
25
110
|

|
26
111
|
* See [the wiki](https://github.com/stripe/stripe-ruby/wiki/Static-Type-Annotations) for more details
|
27
|
-
|
112
|
+
|
28
113
|
* [#1543](https://github.com/stripe/stripe-ruby/pull/1543) Support for APIs in the new API version 2025-03-31.basil
|
29
114
|
|
30
115
|
This release changes the pinned API version to `2025-03-31.basil`.
|
31
|
-
|
116
|
+
|
32
117
|
### ⚠️ Breaking changes due to changes in the Stripe API
|
33
118
|
|
34
119
|
Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/basil) before upgrading.
|
35
|
-
|
120
|
+
|
36
121
|
* Remove support for resources `SubscriptionItemUsageRecordSummary` and `SubscriptionItemUsageRecord`
|
37
122
|
* Remove support for `create` method on resource `SubscriptionItemUsageRecord`
|
38
123
|
* Remove support for `list` method on resource `SubscriptionItemUsageRecordSummary`
|
@@ -42,16 +127,16 @@
|
|
42
127
|
* [#1553](https://github.com/stripe/stripe-ruby/pull/1553) Remove public idempotent_replayed? method
|
43
128
|
* ⚠️ Remove the `idempotent_replayed?` method on `StripeError`
|
44
129
|
* The information is accessible indirectly via the raw response headers, `StripeResponse.http_headers`. For example, use `resource.last_response.http_headers['Idempotent-Replayed']`
|
45
|
-
|
130
|
+
|
46
131
|
### Additions to the Stripe API
|
47
|
-
|
132
|
+
|
48
133
|
* Add support for new resource `InvoicePayment`
|
49
134
|
* Add support for `list` and `retrieve` methods on resource `InvoicePayment`
|
50
|
-
|
135
|
+
|
51
136
|
|
52
137
|
## 13.5.0 - 2025-02-24
|
53
138
|
* [#1534](https://github.com/stripe/stripe-ruby/pull/1534) Update generated code
|
54
|
-
* Fixed `Stripe::InvoiceLineItem.update` method.
|
139
|
+
* Fixed `Stripe::InvoiceLineItem.update` method.
|
55
140
|
* [#1536](https://github.com/stripe/stripe-ruby/pull/1536) Fix InvoiceLineItem parent class
|
56
141
|
* Fix bug where `Stripe::InvoiceLineItem` had the incorrect parent class, making it error when `update` was called
|
57
142
|
* [#1533](https://github.com/stripe/stripe-ruby/pull/1533) add codeowners file
|
@@ -80,7 +165,7 @@
|
|
80
165
|
* [#1500](https://github.com/stripe/stripe-ruby/pull/1500) This release changes the pinned API version to `2024-12-18.acacia`.
|
81
166
|
|
82
167
|
* [#1507](https://github.com/stripe/stripe-ruby/pull/1507) Pass requestor to all deserialized objects including lists
|
83
|
-
|
168
|
+
|
84
169
|
* Fixes bug where `StripeObject` retrieved from lists could not be used to make requests, such as `refresh`
|
85
170
|
|
86
171
|
## 13.2.0 - 2024-11-20
|
@@ -103,24 +188,24 @@
|
|
103
188
|
|
104
189
|
## 13.0.2 - 2024-10-23
|
105
190
|
* [#1473](https://github.com/stripe/stripe-ruby/pull/1473) Always return the result of APIResource#refresh in APIResource.retrieve
|
106
|
-
|
191
|
+
|
107
192
|
* Fix bug where we would not return the mutated `self` object when calling `APIResource.retrieve`
|
108
193
|
|
109
194
|
## 13.0.1 - 2024-10-18
|
110
195
|
* [#1471](https://github.com/stripe/stripe-ruby/pull/1471) update object tags for meter-related classes
|
111
|
-
|
196
|
+
|
112
197
|
- fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server.
|
113
198
|
* [#1470](https://github.com/stripe/stripe-ruby/pull/1470) Cleaned up examples and added documentation
|
114
199
|
|
115
200
|
## 13.0.0 - 2024-10-01
|
116
201
|
* [#1458](https://github.com/stripe/stripe-ruby/pull/1458) Support for APIs in the new API version 2024-09-30.acacia
|
117
|
-
|
118
|
-
This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API
|
119
|
-
|
120
|
-
### ⚠️ Breaking changes
|
121
|
-
|
202
|
+
|
203
|
+
This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Changelog](https://docs.stripe.com/changelog/acacia#2024-09-30.acacia) and carefully review the API changes before upgrading.
|
204
|
+
|
205
|
+
### ⚠️ Breaking changes
|
206
|
+
|
122
207
|
Please refer to our [migration guide for v13](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) for more information about the backwards incompatible changes.
|
123
|
-
|
208
|
+
|
124
209
|
#### ❗ `StripeClient` and related changes
|
125
210
|
* Move `StripeClient` and requestor logic to `APIRequestor`.
|
126
211
|
* `StripeClient#request` is still available, but is deprecated and will be removed. We encourage `StripeClient#raw_request` as a replacement (see other breaking changes for more detail).
|
@@ -128,21 +213,21 @@
|
|
128
213
|
* No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
|
129
214
|
* No extra API calls. All API endpoints can be accessed with a single method call. You don't have to call `retrieve` before doing an `update`.
|
130
215
|
* No static methods. Much easier mocking.
|
131
|
-
|
216
|
+
|
132
217
|
#### Other breaking changes
|
133
|
-
|
218
|
+
|
134
219
|
* Adjust default values around retries for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
|
135
220
|
- max retries: `0` -> `2`
|
136
221
|
- max retry delay (seconds) `2` -> `5`
|
137
222
|
* Remove `StripeClient#connection_manager`. This was a legacy method from years ago.
|
138
|
-
* Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument.
|
223
|
+
* Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument.
|
139
224
|
```ruby
|
140
225
|
params = { expand: ["available"] }
|
141
226
|
opts = { stripe_account: "acct_123" }
|
142
|
-
|
227
|
+
|
143
228
|
# ❌ No longer works
|
144
229
|
Stripe::Balance.retrieve(opts)
|
145
|
-
|
230
|
+
|
146
231
|
# ✅ Correct way to call retrieve method
|
147
232
|
Stripe::Balance.retrieve(params, opts)
|
148
233
|
```
|
@@ -151,7 +236,7 @@
|
|
151
236
|
```ruby
|
152
237
|
# Instead of
|
153
238
|
Stripe::APIResource.request(:get, "/v1/endpoint", params, opts)
|
154
|
-
|
239
|
+
|
155
240
|
# do
|
156
241
|
client = Stripe::StripeClient.new(...)
|
157
242
|
resp = client.raw_request(:get, "/v1/endpoint", params: params, opts: opts)
|
@@ -167,18 +252,18 @@
|
|
167
252
|
# Before
|
168
253
|
obj, api_key = StripeClient.execute_request(method, path, api_base: nil,
|
169
254
|
api_key: nil, headers: {}, params: {}, usage: [])
|
170
|
-
|
255
|
+
|
171
256
|
# is now, with base_address being one of [:api, :files, :connect, :meter_events]
|
172
|
-
|
257
|
+
|
173
258
|
obj, opts = APIRequestor.execute_request(method, path, base_address,
|
174
259
|
params: {}, opts: {}, usage: [])
|
175
260
|
puts(opts) # will output {api_key: "sk_test_123", stripe_account: "acct_123"}
|
176
261
|
```
|
177
|
-
|
178
|
-
|
262
|
+
|
263
|
+
|
179
264
|
### Additions
|
180
265
|
* Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` in the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview)
|
181
|
-
* Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
|
266
|
+
* Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
|
182
267
|
|
183
268
|
|
184
269
|
## 12.6.0 - 2024-09-12
|
@@ -206,15 +291,15 @@
|
|
206
291
|
|
207
292
|
* [#1433](https://github.com/stripe/stripe-ruby/pull/1433) Add usage to raw_request call
|
208
293
|
* [#1431](https://github.com/stripe/stripe-ruby/pull/1431) Add `raw_request`
|
209
|
-
|
294
|
+
|
210
295
|
- Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using `Stripe::APIResource.request(...)` to make custom requests, which is discouraged and will be broken in a future major version.
|
211
296
|
|
212
297
|
## 12.1.0 - 2024-07-05
|
213
298
|
* [#1425](https://github.com/stripe/stripe-ruby/pull/1425) Update generated code
|
214
299
|
* Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice`
|
215
300
|
* [#1420](https://github.com/stripe/stripe-ruby/pull/1420) Update static methods for delete/list on BankAccount/Card to throw NotImplementedError
|
216
|
-
* The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id.
|
217
|
-
|
301
|
+
* The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id.
|
302
|
+
|
218
303
|
Methods affected | Use these instead in the context of payment method | Use these in the context of external accounts
|
219
304
|
------ | ------ | ----
|
220
305
|
Stripe:: BankAccount.delete | Stripe::Customer.delete_source | Stripe::Account.delete_external_account
|
@@ -226,12 +311,12 @@
|
|
226
311
|
|
227
312
|
## 12.0.0 - 2024-06-24
|
228
313
|
* [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount
|
229
|
-
* [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
|
230
|
-
|
231
|
-
This release changes the pinned API version to 2024-06-20. Please read the [API
|
314
|
+
* [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
|
315
|
+
|
316
|
+
This release changes the pinned API version to 2024-06-20. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-06-20) and carefully review the API changes before upgrading.
|
232
317
|
|
233
318
|
### Additions
|
234
|
-
|
319
|
+
|
235
320
|
* Add support for `finalize_amount` test helper method on resource `Issuing.Authorization`
|
236
321
|
|
237
322
|
## 11.7.0 - 2024-06-13
|
@@ -271,7 +356,7 @@
|
|
271
356
|
## 11.0.0 - 2024-04-10
|
272
357
|
* [#1374](https://github.com/stripe/stripe-ruby/pull/1374)
|
273
358
|
|
274
|
-
* This release changes the pinned API version to `2024-04-10`. Please read the [API
|
359
|
+
* This release changes the pinned API version to `2024-04-10`. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-04-10) and carefully review the API changes before upgrading.
|
275
360
|
|
276
361
|
### ⚠️ Breaking changes
|
277
362
|
|
@@ -381,7 +466,7 @@
|
|
381
466
|
* Add support for `create`, `list`, and `update` methods on resource `Registration`
|
382
467
|
|
383
468
|
## 10.0.0 - 2023-10-16
|
384
|
-
* This release changes the pinned API version to `2023-10-16`. Please read the [API
|
469
|
+
* This release changes the pinned API version to `2023-10-16`. Please read the [API Changelog](https://docs.stripe.com/changelog/2023-10-16) and carefully review the API changes before upgrading `stripe-ruby`.
|
385
470
|
* [#1283](https://github.com/stripe/stripe-ruby/pull/1283) Update generated code
|
386
471
|
- Updated pinned API version
|
387
472
|
* [#1281](https://github.com/stripe/stripe-ruby/pull/1281) Update generated code
|
@@ -505,7 +590,7 @@
|
|
505
590
|
## 8.0.0 - 2022-11-16
|
506
591
|
* [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
507
592
|
|
508
|
-
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/
|
593
|
+
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://docs.stripe.com/changelog/2022-11-15.
|
509
594
|
|
510
595
|
"⚠️" symbol highlights breaking changes.
|
511
596
|
|
@@ -543,7 +628,7 @@ Breaking changes that arose during code generation of the library that we postpo
|
|
543
628
|
|
544
629
|
## 7.0.0 - 2022-08-02
|
545
630
|
|
546
|
-
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/
|
631
|
+
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://docs.stripe.com/changelog/2022-08-01.
|
547
632
|
|
548
633
|
"⚠️" symbol highlights breaking changes.
|
549
634
|
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
# Contributing
|
3
|
+
|
4
|
+
We welcome bug reports, feature requests, and code contributions in a pull request.
|
5
|
+
|
6
|
+
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).
|
7
|
+
|
8
|
+
## Contributor License Agreement
|
9
|
+
|
10
|
+
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.
|
11
|
+
|
12
|
+
## Generated code
|
13
|
+
|
14
|
+
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.
|
15
|
+
|
16
|
+
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`.
|
17
|
+
|
18
|
+
## Compatibility with supported language and runtime versions
|
19
|
+
|
20
|
+
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.
|
21
|
+
|
22
|
+
## Set up your dev environment
|
23
|
+
|
24
|
+
Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment.
|
25
|
+
|
data/Gemfile
CHANGED
@@ -24,7 +24,7 @@ group :development do
|
|
24
24
|
# up-to-date, but it's not the end of the world if it's not.
|
25
25
|
#
|
26
26
|
# The latest version of rubocop is only compatible with Ruby 2.7+
|
27
|
-
gem "rubocop", "1.
|
27
|
+
gem "rubocop", "1.75.2" if RUBY_VERSION >= "2.7"
|
28
28
|
|
29
29
|
gem "sorbet"
|
30
30
|
gem "tapioca"
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1819
|
data/README.md
CHANGED
@@ -60,13 +60,14 @@ value:
|
|
60
60
|
|
61
61
|
```ruby
|
62
62
|
require 'stripe'
|
63
|
-
|
63
|
+
|
64
|
+
client = Stripe::StripeClient.new("sk_test_...")
|
64
65
|
|
65
66
|
# list customers
|
66
|
-
|
67
|
+
customers = client.v1.customers.list()
|
67
68
|
|
68
|
-
# retrieve single customer
|
69
|
-
|
69
|
+
# retrieve single customer
|
70
|
+
customer = client.v1.customers.retrieve('cus_123456789')
|
70
71
|
```
|
71
72
|
|
72
73
|
### Per-request Configuration
|
@@ -78,61 +79,30 @@ per-request key and/or account:
|
|
78
79
|
```ruby
|
79
80
|
require "stripe"
|
80
81
|
|
81
|
-
Stripe::
|
82
|
-
{},
|
83
|
-
{
|
84
|
-
api_key: 'sk_test_...',
|
85
|
-
stripe_account: 'acct_...',
|
86
|
-
stripe_version: '2018-02-28',
|
87
|
-
}
|
88
|
-
)
|
82
|
+
client = Stripe::StripeClient.new("sk_test_...")
|
89
83
|
|
90
|
-
|
91
|
-
|
84
|
+
client.v1.customers.list(
|
85
|
+
{},
|
92
86
|
{
|
93
87
|
api_key: 'sk_test_...',
|
94
88
|
stripe_account: 'acct_...',
|
95
89
|
stripe_version: '2018-02-28',
|
96
90
|
}
|
97
91
|
)
|
98
|
-
|
99
|
-
Stripe::Customer.retrieve(
|
100
|
-
{
|
101
|
-
id: 'cus_123456789',
|
102
|
-
expand: %w(balance_transaction)
|
103
|
-
},
|
104
|
-
{
|
105
|
-
stripe_version: '2018-02-28',
|
106
|
-
api_key: 'sk_test_...',
|
107
|
-
}
|
108
|
-
)
|
109
|
-
|
110
|
-
Stripe::Customer.capture(
|
111
|
-
'cus_123456789',
|
112
|
-
{},
|
113
|
-
{
|
114
|
-
stripe_version: '2018-02-28',
|
115
|
-
api_key: 'sk_test_...',
|
116
|
-
}
|
117
|
-
)
|
118
92
|
```
|
119
93
|
|
120
|
-
|
94
|
+
### StripeClient vs legacy pattern
|
121
95
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
`method(id, params, opts)`.
|
126
|
-
- One exception is that `retrieve`, despite being an operation on a resource, has the signature
|
127
|
-
`retrieve(id, opts)`. In addition, it will accept a Hash for the `id` param but will extract the
|
128
|
-
`id` key out and use the others as options.
|
96
|
+
We introduced the `StripeClient` class in v13 of the Ruby SDK. The legacy pattern used prior to that version is still available to use but will be marked as deprecated soon. Review the [migration guide to use StripeClient](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) to move from the legacy pattern.
|
97
|
+
|
98
|
+
Once the legacy pattern is deprecated, new API endpoints will only be accessible in the StripeClient. While there are no current plans to remove the legacy pattern for existing API endpoints, this may change in the future.
|
129
99
|
|
130
100
|
### Accessing resource properties
|
131
101
|
|
132
102
|
Both indexer and accessors can be used to retrieve values of resource properties.
|
133
103
|
|
134
104
|
```ruby
|
135
|
-
customer =
|
105
|
+
customer = client.v1.customers.retrieve('cus_123456789')
|
136
106
|
puts customer['id']
|
137
107
|
puts customer.id
|
138
108
|
```
|
@@ -140,7 +110,7 @@ puts customer.id
|
|
140
110
|
NOTE: If the resource property is not defined, the accessors will raise an exception, while the indexer will return `nil`.
|
141
111
|
|
142
112
|
```ruby
|
143
|
-
customer =
|
113
|
+
customer = client.v1.customers.retrieve('cus_123456789')
|
144
114
|
puts customer['unknown'] # nil
|
145
115
|
puts customer.unknown # raises NoMethodError
|
146
116
|
```
|
@@ -150,7 +120,7 @@ puts customer.unknown # raises NoMethodError
|
|
150
120
|
Get access to response objects by using the `last_response` property of the returned resource:
|
151
121
|
|
152
122
|
```ruby
|
153
|
-
customer =
|
123
|
+
customer = client.v1.customers.retrieve('cus_123456789')
|
154
124
|
|
155
125
|
print(customer.last_response.http_status) # to retrieve status code
|
156
126
|
print(customer.last_response.http_headers) # to retrieve headers
|
@@ -347,22 +317,25 @@ by default. If you are overriding `Stripe.api_version` / `stripe_version` on the
|
|
347
317
|
or using a webhook endpoint tied to an older version, be aware that the data
|
348
318
|
you see at runtime may not match the types.
|
349
319
|
|
350
|
-
###
|
320
|
+
### Public Preview SDKs
|
321
|
+
|
322
|
+
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`.
|
323
|
+
We would love for you to try these as we incrementally release new features and improve them based on your feedback.
|
351
324
|
|
352
|
-
|
353
|
-
We would love for you to try these and share feedback with us before these features reach the stable phase.
|
354
|
-
To install a beta version use `gem install` with the exact version you'd like to use:
|
325
|
+
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:
|
355
326
|
|
356
327
|
```sh
|
357
|
-
gem install stripe -v
|
328
|
+
gem install stripe -v <replace-with-the-version-of-your-choice>
|
358
329
|
```
|
359
330
|
|
331
|
+
You can find the latest version to use in this command from the [releases page](https://github.com/stripe/stripe-ruby/releases/)
|
332
|
+
|
360
333
|
> **Note**
|
361
|
-
> There can be breaking changes between
|
334
|
+
> 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.
|
362
335
|
|
363
336
|
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.
|
364
337
|
|
365
|
-
|
338
|
+
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):
|
366
339
|
|
367
340
|
```python
|
368
341
|
Stripe.add_beta_version("feature_beta", "v3")
|
@@ -374,13 +347,13 @@ If you:
|
|
374
347
|
|
375
348
|
- would like to send a request to an undocumented API (for example you are in a private beta)
|
376
349
|
- prefer to bypass the method definitions in the library and specify your request details directly,
|
377
|
-
- used the method `Stripe::APIResource.request(...)` to specify your own requests, which
|
350
|
+
- used the method `Stripe::APIResource.request(...)` to specify your own requests, which was removed in v13+
|
378
351
|
|
379
352
|
you can now use the `raw_request` method on `StripeClient`.
|
380
353
|
|
381
354
|
```ruby
|
382
|
-
client = Stripe::StripeClient.new(...)
|
383
|
-
resp = client.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
|
355
|
+
client = Stripe::StripeClient.new('sk_test_...')
|
356
|
+
resp = client.raw_request(:post, "/v1/beta_endpoint", params: {param: 123}, opts: {stripe_version: "2022-11-15; feature_beta=v3"})
|
384
357
|
|
385
358
|
# (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
|
386
359
|
deserialized_resp = client.deserialize(resp.http_body)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
15.
|
1
|
+
15.3.0
|
@@ -45,53 +45,53 @@ module Stripe
|
|
45
45
|
when :create
|
46
46
|
define_singleton_method(:"create_#{resource}") \
|
47
47
|
do |id, params = {}, opts = {}|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
request_stripe_object(
|
49
|
+
method: :post,
|
50
|
+
path: send(resource_url_method, id),
|
51
|
+
params: params,
|
52
|
+
opts: opts
|
53
|
+
)
|
54
|
+
end
|
55
55
|
when :retrieve
|
56
56
|
define_singleton_method(:"retrieve_#{resource}") \
|
57
57
|
do |id, nested_id, params = {}, opts = {}|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
58
|
+
request_stripe_object(
|
59
|
+
method: :get,
|
60
|
+
path: send(resource_url_method, id, nested_id),
|
61
|
+
params: params,
|
62
|
+
opts: opts
|
63
|
+
)
|
64
|
+
end
|
65
65
|
when :update
|
66
66
|
define_singleton_method(:"update_#{resource}") \
|
67
67
|
do |id, nested_id, params = {}, opts = {}|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
68
|
+
request_stripe_object(
|
69
|
+
method: :post,
|
70
|
+
path: send(resource_url_method, id, nested_id),
|
71
|
+
params: params,
|
72
|
+
opts: opts
|
73
|
+
)
|
74
|
+
end
|
75
75
|
when :delete
|
76
76
|
define_singleton_method(:"delete_#{resource}") \
|
77
77
|
do |id, nested_id, params = {}, opts = {}|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
78
|
+
request_stripe_object(
|
79
|
+
method: :delete,
|
80
|
+
path: send(resource_url_method, id, nested_id),
|
81
|
+
params: params,
|
82
|
+
opts: opts
|
83
|
+
)
|
84
|
+
end
|
85
85
|
when :list
|
86
86
|
define_singleton_method(:"list_#{resource_plural}") \
|
87
87
|
do |id, params = {}, opts = {}|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
88
|
+
request_stripe_object(
|
89
|
+
method: :get,
|
90
|
+
path: send(resource_url_method, id),
|
91
|
+
params: params,
|
92
|
+
opts: opts
|
93
|
+
)
|
94
|
+
end
|
95
95
|
else
|
96
96
|
raise ArgumentError, "Unknown operation: #{operation.inspect}"
|
97
97
|
end
|