Update generated code for beta#1857
Merged
Merged
Conversation
…, and param files (#1855) * Convert eager require to autoload for resources, services, and params Replace ~985 eager require calls with Ruby's autoload in the three generated barrel files (resources.rb, services.rb, params.rb). This defers loading of resource classes, service classes, and param classes until they are first referenced, rather than loading all of them on require 'stripe'. Add Stripe.eager_load! for production use — it walks the same file list in the same order as the old require calls, so there are no load-order surprises. A Railtie registers Stripe in config.eager_load_namespaces so Rails calls eager_load! automatically when config.eager_load is true (the production default). On Ruby 4.0.2 / Apple M1: - Boot time: 214ms -> 61ms (-71%) - Object allocations: 193k -> 35k (-82%) - Retained memory: 9.0 MB -> 1.4 MB (-85%) Ref #1432 Co-authored-by: Claude <noreply@anthropic.com> * Fix lint and typecheck CI failures - Run rubocop autocorrect to fix line length, trailing whitespace, and argument alignment in autoload statements - Exclude lib/stripe/params.rb from CollectionLiteralLength (generated list, same as existing event_types.rb exclusion) - Add typed: ignore to railtie files since Rails isn't a Sorbet-visible dependency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Regenerate resources, services, and params from updated codegen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Remove redundant rubocop.yml exclusion for params.rb The codegen now emits an inline rubocop:disable comment around the PARAM_FILES array, making the .rubocop.yml file-level exclusion unnecessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Michael Broshi <mbroshi@stripe.com>
mbroshi-stripe
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codegen for openapi v2277 and v2 openapi d59a1f4bdea3032b8e282d40badc032cb021fc60.
Changelog
pausemethod on resourceSubscriptionretrievemethod on resourceV2::Iam::ActivityLogProductCatalog::TrialOffer::EndBehavior::Transition.pricefromstringtoexpandable($Price)amount_paid_off_stripeonQuotePreviewInvoicediscountableonQuotePreviewSubscriptionSchedule::Phase::AddInvoiceItembizumandscalapayonSharedPayment::GrantedToken::PaymentMethodDetailSharedPayment::GrantedToken.agent_detailsto be requiredSubscriptionItem.billed_untilfromnullable(DateTime)toDateTimepayment_behavioronSubscriptionResumeParamsstatus_detailsonSubscriptionSubscription.billing_schedulesto be requiredV2::MoneyManagement::ReceivedCredit::BankTransfer::GbBankAccount.networkfromliteral('fps')toenum('chaps'|'fps')