stripe 8.7.0 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff2d744f7713eb43a337ea7069114c02fa4a9ec886efc5e69332661ff9b90f7d
4
- data.tar.gz: a81af3893eb05270691d307ed0caa132a2ce5fa6b50497840f7d35606dbb7b45
3
+ metadata.gz: dcf0274fbad4e15be02d4b11d735147eab8d6cb5c7dd570c9d40a459a08f3ebc
4
+ data.tar.gz: d67f24cc6bef98f57a2f0d1f54034cce8c8d9f1db8c656badd06f63ca28851c3
5
5
  SHA512:
6
- metadata.gz: 951d8c44a5ed2d161946b139980de3290731d58fecd3ec3118604df28e88ca4a0d30c015fef53990a7cef665e3529b129cee34862f6c05e42865184c249966ef
7
- data.tar.gz: 7aacbdc98ce6c65b9f345d1f28aed3bcc149d6e2422f8688e2de89dd6b874884a2426018bb391fdb262bac77bd910e4bd896fdfbe83a707ddafd29c82e0d66f6
6
+ metadata.gz: ff8e6be35379dde8bd4a51c08d11955267347520f654f5cb508ee78b277078b659c5db4582e306d2f271739152635e0dc16d4736e0800bae04f9e4109bbc52f5
7
+ data.tar.gz: e4a11dc8805e67040a96f6a5a1d113bbde439d9a1fff61d6566963c20f7ac0608757fba85c58c4475e7bdcd4e199d839a41905df66fe710e5b1cfdd9207ce89b
data/CHANGELOG.md CHANGED
@@ -1,8 +1,59 @@
1
1
  # Changelog
2
+ ## 9.3.0 - 2023-09-14
3
+ * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code
4
+ * Add support for new resource `PaymentMethodConfiguration`
5
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
6
+ * [#1271](https://github.com/stripe/stripe-ruby/pull/1271) Update generated code
7
+ * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
8
+ * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
9
+
10
+ ## 9.2.0 - 2023-09-07
11
+ * [#1267](https://github.com/stripe/stripe-ruby/pull/1267) Update generated code
12
+ * Add support for new resource `PaymentMethodDomain`
13
+ * Add support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
14
+
15
+ ## 9.1.0 - 2023-08-31
16
+ * [#1266](https://github.com/stripe/stripe-ruby/pull/1266) Update generated code
17
+ * Add support for new resource `AccountSession`
18
+ * Add support for `create` method on resource `AccountSession`
19
+ * [#1262](https://github.com/stripe/stripe-ruby/pull/1262) Explicitly format timestamp in SignatureVerificationError message
20
+
21
+
22
+ ## 9.0.0 - 2023-08-16
23
+ **⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
24
+
25
+ * [#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
26
+
27
+ 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).
28
+
29
+ To successfully upgrade to stripe-ruby v9, you must either
30
+
31
+ 1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.**
32
+
33
+ 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.
34
+
35
+ You can read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more detailed instructions.
36
+ 2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-ruby`.**
37
+
38
+ 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:
39
+
40
+ ```diff
41
+ require 'stripe'
42
+ Stripe.api_key = "sk_test_..."
43
+ + Stripe.api_version = '2020-08-27'
44
+ ```
45
+
46
+ If you were already initializing stripe-ruby with an explicit API Version, upgrading to v9 will not affect your integration.
47
+
48
+ Read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more details.
49
+
50
+ Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release.
51
+
52
+ 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.
2
53
 
3
54
  ## 8.7.0 - 2023-08-10
4
55
  * [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
5
- 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.
56
+ 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.
6
57
 
7
58
  ## 8.6.0 - 2023-07-13
8
59
  * [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
@@ -24,7 +75,7 @@
24
75
 
25
76
  * [#1225](https://github.com/stripe/stripe-ruby/pull/1225) Downgrade jaro_winkler
26
77
  * [#1219](https://github.com/stripe/stripe-ruby/pull/1219) Update generated code
27
-
78
+
28
79
  Documentation updates.
29
80
  * [#1215](https://github.com/stripe/stripe-ruby/pull/1215) Update generated code
30
81
 
@@ -35,7 +86,7 @@
35
86
 
36
87
  ## 8.5.0 - 2023-03-30
37
88
  * [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
38
- * Remove support for `create` method on resource `Tax.Transaction`
89
+ * Remove support for `create` method on resource `Tax.Transaction`
39
90
  * This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the `create_from_calculation` method.
40
91
  * [#1201](https://github.com/stripe/stripe-ruby/pull/1201) Update save deprecation message
41
92
 
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v457
1
+ v532
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.7.0
1
+ 9.3.0
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2022-11-15"
6
+ CURRENT = "2023-08-16"
7
7
  end
8
8
  end
@@ -14,6 +14,7 @@ module Stripe
14
14
  # business objects
15
15
  Account::OBJECT_NAME => Account,
16
16
  AccountLink::OBJECT_NAME => AccountLink,
17
+ AccountSession::OBJECT_NAME => AccountSession,
17
18
  ApplePayDomain::OBJECT_NAME => ApplePayDomain,
18
19
  ApplicationFee::OBJECT_NAME => ApplicationFee,
19
20
  ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
@@ -65,6 +66,8 @@ module Stripe
65
66
  PaymentIntent::OBJECT_NAME => PaymentIntent,
66
67
  PaymentLink::OBJECT_NAME => PaymentLink,
67
68
  PaymentMethod::OBJECT_NAME => PaymentMethod,
69
+ PaymentMethodConfiguration::OBJECT_NAME => PaymentMethodConfiguration,
70
+ PaymentMethodDomain::OBJECT_NAME => PaymentMethodDomain,
68
71
  Payout::OBJECT_NAME => Payout,
69
72
  Person::OBJECT_NAME => Person,
70
73
  Plan::OBJECT_NAME => Plan,
@@ -23,8 +23,7 @@ module Stripe
23
23
  nested_resource_class_methods :capability,
24
24
  operations: %i[retrieve update list],
25
25
  resource_plural: "capabilities"
26
- nested_resource_class_methods :person,
27
- operations: %i[create retrieve update delete list]
26
+ nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
28
27
 
29
28
  def persons(params = {}, opts = {})
30
29
  request_stripe_object(
@@ -5,7 +5,7 @@ module Stripe
5
5
  # Account Links are the means by which a Connect platform grants a connected account permission to access
6
6
  # Stripe-hosted applications, such as Connect Onboarding.
7
7
  #
8
- # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
8
+ # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)
9
9
  class AccountLink < APIResource
10
10
  extend Stripe::APIOperations::Create
11
11
 
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
6
+ #
7
+ # We recommend that you create an AccountSession each time you need to display an embedded component
8
+ # to your user. Do not save AccountSessions to your database as they expire relatively
9
+ # quickly, and cannot be used more than once.
10
+ #
11
+ # Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
12
+ class AccountSession < APIResource
13
+ extend Stripe::APIOperations::Create
14
+
15
+ OBJECT_NAME = "account_session"
16
+ end
17
+ end
@@ -8,7 +8,6 @@ module Stripe
8
8
 
9
9
  OBJECT_NAME = "application_fee"
10
10
 
11
- nested_resource_class_methods :refund,
12
- operations: %i[create retrieve update list]
11
+ nested_resource_class_methods :refund, operations: %i[create retrieve update list]
13
12
  end
14
13
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  # Balance transactions represent funds moving through your Stripe account.
6
- # They're created for every type of transaction that comes into or flows out of your Stripe account balance.
6
+ # Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
7
7
  #
8
8
  # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
9
9
  class BalanceTransaction < APIResource
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
5
+ # This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer.
6
6
  #
7
7
  # Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)
8
8
  class Customer < APIResource
@@ -15,12 +15,9 @@ module Stripe
15
15
 
16
16
  OBJECT_NAME = "customer"
17
17
 
18
- nested_resource_class_methods :balance_transaction,
19
- operations: %i[create retrieve update list]
20
- nested_resource_class_methods :cash_balance_transaction,
21
- operations: %i[retrieve list]
22
- nested_resource_class_methods :tax_id,
23
- operations: %i[create retrieve delete list]
18
+ nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
19
+ nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
20
+ nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
24
21
 
25
22
  def create_funding_instructions(params = {}, opts = {})
26
23
  request_stripe_object(
@@ -85,12 +82,7 @@ module Stripe
85
82
  )
86
83
  end
87
84
 
88
- def self.retrieve_payment_method(
89
- customer,
90
- payment_method,
91
- params = {},
92
- opts = {}
93
- )
85
+ def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {})
94
86
  request_stripe_object(
95
87
  method: :get,
96
88
  path: format("/v1/customers/%<customer>s/payment_methods/%<payment_method>s", { customer: CGI.escape(customer), payment_method: CGI.escape(payment_method) }),
@@ -3,10 +3,8 @@
3
3
 
4
4
  module Stripe
5
5
  # A dispute occurs when a customer questions your charge with their card issuer.
6
- # When this happens, you're given the opportunity to respond to the dispute with
7
- # evidence that shows that the charge is legitimate. You can find more
8
- # information about the dispute process in our [Disputes and
9
- # Fraud](https://stripe.com/docs/disputes) documentation.
6
+ # When this happens, you have the opportunity to respond to the dispute with
7
+ # evidence that shows that the charge is legitimate.
10
8
  #
11
9
  # Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
12
10
  class Dispute < APIResource
@@ -5,32 +5,33 @@ module Stripe
5
5
  # Events are our way of letting you know when something interesting happens in
6
6
  # your account. When an interesting event occurs, we create a new `Event`
7
7
  # object. For example, when a charge succeeds, we create a `charge.succeeded`
8
- # event; and when an invoice payment attempt fails, we create an
9
- # `invoice.payment_failed` event. Note that many API requests may cause multiple
10
- # events to be created. For example, if you create a new subscription for a
11
- # customer, you will receive both a `customer.subscription.created` event and a
8
+ # event, and when an invoice payment attempt fails, we create an
9
+ # `invoice.payment_failed` event. Certain API requests might create multiple
10
+ # events. For example, if you create a new subscription for a
11
+ # customer, you receive both a `customer.subscription.created` event and a
12
12
  # `charge.succeeded` event.
13
13
  #
14
- # Events occur when the state of another API resource changes. The state of that
15
- # resource at the time of the change is embedded in the event's data field. For
16
- # example, a `charge.succeeded` event will contain a charge, and an
17
- # `invoice.payment_failed` event will contain an invoice.
14
+ # Events occur when the state of another API resource changes. The event's data
15
+ # field embeds the resource's state at the time of the change. For
16
+ # example, a `charge.succeeded` event contains a charge, and an
17
+ # `invoice.payment_failed` event contains an invoice.
18
18
  #
19
19
  # As with other API resources, you can use endpoints to retrieve an
20
20
  # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
21
21
  # from the API. We also have a separate
22
22
  # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
23
- # `Event` objects directly to an endpoint on your server. Webhooks are managed
24
- # in your
25
- # [account settings](https://dashboard.stripe.com/account/webhooks),
26
- # and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.
23
+ # `Event` objects directly to an endpoint on your server. You can manage
24
+ # webhooks in your
25
+ # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
26
+ # to [listen for events]
27
+ # (/docs/webhooks) so that your integration can automatically trigger reactions.
27
28
  #
28
- # When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
29
- # events that occur in connected accounts. For these events, there will be an
29
+ # When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
30
+ # that occur in connected accounts. For these events, there's an
30
31
  # additional `account` attribute in the received `Event` object.
31
32
  #
32
- # **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
33
- # guaranteed only for 30 days.
33
+ # We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)
34
+ # for 30 days.
34
35
  class Event < APIResource
35
36
  extend Stripe::APIOperations::List
36
37
 
@@ -134,12 +134,7 @@ module Stripe
134
134
  end
135
135
 
136
136
  def self.upcoming(params = {}, opts = {})
137
- request_stripe_object(
138
- method: :get,
139
- path: "/v1/invoices/upcoming",
140
- params: params,
141
- opts: opts
142
- )
137
+ request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
143
138
  end
144
139
 
145
140
  def self.void_invoice(invoice, params = {}, opts = {})
@@ -49,6 +49,95 @@ module Stripe
49
49
  opts: opts
50
50
  )
51
51
  end
52
+
53
+ def test_helpers
54
+ TestHelpers.new(self)
55
+ end
56
+
57
+ class TestHelpers < APIResourceTestHelpers
58
+ RESOURCE_CLASS = Authorization
59
+
60
+ def self.capture(authorization, params = {}, opts = {})
61
+ request_stripe_object(
62
+ method: :post,
63
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(authorization) }),
64
+ params: params,
65
+ opts: opts
66
+ )
67
+ end
68
+
69
+ def self.create(params = {}, opts = {})
70
+ request_stripe_object(
71
+ method: :post,
72
+ path: "/v1/test_helpers/issuing/authorizations",
73
+ params: params,
74
+ opts: opts
75
+ )
76
+ end
77
+
78
+ def self.expire(authorization, params = {}, opts = {})
79
+ request_stripe_object(
80
+ method: :post,
81
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(authorization) }),
82
+ params: params,
83
+ opts: opts
84
+ )
85
+ end
86
+
87
+ def self.increment(authorization, params = {}, opts = {})
88
+ request_stripe_object(
89
+ method: :post,
90
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
91
+ params: params,
92
+ opts: opts
93
+ )
94
+ end
95
+
96
+ def self.reverse(authorization, params = {}, opts = {})
97
+ request_stripe_object(
98
+ method: :post,
99
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
100
+ params: params,
101
+ opts: opts
102
+ )
103
+ end
104
+
105
+ def capture(params = {}, opts = {})
106
+ @resource.request_stripe_object(
107
+ method: :post,
108
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
109
+ params: params,
110
+ opts: opts
111
+ )
112
+ end
113
+
114
+ def expire(params = {}, opts = {})
115
+ @resource.request_stripe_object(
116
+ method: :post,
117
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
118
+ params: params,
119
+ opts: opts
120
+ )
121
+ end
122
+
123
+ def increment(params = {}, opts = {})
124
+ @resource.request_stripe_object(
125
+ method: :post,
126
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
127
+ params: params,
128
+ opts: opts
129
+ )
130
+ end
131
+
132
+ def reverse(params = {}, opts = {})
133
+ @resource.request_stripe_object(
134
+ method: :post,
135
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }),
136
+ params: params,
137
+ opts: opts
138
+ )
139
+ end
140
+ end
52
141
  end
53
142
  end
54
143
  end
@@ -13,6 +13,50 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "issuing.transaction"
16
+
17
+ def test_helpers
18
+ TestHelpers.new(self)
19
+ end
20
+
21
+ class TestHelpers < APIResourceTestHelpers
22
+ RESOURCE_CLASS = Transaction
23
+
24
+ def self.create_force_capture(params = {}, opts = {})
25
+ request_stripe_object(
26
+ method: :post,
27
+ path: "/v1/test_helpers/issuing/transactions/create_force_capture",
28
+ params: params,
29
+ opts: opts
30
+ )
31
+ end
32
+
33
+ def self.create_unlinked_refund(params = {}, opts = {})
34
+ request_stripe_object(
35
+ method: :post,
36
+ path: "/v1/test_helpers/issuing/transactions/create_unlinked_refund",
37
+ params: params,
38
+ opts: opts
39
+ )
40
+ end
41
+
42
+ def self.refund(transaction, params = {}, opts = {})
43
+ request_stripe_object(
44
+ method: :post,
45
+ path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(transaction) }),
46
+ params: params,
47
+ opts: opts
48
+ )
49
+ end
50
+
51
+ def refund(params = {}, opts = {})
52
+ @resource.request_stripe_object(
53
+ method: :post,
54
+ path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(@resource["id"]) }),
55
+ params: params,
56
+ opts: opts
57
+ )
58
+ end
59
+ end
16
60
  end
17
61
  end
18
62
  end
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # An object detailing payment method configurations.
6
+ class PaymentMethodConfiguration < APIResource
7
+ extend Stripe::APIOperations::Create
8
+ extend Stripe::APIOperations::List
9
+ include Stripe::APIOperations::Save
10
+
11
+ OBJECT_NAME = "payment_method_configuration"
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # A payment method domain represents a web domain that you have registered with Stripe.
6
+ # Stripe Elements use registered payment method domains to control where certain payment methods are shown.
7
+ #
8
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
9
+ class PaymentMethodDomain < APIResource
10
+ extend Stripe::APIOperations::Create
11
+ extend Stripe::APIOperations::List
12
+ include Stripe::APIOperations::Save
13
+
14
+ OBJECT_NAME = "payment_method_domain"
15
+
16
+ def validate(params = {}, opts = {})
17
+ request_stripe_object(
18
+ method: :post,
19
+ path: format("/v1/payment_method_domains/%<payment_method_domain>s/validate", { payment_method_domain: CGI.escape(self["id"]) }),
20
+ params: params,
21
+ opts: opts
22
+ )
23
+ end
24
+
25
+ def self.validate(payment_method_domain, params = {}, opts = {})
26
+ request_stripe_object(
27
+ method: :post,
28
+ path: format("/v1/payment_method_domains/%<payment_method_domain>s/validate", { payment_method_domain: CGI.escape(payment_method_domain) }),
29
+ params: params,
30
+ opts: opts
31
+ )
32
+ end
33
+ end
34
+ end
@@ -19,8 +19,7 @@ module Stripe
19
19
 
20
20
  OBJECT_NAME = "source"
21
21
 
22
- nested_resource_class_methods :source_transaction,
23
- operations: %i[retrieve list]
22
+ nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
24
23
 
25
24
  def verify(params = {}, opts = {})
26
25
  request_stripe_object(
@@ -20,7 +20,6 @@ module Stripe
20
20
 
21
21
  OBJECT_NAME = "transfer"
22
22
 
23
- nested_resource_class_methods :reversal,
24
- operations: %i[create retrieve update list]
23
+ nested_resource_class_methods :reversal, operations: %i[create retrieve update list]
25
24
  end
26
25
  end
@@ -55,11 +55,7 @@ module Stripe
55
55
  )
56
56
  end
57
57
 
58
- def self.return_outbound_transfer(
59
- outbound_transfer,
60
- params = {},
61
- opts = {}
62
- )
58
+ def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
63
59
  request_stripe_object(
64
60
  method: :post,
65
61
  path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
@@ -3,6 +3,7 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
+ require "stripe/resources/account_session"
6
7
  require "stripe/resources/apple_pay_domain"
7
8
  require "stripe/resources/application_fee"
8
9
  require "stripe/resources/application_fee_refund"
@@ -52,6 +53,8 @@ require "stripe/resources/mandate"
52
53
  require "stripe/resources/payment_intent"
53
54
  require "stripe/resources/payment_link"
54
55
  require "stripe/resources/payment_method"
56
+ require "stripe/resources/payment_method_configuration"
57
+ require "stripe/resources/payment_method_domain"
55
58
  require "stripe/resources/payout"
56
59
  require "stripe/resources/person"
57
60
  require "stripe/resources/plan"
@@ -63,6 +63,7 @@ module Stripe
63
63
  end
64
64
 
65
65
  def initialize
66
+ @api_version = ApiVersion::CURRENT
66
67
  @ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
67
68
  @enable_telemetry = true
68
69
  @verify_ssl_certs = true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "8.7.0"
4
+ VERSION = "9.3.0"
5
5
  end
@@ -108,8 +108,9 @@ module Stripe
108
108
  end
109
109
 
110
110
  if tolerance && timestamp < Time.now - tolerance
111
+ formatted_timestamp = Time.at(timestamp).strftime("%F %T")
111
112
  raise SignatureVerificationError.new(
112
- "Timestamp outside the tolerance zone (#{Time.at(timestamp)})",
113
+ "Timestamp outside the tolerance zone (#{formatted_timestamp})",
113
114
  header, http_body: payload
114
115
  )
115
116
  end
data/lib/stripe.rb CHANGED
@@ -15,6 +15,7 @@ require "uri"
15
15
  require "forwardable"
16
16
 
17
17
  # Version
18
+ require "stripe/api_version"
18
19
  require "stripe/version"
19
20
 
20
21
  # API operations
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.7.0
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -53,6 +53,7 @@ files:
53
53
  - lib/stripe/resources.rb
54
54
  - lib/stripe/resources/account.rb
55
55
  - lib/stripe/resources/account_link.rb
56
+ - lib/stripe/resources/account_session.rb
56
57
  - lib/stripe/resources/alipay_account.rb
57
58
  - lib/stripe/resources/apple_pay_domain.rb
58
59
  - lib/stripe/resources/application_fee.rb
@@ -103,6 +104,8 @@ files:
103
104
  - lib/stripe/resources/payment_intent.rb
104
105
  - lib/stripe/resources/payment_link.rb
105
106
  - lib/stripe/resources/payment_method.rb
107
+ - lib/stripe/resources/payment_method_configuration.rb
108
+ - lib/stripe/resources/payment_method_domain.rb
106
109
  - lib/stripe/resources/payout.rb
107
110
  - lib/stripe/resources/person.rb
108
111
  - lib/stripe/resources/plan.rb