stripe 9.2.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/resources/account.rb +1 -2
- data/lib/stripe/resources/application_fee.rb +1 -2
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/customer.rb +5 -13
- data/lib/stripe/resources/dispute.rb +2 -4
- data/lib/stripe/resources/event.rb +17 -16
- data/lib/stripe/resources/invoice.rb +1 -6
- data/lib/stripe/resources/issuing/authorization.rb +89 -0
- data/lib/stripe/resources/issuing/transaction.rb +44 -0
- data/lib/stripe/resources/payment_method_configuration.rb +13 -0
- data/lib/stripe/resources/source.rb +1 -2
- data/lib/stripe/resources/transfer.rb +1 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +1 -5
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcf0274fbad4e15be02d4b11d735147eab8d6cb5c7dd570c9d40a459a08f3ebc
|
4
|
+
data.tar.gz: d67f24cc6bef98f57a2f0d1f54034cce8c8d9f1db8c656badd06f63ca28851c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8e6be35379dde8bd4a51c08d11955267347520f654f5cb508ee78b277078b659c5db4582e306d2f271739152635e0dc16d4736e0800bae04f9e4109bbc52f5
|
7
|
+
data.tar.gz: e4a11dc8805e67040a96f6a5a1d113bbde439d9a1fff61d6566963c20f7ac0608757fba85c58c4475e7bdcd4e199d839a41905df66fe710e5b1cfdd9207ce89b
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
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
|
+
|
2
10
|
## 9.2.0 - 2023-09-07
|
3
11
|
* [#1267](https://github.com/stripe/stripe-ruby/pull/1267) Update generated code
|
4
12
|
* Add support for new resource `PaymentMethodDomain`
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v532
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
9.
|
1
|
+
9.3.0
|
data/lib/stripe/object_types.rb
CHANGED
@@ -66,6 +66,7 @@ module Stripe
|
|
66
66
|
PaymentIntent::OBJECT_NAME => PaymentIntent,
|
67
67
|
PaymentLink::OBJECT_NAME => PaymentLink,
|
68
68
|
PaymentMethod::OBJECT_NAME => PaymentMethod,
|
69
|
+
PaymentMethodConfiguration::OBJECT_NAME => PaymentMethodConfiguration,
|
69
70
|
PaymentMethodDomain::OBJECT_NAME => PaymentMethodDomain,
|
70
71
|
Payout::OBJECT_NAME => Payout,
|
71
72
|
Person::OBJECT_NAME => Person,
|
@@ -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(
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
# Balance transactions represent funds moving through your Stripe account.
|
6
|
-
#
|
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.
|
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
|
-
|
20
|
-
nested_resource_class_methods :
|
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
|
7
|
-
# evidence that shows that the charge is legitimate.
|
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
|
9
|
-
# `invoice.payment_failed` event.
|
10
|
-
# events
|
11
|
-
# customer, you
|
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
|
15
|
-
# resource at the time of the change
|
16
|
-
# example, a `charge.succeeded` event
|
17
|
-
# `invoice.payment_failed` event
|
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.
|
24
|
-
# in your
|
25
|
-
# [account settings](https://dashboard.stripe.com/account/webhooks)
|
26
|
-
#
|
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
|
29
|
-
#
|
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
|
-
#
|
33
|
-
#
|
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
|
@@ -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(
|
@@ -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) }),
|
data/lib/stripe/resources.rb
CHANGED
@@ -53,6 +53,7 @@ require "stripe/resources/mandate"
|
|
53
53
|
require "stripe/resources/payment_intent"
|
54
54
|
require "stripe/resources/payment_link"
|
55
55
|
require "stripe/resources/payment_method"
|
56
|
+
require "stripe/resources/payment_method_configuration"
|
56
57
|
require "stripe/resources/payment_method_domain"
|
57
58
|
require "stripe/resources/payout"
|
58
59
|
require "stripe/resources/person"
|
data/lib/stripe/version.rb
CHANGED
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: 9.
|
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-09-
|
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.
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/stripe/resources/payment_intent.rb
|
105
105
|
- lib/stripe/resources/payment_link.rb
|
106
106
|
- lib/stripe/resources/payment_method.rb
|
107
|
+
- lib/stripe/resources/payment_method_configuration.rb
|
107
108
|
- lib/stripe/resources/payment_method_domain.rb
|
108
109
|
- lib/stripe/resources/payout.rb
|
109
110
|
- lib/stripe/resources/person.rb
|