From 2dec63e6b057d25350c1b8b983ad6f6f579de4ed Mon Sep 17 00:00:00 2001 From: Bart de Water <496367+bdewater@users.noreply.github.com> Date: Fri, 14 Oct 2022 19:40:20 -0400 Subject: [PATCH 1/5] Update request_end instrumentation example (#1095) * Update request_end instrumentation example in README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e32af3dd7..69dea24da 100644 --- a/README.md +++ b/README.md @@ -261,9 +261,13 @@ For example: ```ruby Stripe::Instrumentation.subscribe(:request_end) do |request_event| + # Filter out high-cardinality ids from `path` + path_parts = event.path.split("/").drop(2) + resource = path_parts.map { |part| part.match?(/\A[a-z_]+\z/) ? part : ":id" }.join("/") + tags = { method: request_event.method, - resource: request_event.path.split('/')[2], + resource: resource, code: request_event.http_status, retries: request_event.num_retries } From 46eca72f79ee5a1d26b8dfb1997a68708dadd703 Mon Sep 17 00:00:00 2001 From: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:34:46 -0700 Subject: [PATCH 2/5] Do not run Coveralls if secret token is not available (#1137) --- test/test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 4876b9fba..5e6141f9e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -3,7 +3,7 @@ # Report test coverage to coveralls for only one Ruby version to avoid # repeated builds. This also accounts for coveralls_reborn requiring # RUBY_VERSION >= 2.5. -if RUBY_VERSION.start_with?("3.1.") +if ENV.key?("COVERALLS_REPO_TOKEN") && RUBY_VERSION.start_with?("3.1.") require "coveralls" Coveralls.wear! end From 5cd6f9f9bcc467abb4b86d7586bc184c6887df1c Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Tue, 1 Nov 2022 16:17:47 -0700 Subject: [PATCH 3/5] Set version to 7.1.0 to simplify merge --- VERSION | 2 +- lib/stripe/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index db0e6beeb..a3fcc7121 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.2.0-beta.4 +7.1.0 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index bfbb7711c..95f1f764b 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "7.2.0-beta.4" + VERSION = "7.1.0" end From a59b57c3d1732f8a4eff835e0005cee489876dcf Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Tue, 1 Nov 2022 16:17:47 -0700 Subject: [PATCH 4/5] Reset version to 7.2.0-beta.4 --- VERSION | 2 +- lib/stripe/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index a3fcc7121..db0e6beeb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.1.0 +7.2.0-beta.4 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index 95f1f764b..bfbb7711c 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "7.1.0" + VERSION = "7.2.0-beta.4" end From 25833c1408b143eba00078ff41a6bef66c6143d6 Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Tue, 1 Nov 2022 16:18:04 -0700 Subject: [PATCH 5/5] Codegen for openapi v205 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/account_session.rb | 4 ++-- lib/stripe/resources/refund.rb | 4 ++++ lib/stripe/resources/source.rb | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index adcc79220..976ca98c1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v202 \ No newline at end of file +v205 \ No newline at end of file diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index 875f9506b..386dfaeeb 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -2,13 +2,13 @@ # frozen_string_literal: true module Stripe - # An AccountSession allows a Connect platform to grant access to a connected account in Connect Elements. + # An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded UIs. # # We recommend that you create an AccountSession each time you need to display an embedded UI # to your user. Do not save AccountSessions to your database as they expire relatively # quickly, and cannot be used more than once. # - # Related guide: [Connect Elements](https://stripe.com/docs/connect/get-started-connect-elements). + # Related guide: [Connect embedded UIs](https://stripe.com/docs/connect/get-started-connect-embedded-uis). class AccountSession < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index f7aa8a55c..7d8ce075f 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -6,6 +6,10 @@ module Stripe # but not yet refunded. Funds will be refunded to the credit or debit card that # was originally charged. # + # Stripe Tax users with recurring payments and invoices can create [Credit Notes](https://stripe.com/docs/api/credit_notes), + # which reduce overall tax liability because tax is correctly recalculated and + # apportioned to the related invoice. + # # Related guide: [Refunds](https://stripe.com/docs/refunds). class Refund < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb index a93ccfb69..d474f59d9 100644 --- a/lib/stripe/resources/source.rb +++ b/lib/stripe/resources/source.rb @@ -7,6 +7,10 @@ module Stripe # just like a `Card` object: once chargeable, they can be charged, or can be # attached to customers. # + # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + # This newer API provides access to our latest features and payment method types. + # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). class Source < APIResource extend Stripe::APIOperations::Create