stripe 15.1.0 → 15.2.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/CHANGELOG.md +34 -6
- data/CONTRIBUTING.md +25 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +10 -7
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/resources/account.rb +47 -20
- data/lib/stripe/resources/account_session.rb +111 -7
- 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 +1 -1
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/charge.rb +13 -5
- data/lib/stripe/resources/checkout/session.rb +20 -4
- data/lib/stripe/resources/confirmation_token.rb +33 -87
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +1 -2
- data/lib/stripe/resources/credit_note.rb +12 -9
- data/lib/stripe/resources/customer.rb +2 -4
- data/lib/stripe/resources/customer_session.rb +3 -3
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +17 -11
- data/lib/stripe/resources/invoice.rb +114 -27
- data/lib/stripe/resources/invoice_item.rb +2 -3
- 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/payment_intent.rb +196 -302
- data/lib/stripe/resources/payment_method.rb +46 -103
- data/lib/stripe/resources/payment_method_configuration.rb +297 -2
- data/lib/stripe/resources/payment_method_domain.rb +2 -2
- data/lib/stripe/resources/payout.rb +4 -4
- data/lib/stripe/resources/person.rb +2 -2
- 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/radar/value_list.rb +1 -2
- data/lib/stripe/resources/radar/value_list_item.rb +1 -2
- data/lib/stripe/resources/refund.rb +6 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +111 -281
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +89 -29
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +119 -4
- data/lib/stripe/resources/tax/calculation.rb +4 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +1 -2
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +1 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +275 -3
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +2 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/services/account_external_account_service.rb +2 -3
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +1 -2
- data/lib/stripe/services/account_service.rb +38 -13
- data/lib/stripe/services/account_session_service.rb +75 -7
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +4 -4
- data/lib/stripe/services/checkout/session_service.rb +11 -3
- data/lib/stripe/services/coupon_service.rb +1 -2
- data/lib/stripe/services/credit_note_service.rb +7 -8
- 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_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +3 -5
- data/lib/stripe/services/customer_tax_id_service.rb +1 -2
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +5 -5
- data/lib/stripe/services/invoice_item_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +92 -23
- 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/payment_intent_service.rb +176 -292
- data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +43 -100
- 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 +2 -3
- data/lib/stripe/services/promotion_code_service.rb +1 -1
- 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/setup_intent_service.rb +110 -280
- data/lib/stripe/services/source_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +26 -0
- data/lib/stripe/services/subscription_schedule_service.rb +93 -3
- data/lib/stripe/services/subscription_service.rb +77 -26
- data/lib/stripe/services/tax/calculation_service.rb +4 -0
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +1 -2
- 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 +106 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/transfer_service.rb +1 -1
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe/resources/account.rbi +46 -23
- data/rbi/stripe/resources/account_session.rbi +131 -12
- 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 +1 -1
- data/rbi/stripe/resources/capability.rbi +1 -1
- data/rbi/stripe/resources/charge.rbi +17 -5
- data/rbi/stripe/resources/checkout/session.rbi +22 -6
- data/rbi/stripe/resources/confirmation_token.rbi +33 -99
- data/rbi/stripe/resources/country_spec.rbi +1 -1
- data/rbi/stripe/resources/coupon.rbi +1 -3
- data/rbi/stripe/resources/credit_note.rbi +14 -9
- data/rbi/stripe/resources/customer.rbi +2 -6
- data/rbi/stripe/resources/customer_session.rbi +3 -3
- data/rbi/stripe/resources/dispute.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +1 -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 +20 -11
- data/rbi/stripe/resources/invoice.rbi +109 -33
- data/rbi/stripe/resources/invoice_item.rbi +2 -4
- data/rbi/stripe/resources/invoice_line_item.rbi +1 -1
- 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/payment_intent.rbi +201 -349
- data/rbi/stripe/resources/payment_method.rbi +46 -116
- data/rbi/stripe/resources/payment_method_configuration.rbi +334 -4
- data/rbi/stripe/resources/payment_method_domain.rbi +2 -2
- data/rbi/stripe/resources/payout.rbi +4 -4
- data/rbi/stripe/resources/person.rbi +2 -2
- 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/radar/value_list.rbi +1 -3
- data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
- data/rbi/stripe/resources/refund.rbi +5 -1
- data/rbi/stripe/resources/reversal.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +111 -325
- data/rbi/stripe/resources/source.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +99 -36
- data/rbi/stripe/resources/subscription_item.rbi +36 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +138 -10
- data/rbi/stripe/resources/tax/calculation.rbi +5 -1
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +3 -0
- data/rbi/stripe/resources/tax/registration.rbi +1 -1
- data/rbi/stripe/resources/tax_id.rbi +1 -3
- data/rbi/stripe/resources/tax_rate.rbi +2 -2
- data/rbi/stripe/resources/terminal/configuration.rbi +1 -3
- data/rbi/stripe/resources/terminal/location.rbi +2 -4
- data/rbi/stripe/resources/terminal/reader.rbi +265 -5
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
- data/rbi/stripe/resources/token.rbi +2 -2
- data/rbi/stripe/resources/transfer.rbi +1 -1
- data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
- data/rbi/stripe/services/account_external_account_service.rbi +2 -4
- data/rbi/stripe/services/account_login_link_service.rbi +1 -1
- data/rbi/stripe/services/account_person_service.rbi +1 -3
- data/rbi/stripe/services/account_service.rbi +40 -16
- data/rbi/stripe/services/account_session_service.rbi +86 -12
- 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/charge_service.rbi +4 -4
- data/rbi/stripe/services/checkout/session_service.rbi +12 -5
- data/rbi/stripe/services/coupon_service.rbi +1 -3
- data/rbi/stripe/services/credit_note_service.rbi +7 -8
- 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_source_service.rbi +1 -1
- data/rbi/stripe/services/customer_service.rbi +3 -7
- data/rbi/stripe/services/customer_tax_id_service.rbi +1 -3
- 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 +5 -5
- data/rbi/stripe/services/invoice_item_service.rbi +1 -3
- data/rbi/stripe/services/invoice_service.rbi +90 -29
- 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 +179 -339
- data/rbi/stripe/services/payment_method_configuration_service.rbi +236 -4
- data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
- data/rbi/stripe/services/payment_method_service.rbi +43 -113
- 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/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 +110 -324
- 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 +107 -9
- data/rbi/stripe/services/subscription_service.rbi +85 -33
- data/rbi/stripe/services/tax/calculation_service.rbi +5 -1
- data/rbi/stripe/services/tax/registration_service.rbi +1 -1
- data/rbi/stripe/services/tax_id_service.rbi +1 -3
- data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
- data/rbi/stripe/services/terminal/location_service.rbi +2 -4
- data/rbi/stripe/services/terminal/reader_service.rbi +115 -4
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +33 -99
- 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 +1 -1
- data/rbi/stripe/services/transfer_service.rbi +1 -1
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +4 -12
- data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
- data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
- metadata +3 -2
@@ -27,7 +27,7 @@ module Stripe
|
|
27
27
|
# Stripe applies any customer credit on the account before determining the
|
28
28
|
# amount due for the invoice (i.e., the amount that will be actually
|
29
29
|
# charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
|
30
|
-
# per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
|
30
|
+
# per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
|
31
31
|
# invoice is automatically marked paid, and we add the amount due to the
|
32
32
|
# customer's credit balance which is applied to the next invoice.
|
33
33
|
#
|
@@ -675,7 +675,7 @@ module Stripe
|
|
675
675
|
# The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
|
676
676
|
sig { returns(T.nilable(String)) }
|
677
677
|
attr_reader :hosted_invoice_url
|
678
|
-
# Unique identifier for the object.
|
678
|
+
# Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.
|
679
679
|
sig { returns(String) }
|
680
680
|
attr_reader :id
|
681
681
|
# The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
|
@@ -789,9 +789,7 @@ module Stripe
|
|
789
789
|
# Always true for a deleted object
|
790
790
|
sig { returns(T::Boolean) }
|
791
791
|
attr_reader :deleted
|
792
|
-
class DeleteParams < Stripe::RequestParams
|
793
|
-
|
794
|
-
end
|
792
|
+
class DeleteParams < Stripe::RequestParams; end
|
795
793
|
class UpdateParams < Stripe::RequestParams
|
796
794
|
class AutomaticTax < Stripe::RequestParams
|
797
795
|
class Liability < Stripe::RequestParams
|
@@ -962,12 +960,8 @@ module Stripe
|
|
962
960
|
}
|
963
961
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
964
962
|
end
|
965
|
-
class Konbini < Stripe::RequestParams
|
966
|
-
|
967
|
-
end
|
968
|
-
class SepaDebit < Stripe::RequestParams
|
969
|
-
|
970
|
-
end
|
963
|
+
class Konbini < Stripe::RequestParams; end
|
964
|
+
class SepaDebit < Stripe::RequestParams; end
|
971
965
|
class UsBankAccount < Stripe::RequestParams
|
972
966
|
class FinancialConnections < Stripe::RequestParams
|
973
967
|
class Filters < Stripe::RequestParams
|
@@ -1658,12 +1652,8 @@ module Stripe
|
|
1658
1652
|
}
|
1659
1653
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
1660
1654
|
end
|
1661
|
-
class Konbini < Stripe::RequestParams
|
1662
|
-
|
1663
|
-
end
|
1664
|
-
class SepaDebit < Stripe::RequestParams
|
1665
|
-
|
1666
|
-
end
|
1655
|
+
class Konbini < Stripe::RequestParams; end
|
1656
|
+
class SepaDebit < Stripe::RequestParams; end
|
1667
1657
|
class UsBankAccount < Stripe::RequestParams
|
1668
1658
|
class FinancialConnections < Stripe::RequestParams
|
1669
1659
|
class Filters < Stripe::RequestParams
|
@@ -2357,6 +2347,16 @@ module Stripe
|
|
2357
2347
|
}
|
2358
2348
|
def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
|
2359
2349
|
end
|
2350
|
+
class AttachPaymentParams < Stripe::RequestParams
|
2351
|
+
# Specifies which fields in the response should be expanded.
|
2352
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2353
|
+
attr_accessor :expand
|
2354
|
+
# The ID of the PaymentIntent to attach to the invoice.
|
2355
|
+
sig { returns(T.nilable(String)) }
|
2356
|
+
attr_accessor :payment_intent
|
2357
|
+
sig { params(expand: T.nilable(T::Array[String]), payment_intent: T.nilable(String)).void }
|
2358
|
+
def initialize(expand: nil, payment_intent: nil); end
|
2359
|
+
end
|
2360
2360
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
2361
2361
|
# 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.
|
2362
2362
|
sig { returns(T.nilable(T::Boolean)) }
|
@@ -3079,6 +3079,18 @@ module Stripe
|
|
3079
3079
|
}
|
3080
3080
|
def initialize(enabled: nil, liability: nil); end
|
3081
3081
|
end
|
3082
|
+
class BillingThresholds < Stripe::RequestParams
|
3083
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
3084
|
+
sig { returns(T.nilable(Integer)) }
|
3085
|
+
attr_accessor :amount_gte
|
3086
|
+
# 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.
|
3087
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3088
|
+
attr_accessor :reset_billing_cycle_anchor
|
3089
|
+
sig {
|
3090
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
3091
|
+
}
|
3092
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
3093
|
+
end
|
3082
3094
|
class Discount < Stripe::RequestParams
|
3083
3095
|
# ID of the coupon to create a new discount for.
|
3084
3096
|
sig { returns(T.nilable(String)) }
|
@@ -3122,6 +3134,13 @@ module Stripe
|
|
3122
3134
|
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
|
3123
3135
|
end
|
3124
3136
|
class Item < Stripe::RequestParams
|
3137
|
+
class BillingThresholds < Stripe::RequestParams
|
3138
|
+
# 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))
|
3139
|
+
sig { returns(Integer) }
|
3140
|
+
attr_accessor :usage_gte
|
3141
|
+
sig { params(usage_gte: Integer).void }
|
3142
|
+
def initialize(usage_gte: nil); end
|
3143
|
+
end
|
3125
3144
|
class Discount < Stripe::RequestParams
|
3126
3145
|
# ID of the coupon to create a new discount for.
|
3127
3146
|
sig { returns(T.nilable(String)) }
|
@@ -3180,6 +3199,11 @@ module Stripe
|
|
3180
3199
|
unit_amount_decimal: nil
|
3181
3200
|
); end
|
3182
3201
|
end
|
3202
|
+
# 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.
|
3203
|
+
sig {
|
3204
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds))))
|
3205
|
+
}
|
3206
|
+
attr_accessor :billing_thresholds
|
3183
3207
|
# The coupons to redeem into discounts for the subscription item.
|
3184
3208
|
sig {
|
3185
3209
|
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
|
@@ -3206,9 +3230,10 @@ module Stripe
|
|
3206
3230
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3207
3231
|
attr_accessor :tax_rates
|
3208
3232
|
sig {
|
3209
|
-
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3233
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3210
3234
|
}
|
3211
3235
|
def initialize(
|
3236
|
+
billing_thresholds: nil,
|
3212
3237
|
discounts: nil,
|
3213
3238
|
metadata: nil,
|
3214
3239
|
plan: nil,
|
@@ -3244,6 +3269,11 @@ module Stripe
|
|
3244
3269
|
# 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).
|
3245
3270
|
sig { returns(T.nilable(String)) }
|
3246
3271
|
attr_accessor :billing_cycle_anchor
|
3272
|
+
# 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.
|
3273
|
+
sig {
|
3274
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds))))
|
3275
|
+
}
|
3276
|
+
attr_accessor :billing_thresholds
|
3247
3277
|
# 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.
|
3248
3278
|
sig { returns(T.nilable(String)) }
|
3249
3279
|
attr_accessor :collection_method
|
@@ -3286,7 +3316,7 @@ module Stripe
|
|
3286
3316
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3287
3317
|
sig { returns(T.nilable(String)) }
|
3288
3318
|
attr_accessor :on_behalf_of
|
3289
|
-
#
|
3319
|
+
# 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.
|
3290
3320
|
sig { returns(T.nilable(String)) }
|
3291
3321
|
attr_accessor :proration_behavior
|
3292
3322
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3304,13 +3334,14 @@ module Stripe
|
|
3304
3334
|
sig { returns(T.nilable(T.any(Integer, String))) }
|
3305
3335
|
attr_accessor :trial_end
|
3306
3336
|
sig {
|
3307
|
-
params(add_invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
3337
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
3308
3338
|
}
|
3309
3339
|
def initialize(
|
3310
3340
|
add_invoice_items: nil,
|
3311
3341
|
application_fee_percent: nil,
|
3312
3342
|
automatic_tax: nil,
|
3313
3343
|
billing_cycle_anchor: nil,
|
3344
|
+
billing_thresholds: nil,
|
3314
3345
|
collection_method: nil,
|
3315
3346
|
currency: nil,
|
3316
3347
|
default_payment_method: nil,
|
@@ -3348,6 +3379,13 @@ module Stripe
|
|
3348
3379
|
end
|
3349
3380
|
class SubscriptionDetails < Stripe::RequestParams
|
3350
3381
|
class Item < Stripe::RequestParams
|
3382
|
+
class BillingThresholds < Stripe::RequestParams
|
3383
|
+
# 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))
|
3384
|
+
sig { returns(Integer) }
|
3385
|
+
attr_accessor :usage_gte
|
3386
|
+
sig { params(usage_gte: Integer).void }
|
3387
|
+
def initialize(usage_gte: nil); end
|
3388
|
+
end
|
3351
3389
|
class Discount < Stripe::RequestParams
|
3352
3390
|
# ID of the coupon to create a new discount for.
|
3353
3391
|
sig { returns(T.nilable(String)) }
|
@@ -3406,6 +3444,11 @@ module Stripe
|
|
3406
3444
|
unit_amount_decimal: nil
|
3407
3445
|
); end
|
3408
3446
|
end
|
3447
|
+
# 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.
|
3448
|
+
sig {
|
3449
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds))))
|
3450
|
+
}
|
3451
|
+
attr_accessor :billing_thresholds
|
3409
3452
|
# 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.
|
3410
3453
|
sig { returns(T.nilable(T::Boolean)) }
|
3411
3454
|
attr_accessor :clear_usage
|
@@ -3441,9 +3484,10 @@ module Stripe
|
|
3441
3484
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3442
3485
|
attr_accessor :tax_rates
|
3443
3486
|
sig {
|
3444
|
-
params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::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::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3487
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::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::Invoice::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::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3445
3488
|
}
|
3446
3489
|
def initialize(
|
3490
|
+
billing_thresholds: nil,
|
3447
3491
|
clear_usage: nil,
|
3448
3492
|
deleted: nil,
|
3449
3493
|
discounts: nil,
|
@@ -3462,7 +3506,7 @@ module Stripe
|
|
3462
3506
|
# 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.
|
3463
3507
|
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
3464
3508
|
attr_accessor :cancel_at
|
3465
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
3509
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
|
3466
3510
|
sig { returns(T.nilable(T::Boolean)) }
|
3467
3511
|
attr_accessor :cancel_at_period_end
|
3468
3512
|
# This simulates the subscription being canceled or expired immediately.
|
@@ -3584,7 +3628,37 @@ module Stripe
|
|
3584
3628
|
}
|
3585
3629
|
def self.add_lines(invoice, params = {}, opts = {}); end
|
3586
3630
|
|
3587
|
-
#
|
3631
|
+
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
3632
|
+
#
|
3633
|
+
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
3634
|
+
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3635
|
+
# invoice's status becomes paid.
|
3636
|
+
#
|
3637
|
+
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
3638
|
+
# credited to the invoice immediately.
|
3639
|
+
#
|
3640
|
+
# See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
|
3641
|
+
sig {
|
3642
|
+
params(params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3643
|
+
}
|
3644
|
+
def attach_payment(params = {}, opts = {}); end
|
3645
|
+
|
3646
|
+
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
3647
|
+
#
|
3648
|
+
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
3649
|
+
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3650
|
+
# invoice's status becomes paid.
|
3651
|
+
#
|
3652
|
+
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
3653
|
+
# credited to the invoice immediately.
|
3654
|
+
#
|
3655
|
+
# See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
|
3656
|
+
sig {
|
3657
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3658
|
+
}
|
3659
|
+
def self.attach_payment(invoice, params = {}, opts = {}); end
|
3660
|
+
|
3661
|
+
# 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.
|
3588
3662
|
sig {
|
3589
3663
|
params(params: T.any(::Stripe::Invoice::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3590
3664
|
}
|
@@ -3592,9 +3666,11 @@ module Stripe
|
|
3592
3666
|
|
3593
3667
|
# 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.
|
3594
3668
|
#
|
3595
|
-
#
|
3669
|
+
# 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.
|
3596
3670
|
#
|
3597
|
-
#
|
3671
|
+
# 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.
|
3672
|
+
#
|
3673
|
+
# 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.
|
3598
3674
|
#
|
3599
3675
|
# 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)
|
3600
3676
|
sig {
|
@@ -3602,13 +3678,13 @@ module Stripe
|
|
3602
3678
|
}
|
3603
3679
|
def self.create_preview(params = {}, opts = {}); end
|
3604
3680
|
|
3605
|
-
# 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/
|
3681
|
+
# 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).
|
3606
3682
|
sig {
|
3607
3683
|
params(invoice: String, params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3608
3684
|
}
|
3609
3685
|
def self.delete(invoice, params = {}, opts = {}); end
|
3610
3686
|
|
3611
|
-
# 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/
|
3687
|
+
# 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).
|
3612
3688
|
sig {
|
3613
3689
|
params(params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3614
3690
|
}
|
@@ -3694,11 +3770,11 @@ module Stripe
|
|
3694
3770
|
}
|
3695
3771
|
def self.send_invoice(invoice, params = {}, opts = {}); end
|
3696
3772
|
|
3697
|
-
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
3773
|
+
# Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized),
|
3698
3774
|
# monetary values, as well as collection_method, become uneditable.
|
3699
3775
|
#
|
3700
3776
|
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
3701
|
-
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
3777
|
+
# sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
3702
3778
|
# auto_advance=false.
|
3703
3779
|
sig {
|
3704
3780
|
params(invoice: String, params: T.any(::Stripe::Invoice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
@@ -3717,17 +3793,17 @@ module Stripe
|
|
3717
3793
|
}
|
3718
3794
|
def self.update_lines(invoice, params = {}, opts = {}); end
|
3719
3795
|
|
3720
|
-
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/
|
3796
|
+
# 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.
|
3721
3797
|
#
|
3722
|
-
# 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/
|
3798
|
+
# 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.
|
3723
3799
|
sig {
|
3724
3800
|
params(params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3725
3801
|
}
|
3726
3802
|
def void_invoice(params = {}, opts = {}); end
|
3727
3803
|
|
3728
|
-
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/
|
3804
|
+
# 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.
|
3729
3805
|
#
|
3730
|
-
# 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/
|
3806
|
+
# 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.
|
3731
3807
|
sig {
|
3732
3808
|
params(invoice: String, params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3733
3809
|
}
|
@@ -94,7 +94,7 @@ module Stripe
|
|
94
94
|
# String representing the object's type. Objects of the same type share the same value.
|
95
95
|
sig { returns(String) }
|
96
96
|
attr_reader :object
|
97
|
-
# The parent that generated this invoice
|
97
|
+
# The parent that generated this invoice item.
|
98
98
|
sig { returns(T.nilable(Parent)) }
|
99
99
|
attr_reader :parent
|
100
100
|
# Attribute for field period
|
@@ -118,9 +118,7 @@ module Stripe
|
|
118
118
|
# Always true for a deleted object
|
119
119
|
sig { returns(T::Boolean) }
|
120
120
|
attr_reader :deleted
|
121
|
-
class DeleteParams < Stripe::RequestParams
|
122
|
-
|
123
|
-
end
|
121
|
+
class DeleteParams < Stripe::RequestParams; end
|
124
122
|
class UpdateParams < Stripe::RequestParams
|
125
123
|
class Discount < Stripe::RequestParams
|
126
124
|
# ID of the coupon to create a new discount for.
|
@@ -182,7 +182,7 @@ module Stripe
|
|
182
182
|
# String representing the object's type. Objects of the same type share the same value.
|
183
183
|
sig { returns(String) }
|
184
184
|
attr_reader :object
|
185
|
-
# The parent that generated this
|
185
|
+
# The parent that generated this line item.
|
186
186
|
sig { returns(T.nilable(Parent)) }
|
187
187
|
attr_reader :parent
|
188
188
|
# Attribute for field period
|
@@ -3,10 +3,17 @@
|
|
3
3
|
|
4
4
|
# typed: true
|
5
5
|
module Stripe
|
6
|
-
#
|
6
|
+
# Invoice Payments represent payments made against invoices. Invoice Payments can
|
7
|
+
# be accessed in two ways:
|
8
|
+
# 1. By expanding the `payments` field on the [Invoice](https://stripe.com/docs/api#invoice) resource.
|
9
|
+
# 2. By using the Invoice Payment retrieve and list endpoints.
|
10
|
+
#
|
11
|
+
# Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices.
|
12
|
+
# This resource and its endpoints allows you to easily track if a payment is associated with a specific invoice and
|
13
|
+
# monitor the allocation details of the payments.
|
7
14
|
class InvoicePayment < APIResource
|
8
15
|
class Payment < Stripe::StripeObject
|
9
|
-
# ID of the successful charge for this payment when `type` is `charge`.
|
16
|
+
# ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead.
|
10
17
|
sig { returns(T.any(String, Stripe::Charge)) }
|
11
18
|
attr_reader :charge
|
12
19
|
# ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
|
@@ -1239,29 +1239,29 @@ module Stripe
|
|
1239
1239
|
sig { params(expand: T.nilable(T::Array[String]), reverse_amount: T.nilable(Integer)).void }
|
1240
1240
|
def initialize(expand: nil, reverse_amount: nil); end
|
1241
1241
|
end
|
1242
|
-
# [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.
|
1243
|
-
# 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).
|
1242
|
+
# [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.
|
1243
|
+
# 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).
|
1244
1244
|
sig {
|
1245
1245
|
params(params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
1246
1246
|
}
|
1247
1247
|
def approve(params = {}, opts = {}); end
|
1248
1248
|
|
1249
|
-
# [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.
|
1250
|
-
# 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).
|
1249
|
+
# [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.
|
1250
|
+
# 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).
|
1251
1251
|
sig {
|
1252
1252
|
params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
1253
1253
|
}
|
1254
1254
|
def self.approve(authorization, params = {}, opts = {}); end
|
1255
1255
|
|
1256
|
-
# [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.
|
1257
|
-
# 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).
|
1256
|
+
# [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.
|
1257
|
+
# 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).
|
1258
1258
|
sig {
|
1259
1259
|
params(params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
1260
1260
|
}
|
1261
1261
|
def decline(params = {}, opts = {}); end
|
1262
1262
|
|
1263
|
-
# [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.
|
1264
|
-
# 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).
|
1263
|
+
# [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.
|
1264
|
+
# 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).
|
1265
1265
|
sig {
|
1266
1266
|
params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization)
|
1267
1267
|
}
|
@@ -455,7 +455,7 @@ module Stripe
|
|
455
455
|
# Specifies which fields in the response should be expanded.
|
456
456
|
sig { returns(T.nilable(T::Array[String])) }
|
457
457
|
attr_accessor :expand
|
458
|
-
#
|
458
|
+
# The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account.
|
459
459
|
sig { returns(T.nilable(String)) }
|
460
460
|
attr_accessor :financial_account
|
461
461
|
# 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`.
|
@@ -879,7 +879,7 @@ module Stripe
|
|
879
879
|
}
|
880
880
|
def initialize(expand: nil, metadata: nil); end
|
881
881
|
end
|
882
|
-
# 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.
|
882
|
+
# 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.
|
883
883
|
sig {
|
884
884
|
params(params: T.any(::Stripe::Issuing::Dispute::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
|
885
885
|
}
|
@@ -891,13 +891,13 @@ module Stripe
|
|
891
891
|
}
|
892
892
|
def self.list(params = {}, opts = {}); end
|
893
893
|
|
894
|
-
# 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).
|
894
|
+
# 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).
|
895
895
|
sig {
|
896
896
|
params(params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
|
897
897
|
}
|
898
898
|
def submit(params = {}, opts = {}); end
|
899
899
|
|
900
|
-
# 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).
|
900
|
+
# 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).
|
901
901
|
sig {
|
902
902
|
params(dispute: String, params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute)
|
903
903
|
}
|