mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-18 00:00:44 -04:00
Compare commits
2 Commits
7f9a370236
...
0b65a716c4
Author | SHA1 | Date | |
---|---|---|---|
|
0b65a716c4 | ||
|
4cb52bb8be |
32
CHANGELOG.md
32
CHANGELOG.md
@ -1,37 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 9.0.0 - 2023-08-16
|
|
||||||
**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
|
|
||||||
|
|
||||||
* [#1253](https://github.com/stripe/stripe-ruby/pull/1253) [#1260](https://github.com/stripe/stripe-ruby/pull/1260) Pin latest API version as the default
|
|
||||||
|
|
||||||
In this release, Stripe API Version `2023-08-16` (the latest at time of release) will be sent by default on all requests. This is a significant change with wide ramifications. The API version affects the properties you see on responses, the parameters you are allowed to send on requests, and so on. The previous default was to use your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version).
|
|
||||||
|
|
||||||
To successfully upgrade to stripe-ruby v9, you must either
|
|
||||||
|
|
||||||
1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.**
|
|
||||||
|
|
||||||
Please read the API Changelog carefully for each API Version from `2023-08-16` back to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). Determine if you are using any of the APIs that have changed in a breaking way, and adjust your integration accordingly. Carefully test your changes with Stripe [Test Mode](https://stripe.com/docs/keys#test-live-modes) before deploying them to production.
|
|
||||||
|
|
||||||
You can read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more detailed instructions.
|
|
||||||
2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-ruby`.**
|
|
||||||
|
|
||||||
If you were previously initializing stripe-ruby without an explicit API Version, you can postpone modifying your integration by specifying a version equal to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). For example:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
require 'stripe'
|
|
||||||
Stripe.api_key = "sk_test_..."
|
|
||||||
+ Stripe.api_version = '2020-08-27'
|
|
||||||
```
|
|
||||||
|
|
||||||
If you were already initializing stripe-ruby with an explicit API Version, upgrading to v9 will not affect your integration.
|
|
||||||
|
|
||||||
Read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more details.
|
|
||||||
|
|
||||||
Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release.
|
|
||||||
|
|
||||||
That is, instead of upgrading stripe-ruby and separately upgrading your Stripe API Version through the Stripe Dashboard. whenever you upgrade major versions of stripe-ruby, you should also upgrade your integration to be compatible with the latest Stripe API version.
|
|
||||||
|
|
||||||
## 8.7.0 - 2023-08-10
|
## 8.7.0 - 2023-08-10
|
||||||
* [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
|
* [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
|
||||||
Add resources `Tax::CalculationLineItem`, `Tax::TransactionLineItem`, and `Treasury::FinancialAccountFeatures`. These resources have no methods on them, but do represent the return type of methods elsewhere.
|
Add resources `Tax::CalculationLineItem`, `Tax::TransactionLineItem`, and `Treasury::FinancialAccountFeatures`. These resources have no methods on them, but do represent the return type of methods elsewhere.
|
||||||
|
@ -1 +1 @@
|
|||||||
v495
|
v461
|
@ -14,7 +14,6 @@ module Stripe
|
|||||||
# business objects
|
# business objects
|
||||||
Account::OBJECT_NAME => Account,
|
Account::OBJECT_NAME => Account,
|
||||||
AccountLink::OBJECT_NAME => AccountLink,
|
AccountLink::OBJECT_NAME => AccountLink,
|
||||||
AccountSession::OBJECT_NAME => AccountSession,
|
|
||||||
ApplePayDomain::OBJECT_NAME => ApplePayDomain,
|
ApplePayDomain::OBJECT_NAME => ApplePayDomain,
|
||||||
ApplicationFee::OBJECT_NAME => ApplicationFee,
|
ApplicationFee::OBJECT_NAME => ApplicationFee,
|
||||||
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
|
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
require "stripe/resources/account"
|
require "stripe/resources/account"
|
||||||
require "stripe/resources/account_link"
|
require "stripe/resources/account_link"
|
||||||
require "stripe/resources/account_session"
|
|
||||||
require "stripe/resources/apple_pay_domain"
|
require "stripe/resources/apple_pay_domain"
|
||||||
require "stripe/resources/application_fee"
|
require "stripe/resources/application_fee"
|
||||||
require "stripe/resources/application_fee_refund"
|
require "stripe/resources/application_fee_refund"
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# File generated from our OpenAPI spec
|
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module Stripe
|
|
||||||
# An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
|
|
||||||
#
|
|
||||||
# We recommend that you create an AccountSession each time you need to display an embedded component
|
|
||||||
# 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 embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
|
|
||||||
class AccountSession < APIResource
|
|
||||||
extend Stripe::APIOperations::Create
|
|
||||||
|
|
||||||
OBJECT_NAME = "account_session"
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
VERSION = "9.0.0"
|
VERSION = "8.7.0"
|
||||||
end
|
end
|
||||||
|
@ -108,9 +108,8 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
if tolerance && timestamp < Time.now - tolerance
|
if tolerance && timestamp < Time.now - tolerance
|
||||||
formatted_timestamp = Time.at(timestamp).strftime("%F %T")
|
|
||||||
raise SignatureVerificationError.new(
|
raise SignatureVerificationError.new(
|
||||||
"Timestamp outside the tolerance zone (#{formatted_timestamp})",
|
"Timestamp outside the tolerance zone (#{Time.at(timestamp)})",
|
||||||
header, http_body: payload
|
header, http_body: payload
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user