stripe 15.0.0 → 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 +129 -44
- data/CONTRIBUTING.md +25 -0
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +28 -55
- data/VERSION +1 -1
- data/lib/stripe/api_operations/nested_resource.rb +35 -35
- data/lib/stripe/api_requestor.rb +1 -1
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/connection_manager.rb +1 -3
- data/lib/stripe/event_types.rb +1 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
- data/lib/stripe/oauth.rb +1 -1
- data/lib/stripe/resources/account.rb +198 -28
- data/lib/stripe/resources/account_session.rb +176 -72
- data/lib/stripe/resources/apple_pay_domain.rb +1 -2
- data/lib/stripe/resources/balance.rb +42 -0
- data/lib/stripe/resources/balance_transaction.rb +2 -0
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing_portal/session.rb +3 -3
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/charge.rb +43 -20
- data/lib/stripe/resources/checkout/session.rb +120 -19
- data/lib/stripe/resources/confirmation_token.rb +119 -100
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +2 -3
- data/lib/stripe/resources/credit_note.rb +21 -18
- data/lib/stripe/resources/customer.rb +4 -6
- data/lib/stripe/resources/customer_session.rb +5 -5
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +3 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/funding_instructions.rb +1 -1
- data/lib/stripe/resources/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +51 -11
- data/lib/stripe/resources/invoice.rb +146 -32
- data/lib/stripe/resources/invoice_item.rb +3 -7
- data/lib/stripe/resources/invoice_line_item.rb +1 -1
- data/lib/stripe/resources/invoice_payment.rb +9 -2
- data/lib/stripe/resources/issuing/authorization.rb +8 -8
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/issuing/dispute.rb +3 -3
- data/lib/stripe/resources/login_link.rb +2 -1
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +602 -325
- data/lib/stripe/resources/payment_method.rb +76 -117
- data/lib/stripe/resources/payment_method_configuration.rb +356 -2
- data/lib/stripe/resources/payment_method_domain.rb +15 -2
- data/lib/stripe/resources/payout.rb +4 -4
- data/lib/stripe/resources/person.rb +27 -3
- data/lib/stripe/resources/plan.rb +2 -3
- data/lib/stripe/resources/price.rb +1 -1
- data/lib/stripe/resources/product.rb +1 -2
- data/lib/stripe/resources/quote.rb +28 -3
- data/lib/stripe/resources/radar/value_list.rb +1 -2
- data/lib/stripe/resources/radar/value_list_item.rb +1 -2
- data/lib/stripe/resources/refund.rb +8 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +414 -293
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +149 -27
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +141 -4
- data/lib/stripe/resources/tax/calculation.rb +6 -2
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +261 -1
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +3 -4
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +2 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +426 -6
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +63 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/resources/v2/event.rb +2 -2
- data/lib/stripe/resources/v2/event_destination.rb +2 -2
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/services/account_external_account_service.rb +3 -4
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +85 -2
- data/lib/stripe/services/account_service.rb +169 -20
- data/lib/stripe/services/account_session_service.rb +115 -47
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/application_fee_service.rb +1 -1
- data/lib/stripe/services/apps_service.rb +1 -1
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/billing_portal_service.rb +1 -1
- data/lib/stripe/services/billing_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +4 -4
- data/lib/stripe/services/checkout/session_service.rb +94 -15
- data/lib/stripe/services/checkout_service.rb +1 -1
- data/lib/stripe/services/climate_service.rb +1 -1
- data/lib/stripe/services/coupon_service.rb +1 -2
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +14 -15
- data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/customer_payment_method_service.rb +1 -1
- data/lib/stripe/services/customer_payment_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +5 -7
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/customer_tax_id_service.rb +2 -3
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/entitlements_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +1 -1
- data/lib/stripe/services/financial_connections_service.rb +1 -1
- data/lib/stripe/services/forwarding_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +21 -5
- data/lib/stripe/services/identity_service.rb +1 -1
- data/lib/stripe/services/invoice_item_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +122 -28
- data/lib/stripe/services/issuing/authorization_service.rb +4 -4
- data/lib/stripe/services/issuing/card_service.rb +1 -1
- data/lib/stripe/services/issuing/dispute_service.rb +2 -2
- data/lib/stripe/services/issuing_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +563 -313
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +59 -105
- data/lib/stripe/services/payout_service.rb +2 -2
- data/lib/stripe/services/plan_service.rb +2 -3
- data/lib/stripe/services/price_service.rb +2 -2
- data/lib/stripe/services/product_feature_service.rb +1 -2
- data/lib/stripe/services/product_service.rb +3 -4
- data/lib/stripe/services/promotion_code_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +21 -4
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
- data/lib/stripe/services/radar/value_list_service.rb +1 -2
- data/lib/stripe/services/radar_service.rb +1 -1
- data/lib/stripe/services/reporting_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +403 -291
- data/lib/stripe/services/sigma_service.rb +1 -1
- data/lib/stripe/services/source_service.rb +2 -2
- data/lib/stripe/services/subscription_item_service.rb +26 -0
- data/lib/stripe/services/subscription_schedule_service.rb +106 -3
- data/lib/stripe/services/subscription_service.rb +121 -26
- data/lib/stripe/services/tax/calculation_service.rb +6 -2
- data/lib/stripe/services/tax/registration_service.rb +170 -1
- data/lib/stripe/services/tax/transaction_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +2 -3
- data/lib/stripe/services/tax_service.rb +1 -1
- data/lib/stripe/services/terminal/configuration_service.rb +1 -2
- data/lib/stripe/services/terminal/location_service.rb +2 -3
- data/lib/stripe/services/terminal/reader_service.rb +196 -2
- data/lib/stripe/services/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
- data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
- data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
- data/lib/stripe/services/test_helpers_service.rb +1 -1
- data/lib/stripe/services/token_service.rb +62 -1
- data/lib/stripe/services/transfer_service.rb +2 -2
- data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
- data/lib/stripe/services/treasury_service.rb +1 -1
- data/lib/stripe/services/v1_services.rb +1 -1
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/billing_service.rb +3 -3
- data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/v2/core_service.rb +1 -1
- data/lib/stripe/services/v2_services.rb +1 -1
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/rbi/stripe/resources/account.rbi +190 -35
- data/rbi/stripe/resources/account_session.rbi +196 -77
- data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
- data/rbi/stripe/resources/balance.rbi +55 -0
- data/rbi/stripe/resources/balance_transaction.rbi +3 -0
- data/rbi/stripe/resources/bank_account.rbi +2 -2
- data/rbi/stripe/resources/billing/alert.rbi +2 -2
- data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
- data/rbi/stripe/resources/capability.rbi +1 -1
- data/rbi/stripe/resources/charge.rbi +52 -20
- data/rbi/stripe/resources/checkout/session.rbi +133 -24
- data/rbi/stripe/resources/confirmation_token.rbi +140 -115
- data/rbi/stripe/resources/country_spec.rbi +1 -1
- data/rbi/stripe/resources/coupon.rbi +2 -4
- data/rbi/stripe/resources/credit_note.rbi +23 -18
- data/rbi/stripe/resources/customer.rbi +4 -8
- data/rbi/stripe/resources/customer_session.rbi +5 -5
- data/rbi/stripe/resources/dispute.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +4 -1
- data/rbi/stripe/resources/file.rbi +1 -1
- data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
- data/rbi/stripe/resources/invoice.rbi +149 -40
- data/rbi/stripe/resources/invoice_item.rbi +3 -8
- data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
- data/rbi/stripe/resources/invoice_payment.rbi +9 -2
- data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
- data/rbi/stripe/resources/issuing/card.rbi +1 -1
- data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
- data/rbi/stripe/resources/login_link.rbi +2 -1
- data/rbi/stripe/resources/mandate.rbi +4 -0
- data/rbi/stripe/resources/payment_intent.rbi +637 -381
- data/rbi/stripe/resources/payment_method.rbi +81 -133
- data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
- data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
- data/rbi/stripe/resources/payout.rbi +4 -4
- data/rbi/stripe/resources/person.rbi +33 -3
- data/rbi/stripe/resources/plan.rbi +2 -4
- data/rbi/stripe/resources/price.rbi +1 -1
- data/rbi/stripe/resources/product.rbi +1 -3
- data/rbi/stripe/resources/quote.rbi +25 -3
- data/rbi/stripe/resources/radar/value_list.rbi +1 -3
- data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
- data/rbi/stripe/resources/refund.rbi +8 -1
- data/rbi/stripe/resources/reversal.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +1 -1
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +464 -346
- data/rbi/stripe/resources/source.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +150 -34
- data/rbi/stripe/resources/subscription_item.rbi +36 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
- data/rbi/stripe/resources/tax/calculation.rbi +7 -3
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
- data/rbi/stripe/resources/tax/registration.rbi +249 -2
- data/rbi/stripe/resources/tax/transaction.rbi +1 -1
- data/rbi/stripe/resources/tax_id.rbi +3 -5
- data/rbi/stripe/resources/tax_rate.rbi +2 -2
- data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
- data/rbi/stripe/resources/terminal/location.rbi +4 -6
- data/rbi/stripe/resources/terminal/reader.rbi +415 -8
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
- data/rbi/stripe/resources/token.rbi +70 -4
- data/rbi/stripe/resources/transfer.rbi +1 -1
- data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
- data/rbi/stripe/resources/v2/event.rbi +3 -3
- data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
- data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
- data/rbi/stripe/services/account_external_account_service.rbi +3 -5
- data/rbi/stripe/services/account_login_link_service.rbi +1 -1
- data/rbi/stripe/services/account_person_service.rbi +93 -5
- data/rbi/stripe/services/account_service.rbi +166 -28
- data/rbi/stripe/services/account_session_service.rbi +126 -52
- data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
- data/rbi/stripe/services/balance_service.rbi +1 -1
- data/rbi/stripe/services/billing/alert_service.rbi +2 -2
- data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
- data/rbi/stripe/services/charge_service.rbi +4 -4
- data/rbi/stripe/services/checkout/session_service.rbi +104 -19
- data/rbi/stripe/services/coupon_service.rbi +1 -3
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
- data/rbi/stripe/services/credit_note_service.rbi +13 -14
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
- data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
- data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
- data/rbi/stripe/services/customer_service.rbi +4 -8
- data/rbi/stripe/services/customer_session_service.rbi +1 -1
- data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
- data/rbi/stripe/services/dispute_service.rbi +1 -1
- data/rbi/stripe/services/file_service.rbi +1 -1
- data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
- data/rbi/stripe/services/invoice_item_service.rbi +1 -3
- data/rbi/stripe/services/invoice_service.rbi +126 -35
- data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
- data/rbi/stripe/services/issuing/card_service.rbi +1 -1
- data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +599 -369
- data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
- data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
- data/rbi/stripe/services/payment_method_service.rbi +62 -121
- data/rbi/stripe/services/payout_service.rbi +2 -2
- data/rbi/stripe/services/plan_service.rbi +2 -4
- data/rbi/stripe/services/price_service.rbi +2 -2
- data/rbi/stripe/services/product_feature_service.rbi +1 -3
- data/rbi/stripe/services/product_service.rbi +2 -4
- data/rbi/stripe/services/promotion_code_service.rbi +1 -1
- data/rbi/stripe/services/quote_service.rbi +16 -3
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
- data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
- data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
- data/rbi/stripe/services/setup_intent_service.rbi +457 -344
- data/rbi/stripe/services/source_service.rbi +1 -1
- data/rbi/stripe/services/subscription_item_service.rbi +28 -2
- data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
- data/rbi/stripe/services/subscription_service.rbi +121 -33
- data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
- data/rbi/stripe/services/tax/registration_service.rbi +171 -2
- data/rbi/stripe/services/tax_id_service.rbi +2 -4
- data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
- data/rbi/stripe/services/terminal/location_service.rbi +4 -6
- data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
- data/rbi/stripe/services/token_service.rbi +71 -3
- data/rbi/stripe/services/transfer_service.rbi +1 -1
- data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
- data/rbi/stripe/services/v2/billing_service.rbi +1 -1
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
- data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
- data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
- metadata +5 -2
@@ -4,9 +4,7 @@
|
|
4
4
|
# typed: true
|
5
5
|
module Stripe
|
6
6
|
class InvoiceItemService < StripeService
|
7
|
-
class DeleteParams < Stripe::RequestParams
|
8
|
-
|
9
|
-
end
|
7
|
+
class DeleteParams < Stripe::RequestParams; end
|
10
8
|
class RetrieveParams < Stripe::RequestParams
|
11
9
|
# Specifies which fields in the response should be expanded.
|
12
10
|
sig { returns(T.nilable(T::Array[String])) }
|
@@ -5,9 +5,7 @@
|
|
5
5
|
module Stripe
|
6
6
|
class InvoiceService < StripeService
|
7
7
|
attr_reader :line_items
|
8
|
-
class DeleteParams < Stripe::RequestParams
|
9
|
-
|
10
|
-
end
|
8
|
+
class DeleteParams < Stripe::RequestParams; end
|
11
9
|
class RetrieveParams < Stripe::RequestParams
|
12
10
|
# Specifies which fields in the response should be expanded.
|
13
11
|
sig { returns(T.nilable(T::Array[String])) }
|
@@ -113,7 +111,7 @@ module Stripe
|
|
113
111
|
# One of `month`.
|
114
112
|
sig { returns(T.nilable(String)) }
|
115
113
|
attr_accessor :interval
|
116
|
-
# Type of installment plan, one of `fixed_count`.
|
114
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
117
115
|
sig { returns(String) }
|
118
116
|
attr_accessor :type
|
119
117
|
sig {
|
@@ -185,12 +183,8 @@ module Stripe
|
|
185
183
|
}
|
186
184
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
187
185
|
end
|
188
|
-
class Konbini < Stripe::RequestParams
|
189
|
-
|
190
|
-
end
|
191
|
-
class SepaDebit < Stripe::RequestParams
|
192
|
-
|
193
|
-
end
|
186
|
+
class Konbini < Stripe::RequestParams; end
|
187
|
+
class SepaDebit < Stripe::RequestParams; end
|
194
188
|
class UsBankAccount < Stripe::RequestParams
|
195
189
|
class FinancialConnections < Stripe::RequestParams
|
196
190
|
class Filters < Stripe::RequestParams
|
@@ -811,7 +805,7 @@ module Stripe
|
|
811
805
|
# One of `month`.
|
812
806
|
sig { returns(T.nilable(String)) }
|
813
807
|
attr_accessor :interval
|
814
|
-
# Type of installment plan, one of `fixed_count`.
|
808
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
815
809
|
sig { returns(String) }
|
816
810
|
attr_accessor :type
|
817
811
|
sig {
|
@@ -883,12 +877,8 @@ module Stripe
|
|
883
877
|
}
|
884
878
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
885
879
|
end
|
886
|
-
class Konbini < Stripe::RequestParams
|
887
|
-
|
888
|
-
end
|
889
|
-
class SepaDebit < Stripe::RequestParams
|
890
|
-
|
891
|
-
end
|
880
|
+
class Konbini < Stripe::RequestParams; end
|
881
|
+
class SepaDebit < Stripe::RequestParams; end
|
892
882
|
class UsBankAccount < Stripe::RequestParams
|
893
883
|
class FinancialConnections < Stripe::RequestParams
|
894
884
|
class Filters < Stripe::RequestParams
|
@@ -1584,6 +1574,16 @@ module Stripe
|
|
1584
1574
|
}
|
1585
1575
|
def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
|
1586
1576
|
end
|
1577
|
+
class AttachPaymentParams < Stripe::RequestParams
|
1578
|
+
# Specifies which fields in the response should be expanded.
|
1579
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1580
|
+
attr_accessor :expand
|
1581
|
+
# The ID of the PaymentIntent to attach to the invoice.
|
1582
|
+
sig { returns(T.nilable(String)) }
|
1583
|
+
attr_accessor :payment_intent
|
1584
|
+
sig { params(expand: T.nilable(T::Array[String]), payment_intent: T.nilable(String)).void }
|
1585
|
+
def initialize(expand: nil, payment_intent: nil); end
|
1586
|
+
end
|
1587
1587
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
1588
1588
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
1589
1589
|
sig { returns(T.nilable(T::Boolean)) }
|
@@ -2024,7 +2024,7 @@ module Stripe
|
|
2024
2024
|
def initialize(ip_address: nil); end
|
2025
2025
|
end
|
2026
2026
|
class TaxId < Stripe::RequestParams
|
2027
|
-
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
2027
|
+
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
2028
2028
|
sig { returns(String) }
|
2029
2029
|
attr_accessor :type
|
2030
2030
|
# Value of the tax ID.
|
@@ -2216,6 +2216,13 @@ module Stripe
|
|
2216
2216
|
def initialize(account: nil, type: nil); end
|
2217
2217
|
end
|
2218
2218
|
class ScheduleDetails < Stripe::RequestParams
|
2219
|
+
class BillingMode < Stripe::RequestParams
|
2220
|
+
# Attribute for param field type
|
2221
|
+
sig { returns(String) }
|
2222
|
+
attr_accessor :type
|
2223
|
+
sig { params(type: String).void }
|
2224
|
+
def initialize(type: nil); end
|
2225
|
+
end
|
2219
2226
|
class Phase < Stripe::RequestParams
|
2220
2227
|
class AddInvoiceItem < Stripe::RequestParams
|
2221
2228
|
class Discount < Stripe::RequestParams
|
@@ -2314,6 +2321,18 @@ module Stripe
|
|
2314
2321
|
}
|
2315
2322
|
def initialize(enabled: nil, liability: nil); end
|
2316
2323
|
end
|
2324
|
+
class BillingThresholds < Stripe::RequestParams
|
2325
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
2326
|
+
sig { returns(T.nilable(Integer)) }
|
2327
|
+
attr_accessor :amount_gte
|
2328
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
2329
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2330
|
+
attr_accessor :reset_billing_cycle_anchor
|
2331
|
+
sig {
|
2332
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
2333
|
+
}
|
2334
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
2335
|
+
end
|
2317
2336
|
class Discount < Stripe::RequestParams
|
2318
2337
|
# ID of the coupon to create a new discount for.
|
2319
2338
|
sig { returns(T.nilable(String)) }
|
@@ -2357,6 +2376,13 @@ module Stripe
|
|
2357
2376
|
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
|
2358
2377
|
end
|
2359
2378
|
class Item < Stripe::RequestParams
|
2379
|
+
class BillingThresholds < Stripe::RequestParams
|
2380
|
+
# 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))
|
2381
|
+
sig { returns(Integer) }
|
2382
|
+
attr_accessor :usage_gte
|
2383
|
+
sig { params(usage_gte: Integer).void }
|
2384
|
+
def initialize(usage_gte: nil); end
|
2385
|
+
end
|
2360
2386
|
class Discount < Stripe::RequestParams
|
2361
2387
|
# ID of the coupon to create a new discount for.
|
2362
2388
|
sig { returns(T.nilable(String)) }
|
@@ -2415,6 +2441,11 @@ module Stripe
|
|
2415
2441
|
unit_amount_decimal: nil
|
2416
2442
|
); end
|
2417
2443
|
end
|
2444
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2445
|
+
sig {
|
2446
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds))))
|
2447
|
+
}
|
2448
|
+
attr_accessor :billing_thresholds
|
2418
2449
|
# The coupons to redeem into discounts for the subscription item.
|
2419
2450
|
sig {
|
2420
2451
|
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
|
@@ -2441,9 +2472,10 @@ module Stripe
|
|
2441
2472
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2442
2473
|
attr_accessor :tax_rates
|
2443
2474
|
sig {
|
2444
|
-
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2475
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2445
2476
|
}
|
2446
2477
|
def initialize(
|
2478
|
+
billing_thresholds: nil,
|
2447
2479
|
discounts: nil,
|
2448
2480
|
metadata: nil,
|
2449
2481
|
plan: nil,
|
@@ -2479,6 +2511,11 @@ module Stripe
|
|
2479
2511
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
2480
2512
|
sig { returns(T.nilable(String)) }
|
2481
2513
|
attr_accessor :billing_cycle_anchor
|
2514
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2515
|
+
sig {
|
2516
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds))))
|
2517
|
+
}
|
2518
|
+
attr_accessor :billing_thresholds
|
2482
2519
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
2483
2520
|
sig { returns(T.nilable(String)) }
|
2484
2521
|
attr_accessor :collection_method
|
@@ -2521,7 +2558,7 @@ module Stripe
|
|
2521
2558
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2522
2559
|
sig { returns(T.nilable(String)) }
|
2523
2560
|
attr_accessor :on_behalf_of
|
2524
|
-
#
|
2561
|
+
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
2525
2562
|
sig { returns(T.nilable(String)) }
|
2526
2563
|
attr_accessor :proration_behavior
|
2527
2564
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2539,13 +2576,14 @@ module Stripe
|
|
2539
2576
|
sig { returns(T.nilable(T.any(Integer, String))) }
|
2540
2577
|
attr_accessor :trial_end
|
2541
2578
|
sig {
|
2542
|
-
params(add_invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
2579
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
2543
2580
|
}
|
2544
2581
|
def initialize(
|
2545
2582
|
add_invoice_items: nil,
|
2546
2583
|
application_fee_percent: nil,
|
2547
2584
|
automatic_tax: nil,
|
2548
2585
|
billing_cycle_anchor: nil,
|
2586
|
+
billing_thresholds: nil,
|
2549
2587
|
collection_method: nil,
|
2550
2588
|
currency: nil,
|
2551
2589
|
default_payment_method: nil,
|
@@ -2565,6 +2603,11 @@ module Stripe
|
|
2565
2603
|
trial_end: nil
|
2566
2604
|
); end
|
2567
2605
|
end
|
2606
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2607
|
+
sig {
|
2608
|
+
returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode))
|
2609
|
+
}
|
2610
|
+
attr_accessor :billing_mode
|
2568
2611
|
# 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.
|
2569
2612
|
sig { returns(T.nilable(String)) }
|
2570
2613
|
attr_accessor :end_behavior
|
@@ -2577,12 +2620,31 @@ module Stripe
|
|
2577
2620
|
sig { returns(T.nilable(String)) }
|
2578
2621
|
attr_accessor :proration_behavior
|
2579
2622
|
sig {
|
2580
|
-
params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
|
2623
|
+
params(billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
|
2581
2624
|
}
|
2582
|
-
def initialize(
|
2625
|
+
def initialize(
|
2626
|
+
billing_mode: nil,
|
2627
|
+
end_behavior: nil,
|
2628
|
+
phases: nil,
|
2629
|
+
proration_behavior: nil
|
2630
|
+
); end
|
2583
2631
|
end
|
2584
2632
|
class SubscriptionDetails < Stripe::RequestParams
|
2633
|
+
class BillingMode < Stripe::RequestParams
|
2634
|
+
# Attribute for param field type
|
2635
|
+
sig { returns(String) }
|
2636
|
+
attr_accessor :type
|
2637
|
+
sig { params(type: String).void }
|
2638
|
+
def initialize(type: nil); end
|
2639
|
+
end
|
2585
2640
|
class Item < Stripe::RequestParams
|
2641
|
+
class BillingThresholds < Stripe::RequestParams
|
2642
|
+
# 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))
|
2643
|
+
sig { returns(Integer) }
|
2644
|
+
attr_accessor :usage_gte
|
2645
|
+
sig { params(usage_gte: Integer).void }
|
2646
|
+
def initialize(usage_gte: nil); end
|
2647
|
+
end
|
2586
2648
|
class Discount < Stripe::RequestParams
|
2587
2649
|
# ID of the coupon to create a new discount for.
|
2588
2650
|
sig { returns(T.nilable(String)) }
|
@@ -2641,6 +2703,11 @@ module Stripe
|
|
2641
2703
|
unit_amount_decimal: nil
|
2642
2704
|
); end
|
2643
2705
|
end
|
2706
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2707
|
+
sig {
|
2708
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds))))
|
2709
|
+
}
|
2710
|
+
attr_accessor :billing_thresholds
|
2644
2711
|
# Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
2645
2712
|
sig { returns(T.nilable(T::Boolean)) }
|
2646
2713
|
attr_accessor :clear_usage
|
@@ -2676,9 +2743,10 @@ module Stripe
|
|
2676
2743
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2677
2744
|
attr_accessor :tax_rates
|
2678
2745
|
sig {
|
2679
|
-
params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2746
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds))), clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2680
2747
|
}
|
2681
2748
|
def initialize(
|
2749
|
+
billing_thresholds: nil,
|
2682
2750
|
clear_usage: nil,
|
2683
2751
|
deleted: nil,
|
2684
2752
|
discounts: nil,
|
@@ -2694,6 +2762,11 @@ module Stripe
|
|
2694
2762
|
# 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`.
|
2695
2763
|
sig { returns(T.nilable(T.any(String, Integer))) }
|
2696
2764
|
attr_accessor :billing_cycle_anchor
|
2765
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2766
|
+
sig {
|
2767
|
+
returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode))
|
2768
|
+
}
|
2769
|
+
attr_accessor :billing_mode
|
2697
2770
|
# 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.
|
2698
2771
|
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
2699
2772
|
attr_accessor :cancel_at
|
@@ -2727,10 +2800,11 @@ module Stripe
|
|
2727
2800
|
sig { returns(T.nilable(T.any(String, Integer))) }
|
2728
2801
|
attr_accessor :trial_end
|
2729
2802
|
sig {
|
2730
|
-
params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
|
2803
|
+
params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
|
2731
2804
|
}
|
2732
2805
|
def initialize(
|
2733
2806
|
billing_cycle_anchor: nil,
|
2807
|
+
billing_mode: nil,
|
2734
2808
|
cancel_at: nil,
|
2735
2809
|
cancel_at_period_end: nil,
|
2736
2810
|
cancel_now: nil,
|
@@ -2815,17 +2889,34 @@ module Stripe
|
|
2815
2889
|
}
|
2816
2890
|
def add_lines(invoice, params = {}, opts = {}); end
|
2817
2891
|
|
2818
|
-
#
|
2892
|
+
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
2893
|
+
#
|
2894
|
+
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
2895
|
+
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
2896
|
+
# invoice's status becomes paid.
|
2897
|
+
#
|
2898
|
+
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
2899
|
+
# credited to the invoice immediately.
|
2900
|
+
#
|
2901
|
+
# See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
|
2902
|
+
sig {
|
2903
|
+
params(invoice: String, params: T.any(::Stripe::InvoiceService::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
2904
|
+
}
|
2905
|
+
def attach_payment(invoice, params = {}, opts = {}); end
|
2906
|
+
|
2907
|
+
# 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://docs.stripe.com/api#finalize_invoice) the invoice to your customers.
|
2819
2908
|
sig {
|
2820
2909
|
params(params: T.any(::Stripe::InvoiceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
2821
2910
|
}
|
2822
2911
|
def create(params = {}, opts = {}); end
|
2823
2912
|
|
2824
|
-
# At any time, you can preview the upcoming invoice for a
|
2913
|
+
# At any time, you can preview the upcoming invoice for a subscription or subscription schedule. 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.
|
2825
2914
|
#
|
2826
|
-
#
|
2915
|
+
# You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that 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.
|
2916
|
+
#
|
2917
|
+
# The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
|
2827
2918
|
#
|
2828
|
-
#
|
2919
|
+
# 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.
|
2829
2920
|
#
|
2830
2921
|
# 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)
|
2831
2922
|
sig {
|
@@ -2833,7 +2924,7 @@ module Stripe
|
|
2833
2924
|
}
|
2834
2925
|
def create_preview(params = {}, opts = {}); end
|
2835
2926
|
|
2836
|
-
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/
|
2927
|
+
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice).
|
2837
2928
|
sig {
|
2838
2929
|
params(invoice: String, params: T.any(::Stripe::InvoiceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
2839
2930
|
}
|
@@ -2875,7 +2966,7 @@ module Stripe
|
|
2875
2966
|
}
|
2876
2967
|
def retrieve(invoice, params = {}, opts = {}); end
|
2877
2968
|
|
2878
|
-
# Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
|
2969
|
+
# Search for invoices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
|
2879
2970
|
# Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
|
2880
2971
|
# conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
|
2881
2972
|
# to an hour behind during outages. Search functionality is not available to merchants in India.
|
@@ -2892,11 +2983,11 @@ module Stripe
|
|
2892
2983
|
}
|
2893
2984
|
def send_invoice(invoice, params = {}, opts = {}); end
|
2894
2985
|
|
2895
|
-
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
2986
|
+
# Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized),
|
2896
2987
|
# monetary values, as well as collection_method, become uneditable.
|
2897
2988
|
#
|
2898
2989
|
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
2899
|
-
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
2990
|
+
# sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
2900
2991
|
# auto_advance=false.
|
2901
2992
|
sig {
|
2902
2993
|
params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
@@ -2909,9 +3000,9 @@ module Stripe
|
|
2909
3000
|
}
|
2910
3001
|
def update_lines(invoice, params = {}, opts = {}); end
|
2911
3002
|
|
2912
|
-
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/
|
3003
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
2913
3004
|
#
|
2914
|
-
# 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/
|
3005
|
+
# 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://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
|
2915
3006
|
sig {
|
2916
3007
|
params(invoice: String, params: T.any(::Stripe::InvoiceService::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
2917
3008
|
}
|
@@ -110,15 +110,15 @@ module Stripe
|
|
110
110
|
}
|
111
111
|
def initialize(expand: nil, metadata: nil); end
|
112
112
|
end
|
113
|
-
# [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.
|
114
|
-
# 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).
|
113
|
+
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
114
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
115
115
|
sig {
|
116
116
|
params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
117
117
|
}
|
118
118
|
def approve(authorization, params = {}, opts = {}); end
|
119
119
|
|
120
|
-
# [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.
|
121
|
-
# 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).
|
120
|
+
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
121
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
122
122
|
sig {
|
123
123
|
params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
124
124
|
}
|
@@ -229,7 +229,7 @@ module Stripe
|
|
229
229
|
# Specifies which fields in the response should be expanded.
|
230
230
|
sig { returns(T.nilable(T::Array[String])) }
|
231
231
|
attr_accessor :expand
|
232
|
-
#
|
232
|
+
# The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account.
|
233
233
|
sig { returns(T.nilable(String)) }
|
234
234
|
attr_accessor :financial_account
|
235
235
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
@@ -673,7 +673,7 @@ module Stripe
|
|
673
673
|
}
|
674
674
|
def initialize(expand: nil, metadata: nil); end
|
675
675
|
end
|
676
|
-
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
676
|
+
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
677
677
|
sig {
|
678
678
|
params(params: T.any(::Stripe::Issuing::DisputeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
|
679
679
|
}
|
@@ -691,7 +691,7 @@ module Stripe
|
|
691
691
|
}
|
692
692
|
def retrieve(dispute, params = {}, opts = {}); end
|
693
693
|
|
694
|
-
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
694
|
+
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
695
695
|
sig {
|
696
696
|
params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
|
697
697
|
}
|