stripe 13.2.0.pre.beta.1 → 13.2.0.pre.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/object_types.rb +3 -0
- data/lib/stripe/request_options.rb +1 -1
- data/lib/stripe/resources/billing/credit_grant.rb +5 -6
- data/lib/stripe/resources/issuing/authorization.rb +20 -0
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/issuing/cardholder.rb +1 -1
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +26 -0
- data/lib/stripe/resources/payment_attempt_record.rb +27 -0
- data/lib/stripe/resources/payment_record.rb +115 -0
- data/lib/stripe/resources/subscription.rb +1 -1
- data/lib/stripe/resources.rb +3 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +2 -1
- data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
- data/lib/stripe/services/payment_record_service.rb +78 -0
- data/lib/stripe/services/subscription_service.rb +1 -1
- data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +11 -0
- data/lib/stripe/services/v1_services.rb +3 -1
- data/lib/stripe/services.rb +3 -0
- data/lib/stripe/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b689dbf916ec68bd4ab529d3ebcf0bba03c3b176e45894ccad49f5b2411249f5
|
4
|
+
data.tar.gz: d369743845bd9ad2cfbd3e08155adbc60a570f6a2ac66db39d993a4404ded55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d42049012e28f400affc14217b70b8a67480b6f855378ddefdfc5e6f8d6b9668fe6968329d01c53f86da9444c2496c9926e5f49297d7f5c80cebd5e1bf9e329
|
7
|
+
data.tar.gz: 4a5cc37abe24102999ba1e1ed12b4fd754d1daf4d2a394cd0dbc760af218a1c5d2b7f77b67a30334c7fa75725bb0f9feef4d9c2d6c3cd39b0b43774f6fb79e5b
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 13.2.0-beta.3 - 2024-11-14
|
4
|
+
* [#1484](https://github.com/stripe/stripe-ruby/pull/1484) Update generated code for beta
|
5
|
+
|
6
|
+
|
7
|
+
## 13.2.0-beta.2 - 2024-11-07
|
8
|
+
* [#1480](https://github.com/stripe/stripe-ruby/pull/1480) Update generated code for beta
|
9
|
+
* Add support for new resources `Issuing.FraudLiabilityDebit`, `PaymentAttemptRecord`, and `PaymentRecord`
|
10
|
+
* Add support for `list` and `retrieve` methods on resources `FraudLiabilityDebit` and `PaymentAttemptRecord`
|
11
|
+
* Add support for `report_payment_attempt_canceled`, `report_payment_attempt_failed`, `report_payment_attempt_guaranteed`, `report_payment_attempt`, `report_payment`, and `retrieve` methods on resource `PaymentRecord`
|
12
|
+
|
3
13
|
## 13.2.0-beta.1 - 2024-10-29
|
4
14
|
* [#1477](https://github.com/stripe/stripe-ruby/pull/1477) Update generated code for beta
|
5
15
|
* Add support for `trigger_action` method on resource `PaymentIntent`
|
6
16
|
|
17
|
+
## 13.1.1 - 2024-11-06
|
18
|
+
* [#1483](https://github.com/stripe/stripe-ruby/pull/1483) Fix APIResource#retrieve not sending `stripe_version`
|
19
|
+
* [#1478](https://github.com/stripe/stripe-ruby/pull/1478) Update changelog with a note on 2024-10-28.acacia API version
|
20
|
+
|
7
21
|
## 13.1.0 - 2024-10-29
|
8
|
-
* [#1472](https://github.com/stripe/stripe-ruby/pull/1472)
|
22
|
+
* [#1472](https://github.com/stripe/stripe-ruby/pull/1472) This release changes the pinned API version to `2024-10-28.acacia`.
|
9
23
|
* Add support for `submit_card` test helper method on resource `Issuing.Card`
|
10
24
|
* Add support for new resource `V2.EventDestinations`
|
11
25
|
* Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1345
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
13.2.0-beta.
|
1
|
+
13.2.0-beta.3
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/object_types.rb
CHANGED
@@ -87,6 +87,7 @@ module Stripe
|
|
87
87
|
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
88
88
|
Issuing::Dispute.object_name => Issuing::Dispute,
|
89
89
|
Issuing::DisputeSettlementDetail.object_name => Issuing::DisputeSettlementDetail,
|
90
|
+
Issuing::FraudLiabilityDebit.object_name => Issuing::FraudLiabilityDebit,
|
90
91
|
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
91
92
|
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
92
93
|
Issuing::Token.object_name => Issuing::Token,
|
@@ -96,11 +97,13 @@ module Stripe
|
|
96
97
|
Mandate.object_name => Mandate,
|
97
98
|
Margin.object_name => Margin,
|
98
99
|
Order.object_name => Order,
|
100
|
+
PaymentAttemptRecord.object_name => PaymentAttemptRecord,
|
99
101
|
PaymentIntent.object_name => PaymentIntent,
|
100
102
|
PaymentLink.object_name => PaymentLink,
|
101
103
|
PaymentMethod.object_name => PaymentMethod,
|
102
104
|
PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,
|
103
105
|
PaymentMethodDomain.object_name => PaymentMethodDomain,
|
106
|
+
PaymentRecord.object_name => PaymentRecord,
|
104
107
|
Payout.object_name => Payout,
|
105
108
|
Person.object_name => Person,
|
106
109
|
Plan.object_name => Plan,
|
@@ -63,7 +63,7 @@ module Stripe
|
|
63
63
|
idempotency_key: req_opts[:idempotency_key],
|
64
64
|
stripe_account: req_opts[:stripe_account] || object_opts[:stripe_account],
|
65
65
|
stripe_context: req_opts[:stripe_context] || object_opts[:stripe_context],
|
66
|
-
stripe_version: req_opts[:stripe_version] || object_opts[:
|
66
|
+
stripe_version: req_opts[:stripe_version] || object_opts[:stripe_version],
|
67
67
|
}
|
68
68
|
|
69
69
|
# Remove nil values from headers
|
@@ -6,7 +6,6 @@ module Stripe
|
|
6
6
|
# A credit grant is an API resource that documents the allocation of some billing credits to a customer.
|
7
7
|
#
|
8
8
|
# Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
|
9
|
-
# end
|
10
9
|
class CreditGrant < APIResource
|
11
10
|
extend Stripe::APIOperations::Create
|
12
11
|
extend Stripe::APIOperations::List
|
@@ -27,7 +26,7 @@ module Stripe
|
|
27
26
|
)
|
28
27
|
end
|
29
28
|
|
30
|
-
# Expires a credit grant
|
29
|
+
# Expires a credit grant.
|
31
30
|
def expire(params = {}, opts = {})
|
32
31
|
request_stripe_object(
|
33
32
|
method: :post,
|
@@ -37,7 +36,7 @@ module Stripe
|
|
37
36
|
)
|
38
37
|
end
|
39
38
|
|
40
|
-
# Expires a credit grant
|
39
|
+
# Expires a credit grant.
|
41
40
|
def self.expire(id, params = {}, opts = {})
|
42
41
|
request_stripe_object(
|
43
42
|
method: :post,
|
@@ -47,7 +46,7 @@ module Stripe
|
|
47
46
|
)
|
48
47
|
end
|
49
48
|
|
50
|
-
# Retrieve a list of credit grants
|
49
|
+
# Retrieve a list of credit grants.
|
51
50
|
def self.list(filters = {}, opts = {})
|
52
51
|
request_stripe_object(
|
53
52
|
method: :get,
|
@@ -67,7 +66,7 @@ module Stripe
|
|
67
66
|
)
|
68
67
|
end
|
69
68
|
|
70
|
-
# Voids a credit grant
|
69
|
+
# Voids a credit grant.
|
71
70
|
def void_grant(params = {}, opts = {})
|
72
71
|
request_stripe_object(
|
73
72
|
method: :post,
|
@@ -77,7 +76,7 @@ module Stripe
|
|
77
76
|
)
|
78
77
|
end
|
79
78
|
|
80
|
-
# Voids a credit grant
|
79
|
+
# Voids a credit grant.
|
81
80
|
def self.void_grant(id, params = {}, opts = {})
|
82
81
|
request_stripe_object(
|
83
82
|
method: :post,
|
@@ -192,6 +192,26 @@ module Stripe
|
|
192
192
|
)
|
193
193
|
end
|
194
194
|
|
195
|
+
# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
|
196
|
+
def self.respond(authorization, params = {}, opts = {})
|
197
|
+
request_stripe_object(
|
198
|
+
method: :post,
|
199
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(authorization) }),
|
200
|
+
params: params,
|
201
|
+
opts: opts
|
202
|
+
)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
|
206
|
+
def respond(params = {}, opts = {})
|
207
|
+
@resource.request_stripe_object(
|
208
|
+
method: :post,
|
209
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(@resource["id"]) }),
|
210
|
+
params: params,
|
211
|
+
opts: opts
|
212
|
+
)
|
213
|
+
end
|
214
|
+
|
195
215
|
# Reverse a test-mode Authorization.
|
196
216
|
def self.reverse(authorization, params = {}, opts = {})
|
197
217
|
request_stripe_object(
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Issuing
|
6
|
-
# You can [create physical or virtual cards](https://stripe.com/docs/issuing
|
6
|
+
# You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
|
7
7
|
class Card < APIResource
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
@@ -5,7 +5,7 @@ module Stripe
|
|
5
5
|
module Issuing
|
6
6
|
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
|
7
7
|
#
|
8
|
-
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
|
8
|
+
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
|
9
9
|
class Cardholder < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
extend Stripe::APIOperations::List
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Issuing
|
6
|
+
# A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
|
7
|
+
class FraudLiabilityDebit < APIResource
|
8
|
+
extend Stripe::APIOperations::List
|
9
|
+
|
10
|
+
OBJECT_NAME = "issuing.fraud_liability_debit"
|
11
|
+
def self.object_name
|
12
|
+
"issuing.fraud_liability_debit"
|
13
|
+
end
|
14
|
+
|
15
|
+
# Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
16
|
+
def self.list(filters = {}, opts = {})
|
17
|
+
request_stripe_object(
|
18
|
+
method: :get,
|
19
|
+
path: "/v1/issuing/fraud_liability_debits",
|
20
|
+
params: filters,
|
21
|
+
opts: opts
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
# A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe.
|
6
|
+
# Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment
|
7
|
+
# method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record
|
8
|
+
# can have guaranteed funds.
|
9
|
+
class PaymentAttemptRecord < APIResource
|
10
|
+
extend Stripe::APIOperations::List
|
11
|
+
|
12
|
+
OBJECT_NAME = "payment_attempt_record"
|
13
|
+
def self.object_name
|
14
|
+
"payment_attempt_record"
|
15
|
+
end
|
16
|
+
|
17
|
+
# List all the Payment Attempt Records attached to the specified Payment Record.
|
18
|
+
def self.list(filters = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :get,
|
21
|
+
path: "/v1/payment_attempt_records",
|
22
|
+
params: filters,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
# A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe.
|
6
|
+
# For example, you can create a Payment Record to model a payment made on a different payment processor,
|
7
|
+
# in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or
|
8
|
+
# more Payment Attempt Records, which represent individual attempts made on a payment network.
|
9
|
+
class PaymentRecord < APIResource
|
10
|
+
OBJECT_NAME = "payment_record"
|
11
|
+
def self.object_name
|
12
|
+
"payment_record"
|
13
|
+
end
|
14
|
+
|
15
|
+
# Report a new Payment Record. You may report a Payment Record as it is
|
16
|
+
# initialized and later report updates through the other report_* methods, or report Payment
|
17
|
+
# Records in a terminal state directly, through this method.
|
18
|
+
def self.report_payment(params = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :post,
|
21
|
+
path: "/v1/payment_records/report_payment",
|
22
|
+
params: params,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Report a new payment attempt on the specified Payment Record. A new payment
|
28
|
+
# attempt can only be specified if all other payment attempts are canceled or failed.
|
29
|
+
def report_payment_attempt(params = {}, opts = {})
|
30
|
+
request_stripe_object(
|
31
|
+
method: :post,
|
32
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(self["id"]) }),
|
33
|
+
params: params,
|
34
|
+
opts: opts
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Report a new payment attempt on the specified Payment Record. A new payment
|
39
|
+
# attempt can only be specified if all other payment attempts are canceled or failed.
|
40
|
+
def self.report_payment_attempt(id, params = {}, opts = {})
|
41
|
+
request_stripe_object(
|
42
|
+
method: :post,
|
43
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }),
|
44
|
+
params: params,
|
45
|
+
opts: opts
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
50
|
+
# was canceled.
|
51
|
+
def report_payment_attempt_canceled(params = {}, opts = {})
|
52
|
+
request_stripe_object(
|
53
|
+
method: :post,
|
54
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(self["id"]) }),
|
55
|
+
params: params,
|
56
|
+
opts: opts
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
61
|
+
# was canceled.
|
62
|
+
def self.report_payment_attempt_canceled(id, params = {}, opts = {})
|
63
|
+
request_stripe_object(
|
64
|
+
method: :post,
|
65
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }),
|
66
|
+
params: params,
|
67
|
+
opts: opts
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
72
|
+
# failed or errored.
|
73
|
+
def report_payment_attempt_failed(params = {}, opts = {})
|
74
|
+
request_stripe_object(
|
75
|
+
method: :post,
|
76
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(self["id"]) }),
|
77
|
+
params: params,
|
78
|
+
opts: opts
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
83
|
+
# failed or errored.
|
84
|
+
def self.report_payment_attempt_failed(id, params = {}, opts = {})
|
85
|
+
request_stripe_object(
|
86
|
+
method: :post,
|
87
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }),
|
88
|
+
params: params,
|
89
|
+
opts: opts
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
94
|
+
# was guaranteed.
|
95
|
+
def report_payment_attempt_guaranteed(params = {}, opts = {})
|
96
|
+
request_stripe_object(
|
97
|
+
method: :post,
|
98
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(self["id"]) }),
|
99
|
+
params: params,
|
100
|
+
opts: opts
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
105
|
+
# was guaranteed.
|
106
|
+
def self.report_payment_attempt_guaranteed(id, params = {}, opts = {})
|
107
|
+
request_stripe_object(
|
108
|
+
method: :post,
|
109
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }),
|
110
|
+
params: params,
|
111
|
+
opts: opts
|
112
|
+
)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -127,7 +127,7 @@ module Stripe
|
|
127
127
|
# A trial starts or ends.
|
128
128
|
#
|
129
129
|
#
|
130
|
-
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
|
130
|
+
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
|
131
131
|
#
|
132
132
|
# If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
|
133
133
|
#
|
data/lib/stripe/resources.rb
CHANGED
@@ -75,6 +75,7 @@ require "stripe/resources/issuing/cardholder"
|
|
75
75
|
require "stripe/resources/issuing/credit_underwriting_record"
|
76
76
|
require "stripe/resources/issuing/dispute"
|
77
77
|
require "stripe/resources/issuing/dispute_settlement_detail"
|
78
|
+
require "stripe/resources/issuing/fraud_liability_debit"
|
78
79
|
require "stripe/resources/issuing/personalization_design"
|
79
80
|
require "stripe/resources/issuing/physical_bundle"
|
80
81
|
require "stripe/resources/issuing/token"
|
@@ -84,11 +85,13 @@ require "stripe/resources/login_link"
|
|
84
85
|
require "stripe/resources/mandate"
|
85
86
|
require "stripe/resources/margin"
|
86
87
|
require "stripe/resources/order"
|
88
|
+
require "stripe/resources/payment_attempt_record"
|
87
89
|
require "stripe/resources/payment_intent"
|
88
90
|
require "stripe/resources/payment_link"
|
89
91
|
require "stripe/resources/payment_method"
|
90
92
|
require "stripe/resources/payment_method_configuration"
|
91
93
|
require "stripe/resources/payment_method_domain"
|
94
|
+
require "stripe/resources/payment_record"
|
92
95
|
require "stripe/resources/payout"
|
93
96
|
require "stripe/resources/person"
|
94
97
|
require "stripe/resources/plan"
|
@@ -15,7 +15,7 @@ module Stripe
|
|
15
15
|
)
|
16
16
|
end
|
17
17
|
|
18
|
-
# Expires a credit grant
|
18
|
+
# Expires a credit grant.
|
19
19
|
def expire(id, params = {}, opts = {})
|
20
20
|
request(
|
21
21
|
method: :post,
|
@@ -26,7 +26,7 @@ module Stripe
|
|
26
26
|
)
|
27
27
|
end
|
28
28
|
|
29
|
-
# Retrieve a list of credit grants
|
29
|
+
# Retrieve a list of credit grants.
|
30
30
|
def list(params = {}, opts = {})
|
31
31
|
request(
|
32
32
|
method: :get,
|
@@ -59,7 +59,7 @@ module Stripe
|
|
59
59
|
)
|
60
60
|
end
|
61
61
|
|
62
|
-
# Voids a credit grant
|
62
|
+
# Voids a credit grant.
|
63
63
|
def void_grant(id, params = {}, opts = {})
|
64
64
|
request(
|
65
65
|
method: :post,
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Issuing
|
6
|
+
class FraudLiabilityDebitService < StripeService
|
7
|
+
# Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
8
|
+
def list(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/issuing/fraud_liability_debits",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Retrieves an Issuing FraudLiabilityDebit object.
|
19
|
+
def retrieve(fraud_liability_debit, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :get,
|
22
|
+
path: format("/v1/issuing/fraud_liability_debits/%<fraud_liability_debit>s", { fraud_liability_debit: CGI.escape(fraud_liability_debit) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class IssuingService < StripeService
|
6
|
-
attr_reader :authorizations, :cards, :cardholders, :credit_underwriting_records, :disputes, :dispute_settlement_details, :personalization_designs, :physical_bundles, :tokens, :transactions
|
6
|
+
attr_reader :authorizations, :cards, :cardholders, :credit_underwriting_records, :disputes, :dispute_settlement_details, :fraud_liability_debits, :personalization_designs, :physical_bundles, :tokens, :transactions
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
@@ -14,6 +14,7 @@ module Stripe
|
|
14
14
|
.new(@requestor)
|
15
15
|
@disputes = Stripe::Issuing::DisputeService.new(@requestor)
|
16
16
|
@dispute_settlement_details = Stripe::Issuing::DisputeSettlementDetailService.new(@requestor)
|
17
|
+
@fraud_liability_debits = Stripe::Issuing::FraudLiabilityDebitService.new(@requestor)
|
17
18
|
@personalization_designs = Stripe::Issuing::PersonalizationDesignService.new(@requestor)
|
18
19
|
@physical_bundles = Stripe::Issuing::PhysicalBundleService.new(@requestor)
|
19
20
|
@tokens = Stripe::Issuing::TokenService.new(@requestor)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class PaymentAttemptRecordService < StripeService
|
6
|
+
# List all the Payment Attempt Records attached to the specified Payment Record.
|
7
|
+
def list(params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :get,
|
10
|
+
path: "/v1/payment_attempt_records",
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Retrieves a Payment Attempt Record with the given ID
|
18
|
+
def retrieve(id, params = {}, opts = {})
|
19
|
+
request(
|
20
|
+
method: :get,
|
21
|
+
path: format("/v1/payment_attempt_records/%<id>s", { id: CGI.escape(id) }),
|
22
|
+
params: params,
|
23
|
+
opts: opts,
|
24
|
+
base_address: :api
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class PaymentRecordService < StripeService
|
6
|
+
# Report a new Payment Record. You may report a Payment Record as it is
|
7
|
+
# initialized and later report updates through the other report_* methods, or report Payment
|
8
|
+
# Records in a terminal state directly, through this method.
|
9
|
+
def report_payment(params = {}, opts = {})
|
10
|
+
request(
|
11
|
+
method: :post,
|
12
|
+
path: "/v1/payment_records/report_payment",
|
13
|
+
params: params,
|
14
|
+
opts: opts,
|
15
|
+
base_address: :api
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Report a new payment attempt on the specified Payment Record. A new payment
|
20
|
+
# attempt can only be specified if all other payment attempts are canceled or failed.
|
21
|
+
def report_payment_attempt(id, params = {}, opts = {})
|
22
|
+
request(
|
23
|
+
method: :post,
|
24
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }),
|
25
|
+
params: params,
|
26
|
+
opts: opts,
|
27
|
+
base_address: :api
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
32
|
+
# was canceled.
|
33
|
+
def report_payment_attempt_canceled(id, params = {}, opts = {})
|
34
|
+
request(
|
35
|
+
method: :post,
|
36
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }),
|
37
|
+
params: params,
|
38
|
+
opts: opts,
|
39
|
+
base_address: :api
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
44
|
+
# failed or errored.
|
45
|
+
def report_payment_attempt_failed(id, params = {}, opts = {})
|
46
|
+
request(
|
47
|
+
method: :post,
|
48
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }),
|
49
|
+
params: params,
|
50
|
+
opts: opts,
|
51
|
+
base_address: :api
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
56
|
+
# was guaranteed.
|
57
|
+
def report_payment_attempt_guaranteed(id, params = {}, opts = {})
|
58
|
+
request(
|
59
|
+
method: :post,
|
60
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }),
|
61
|
+
params: params,
|
62
|
+
opts: opts,
|
63
|
+
base_address: :api
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Retrieves a Payment Record with the given ID
|
68
|
+
def retrieve(id, params = {}, opts = {})
|
69
|
+
request(
|
70
|
+
method: :get,
|
71
|
+
path: format("/v1/payment_records/%<id>s", { id: CGI.escape(id) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts,
|
74
|
+
base_address: :api
|
75
|
+
)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -107,7 +107,7 @@ module Stripe
|
|
107
107
|
# A trial starts or ends.
|
108
108
|
#
|
109
109
|
#
|
110
|
-
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
|
110
|
+
# In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
|
111
111
|
#
|
112
112
|
# If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
|
113
113
|
#
|
@@ -60,6 +60,17 @@ module Stripe
|
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
63
|
+
# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
|
64
|
+
def respond(authorization, params = {}, opts = {})
|
65
|
+
request(
|
66
|
+
method: :post,
|
67
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(authorization) }),
|
68
|
+
params: params,
|
69
|
+
opts: opts,
|
70
|
+
base_address: :api
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
63
74
|
# Reverse a test-mode Authorization.
|
64
75
|
def reverse(authorization, params = {}, opts = {})
|
65
76
|
request(
|
@@ -4,7 +4,7 @@ module Stripe
|
|
4
4
|
class V1Services < StripeService
|
5
5
|
# v1 accessors: The beginning of the section generated from our OpenAPI spec
|
6
6
|
attr_reader :accounts
|
7
|
-
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
|
7
|
+
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
|
8
8
|
# v1 accessors: The end of the section generated from our OpenAPI spec
|
9
9
|
|
10
10
|
# OAuthService is manually maintained, as it has special behaviors
|
@@ -53,11 +53,13 @@ module Stripe
|
|
53
53
|
@mandates = Stripe::MandateService.new(@requestor)
|
54
54
|
@margins = Stripe::MarginService.new(@requestor)
|
55
55
|
@orders = Stripe::OrderService.new(@requestor)
|
56
|
+
@payment_attempt_records = Stripe::PaymentAttemptRecordService.new(@requestor)
|
56
57
|
@payment_intents = Stripe::PaymentIntentService.new(@requestor)
|
57
58
|
@payment_links = Stripe::PaymentLinkService.new(@requestor)
|
58
59
|
@payment_methods = Stripe::PaymentMethodService.new(@requestor)
|
59
60
|
@payment_method_configurations = Stripe::PaymentMethodConfigurationService.new(@requestor)
|
60
61
|
@payment_method_domains = Stripe::PaymentMethodDomainService.new(@requestor)
|
62
|
+
@payment_records = Stripe::PaymentRecordService.new(@requestor)
|
61
63
|
@payouts = Stripe::PayoutService.new(@requestor)
|
62
64
|
@plans = Stripe::PlanService.new(@requestor)
|
63
65
|
@prices = Stripe::PriceService.new(@requestor)
|
data/lib/stripe/services.rb
CHANGED
@@ -91,6 +91,7 @@ require "stripe/services/issuing/cardholder_service"
|
|
91
91
|
require "stripe/services/issuing/credit_underwriting_record_service"
|
92
92
|
require "stripe/services/issuing/dispute_service"
|
93
93
|
require "stripe/services/issuing/dispute_settlement_detail_service"
|
94
|
+
require "stripe/services/issuing/fraud_liability_debit_service"
|
94
95
|
require "stripe/services/issuing/personalization_design_service"
|
95
96
|
require "stripe/services/issuing/physical_bundle_service"
|
96
97
|
require "stripe/services/issuing/token_service"
|
@@ -100,12 +101,14 @@ require "stripe/services/mandate_service"
|
|
100
101
|
require "stripe/services/margin_service"
|
101
102
|
require "stripe/services/order_line_item_service"
|
102
103
|
require "stripe/services/order_service"
|
104
|
+
require "stripe/services/payment_attempt_record_service"
|
103
105
|
require "stripe/services/payment_intent_service"
|
104
106
|
require "stripe/services/payment_link_line_item_service"
|
105
107
|
require "stripe/services/payment_link_service"
|
106
108
|
require "stripe/services/payment_method_configuration_service"
|
107
109
|
require "stripe/services/payment_method_domain_service"
|
108
110
|
require "stripe/services/payment_method_service"
|
111
|
+
require "stripe/services/payment_record_service"
|
109
112
|
require "stripe/services/payout_service"
|
110
113
|
require "stripe/services/plan_service"
|
111
114
|
require "stripe/services/price_service"
|
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: 13.2.0.pre.beta.
|
4
|
+
version: 13.2.0.pre.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-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.
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/stripe/resources/issuing/credit_underwriting_record.rb
|
138
138
|
- lib/stripe/resources/issuing/dispute.rb
|
139
139
|
- lib/stripe/resources/issuing/dispute_settlement_detail.rb
|
140
|
+
- lib/stripe/resources/issuing/fraud_liability_debit.rb
|
140
141
|
- lib/stripe/resources/issuing/personalization_design.rb
|
141
142
|
- lib/stripe/resources/issuing/physical_bundle.rb
|
142
143
|
- lib/stripe/resources/issuing/token.rb
|
@@ -146,11 +147,13 @@ files:
|
|
146
147
|
- lib/stripe/resources/mandate.rb
|
147
148
|
- lib/stripe/resources/margin.rb
|
148
149
|
- lib/stripe/resources/order.rb
|
150
|
+
- lib/stripe/resources/payment_attempt_record.rb
|
149
151
|
- lib/stripe/resources/payment_intent.rb
|
150
152
|
- lib/stripe/resources/payment_link.rb
|
151
153
|
- lib/stripe/resources/payment_method.rb
|
152
154
|
- lib/stripe/resources/payment_method_configuration.rb
|
153
155
|
- lib/stripe/resources/payment_method_domain.rb
|
156
|
+
- lib/stripe/resources/payment_record.rb
|
154
157
|
- lib/stripe/resources/payout.rb
|
155
158
|
- lib/stripe/resources/person.rb
|
156
159
|
- lib/stripe/resources/plan.rb
|
@@ -310,6 +313,7 @@ files:
|
|
310
313
|
- lib/stripe/services/issuing/credit_underwriting_record_service.rb
|
311
314
|
- lib/stripe/services/issuing/dispute_service.rb
|
312
315
|
- lib/stripe/services/issuing/dispute_settlement_detail_service.rb
|
316
|
+
- lib/stripe/services/issuing/fraud_liability_debit_service.rb
|
313
317
|
- lib/stripe/services/issuing/personalization_design_service.rb
|
314
318
|
- lib/stripe/services/issuing/physical_bundle_service.rb
|
315
319
|
- lib/stripe/services/issuing/token_service.rb
|
@@ -320,12 +324,14 @@ files:
|
|
320
324
|
- lib/stripe/services/oauth_service.rb
|
321
325
|
- lib/stripe/services/order_line_item_service.rb
|
322
326
|
- lib/stripe/services/order_service.rb
|
327
|
+
- lib/stripe/services/payment_attempt_record_service.rb
|
323
328
|
- lib/stripe/services/payment_intent_service.rb
|
324
329
|
- lib/stripe/services/payment_link_line_item_service.rb
|
325
330
|
- lib/stripe/services/payment_link_service.rb
|
326
331
|
- lib/stripe/services/payment_method_configuration_service.rb
|
327
332
|
- lib/stripe/services/payment_method_domain_service.rb
|
328
333
|
- lib/stripe/services/payment_method_service.rb
|
334
|
+
- lib/stripe/services/payment_record_service.rb
|
329
335
|
- lib/stripe/services/payout_service.rb
|
330
336
|
- lib/stripe/services/plan_service.rb
|
331
337
|
- lib/stripe/services/price_service.rb
|