stripe 15.2.1 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -0
- data/CHANGELOG.md +66 -39
- data/OPENAPI_VERSION +1 -1
- data/README.md +14 -50
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/resources/account.rb +89 -5
- data/lib/stripe/resources/account_session.rb +79 -79
- data/lib/stripe/resources/billing_portal/session.rb +2 -2
- data/lib/stripe/resources/charge.rb +28 -15
- data/lib/stripe/resources/checkout/session.rb +57 -7
- data/lib/stripe/resources/confirmation_token.rb +19 -11
- data/lib/stripe/resources/credit_note.rb +9 -9
- data/lib/stripe/resources/customer_session.rb +2 -2
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/identity/verification_session.rb +34 -0
- data/lib/stripe/resources/invoice.rb +29 -4
- data/lib/stripe/resources/invoice_item.rb +1 -4
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +331 -12
- data/lib/stripe/resources/payment_method.rb +17 -9
- data/lib/stripe/resources/quote.rb +26 -3
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +285 -3
- data/lib/stripe/resources/subscription.rb +68 -6
- data/lib/stripe/resources/subscription_schedule.rb +22 -0
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +152 -4
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/services/account_service.rb +83 -5
- data/lib/stripe/services/account_session_service.rb +48 -48
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/checkout/session_service.rb +57 -7
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -6
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +16 -0
- data/lib/stripe/services/invoice_service.rb +29 -4
- data/lib/stripe/services/payment_intent_service.rb +315 -9
- data/lib/stripe/services/payment_method_service.rb +5 -0
- data/lib/stripe/services/quote_service.rb +20 -3
- data/lib/stripe/services/setup_intent_service.rb +275 -2
- data/lib/stripe/services/subscription_schedule_service.rb +13 -0
- data/lib/stripe/services/subscription_service.rb +48 -4
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/terminal/reader_service.rb +90 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe/resources/account.rbi +78 -9
- data/rbi/stripe/resources/account_session.rbi +79 -79
- data/rbi/stripe/resources/billing_portal/session.rbi +2 -2
- data/rbi/stripe/resources/charge.rbi +32 -15
- data/rbi/stripe/resources/checkout/session.rbi +65 -9
- data/rbi/stripe/resources/confirmation_token.rbi +23 -12
- data/rbi/stripe/resources/credit_note.rbi +9 -9
- data/rbi/stripe/resources/customer_session.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +1 -1
- data/rbi/stripe/resources/identity/verification_session.rbi +39 -1
- data/rbi/stripe/resources/invoice.rbi +36 -6
- data/rbi/stripe/resources/invoice_item.rbi +1 -4
- data/rbi/stripe/resources/mandate.rbi +4 -0
- data/rbi/stripe/resources/payment_intent.rbi +361 -21
- data/rbi/stripe/resources/payment_method.rbi +19 -10
- data/rbi/stripe/resources/quote.rbi +22 -3
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +332 -9
- data/rbi/stripe/resources/subscription.rbi +60 -7
- data/rbi/stripe/resources/subscription_schedule.rbi +23 -1
- data/rbi/stripe/resources/tax/registration.rbi +20 -1
- data/rbi/stripe/resources/terminal/configuration.rbi +1 -0
- data/rbi/stripe/resources/terminal/location.rbi +2 -2
- data/rbi/stripe/resources/terminal/reader.rbi +151 -4
- data/rbi/stripe/resources/token.rbi +1 -1
- data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
- data/rbi/stripe/services/account_service.rbi +77 -9
- data/rbi/stripe/services/account_session_service.rbi +48 -48
- data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
- data/rbi/stripe/services/checkout/session_service.rbi +65 -9
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
- data/rbi/stripe/services/credit_note_service.rbi +6 -6
- data/rbi/stripe/services/customer_session_service.rbi +1 -1
- data/rbi/stripe/services/identity/verification_session_service.rbi +17 -1
- data/rbi/stripe/services/invoice_service.rbi +36 -6
- data/rbi/stripe/services/payment_intent_service.rbi +348 -18
- data/rbi/stripe/services/payment_method_service.rbi +6 -1
- data/rbi/stripe/services/quote_service.rbi +16 -3
- data/rbi/stripe/services/setup_intent_service.rbi +326 -8
- data/rbi/stripe/services/subscription_schedule_service.rbi +12 -1
- data/rbi/stripe/services/subscription_service.rbi +41 -5
- data/rbi/stripe/services/tax/registration_service.rbi +14 -1
- data/rbi/stripe/services/terminal/location_service.rbi +2 -2
- data/rbi/stripe/services/terminal/reader_service.rbi +85 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +9 -2
- data/rbi/stripe/services/token_service.rbi +1 -1
- data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
- data/rbi/stripe/services/v2/billing_service.rbi +1 -1
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +13 -13
- metadata +3 -2
@@ -141,7 +141,7 @@ module Stripe
|
|
141
141
|
@shipping_rate = shipping_rate
|
142
142
|
end
|
143
143
|
end
|
144
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
144
|
+
# The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
145
145
|
attr_accessor :amount
|
146
146
|
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
|
147
147
|
attr_accessor :credit_amount
|
@@ -153,7 +153,7 @@ module Stripe
|
|
153
153
|
attr_accessor :expand
|
154
154
|
# ID of the invoice.
|
155
155
|
attr_accessor :invoice
|
156
|
-
# Line items that make up the credit note.
|
156
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
157
157
|
attr_accessor :lines
|
158
158
|
# The credit note's memo appears on the credit note PDF.
|
159
159
|
attr_accessor :memo
|
@@ -167,7 +167,7 @@ module Stripe
|
|
167
167
|
attr_accessor :refund_amount
|
168
168
|
# Refunds to link to this credit note.
|
169
169
|
attr_accessor :refunds
|
170
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
170
|
+
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
171
171
|
attr_accessor :shipping_cost
|
172
172
|
|
173
173
|
def initialize(
|
@@ -305,7 +305,7 @@ module Stripe
|
|
305
305
|
@shipping_rate = shipping_rate
|
306
306
|
end
|
307
307
|
end
|
308
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
308
|
+
# The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
309
309
|
attr_accessor :amount
|
310
310
|
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
|
311
311
|
attr_accessor :credit_amount
|
@@ -317,7 +317,7 @@ module Stripe
|
|
317
317
|
attr_accessor :expand
|
318
318
|
# ID of the invoice.
|
319
319
|
attr_accessor :invoice
|
320
|
-
# Line items that make up the credit note.
|
320
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
321
321
|
attr_accessor :lines
|
322
322
|
# The credit note's memo appears on the credit note PDF.
|
323
323
|
attr_accessor :memo
|
@@ -331,7 +331,7 @@ module Stripe
|
|
331
331
|
attr_accessor :refund_amount
|
332
332
|
# Refunds to link to this credit note.
|
333
333
|
attr_accessor :refunds
|
334
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
334
|
+
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
335
335
|
attr_accessor :shipping_cost
|
336
336
|
|
337
337
|
def initialize(
|
@@ -22,7 +22,7 @@ module Stripe
|
|
22
22
|
attr_accessor :payment_method_allow_redisplay_filters
|
23
23
|
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
24
24
|
attr_accessor :payment_method_redisplay
|
25
|
-
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
25
|
+
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`.
|
26
26
|
attr_accessor :payment_method_redisplay_limit
|
27
27
|
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
28
28
|
#
|
@@ -103,6 +103,18 @@ module Stripe
|
|
103
103
|
@phone = phone
|
104
104
|
end
|
105
105
|
end
|
106
|
+
|
107
|
+
class RelatedPerson < Stripe::RequestParams
|
108
|
+
# A token representing a connected account. If provided, the person parameter is also required and must be associated with the account.
|
109
|
+
attr_accessor :account
|
110
|
+
# A token referencing a Person resource that this verification is being used to verify.
|
111
|
+
attr_accessor :person
|
112
|
+
|
113
|
+
def initialize(account: nil, person: nil)
|
114
|
+
@account = account
|
115
|
+
@person = person
|
116
|
+
end
|
117
|
+
end
|
106
118
|
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
107
119
|
attr_accessor :client_reference_id
|
108
120
|
# Specifies which fields in the response should be expanded.
|
@@ -115,6 +127,8 @@ module Stripe
|
|
115
127
|
attr_accessor :provided_details
|
116
128
|
# Customer ID
|
117
129
|
attr_accessor :related_customer
|
130
|
+
# Tokens referencing a Person resource and it's associated account.
|
131
|
+
attr_accessor :related_person
|
118
132
|
# The URL that the user will be redirected to upon completing the verification flow.
|
119
133
|
attr_accessor :return_url
|
120
134
|
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
|
@@ -129,6 +143,7 @@ module Stripe
|
|
129
143
|
options: nil,
|
130
144
|
provided_details: nil,
|
131
145
|
related_customer: nil,
|
146
|
+
related_person: nil,
|
132
147
|
return_url: nil,
|
133
148
|
type: nil,
|
134
149
|
verification_flow: nil
|
@@ -139,6 +154,7 @@ module Stripe
|
|
139
154
|
@options = options
|
140
155
|
@provided_details = provided_details
|
141
156
|
@related_customer = related_customer
|
157
|
+
@related_person = related_person
|
142
158
|
@return_url = return_url
|
143
159
|
@type = type
|
144
160
|
@verification_flow = verification_flow
|
@@ -123,7 +123,7 @@ module Stripe
|
|
123
123
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
124
124
|
# One of `month`.
|
125
125
|
attr_accessor :interval
|
126
|
-
# Type of installment plan, one of `fixed_count`.
|
126
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
127
127
|
attr_accessor :type
|
128
128
|
|
129
129
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -770,7 +770,7 @@ module Stripe
|
|
770
770
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
771
771
|
# One of `month`.
|
772
772
|
attr_accessor :interval
|
773
|
-
# Type of installment plan, one of `fixed_count`.
|
773
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
774
774
|
attr_accessor :type
|
775
775
|
|
776
776
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -2110,6 +2110,15 @@ module Stripe
|
|
2110
2110
|
end
|
2111
2111
|
|
2112
2112
|
class ScheduleDetails < Stripe::RequestParams
|
2113
|
+
class BillingMode < Stripe::RequestParams
|
2114
|
+
# Attribute for param field type
|
2115
|
+
attr_accessor :type
|
2116
|
+
|
2117
|
+
def initialize(type: nil)
|
2118
|
+
@type = type
|
2119
|
+
end
|
2120
|
+
end
|
2121
|
+
|
2113
2122
|
class Phase < Stripe::RequestParams
|
2114
2123
|
class AddInvoiceItem < Stripe::RequestParams
|
2115
2124
|
class Discount < Stripe::RequestParams
|
@@ -2463,6 +2472,8 @@ module Stripe
|
|
2463
2472
|
@trial_end = trial_end
|
2464
2473
|
end
|
2465
2474
|
end
|
2475
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2476
|
+
attr_accessor :billing_mode
|
2466
2477
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
2467
2478
|
attr_accessor :end_behavior
|
2468
2479
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
@@ -2470,7 +2481,8 @@ module Stripe
|
|
2470
2481
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2471
2482
|
attr_accessor :proration_behavior
|
2472
2483
|
|
2473
|
-
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
2484
|
+
def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
|
2485
|
+
@billing_mode = billing_mode
|
2474
2486
|
@end_behavior = end_behavior
|
2475
2487
|
@phases = phases
|
2476
2488
|
@proration_behavior = proration_behavior
|
@@ -2478,6 +2490,15 @@ module Stripe
|
|
2478
2490
|
end
|
2479
2491
|
|
2480
2492
|
class SubscriptionDetails < Stripe::RequestParams
|
2493
|
+
class BillingMode < Stripe::RequestParams
|
2494
|
+
# Attribute for param field type
|
2495
|
+
attr_accessor :type
|
2496
|
+
|
2497
|
+
def initialize(type: nil)
|
2498
|
+
@type = type
|
2499
|
+
end
|
2500
|
+
end
|
2501
|
+
|
2481
2502
|
class Item < Stripe::RequestParams
|
2482
2503
|
class BillingThresholds < Stripe::RequestParams
|
2483
2504
|
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
@@ -2595,9 +2616,11 @@ module Stripe
|
|
2595
2616
|
end
|
2596
2617
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
2597
2618
|
attr_accessor :billing_cycle_anchor
|
2619
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2620
|
+
attr_accessor :billing_mode
|
2598
2621
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
2599
2622
|
attr_accessor :cancel_at
|
2600
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2623
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2601
2624
|
attr_accessor :cancel_at_period_end
|
2602
2625
|
# This simulates the subscription being canceled or expired immediately.
|
2603
2626
|
attr_accessor :cancel_now
|
@@ -2618,6 +2641,7 @@ module Stripe
|
|
2618
2641
|
|
2619
2642
|
def initialize(
|
2620
2643
|
billing_cycle_anchor: nil,
|
2644
|
+
billing_mode: nil,
|
2621
2645
|
cancel_at: nil,
|
2622
2646
|
cancel_at_period_end: nil,
|
2623
2647
|
cancel_now: nil,
|
@@ -2630,6 +2654,7 @@ module Stripe
|
|
2630
2654
|
trial_end: nil
|
2631
2655
|
)
|
2632
2656
|
@billing_cycle_anchor = billing_cycle_anchor
|
2657
|
+
@billing_mode = billing_mode
|
2633
2658
|
@cancel_at = cancel_at
|
2634
2659
|
@cancel_at_period_end = cancel_at_period_end
|
2635
2660
|
@cancel_now = cancel_now
|