diff --git a/.rubocop.yml b/.rubocop.yml index b3af9361..bb8e513c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -50,6 +50,7 @@ Metrics/CyclomaticComplexity: Metrics/PerceivedComplexity: Exclude: - "lib/stripe/api_requestor.rb" + - "lib/stripe/stripe_object.rb" - "lib/stripe/util.rb" Metrics/MethodLength: diff --git a/CHANGELOG.md b/CHANGELOG.md index c448a21a..dbc6227d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 15.0.0 - 2025-04-09 + +### Breaking change +* [#1574](https://github.com/stripe/stripe-ruby/pull/1574) Rename `object_id` in V2::Core::EventService::ListParams to `object_id_` + * ⚠️ Change name of parameter from `object_id` to `object_id_` on `Stripe::V2::Core::EventService::ListParams` to avoid conflict with Ruby native attribute, as found in https://github.com/stripe/stripe-ruby/issues/1567 + * This is a no-op unless you are using this specific parameter that was introduced in `v14.0.0` + +* [#1576](https://github.com/stripe/stripe-ruby/pull/1576) Explicitly pass through custom headers in retrieve + * Fix custom options passing for resource-based retrieve +* [#1571](https://github.com/stripe/stripe-ruby/pull/1571) Validate all instance variable keys returned from the API + * 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 + * 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. + ```ruby + c = client.v1.customers.retrieve("cus_123") + c.metadata["invalid-variable-name!"] + c.metadata["valid_key_name_works_too"] + ``` +* [#1575](https://github.com/stripe/stripe-ruby/pull/1575) Remove unused youtube playlist link +* [#1573](https://github.com/stripe/stripe-ruby/pull/1573) Remove link for stale youtube video playlist + ## 14.1.0-beta.1 - 2025-04-02 * [#1563](https://github.com/stripe/stripe-ruby/pull/1563), [#1558](https://github.com/stripe/stripe-ruby/pull/1558), [#1547](https://github.com/stripe/stripe-ruby/pull/1547) Update generated code for beta @@ -55,7 +75,6 @@ * [#1557](https://github.com/stripe/stripe-ruby/pull/1557) Update Stripe.add_beta_version * `stripe.add_beta_version` will use the highest version number used for a beta feature instead of raising an `Error` on a conflict as it had done previously. - ## 14.0.0 - 2025-04-01 * [#1559](https://github.com/stripe/stripe-ruby/pull/1559) Add RBI annotations for fields and params * Adds explicit field types for resources and parameters for methods, and add RBI static annotations for all resources and services diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f107144c..f659e744 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1648 \ No newline at end of file +v1669 \ No newline at end of file diff --git a/README.md b/README.md index fea4b783..bfc1305f 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,6 @@ The library also provides other features. For example: See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby). -See [video demonstrations][youtube-playlist] covering how to use the library. - ## Installation You don't need this source code unless you want to modify the gem. If you just @@ -158,6 +156,9 @@ print(customer.last_response.http_status) # to retrieve status code print(customer.last_response.http_headers) # to retrieve headers ``` +If you are accessing a response field with custom hashes provided by you, such as `Customer.metadata`, +please access your fields with the `[]` accessor. + ### Configuring a proxy A proxy can be configured with `Stripe.proxy`: @@ -444,7 +445,6 @@ Update the bundled [stripe-mock] by editing the version number found in [idempotency-keys]: https://stripe.com/docs/api/idempotent_requests?lang=ruby [stripe-mock]: https://github.com/stripe/stripe-mock [versioning]: https://stripe.com/docs/api/versioning?lang=ruby -[youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk