stripe 11.3.0.pre.beta.1 → 11.3.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 +658 -1314
- data/OPENAPI_VERSION +1 -1
- data/README.md +0 -11
- 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 -16
- data/lib/stripe/resources/account.rb +28 -15
- data/lib/stripe/resources/bank_account.rb +4 -3
- data/lib/stripe/resources/event.rb +3 -3
- data/lib/stripe/resources/financial_connections/account.rb +0 -3
- data/lib/stripe/resources/invoice.rb +5 -100
- data/lib/stripe/resources/issuing/authorization.rb +11 -0
- data/lib/stripe/resources/login_link.rb +1 -1
- data/lib/stripe/resources/payment_intent.rb +0 -50
- data/lib/stripe/resources/person.rb +2 -3
- data/lib/stripe/resources/quote.rb +0 -104
- data/lib/stripe/resources/subscription_schedule.rb +0 -20
- data/lib/stripe/resources/terminal/reader.rb +0 -60
- data/lib/stripe/resources/token.rb +2 -2
- data/lib/stripe/resources/webhook_endpoint.rb +2 -2
- data/lib/stripe/resources.rb +0 -15
- 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 -54
- metadata +5 -21
- 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/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/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/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1005
|
data/README.md
CHANGED
@@ -339,17 +339,6 @@ If your beta feature requires a `Stripe-Version` header to be sent, set the `Str
|
|
339
339
|
Stripe.add_beta_version("feature_beta", "v3")
|
340
340
|
```
|
341
341
|
|
342
|
-
### Custom requests
|
343
|
-
|
344
|
-
If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `Stripe`.
|
345
|
-
|
346
|
-
```ruby
|
347
|
-
resp = Stripe.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
|
348
|
-
|
349
|
-
# (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
|
350
|
-
deserialized_resp = Stripe.deserialize(resp.http_body)
|
351
|
-
```
|
352
|
-
|
353
342
|
## Support
|
354
343
|
|
355
344
|
New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
11.3.0
|
1
|
+
11.3.0
|
@@ -48,14 +48,13 @@ module Stripe
|
|
48
48
|
api_key = headers.delete(:api_key)
|
49
49
|
api_base = headers.delete(:api_base)
|
50
50
|
client = headers.delete(:client)
|
51
|
-
api_mode = headers.delete(:api_mode)
|
52
51
|
# Assume all remaining opts must be headers
|
53
52
|
|
54
53
|
resp, opts[:api_key] = client.send(
|
55
54
|
client_request_method_sym,
|
56
55
|
method, url,
|
57
56
|
api_base: api_base, api_key: api_key,
|
58
|
-
headers: headers, params: params, usage: usage,
|
57
|
+
headers: headers, params: params, usage: usage,
|
59
58
|
&read_body_chunk_block
|
60
59
|
)
|
61
60
|
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/object_types.rb
CHANGED
@@ -15,7 +15,6 @@ module Stripe
|
|
15
15
|
# object classes: The beginning of the section generated from our OpenAPI spec
|
16
16
|
Account.object_name => Account,
|
17
17
|
AccountLink.object_name => AccountLink,
|
18
|
-
AccountNotice.object_name => AccountNotice,
|
19
18
|
AccountSession.object_name => AccountSession,
|
20
19
|
ApplePayDomain.object_name => ApplePayDomain,
|
21
20
|
ApplicationFee.object_name => ApplicationFee,
|
@@ -31,9 +30,6 @@ module Stripe
|
|
31
30
|
BillingPortal::Configuration.object_name => BillingPortal::Configuration,
|
32
31
|
BillingPortal::Session.object_name => BillingPortal::Session,
|
33
32
|
Capability.object_name => Capability,
|
34
|
-
Capital::FinancingOffer.object_name => Capital::FinancingOffer,
|
35
|
-
Capital::FinancingSummary.object_name => Capital::FinancingSummary,
|
36
|
-
Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
|
37
33
|
Card.object_name => Card,
|
38
34
|
CashBalance.object_name => CashBalance,
|
39
35
|
Charge.object_name => Charge,
|
@@ -60,26 +56,20 @@ module Stripe
|
|
60
56
|
File.object_name => File,
|
61
57
|
FileLink.object_name => FileLink,
|
62
58
|
FinancialConnections::Account.object_name => FinancialConnections::Account,
|
63
|
-
FinancialConnections::AccountInferredBalance.object_name =>
|
64
|
-
FinancialConnections::AccountInferredBalance,
|
65
59
|
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
|
66
60
|
FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
|
67
61
|
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
68
62
|
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
69
63
|
Forwarding::Request.object_name => Forwarding::Request,
|
70
64
|
FundingInstructions.object_name => FundingInstructions,
|
71
|
-
GiftCards::Card.object_name => GiftCards::Card,
|
72
|
-
GiftCards::Transaction.object_name => GiftCards::Transaction,
|
73
65
|
Identity::VerificationReport.object_name => Identity::VerificationReport,
|
74
66
|
Identity::VerificationSession.object_name => Identity::VerificationSession,
|
75
67
|
Invoice.object_name => Invoice,
|
76
68
|
InvoiceItem.object_name => InvoiceItem,
|
77
69
|
InvoiceLineItem.object_name => InvoiceLineItem,
|
78
|
-
InvoicePayment.object_name => InvoicePayment,
|
79
70
|
Issuing::Authorization.object_name => Issuing::Authorization,
|
80
71
|
Issuing::Card.object_name => Issuing::Card,
|
81
72
|
Issuing::Cardholder.object_name => Issuing::Cardholder,
|
82
|
-
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
83
73
|
Issuing::Dispute.object_name => Issuing::Dispute,
|
84
74
|
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
85
75
|
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
@@ -88,8 +78,6 @@ module Stripe
|
|
88
78
|
LineItem.object_name => LineItem,
|
89
79
|
LoginLink.object_name => LoginLink,
|
90
80
|
Mandate.object_name => Mandate,
|
91
|
-
Margin.object_name => Margin,
|
92
|
-
Order.object_name => Order,
|
93
81
|
PaymentIntent.object_name => PaymentIntent,
|
94
82
|
PaymentLink.object_name => PaymentLink,
|
95
83
|
PaymentMethod.object_name => PaymentMethod,
|
@@ -103,9 +91,6 @@ module Stripe
|
|
103
91
|
ProductFeature.object_name => ProductFeature,
|
104
92
|
PromotionCode.object_name => PromotionCode,
|
105
93
|
Quote.object_name => Quote,
|
106
|
-
QuotePhase.object_name => QuotePhase,
|
107
|
-
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
|
108
|
-
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
|
109
94
|
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
110
95
|
Radar::ValueList.object_name => Radar::ValueList,
|
111
96
|
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
@@ -125,7 +110,6 @@ module Stripe
|
|
125
110
|
SubscriptionSchedule.object_name => SubscriptionSchedule,
|
126
111
|
Tax::Calculation.object_name => Tax::Calculation,
|
127
112
|
Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
|
128
|
-
Tax::Form.object_name => Tax::Form,
|
129
113
|
Tax::Registration.object_name => Tax::Registration,
|
130
114
|
Tax::Settings.object_name => Tax::Settings,
|
131
115
|
Tax::Transaction.object_name => Tax::Transaction,
|
@@ -6,9 +6,14 @@ module Stripe
|
|
6
6
|
# properties on the account like its current requirements or if the account is
|
7
7
|
# enabled to make live charges or receive payouts.
|
8
8
|
#
|
9
|
-
# For
|
10
|
-
#
|
11
|
-
#
|
9
|
+
# For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
|
10
|
+
# is `application`, which includes Custom accounts, the properties below are always
|
11
|
+
# returned.
|
12
|
+
#
|
13
|
+
# For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
|
14
|
+
# is `stripe`, which includes Standard and Express accounts, some properties are only returned
|
15
|
+
# until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions)
|
16
|
+
# to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/connect/accounts).
|
12
17
|
class Account < APIResource
|
13
18
|
extend Stripe::APIOperations::Create
|
14
19
|
include Stripe::APIOperations::Delete
|
@@ -39,9 +44,11 @@ module Stripe
|
|
39
44
|
request_stripe_object(method: :post, path: "/v1/accounts", params: params, opts: opts)
|
40
45
|
end
|
41
46
|
|
42
|
-
# With [Connect](https://stripe.com/
|
47
|
+
# With [Connect](https://stripe.com/connect), you can delete accounts you manage.
|
48
|
+
#
|
49
|
+
# Test-mode accounts can be deleted at any time.
|
43
50
|
#
|
44
|
-
#
|
51
|
+
# Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
|
45
52
|
#
|
46
53
|
# If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
|
47
54
|
def self.delete(id, params = {}, opts = {})
|
@@ -53,9 +60,11 @@ module Stripe
|
|
53
60
|
)
|
54
61
|
end
|
55
62
|
|
56
|
-
# With [Connect](https://stripe.com/
|
63
|
+
# With [Connect](https://stripe.com/connect), you can delete accounts you manage.
|
57
64
|
#
|
58
|
-
#
|
65
|
+
# Test-mode accounts can be deleted at any time.
|
66
|
+
#
|
67
|
+
# Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
|
59
68
|
#
|
60
69
|
# If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
|
61
70
|
def delete(params = {}, opts = {})
|
@@ -92,9 +101,9 @@ module Stripe
|
|
92
101
|
)
|
93
102
|
end
|
94
103
|
|
95
|
-
# With [Connect](https://stripe.com/
|
104
|
+
# With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
|
96
105
|
#
|
97
|
-
#
|
106
|
+
# Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
|
98
107
|
def reject(params = {}, opts = {})
|
99
108
|
request_stripe_object(
|
100
109
|
method: :post,
|
@@ -104,9 +113,9 @@ module Stripe
|
|
104
113
|
)
|
105
114
|
end
|
106
115
|
|
107
|
-
# With [Connect](https://stripe.com/
|
116
|
+
# With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
|
108
117
|
#
|
109
|
-
#
|
118
|
+
# Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
|
110
119
|
def self.reject(account, params = {}, opts = {})
|
111
120
|
request_stripe_object(
|
112
121
|
method: :post,
|
@@ -116,12 +125,16 @@ module Stripe
|
|
116
125
|
)
|
117
126
|
end
|
118
127
|
|
119
|
-
# Updates a [connected account](https://stripe.com/
|
128
|
+
# Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
|
120
129
|
# left unchanged.
|
121
130
|
#
|
122
|
-
# For
|
123
|
-
#
|
124
|
-
#
|
131
|
+
# For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
|
132
|
+
# is application, which includes Custom accounts, you can update any information on the account.
|
133
|
+
#
|
134
|
+
# For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
|
135
|
+
# is stripe, which includes Standard and Express accounts, you can update all information until you create
|
136
|
+
# an [Account Link or <a href="/api/account_sessions">Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
|
137
|
+
# after which some properties can no longer be updated.
|
125
138
|
#
|
126
139
|
# To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
|
127
140
|
# [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
|
@@ -4,11 +4,12 @@
|
|
4
4
|
module Stripe
|
5
5
|
# These bank accounts are payment methods on `Customer` objects.
|
6
6
|
#
|
7
|
-
# On the other hand [External Accounts](https://stripe.com/
|
8
|
-
# destinations on `Account` objects for [
|
7
|
+
# On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
|
8
|
+
# destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
|
9
|
+
# is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts).
|
9
10
|
# They can be bank accounts or debit cards as well, and are documented in the links above.
|
10
11
|
#
|
11
|
-
# Related guide: [Bank debits and transfers](https://stripe.com/
|
12
|
+
# Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
|
12
13
|
class BankAccount < APIResource
|
13
14
|
include Stripe::APIOperations::Delete
|
14
15
|
extend Stripe::APIOperations::List
|
@@ -23,10 +23,10 @@ module Stripe
|
|
23
23
|
# `Event` objects directly to an endpoint on your server. You can manage
|
24
24
|
# webhooks in your
|
25
25
|
# [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
|
26
|
-
# to [listen for events](https://stripe.com/
|
26
|
+
# to [listen for events](https://docs.stripe.com/webhooks)
|
27
27
|
# so that your integration can automatically trigger reactions.
|
28
28
|
#
|
29
|
-
# When using [Connect](https://stripe.com/
|
29
|
+
# When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications
|
30
30
|
# that occur in connected accounts. For these events, there's an
|
31
31
|
# additional `account` attribute in the received `Event` object.
|
32
32
|
#
|
@@ -40,7 +40,7 @@ module Stripe
|
|
40
40
|
"event"
|
41
41
|
end
|
42
42
|
|
43
|
-
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/
|
43
|
+
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
|
44
44
|
def self.list(filters = {}, opts = {})
|
45
45
|
request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts)
|
46
46
|
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(
|
@@ -38,7 +38,6 @@ module Stripe
|
|
38
38
|
extend Stripe::APIOperations::Create
|
39
39
|
include Stripe::APIOperations::Delete
|
40
40
|
extend Stripe::APIOperations::List
|
41
|
-
extend Stripe::APIOperations::NestedResource
|
42
41
|
extend Stripe::APIOperations::Search
|
43
42
|
include Stripe::APIOperations::Save
|
44
43
|
|
@@ -47,64 +46,6 @@ module Stripe
|
|
47
46
|
"invoice"
|
48
47
|
end
|
49
48
|
|
50
|
-
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
51
|
-
|
52
|
-
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
|
53
|
-
def add_lines(params = {}, opts = {})
|
54
|
-
request_stripe_object(
|
55
|
-
method: :post,
|
56
|
-
path: format("/v1/invoices/%<invoice>s/add_lines", { invoice: CGI.escape(self["id"]) }),
|
57
|
-
params: params,
|
58
|
-
opts: opts
|
59
|
-
)
|
60
|
-
end
|
61
|
-
|
62
|
-
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
|
63
|
-
def self.add_lines(invoice, params = {}, opts = {})
|
64
|
-
request_stripe_object(
|
65
|
-
method: :post,
|
66
|
-
path: format("/v1/invoices/%<invoice>s/add_lines", { invoice: CGI.escape(invoice) }),
|
67
|
-
params: params,
|
68
|
-
opts: opts
|
69
|
-
)
|
70
|
-
end
|
71
|
-
|
72
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
73
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
74
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
75
|
-
# invoice's status becomes paid.
|
76
|
-
#
|
77
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
78
|
-
# credited to the invoice immediately.
|
79
|
-
#
|
80
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
81
|
-
def attach_payment_intent(params = {}, opts = {})
|
82
|
-
request_stripe_object(
|
83
|
-
method: :post,
|
84
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
|
85
|
-
params: params,
|
86
|
-
opts: opts
|
87
|
-
)
|
88
|
-
end
|
89
|
-
|
90
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
91
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
92
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
93
|
-
# invoice's status becomes paid.
|
94
|
-
#
|
95
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
96
|
-
# credited to the invoice immediately.
|
97
|
-
#
|
98
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
99
|
-
def self.attach_payment_intent(invoice, params = {}, opts = {})
|
100
|
-
request_stripe_object(
|
101
|
-
method: :post,
|
102
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
103
|
-
params: params,
|
104
|
-
opts: opts
|
105
|
-
)
|
106
|
-
end
|
107
|
-
|
108
49
|
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
109
50
|
def self.create(params = {}, opts = {})
|
110
51
|
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|
@@ -115,6 +56,8 @@ module Stripe
|
|
115
56
|
# 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.
|
116
57
|
#
|
117
58
|
# 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 the subscription_details.proration_date parameter when doing the actual subscription update. 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_details.proration_date value passed in the request.
|
59
|
+
#
|
60
|
+
# Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
|
118
61
|
def self.create_preview(params = {}, opts = {})
|
119
62
|
request_stripe_object(
|
120
63
|
method: :post,
|
@@ -219,26 +162,6 @@ module Stripe
|
|
219
162
|
)
|
220
163
|
end
|
221
164
|
|
222
|
-
# Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
|
223
|
-
def remove_lines(params = {}, opts = {})
|
224
|
-
request_stripe_object(
|
225
|
-
method: :post,
|
226
|
-
path: format("/v1/invoices/%<invoice>s/remove_lines", { invoice: CGI.escape(self["id"]) }),
|
227
|
-
params: params,
|
228
|
-
opts: opts
|
229
|
-
)
|
230
|
-
end
|
231
|
-
|
232
|
-
# Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
|
233
|
-
def self.remove_lines(invoice, params = {}, opts = {})
|
234
|
-
request_stripe_object(
|
235
|
-
method: :post,
|
236
|
-
path: format("/v1/invoices/%<invoice>s/remove_lines", { invoice: CGI.escape(invoice) }),
|
237
|
-
params: params,
|
238
|
-
opts: opts
|
239
|
-
)
|
240
|
-
end
|
241
|
-
|
242
165
|
def self.search(params = {}, opts = {})
|
243
166
|
request_stripe_object(method: :get, path: "/v1/invoices/search", params: params, opts: opts)
|
244
167
|
end
|
@@ -275,7 +198,9 @@ module Stripe
|
|
275
198
|
#
|
276
199
|
# 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.
|
277
200
|
#
|
278
|
-
# 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 the
|
201
|
+
# 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 the subscription_details.proration_date parameter when doing the actual subscription update. 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_details.proration_date value passed in the request.
|
202
|
+
#
|
203
|
+
# Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
|
279
204
|
def self.upcoming(params = {}, opts = {})
|
280
205
|
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
|
281
206
|
end
|
@@ -295,26 +220,6 @@ module Stripe
|
|
295
220
|
)
|
296
221
|
end
|
297
222
|
|
298
|
-
# Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
|
299
|
-
def update_lines(params = {}, opts = {})
|
300
|
-
request_stripe_object(
|
301
|
-
method: :post,
|
302
|
-
path: format("/v1/invoices/%<invoice>s/update_lines", { invoice: CGI.escape(self["id"]) }),
|
303
|
-
params: params,
|
304
|
-
opts: opts
|
305
|
-
)
|
306
|
-
end
|
307
|
-
|
308
|
-
# Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
|
309
|
-
def self.update_lines(invoice, params = {}, opts = {})
|
310
|
-
request_stripe_object(
|
311
|
-
method: :post,
|
312
|
-
path: format("/v1/invoices/%<invoice>s/update_lines", { invoice: CGI.escape(invoice) }),
|
313
|
-
params: params,
|
314
|
-
opts: opts
|
315
|
-
)
|
316
|
-
end
|
317
|
-
|
318
223
|
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
319
224
|
#
|
320
225
|
# Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
|
@@ -9,6 +9,7 @@ module Stripe
|
|
9
9
|
#
|
10
10
|
# Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
|
11
11
|
class Authorization < APIResource
|
12
|
+
extend Gem::Deprecate
|
12
13
|
extend Stripe::APIOperations::List
|
13
14
|
include Stripe::APIOperations::Save
|
14
15
|
|
@@ -27,6 +28,7 @@ module Stripe
|
|
27
28
|
opts: opts
|
28
29
|
)
|
29
30
|
end
|
31
|
+
deprecate :approve, :none, 2024, 3
|
30
32
|
|
31
33
|
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
32
34
|
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
@@ -38,6 +40,10 @@ module Stripe
|
|
38
40
|
opts: opts
|
39
41
|
)
|
40
42
|
end
|
43
|
+
class << self
|
44
|
+
extend Gem::Deprecate
|
45
|
+
deprecate :approve, :none, 2024, 3
|
46
|
+
end
|
41
47
|
|
42
48
|
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
43
49
|
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
@@ -49,6 +55,7 @@ module Stripe
|
|
49
55
|
opts: opts
|
50
56
|
)
|
51
57
|
end
|
58
|
+
deprecate :decline, :none, 2024, 3
|
52
59
|
|
53
60
|
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
54
61
|
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
@@ -60,6 +67,10 @@ module Stripe
|
|
60
67
|
opts: opts
|
61
68
|
)
|
62
69
|
end
|
70
|
+
class << self
|
71
|
+
extend Gem::Deprecate
|
72
|
+
deprecate :decline, :none, 2024, 3
|
73
|
+
end
|
63
74
|
|
64
75
|
# Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
65
76
|
def self.list(filters = {}, opts = {})
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
# Login Links are single-use
|
5
|
+
# Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard.
|
6
6
|
class LoginLink < APIResource
|
7
7
|
OBJECT_NAME = "login_link"
|
8
8
|
def self.object_name
|
@@ -176,56 +176,6 @@ module Stripe
|
|
176
176
|
request_stripe_object(method: :post, path: "/v1/payment_intents", params: params, opts: opts)
|
177
177
|
end
|
178
178
|
|
179
|
-
# Perform a decremental authorization on an eligible
|
180
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
181
|
-
# PaymentIntent's status must be requires_capture and
|
182
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
183
|
-
# must be available.
|
184
|
-
#
|
185
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
186
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
187
|
-
#
|
188
|
-
# After decrement, the PaymentIntent object
|
189
|
-
# returns with the updated
|
190
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
191
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
192
|
-
#
|
193
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
194
|
-
# After it's fully captured, a PaymentIntent can no longer be decremented.
|
195
|
-
def decrement_authorization(params = {}, opts = {})
|
196
|
-
request_stripe_object(
|
197
|
-
method: :post,
|
198
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(self["id"]) }),
|
199
|
-
params: params,
|
200
|
-
opts: opts
|
201
|
-
)
|
202
|
-
end
|
203
|
-
|
204
|
-
# Perform a decremental authorization on an eligible
|
205
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
206
|
-
# PaymentIntent's status must be requires_capture and
|
207
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
208
|
-
# must be available.
|
209
|
-
#
|
210
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
211
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
212
|
-
#
|
213
|
-
# After decrement, the PaymentIntent object
|
214
|
-
# returns with the updated
|
215
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
216
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
217
|
-
#
|
218
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
219
|
-
# After it's fully captured, a PaymentIntent can no longer be decremented.
|
220
|
-
def self.decrement_authorization(intent, params = {}, opts = {})
|
221
|
-
request_stripe_object(
|
222
|
-
method: :post,
|
223
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
|
224
|
-
params: params,
|
225
|
-
opts: opts
|
226
|
-
)
|
227
|
-
end
|
228
|
-
|
229
179
|
# Perform an incremental authorization on an eligible
|
230
180
|
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
231
181
|
# PaymentIntent's status must be requires_capture and
|
@@ -4,10 +4,9 @@
|
|
4
4
|
module Stripe
|
5
5
|
# This is an object representing a person associated with a Stripe account.
|
6
6
|
#
|
7
|
-
# A platform cannot access a
|
8
|
-
# See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
|
7
|
+
# A platform cannot access a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
|
9
8
|
#
|
10
|
-
#
|
9
|
+
# See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information).
|
11
10
|
class Person < APIResource
|
12
11
|
include Stripe::APIOperations::Save
|
13
12
|
|