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

Update dependency stripe to v13 #9596

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Update dependency stripe to v13 #9596

merged 1 commit into from
Jan 14, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 5, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
stripe (source, changelog) 12.6.0 -> 13.3.1 age adoption passing confidence

Release Notes

stripe/stripe-ruby (stripe)

v13.3.1

Compare Source

  • #​1512 Import global configuration for options not available on StripeClient options
    • Fixes bug where StripeClient was not falling back to global options for options that are not available to be set per-client
  • #​1516 ThinEvent reason and livemode
    • Add livemode and optional reason fields to ThinEvent
  • #​1518 Pin ubuntu version in Test action
  • #​1508 Added pull request template

v13.3.0

Compare Source

  • #​1500 This release changes the pinned API version to 2024-12-18.acacia.

  • #​1507 Pass requestor to all deserialized objects including lists

    • Fixes bug where StripeObject retrieved from lists could not be used to make requests, such as refresh

v13.2.0

Compare Source

  • #​1486 This release changes the pinned API version to 2024-11-20.acacia.
    • Add support for respond test helper method on resource Issuing.Authorization

v13.1.2

Compare Source

  • #​1488 Fix incorrect key in param encoding

v13.1.1

Compare Source

  • #​1483 Fix APIResource#retrieve not sending stripe_version

v13.1.0

Compare Source

  • #​1472 This release changes the pinned API version to 2024-10-28.acacia.
    • Add support for submit_card test helper method on resource Issuing.Card
    • Add support for new resource V2.EventDestinations
    • Add support for create, retrieve, update, list, delete, disable, enable and ping methods on resource V2.EventDestinations
  • #​1476 Fix APIResource#retrieve bug not returning instance of custom resources
    • Fix bug in APIResource#refresh and APIResource#retrieve where they returned an instance of StripeObject for custom resources. They should now return the instance of the custom resource.

v13.0.2

Compare Source

  • #​1473 Always return the result of APIResource#refresh in APIResource.retrieve

    • Fix bug where we would not return the mutated self object when calling APIResource.retrieve

v13.0.1

Compare Source

  • #​1471 update object tags for meter-related classes

    • fixes a bug where the object property of the MeterEvent, MeterEventAdjustment, and MeterEventSession didn't match the server.
  • #​1470 Cleaned up examples and added documentation

v13.0.0

Compare Source

  • #​1458 Support for APIs in the new API version 2024-09-30.acacia

    This release changes the pinned API version to 2024-09-30.acacia. Please read the API Upgrade Guide and carefully review the API changes before upgrading.

⚠️ Breaking changes

Please refer to our migration guide for v13 for more information about the backwards incompatible changes.

StripeClient and related changes
  • Move StripeClient and requestor logic to APIRequestor.
    • 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).
  • Repurpose and introduce StripeClient as the the entry-point to the service-based pattern, a new interface for calling the Stripe API with many benefits over the existing resource-based paradigm. Services are available under the v1 and v2 accessors.
    • No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
    • 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.
    • No static methods. Much easier mocking.
Other breaking changes
  • Adjust default values around retries for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
    • max retries: 0 -> 2
    • max retry delay (seconds) 2 -> 5
  • Remove StripeClient#connection_manager. This was a legacy method from years ago.
  • 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.
    params = { expand: ["available"] }
    opts = { stripe_account: "acct_123" }

❌ No longer works

  Stripe::Balance.retrieve(opts)

✅ Correct way to call retrieve method

  Stripe::Balance.retrieve(params, opts)
  ```
  • Moved the Stripe.raw_request() method that was recently added to StripeClient. This will use the configuration set on the StripeClient instead of the global configuration used before.
  • Remove APIResource.request. Instead, use StripeClient#raw_request now.

Instead of

  Stripe::APIResource.request(:get, "/v1/endpoint", params, opts)

do

  client = Stripe::StripeClient.new(...)
  resp = client.raw_request(:get, "/v1/endpoint", params: params, opts: opts)
  ```
  • Add an additional parameter to APIResource.execute_resource_request. However, we discourage use of this in favor of StripeClient#raw_request.
    APIResource.execute_resource_request(method, url, params = {}, opts = {}, usage = [])

is now, with base_address being one of [:api, :files, :connect, :meter_events]

  APIResource.execute_resource_request(method, url, base_address = :api, params = {}, opts = {}, usage = [])
  ```
  • Change parameters to APIRequestor.execute_request (previously StripeClient.execute_request). It now returns all request options from our internal request framework as the second value in the returned tuple, instead of only the API key used:

Before

obj, api_key = StripeClient.execute_request(method, path, api_base: nil,
                                            api_key: nil, headers: {}, params: {}, usage: [])

is now, with base_address being one of [:api, :files, :connect, :meter_events]

obj, opts = APIRequestor.execute_request(method, path, base_address,
                                        params: {}, opts: {}, usage: [])
puts(opts) # will output {api_key: "sk_test_123", stripe_account: "acct_123"}
```
Additions
  • 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
  • Add method parse_thin_event() on the StripeClient class to parse thin events.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies label Oct 5, 2024
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch 3 times, most recently from 9001aaf to ae2c9fd Compare October 24, 2024 03:07
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch 2 times, most recently from dba45f1 to aa64449 Compare October 30, 2024 01:14
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch 3 times, most recently from e47013c to e942992 Compare November 13, 2024 18:35
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch 2 times, most recently from b3c0f43 to ad1c14f Compare November 21, 2024 01:17
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch from ad1c14f to d943838 Compare December 10, 2024 09:36
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch 3 times, most recently from 96a6fd5 to d6e340c Compare December 20, 2024 00:32
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch from d6e340c to 737259d Compare January 14, 2025 16:07
@renovate renovate bot force-pushed the renovate/stripe-13.x-lockfile branch from 737259d to cdb4e54 Compare January 14, 2025 18:28
Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Coverage
Overall Coverage 🟢 30.72%

Minimum allowed coverage is 0%, this run produced 30.72%

@nbudin nbudin merged commit b86707e into main Jan 14, 2025
16 checks passed
@nbudin nbudin deleted the renovate/stripe-13.x-lockfile branch January 14, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant