stripe 10.11.0.pre.beta.1 → 10.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +52 -282
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +2 -14
- data/VERSION +1 -1
- data/lib/stripe/api_operations/request.rb +1 -2
- data/lib/stripe/api_version.rb +0 -1
- data/lib/stripe/object_types.rb +0 -23
- data/lib/stripe/resources/charge.rb +3 -0
- data/lib/stripe/resources/customer.rb +0 -11
- data/lib/stripe/resources/financial_connections/account.rb +0 -3
- data/lib/stripe/resources/invoice.rb +0 -53
- data/lib/stripe/resources/payment_intent.rb +0 -50
- data/lib/stripe/resources/quote.rb +0 -104
- data/lib/stripe/resources/refund.rb +5 -9
- data/lib/stripe/resources/subscription_schedule.rb +0 -20
- data/lib/stripe/resources/terminal/reader.rb +0 -60
- data/lib/stripe/resources.rb +0 -22
- data/lib/stripe/stripe_client.rb +28 -62
- data/lib/stripe/stripe_configuration.rb +1 -2
- data/lib/stripe/util.rb +1 -8
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -46
- metadata +4 -27
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -32
- data/lib/stripe/resources/capital/financing_offer.rb +0 -49
- data/lib/stripe/resources/capital/financing_summary.rb +0 -15
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
- data/lib/stripe/resources/confirmation_token.rb +0 -16
- data/lib/stripe/resources/customer_entitlement.rb +0 -12
- data/lib/stripe/resources/customer_entitlement_summary.rb +0 -12
- data/lib/stripe/resources/entitlements/event.rb +0 -26
- data/lib/stripe/resources/entitlements/feature.rb +0 -38
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
- data/lib/stripe/resources/gift_cards/card.rb +0 -59
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
- data/lib/stripe/resources/invoice_payment.rb +0 -12
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -119
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -26
- data/lib/stripe/resources/margin.rb +0 -37
- data/lib/stripe/resources/order.rb +0 -120
- data/lib/stripe/resources/quote_phase.rb +0 -39
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
- data/lib/stripe/resources/tax/form.rb +0 -49
data/lib/stripe/object_types.rb
CHANGED
@@ -16,7 +16,6 @@ module Stripe
|
|
16
16
|
File.object_name_alt => File,
|
17
17
|
Account.object_name => Account,
|
18
18
|
AccountLink.object_name => AccountLink,
|
19
|
-
AccountNotice.object_name => AccountNotice,
|
20
19
|
AccountSession.object_name => AccountSession,
|
21
20
|
ApplePayDomain.object_name => ApplePayDomain,
|
22
21
|
ApplicationFee.object_name => ApplicationFee,
|
@@ -28,9 +27,6 @@ module Stripe
|
|
28
27
|
BillingPortal::Configuration.object_name => BillingPortal::Configuration,
|
29
28
|
BillingPortal::Session.object_name => BillingPortal::Session,
|
30
29
|
Capability.object_name => Capability,
|
31
|
-
Capital::FinancingOffer.object_name => Capital::FinancingOffer,
|
32
|
-
Capital::FinancingSummary.object_name => Capital::FinancingSummary,
|
33
|
-
Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
|
34
30
|
Card.object_name => Card,
|
35
31
|
CashBalance.object_name => CashBalance,
|
36
32
|
Charge.object_name => Charge,
|
@@ -38,7 +34,6 @@ module Stripe
|
|
38
34
|
Climate::Order.object_name => Climate::Order,
|
39
35
|
Climate::Product.object_name => Climate::Product,
|
40
36
|
Climate::Supplier.object_name => Climate::Supplier,
|
41
|
-
ConfirmationToken.object_name => ConfirmationToken,
|
42
37
|
CountrySpec.object_name => CountrySpec,
|
43
38
|
Coupon.object_name => Coupon,
|
44
39
|
CreditNote.object_name => CreditNote,
|
@@ -46,49 +41,35 @@ module Stripe
|
|
46
41
|
Customer.object_name => Customer,
|
47
42
|
CustomerBalanceTransaction.object_name => CustomerBalanceTransaction,
|
48
43
|
CustomerCashBalanceTransaction.object_name => CustomerCashBalanceTransaction,
|
49
|
-
CustomerEntitlement.object_name => CustomerEntitlement,
|
50
|
-
CustomerEntitlementSummary.object_name => CustomerEntitlementSummary,
|
51
44
|
CustomerSession.object_name => CustomerSession,
|
52
45
|
Discount.object_name => Discount,
|
53
46
|
Dispute.object_name => Dispute,
|
54
|
-
Entitlements::Event.object_name => Entitlements::Event,
|
55
|
-
Entitlements::Feature.object_name => Entitlements::Feature,
|
56
47
|
EphemeralKey.object_name => EphemeralKey,
|
57
48
|
Event.object_name => Event,
|
58
49
|
ExchangeRate.object_name => ExchangeRate,
|
59
50
|
File.object_name => File,
|
60
51
|
FileLink.object_name => FileLink,
|
61
52
|
FinancialConnections::Account.object_name => FinancialConnections::Account,
|
62
|
-
FinancialConnections::AccountInferredBalance.object_name =>
|
63
|
-
FinancialConnections::AccountInferredBalance,
|
64
53
|
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
|
65
54
|
FinancialConnections::AccountOwnership.object_name =>
|
66
55
|
FinancialConnections::AccountOwnership,
|
67
56
|
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
68
57
|
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
69
58
|
FundingInstructions.object_name => FundingInstructions,
|
70
|
-
GiftCards::Card.object_name => GiftCards::Card,
|
71
|
-
GiftCards::Transaction.object_name => GiftCards::Transaction,
|
72
59
|
Identity::VerificationReport.object_name => Identity::VerificationReport,
|
73
60
|
Identity::VerificationSession.object_name => Identity::VerificationSession,
|
74
61
|
Invoice.object_name => Invoice,
|
75
62
|
InvoiceItem.object_name => InvoiceItem,
|
76
63
|
InvoiceLineItem.object_name => InvoiceLineItem,
|
77
|
-
InvoicePayment.object_name => InvoicePayment,
|
78
64
|
Issuing::Authorization.object_name => Issuing::Authorization,
|
79
65
|
Issuing::Card.object_name => Issuing::Card,
|
80
66
|
Issuing::Cardholder.object_name => Issuing::Cardholder,
|
81
|
-
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
82
67
|
Issuing::Dispute.object_name => Issuing::Dispute,
|
83
|
-
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
84
|
-
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
85
68
|
Issuing::Token.object_name => Issuing::Token,
|
86
69
|
Issuing::Transaction.object_name => Issuing::Transaction,
|
87
70
|
LineItem.object_name => LineItem,
|
88
71
|
LoginLink.object_name => LoginLink,
|
89
72
|
Mandate.object_name => Mandate,
|
90
|
-
Margin.object_name => Margin,
|
91
|
-
Order.object_name => Order,
|
92
73
|
PaymentIntent.object_name => PaymentIntent,
|
93
74
|
PaymentLink.object_name => PaymentLink,
|
94
75
|
PaymentMethod.object_name => PaymentMethod,
|
@@ -101,9 +82,6 @@ module Stripe
|
|
101
82
|
Product.object_name => Product,
|
102
83
|
PromotionCode.object_name => PromotionCode,
|
103
84
|
Quote.object_name => Quote,
|
104
|
-
QuotePhase.object_name => QuotePhase,
|
105
|
-
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
|
106
|
-
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
|
107
85
|
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
108
86
|
Radar::ValueList.object_name => Radar::ValueList,
|
109
87
|
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
@@ -123,7 +101,6 @@ module Stripe
|
|
123
101
|
SubscriptionSchedule.object_name => SubscriptionSchedule,
|
124
102
|
Tax::Calculation.object_name => Tax::Calculation,
|
125
103
|
Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
|
126
|
-
Tax::Form.object_name => Tax::Form,
|
127
104
|
Tax::Registration.object_name => Tax::Registration,
|
128
105
|
Tax::Settings.object_name => Tax::Settings,
|
129
106
|
Tax::Transaction.object_name => Tax::Transaction,
|
@@ -11,12 +11,15 @@ module Stripe
|
|
11
11
|
extend Stripe::APIOperations::List
|
12
12
|
extend Stripe::APIOperations::Search
|
13
13
|
include Stripe::APIOperations::Save
|
14
|
+
extend Stripe::APIOperations::NestedResource
|
14
15
|
|
15
16
|
OBJECT_NAME = "charge"
|
16
17
|
def self.object_name
|
17
18
|
"charge"
|
18
19
|
end
|
19
20
|
|
21
|
+
nested_resource_class_methods :refund, operations: %i[retrieve list]
|
22
|
+
|
20
23
|
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
21
24
|
#
|
22
25
|
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
@@ -22,7 +22,6 @@ module Stripe
|
|
22
22
|
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
23
23
|
nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
|
24
24
|
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
|
25
|
-
nested_resource_class_methods :entitlement, operations: %i[list]
|
26
25
|
|
27
26
|
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
|
28
27
|
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
|
@@ -186,16 +185,6 @@ module Stripe
|
|
186
185
|
)
|
187
186
|
end
|
188
187
|
|
189
|
-
# Retrieve the entitlement summary for a customer
|
190
|
-
def self.retrieve_entitlement_summary(customer, params = {}, opts = {})
|
191
|
-
request_stripe_object(
|
192
|
-
method: :get,
|
193
|
-
path: format("/v1/customers/%<customer>s/entitlement_summary", { customer: CGI.escape(customer) }),
|
194
|
-
params: params,
|
195
|
-
opts: opts
|
196
|
-
)
|
197
|
-
end
|
198
|
-
|
199
188
|
def test_helpers
|
200
189
|
TestHelpers.new(self)
|
201
190
|
end
|
@@ -6,15 +6,12 @@ module Stripe
|
|
6
6
|
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
7
7
|
class Account < APIResource
|
8
8
|
extend Stripe::APIOperations::List
|
9
|
-
extend Stripe::APIOperations::NestedResource
|
10
9
|
|
11
10
|
OBJECT_NAME = "financial_connections.account"
|
12
11
|
def self.object_name
|
13
12
|
"financial_connections.account"
|
14
13
|
end
|
15
14
|
|
16
|
-
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
17
|
-
|
18
15
|
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
|
19
16
|
def disconnect(params = {}, opts = {})
|
20
17
|
request_stripe_object(
|
@@ -40,33 +40,12 @@ module Stripe
|
|
40
40
|
extend Stripe::APIOperations::List
|
41
41
|
extend Stripe::APIOperations::Search
|
42
42
|
include Stripe::APIOperations::Save
|
43
|
-
extend Stripe::APIOperations::NestedResource
|
44
43
|
|
45
44
|
OBJECT_NAME = "invoice"
|
46
45
|
def self.object_name
|
47
46
|
"invoice"
|
48
47
|
end
|
49
48
|
|
50
|
-
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
51
|
-
|
52
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
53
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
54
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
55
|
-
# invoice's status becomes paid.
|
56
|
-
#
|
57
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
58
|
-
# credited to the invoice immediately.
|
59
|
-
#
|
60
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
61
|
-
def attach_payment_intent(params = {}, opts = {})
|
62
|
-
request_stripe_object(
|
63
|
-
method: :post,
|
64
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
|
65
|
-
params: params,
|
66
|
-
opts: opts
|
67
|
-
)
|
68
|
-
end
|
69
|
-
|
70
49
|
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
71
50
|
def finalize_invoice(params = {}, opts = {})
|
72
51
|
request_stripe_object(
|
@@ -119,38 +98,6 @@ module Stripe
|
|
119
98
|
)
|
120
99
|
end
|
121
100
|
|
122
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
123
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
124
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
125
|
-
# invoice's status becomes paid.
|
126
|
-
#
|
127
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
128
|
-
# credited to the invoice immediately.
|
129
|
-
#
|
130
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
131
|
-
def self.attach_payment_intent(invoice, params = {}, opts = {})
|
132
|
-
request_stripe_object(
|
133
|
-
method: :post,
|
134
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
135
|
-
params: params,
|
136
|
-
opts: opts
|
137
|
-
)
|
138
|
-
end
|
139
|
-
|
140
|
-
# At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
|
141
|
-
#
|
142
|
-
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
|
143
|
-
#
|
144
|
-
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
|
145
|
-
def self.create_preview(params = {}, opts = {})
|
146
|
-
request_stripe_object(
|
147
|
-
method: :post,
|
148
|
-
path: "/v1/invoices/create_preview",
|
149
|
-
params: params,
|
150
|
-
opts: opts
|
151
|
-
)
|
152
|
-
end
|
153
|
-
|
154
101
|
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
155
102
|
def self.finalize_invoice(invoice, params = {}, opts = {})
|
156
103
|
request_stripe_object(
|
@@ -93,31 +93,6 @@ module Stripe
|
|
93
93
|
)
|
94
94
|
end
|
95
95
|
|
96
|
-
# Perform an decremental authorization on an eligible
|
97
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
98
|
-
# PaymentIntent's status must be requires_capture and
|
99
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
100
|
-
# must be available.
|
101
|
-
#
|
102
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
103
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
104
|
-
#
|
105
|
-
# After decrement, the PaymentIntent object
|
106
|
-
# returns with the updated
|
107
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
108
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
109
|
-
#
|
110
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
111
|
-
# After it's captured, a PaymentIntent can no longer be decremented.
|
112
|
-
def decrement_authorization(params = {}, opts = {})
|
113
|
-
request_stripe_object(
|
114
|
-
method: :post,
|
115
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(self["id"]) }),
|
116
|
-
params: params,
|
117
|
-
opts: opts
|
118
|
-
)
|
119
|
-
end
|
120
|
-
|
121
96
|
# Perform an incremental authorization on an eligible
|
122
97
|
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
123
98
|
# PaymentIntent's status must be requires_capture and
|
@@ -230,31 +205,6 @@ module Stripe
|
|
230
205
|
)
|
231
206
|
end
|
232
207
|
|
233
|
-
# Perform an decremental authorization on an eligible
|
234
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
235
|
-
# PaymentIntent's status must be requires_capture and
|
236
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
237
|
-
# must be available.
|
238
|
-
#
|
239
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
240
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
241
|
-
#
|
242
|
-
# After decrement, the PaymentIntent object
|
243
|
-
# returns with the updated
|
244
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
245
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
246
|
-
#
|
247
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
248
|
-
# After it's captured, a PaymentIntent can no longer be decremented.
|
249
|
-
def self.decrement_authorization(intent, params = {}, opts = {})
|
250
|
-
request_stripe_object(
|
251
|
-
method: :post,
|
252
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
|
253
|
-
params: params,
|
254
|
-
opts: opts
|
255
|
-
)
|
256
|
-
end
|
257
|
-
|
258
208
|
# Perform an incremental authorization on an eligible
|
259
209
|
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
260
210
|
# PaymentIntent's status must be requires_capture and
|
@@ -8,16 +8,12 @@ module Stripe
|
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
10
10
|
include Stripe::APIOperations::Save
|
11
|
-
extend Stripe::APIOperations::NestedResource
|
12
11
|
|
13
12
|
OBJECT_NAME = "quote"
|
14
13
|
def self.object_name
|
15
14
|
"quote"
|
16
15
|
end
|
17
16
|
|
18
|
-
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
19
|
-
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
20
|
-
|
21
17
|
# Accepts the specified quote.
|
22
18
|
def accept(params = {}, opts = {})
|
23
19
|
request_stripe_object(
|
@@ -68,46 +64,6 @@ module Stripe
|
|
68
64
|
)
|
69
65
|
end
|
70
66
|
|
71
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
72
|
-
def list_lines(params = {}, opts = {})
|
73
|
-
request_stripe_object(
|
74
|
-
method: :get,
|
75
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
76
|
-
params: params,
|
77
|
-
opts: opts
|
78
|
-
)
|
79
|
-
end
|
80
|
-
|
81
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
82
|
-
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
|
83
|
-
request_stripe_object(
|
84
|
-
method: :get,
|
85
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
|
86
|
-
params: params,
|
87
|
-
opts: opts
|
88
|
-
)
|
89
|
-
end
|
90
|
-
|
91
|
-
# Converts a stale quote to draft.
|
92
|
-
def mark_draft(params = {}, opts = {})
|
93
|
-
request_stripe_object(
|
94
|
-
method: :post,
|
95
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
96
|
-
params: params,
|
97
|
-
opts: opts
|
98
|
-
)
|
99
|
-
end
|
100
|
-
|
101
|
-
# Converts a draft or open quote to stale.
|
102
|
-
def mark_stale(params = {}, opts = {})
|
103
|
-
request_stripe_object(
|
104
|
-
method: :post,
|
105
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
106
|
-
params: params,
|
107
|
-
opts: opts
|
108
|
-
)
|
109
|
-
end
|
110
|
-
|
111
67
|
# Download the PDF for a finalized quote
|
112
68
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
113
69
|
config = opts[:client]&.config || Stripe.config
|
@@ -121,16 +77,6 @@ module Stripe
|
|
121
77
|
)
|
122
78
|
end
|
123
79
|
|
124
|
-
# Recompute the upcoming invoice estimate for the quote.
|
125
|
-
def reestimate(params = {}, opts = {})
|
126
|
-
request_stripe_object(
|
127
|
-
method: :post,
|
128
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
129
|
-
params: params,
|
130
|
-
opts: opts
|
131
|
-
)
|
132
|
-
end
|
133
|
-
|
134
80
|
# Accepts the specified quote.
|
135
81
|
def self.accept(quote, params = {}, opts = {})
|
136
82
|
request_stripe_object(
|
@@ -181,46 +127,6 @@ module Stripe
|
|
181
127
|
)
|
182
128
|
end
|
183
129
|
|
184
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
185
|
-
def self.list_lines(quote, params = {}, opts = {})
|
186
|
-
request_stripe_object(
|
187
|
-
method: :get,
|
188
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
189
|
-
params: params,
|
190
|
-
opts: opts
|
191
|
-
)
|
192
|
-
end
|
193
|
-
|
194
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
195
|
-
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
196
|
-
request_stripe_object(
|
197
|
-
method: :get,
|
198
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
199
|
-
params: params,
|
200
|
-
opts: opts
|
201
|
-
)
|
202
|
-
end
|
203
|
-
|
204
|
-
# Converts a stale quote to draft.
|
205
|
-
def self.mark_draft(quote, params = {}, opts = {})
|
206
|
-
request_stripe_object(
|
207
|
-
method: :post,
|
208
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
209
|
-
params: params,
|
210
|
-
opts: opts
|
211
|
-
)
|
212
|
-
end
|
213
|
-
|
214
|
-
# Converts a draft or open quote to stale.
|
215
|
-
def self.mark_stale(quote, params = {}, opts = {})
|
216
|
-
request_stripe_object(
|
217
|
-
method: :post,
|
218
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
219
|
-
params: params,
|
220
|
-
opts: opts
|
221
|
-
)
|
222
|
-
end
|
223
|
-
|
224
130
|
# Download the PDF for a finalized quote
|
225
131
|
def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
226
132
|
config = opts[:client]&.config || Stripe.config
|
@@ -234,16 +140,6 @@ module Stripe
|
|
234
140
|
)
|
235
141
|
end
|
236
142
|
|
237
|
-
# Recompute the upcoming invoice estimate for the quote.
|
238
|
-
def self.reestimate(quote, params = {}, opts = {})
|
239
|
-
request_stripe_object(
|
240
|
-
method: :post,
|
241
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
242
|
-
params: params,
|
243
|
-
opts: opts
|
244
|
-
)
|
245
|
-
end
|
246
|
-
|
247
143
|
# A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
|
248
144
|
def self.create(params = {}, opts = {})
|
249
145
|
request_stripe_object(method: :post, path: "/v1/quotes", params: params, opts: opts)
|
@@ -41,15 +41,6 @@ module Stripe
|
|
41
41
|
)
|
42
42
|
end
|
43
43
|
|
44
|
-
def self.list(filters = {}, opts = {})
|
45
|
-
request_stripe_object(
|
46
|
-
method: :get,
|
47
|
-
path: format("/v1/refunds"),
|
48
|
-
params: filters,
|
49
|
-
opts: opts
|
50
|
-
)
|
51
|
-
end
|
52
|
-
|
53
44
|
# When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
|
54
45
|
#
|
55
46
|
# Creating a new refund will refund a charge that has previously been created but not yet refunded.
|
@@ -65,6 +56,11 @@ module Stripe
|
|
65
56
|
request_stripe_object(method: :post, path: "/v1/refunds", params: params, opts: opts)
|
66
57
|
end
|
67
58
|
|
59
|
+
# Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object.
|
60
|
+
def self.list(filters = {}, opts = {})
|
61
|
+
request_stripe_object(method: :get, path: "/v1/refunds", params: filters, opts: opts)
|
62
|
+
end
|
63
|
+
|
68
64
|
# Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.
|
69
65
|
#
|
70
66
|
# This request only accepts metadata as an argument.
|
@@ -15,16 +15,6 @@ module Stripe
|
|
15
15
|
"subscription_schedule"
|
16
16
|
end
|
17
17
|
|
18
|
-
# Amends an existing subscription schedule.
|
19
|
-
def amend(params = {}, opts = {})
|
20
|
-
request_stripe_object(
|
21
|
-
method: :post,
|
22
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
23
|
-
params: params,
|
24
|
-
opts: opts
|
25
|
-
)
|
26
|
-
end
|
27
|
-
|
28
18
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
29
19
|
def cancel(params = {}, opts = {})
|
30
20
|
request_stripe_object(
|
@@ -45,16 +35,6 @@ module Stripe
|
|
45
35
|
)
|
46
36
|
end
|
47
37
|
|
48
|
-
# Amends an existing subscription schedule.
|
49
|
-
def self.amend(schedule, params = {}, opts = {})
|
50
|
-
request_stripe_object(
|
51
|
-
method: :post,
|
52
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
53
|
-
params: params,
|
54
|
-
opts: opts
|
55
|
-
)
|
56
|
-
end
|
57
|
-
|
58
38
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
59
39
|
def self.cancel(schedule, params = {}, opts = {})
|
60
40
|
request_stripe_object(
|
@@ -27,36 +27,6 @@ module Stripe
|
|
27
27
|
)
|
28
28
|
end
|
29
29
|
|
30
|
-
# Initiates an input collection flow on a Reader.
|
31
|
-
def collect_inputs(params = {}, opts = {})
|
32
|
-
request_stripe_object(
|
33
|
-
method: :post,
|
34
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
|
35
|
-
params: params,
|
36
|
-
opts: opts
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
|
-
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
41
|
-
def collect_payment_method(params = {}, opts = {})
|
42
|
-
request_stripe_object(
|
43
|
-
method: :post,
|
44
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
|
45
|
-
params: params,
|
46
|
-
opts: opts
|
47
|
-
)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Finalizes a payment on a Reader.
|
51
|
-
def confirm_payment_intent(params = {}, opts = {})
|
52
|
-
request_stripe_object(
|
53
|
-
method: :post,
|
54
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
|
55
|
-
params: params,
|
56
|
-
opts: opts
|
57
|
-
)
|
58
|
-
end
|
59
|
-
|
60
30
|
# Initiates a payment flow on a Reader.
|
61
31
|
def process_payment_intent(params = {}, opts = {})
|
62
32
|
request_stripe_object(
|
@@ -107,36 +77,6 @@ module Stripe
|
|
107
77
|
)
|
108
78
|
end
|
109
79
|
|
110
|
-
# Initiates an input collection flow on a Reader.
|
111
|
-
def self.collect_inputs(reader, params = {}, opts = {})
|
112
|
-
request_stripe_object(
|
113
|
-
method: :post,
|
114
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
115
|
-
params: params,
|
116
|
-
opts: opts
|
117
|
-
)
|
118
|
-
end
|
119
|
-
|
120
|
-
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
121
|
-
def self.collect_payment_method(reader, params = {}, opts = {})
|
122
|
-
request_stripe_object(
|
123
|
-
method: :post,
|
124
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
|
125
|
-
params: params,
|
126
|
-
opts: opts
|
127
|
-
)
|
128
|
-
end
|
129
|
-
|
130
|
-
# Finalizes a payment on a Reader.
|
131
|
-
def self.confirm_payment_intent(reader, params = {}, opts = {})
|
132
|
-
request_stripe_object(
|
133
|
-
method: :post,
|
134
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
|
135
|
-
params: params,
|
136
|
-
opts: opts
|
137
|
-
)
|
138
|
-
end
|
139
|
-
|
140
80
|
# Initiates a payment flow on a Reader.
|
141
81
|
def self.process_payment_intent(reader, params = {}, opts = {})
|
142
82
|
request_stripe_object(
|
data/lib/stripe/resources.rb
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
|
4
4
|
require "stripe/resources/account"
|
5
5
|
require "stripe/resources/account_link"
|
6
|
-
require "stripe/resources/account_notice"
|
7
6
|
require "stripe/resources/account_session"
|
8
7
|
require "stripe/resources/apple_pay_domain"
|
9
8
|
require "stripe/resources/application_fee"
|
@@ -15,9 +14,6 @@ require "stripe/resources/bank_account"
|
|
15
14
|
require "stripe/resources/billing_portal/configuration"
|
16
15
|
require "stripe/resources/billing_portal/session"
|
17
16
|
require "stripe/resources/capability"
|
18
|
-
require "stripe/resources/capital/financing_offer"
|
19
|
-
require "stripe/resources/capital/financing_summary"
|
20
|
-
require "stripe/resources/capital/financing_transaction"
|
21
17
|
require "stripe/resources/card"
|
22
18
|
require "stripe/resources/cash_balance"
|
23
19
|
require "stripe/resources/charge"
|
@@ -25,7 +21,6 @@ require "stripe/resources/checkout/session"
|
|
25
21
|
require "stripe/resources/climate/order"
|
26
22
|
require "stripe/resources/climate/product"
|
27
23
|
require "stripe/resources/climate/supplier"
|
28
|
-
require "stripe/resources/confirmation_token"
|
29
24
|
require "stripe/resources/country_spec"
|
30
25
|
require "stripe/resources/coupon"
|
31
26
|
require "stripe/resources/credit_note"
|
@@ -33,47 +28,34 @@ require "stripe/resources/credit_note_line_item"
|
|
33
28
|
require "stripe/resources/customer"
|
34
29
|
require "stripe/resources/customer_balance_transaction"
|
35
30
|
require "stripe/resources/customer_cash_balance_transaction"
|
36
|
-
require "stripe/resources/customer_entitlement"
|
37
|
-
require "stripe/resources/customer_entitlement_summary"
|
38
31
|
require "stripe/resources/customer_session"
|
39
32
|
require "stripe/resources/discount"
|
40
33
|
require "stripe/resources/dispute"
|
41
|
-
require "stripe/resources/entitlements/event"
|
42
|
-
require "stripe/resources/entitlements/feature"
|
43
34
|
require "stripe/resources/ephemeral_key"
|
44
35
|
require "stripe/resources/event"
|
45
36
|
require "stripe/resources/exchange_rate"
|
46
37
|
require "stripe/resources/file"
|
47
38
|
require "stripe/resources/file_link"
|
48
39
|
require "stripe/resources/financial_connections/account"
|
49
|
-
require "stripe/resources/financial_connections/account_inferred_balance"
|
50
40
|
require "stripe/resources/financial_connections/account_owner"
|
51
41
|
require "stripe/resources/financial_connections/account_ownership"
|
52
42
|
require "stripe/resources/financial_connections/session"
|
53
43
|
require "stripe/resources/financial_connections/transaction"
|
54
44
|
require "stripe/resources/funding_instructions"
|
55
|
-
require "stripe/resources/gift_cards/card"
|
56
|
-
require "stripe/resources/gift_cards/transaction"
|
57
45
|
require "stripe/resources/identity/verification_report"
|
58
46
|
require "stripe/resources/identity/verification_session"
|
59
47
|
require "stripe/resources/invoice"
|
60
48
|
require "stripe/resources/invoice_item"
|
61
49
|
require "stripe/resources/invoice_line_item"
|
62
|
-
require "stripe/resources/invoice_payment"
|
63
50
|
require "stripe/resources/issuing/authorization"
|
64
51
|
require "stripe/resources/issuing/card"
|
65
52
|
require "stripe/resources/issuing/cardholder"
|
66
|
-
require "stripe/resources/issuing/credit_underwriting_record"
|
67
53
|
require "stripe/resources/issuing/dispute"
|
68
|
-
require "stripe/resources/issuing/personalization_design"
|
69
|
-
require "stripe/resources/issuing/physical_bundle"
|
70
54
|
require "stripe/resources/issuing/token"
|
71
55
|
require "stripe/resources/issuing/transaction"
|
72
56
|
require "stripe/resources/line_item"
|
73
57
|
require "stripe/resources/login_link"
|
74
58
|
require "stripe/resources/mandate"
|
75
|
-
require "stripe/resources/margin"
|
76
|
-
require "stripe/resources/order"
|
77
59
|
require "stripe/resources/payment_intent"
|
78
60
|
require "stripe/resources/payment_link"
|
79
61
|
require "stripe/resources/payment_method"
|
@@ -86,9 +68,6 @@ require "stripe/resources/price"
|
|
86
68
|
require "stripe/resources/product"
|
87
69
|
require "stripe/resources/promotion_code"
|
88
70
|
require "stripe/resources/quote"
|
89
|
-
require "stripe/resources/quote_phase"
|
90
|
-
require "stripe/resources/quote_preview_invoice"
|
91
|
-
require "stripe/resources/quote_preview_subscription_schedule"
|
92
71
|
require "stripe/resources/radar/early_fraud_warning"
|
93
72
|
require "stripe/resources/radar/value_list"
|
94
73
|
require "stripe/resources/radar/value_list_item"
|
@@ -108,7 +87,6 @@ require "stripe/resources/subscription_item"
|
|
108
87
|
require "stripe/resources/subscription_schedule"
|
109
88
|
require "stripe/resources/tax/calculation"
|
110
89
|
require "stripe/resources/tax/calculation_line_item"
|
111
|
-
require "stripe/resources/tax/form"
|
112
90
|
require "stripe/resources/tax/registration"
|
113
91
|
require "stripe/resources/tax/settings"
|
114
92
|
require "stripe/resources/tax/transaction"
|