Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit attributes for fields in resources, and rbis for resources #1490

Open
wants to merge 8 commits into
base: beta
Choose a base branch
from

Conversation

helenye-stripe
Copy link
Contributor

@helenye-stripe helenye-stripe commented Nov 19, 2024

Why?

This is the first step in #1479 - this adds explicit attributes for fields in resources, and adds RBIs with type annotations for them. This is not yet ready for use as it does not define any methods, so I have not included the RBIs in the gemspec.

What?

I recommend reviewing this mostly through the codegen PR, as this is almost entirely generated changes.

Important notes:

  • There are a set of files that do not have any methods, and are returned solely in deprecated APIs. However, they are described in the return types for these methods, so I have added them and their corresponding RBIs. They are:
    • lib/stripe/resources/application.rb
    • lib/stripe/resources/billing/alert_triggered.rb
    • lib/stripe/resources/billing/meter_error_report.rb
    • lib/stripe/resources/connect_collection_transfer.rb
    • lib/stripe/resources/entitlements/active_entitlement_summary.rb
    • lib/stripe/resources/issuing/settlement.rb
    • lib/stripe/resources/quote_line.rb
    • lib/stripe/resources/reserve_transaction.rb
    • lib/stripe/resources/source_mandate_notification.rb
    • lib/stripe/resources/tax_deducted_at_source.rb
  • Added lib/stripe/resources/amount.rb and rbi/stripe/resources/amount.rbi because it is a type used in V2.
  • Added an additional step in StripeObject.add_accessors (lib/stripe/stripe_object.rb) to appropriately set instance variables upon creation.
  • Updated .rubocop.yml to ignore variable numbers, since we have field names in various conventions in the API.

@helenye-stripe helenye-stripe changed the title Helenye beta fields Add explicit attributes for fields in resources, and rbis for resources Nov 20, 2024
@helenye-stripe helenye-stripe marked this pull request as ready for review November 20, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant