stripe 19.4.0.pre.alpha.2 → 19.4.0.pre.alpha.4
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/lib/stripe/api_requestor.rb +2 -27
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/error_object.rb +48 -19
- data/lib/stripe/event_types.rb +15 -0
- data/lib/stripe/events/v2_billing_contract_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_ended_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +0 -1
- data/lib/stripe/params/account_create_params.rb +2 -0
- data/lib/stripe/params/account_person_create_params.rb +6 -0
- data/lib/stripe/params/account_person_update_params.rb +6 -0
- data/lib/stripe/params/account_session_create_params.rb +0 -42
- data/lib/stripe/params/account_update_params.rb +2 -0
- data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
- data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +2 -2
- data/lib/stripe/params/checkout/session_create_params.rb +1 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +2 -2
- data/lib/stripe/params/issuing/authorization_capture_params.rb +1 -1
- data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +1 -1
- data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +1 -1
- data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +1 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +10 -1
- data/lib/stripe/params/payment_intent_create_params.rb +10 -1
- data/lib/stripe/params/payment_intent_update_params.rb +10 -1
- data/lib/stripe/params/payment_record_create_params.rb +109 -0
- data/lib/stripe/params/promotion_code_create_params.rb +1 -1
- data/lib/stripe/params/promotion_code_update_params.rb +1 -1
- data/lib/stripe/params/refund_create_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +138 -2
- data/lib/stripe/params/subscription_schedule_list_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_update_params.rb +139 -3
- data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +35 -0
- data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +27 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +1 -1
- data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +1 -1
- data/lib/stripe/params/token_create_params.rb +8 -0
- data/lib/stripe/params/v2/billing/contract_cancel_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +13 -175
- data/lib/stripe/params/v2/billing/contract_list_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_update_params.rb +48 -495
- data/lib/stripe/params/v2/core/account_list_params.rb +9 -1
- data/lib/stripe/params/v2/data/analytics/metric_query_create_params.rb +2 -2
- data/lib/stripe/params.rb +10 -8
- data/lib/stripe/resources/account.rb +55 -3
- data/lib/stripe/resources/account_session.rb +8 -0
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing/alert_recovered.rb +17 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +1 -1
- data/lib/stripe/resources/capability.rb +2 -2
- data/lib/stripe/resources/capital/financing_transaction.rb +1 -1
- data/lib/stripe/resources/charge.rb +1 -1
- data/lib/stripe/resources/checkout/session.rb +23 -5
- data/lib/stripe/resources/confirmation_token.rb +1 -1
- data/lib/stripe/resources/dispute.rb +4 -2
- data/lib/stripe/resources/financial_connections/session.rb +5 -0
- data/lib/stripe/resources/invoice.rb +4 -1
- data/lib/stripe/resources/issuing/authorization.rb +52 -1
- data/lib/stripe/resources/issuing/card.rb +2 -0
- data/lib/stripe/resources/issuing/transaction.rb +48 -2
- data/lib/stripe/resources/order.rb +1 -1
- data/lib/stripe/resources/payment_attempt_record.rb +2 -2
- data/lib/stripe/resources/payment_intent.rb +28 -0
- data/lib/stripe/resources/payment_method.rb +3 -3
- data/lib/stripe/resources/payment_record.rb +14 -2
- data/lib/stripe/resources/person.rb +2 -2
- data/lib/stripe/resources/profile.rb +14 -14
- data/lib/stripe/resources/quote.rb +22 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +4 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +169 -2
- data/lib/stripe/resources/setup_attempt.rb +16 -0
- data/lib/stripe/resources/setup_intent.rb +3 -0
- data/lib/stripe/resources/shared_payment/granted_token.rb +1 -1
- data/lib/stripe/resources/shared_payment/issued_token.rb +18 -1
- data/lib/stripe/resources/subscription_schedule.rb +169 -2
- data/lib/stripe/resources/tax/calculation.rb +1 -1
- data/lib/stripe/resources/tax/registration.rb +32 -0
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/terminal/reader.rb +173 -0
- data/lib/stripe/resources/v2/billing/contract.rb +47 -330
- data/lib/stripe/resources/v2/billing/contract_pricing_line_quantity_change.rb +2 -2
- data/lib/stripe/resources/v2/core/account.rb +18 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +16 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +30 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +4 -1
- data/lib/stripe/resources.rb +15 -2
- data/lib/stripe/services/account_person_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +1 -1
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +12 -0
- data/lib/stripe/services/terminal/reader_service.rb +44 -0
- data/lib/stripe/services/v1_services.rb +1 -2
- data/lib/stripe/services/v2/billing/contract_service.rb +7 -7
- data/lib/stripe/services/v2/signals/account_signal_service.rb +1 -1
- data/lib/stripe/services.rb +0 -2
- data/lib/stripe/stripe_event_notification_handler.rb +30 -0
- data/lib/stripe/telemetry_id.rb +65 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +2 -0
- data/rbi/stripe.rbi +2023 -1531
- metadata +13 -8
- data/lib/stripe/params/fr_meal_vouchers_onboarding_create_params.rb +0 -25
- data/lib/stripe/params/fr_meal_vouchers_onboarding_list_params.rb +0 -22
- data/lib/stripe/params/fr_meal_vouchers_onboarding_retrieve_params.rb +0 -13
- data/lib/stripe/params/fr_meal_vouchers_onboarding_update_params.rb +0 -16
- data/lib/stripe/resources/fr_meal_vouchers_onboarding.rb +0 -153
- data/lib/stripe/services/fr_meal_vouchers_onboarding_service.rb +0 -57
|
@@ -2859,7 +2859,7 @@ module Stripe
|
|
|
2859
2859
|
end
|
|
2860
2860
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
|
2861
2861
|
attr_accessor :application_fee_percent
|
|
2862
|
-
# A future timestamp to anchor the subscription's billing cycle for new subscriptions.
|
|
2862
|
+
# A future timestamp to anchor the subscription's billing cycle for new subscriptions.
|
|
2863
2863
|
attr_accessor :billing_cycle_anchor
|
|
2864
2864
|
# Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
|
|
2865
2865
|
attr_accessor :billing_cycle_anchor_config
|
|
@@ -1812,7 +1812,7 @@ module Stripe
|
|
|
1812
1812
|
attr_accessor :pause_collection
|
|
1813
1813
|
# Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
1814
1814
|
attr_accessor :proration_behavior
|
|
1815
|
-
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
|
1815
|
+
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. Prefer to specify `now` over an explicit timestamp when appropriate to avoid unexpected behavior due to request delays or clock skew resulting in the phase being slightly backdated or postdated.
|
|
1816
1816
|
attr_accessor :start_date
|
|
1817
1817
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
1818
1818
|
attr_accessor :transfer_data
|
|
@@ -1820,7 +1820,7 @@ module Stripe
|
|
|
1820
1820
|
attr_accessor :trial
|
|
1821
1821
|
# Specify trial behavior when crossing phase boundaries
|
|
1822
1822
|
attr_accessor :trial_continuation
|
|
1823
|
-
# Sets the phase to trialing from the start date to this date. Must be
|
|
1823
|
+
# Sets the phase to trialing from the start date to this date. Must be within the phase. When previewing an update, if combined with `trial=true`, it must match the phase end date.
|
|
1824
1824
|
attr_accessor :trial_end
|
|
1825
1825
|
# Settings related to subscription trials.
|
|
1826
1826
|
attr_accessor :trial_settings
|
|
@@ -44,7 +44,7 @@ module Stripe
|
|
|
44
44
|
|
|
45
45
|
class ReportedBreakdown < ::Stripe::RequestParams
|
|
46
46
|
class Fuel < ::Stripe::RequestParams
|
|
47
|
-
# Gross fuel amount that should equal Fuel Volume
|
|
47
|
+
# Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
|
|
48
48
|
attr_accessor :gross_amount_decimal
|
|
49
49
|
|
|
50
50
|
def initialize(gross_amount_decimal: nil)
|
|
@@ -46,7 +46,7 @@ module Stripe
|
|
|
46
46
|
|
|
47
47
|
class ReportedBreakdown < ::Stripe::RequestParams
|
|
48
48
|
class Fuel < ::Stripe::RequestParams
|
|
49
|
-
# Gross fuel amount that should equal Fuel Volume
|
|
49
|
+
# Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
|
|
50
50
|
attr_accessor :gross_amount_decimal
|
|
51
51
|
|
|
52
52
|
def initialize(gross_amount_decimal: nil)
|
|
@@ -34,7 +34,7 @@ module Stripe
|
|
|
34
34
|
|
|
35
35
|
class ReportedBreakdown < ::Stripe::RequestParams
|
|
36
36
|
class Fuel < ::Stripe::RequestParams
|
|
37
|
-
# Gross fuel amount that should equal Fuel Volume
|
|
37
|
+
# Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
|
|
38
38
|
attr_accessor :gross_amount_decimal
|
|
39
39
|
|
|
40
40
|
def initialize(gross_amount_decimal: nil)
|
|
@@ -95,7 +95,7 @@ module Stripe
|
|
|
95
95
|
|
|
96
96
|
class ReportedBreakdown < ::Stripe::RequestParams
|
|
97
97
|
class Fuel < ::Stripe::RequestParams
|
|
98
|
-
# Gross fuel amount that should equal Fuel Volume
|
|
98
|
+
# Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
|
|
99
99
|
attr_accessor :gross_amount_decimal
|
|
100
100
|
|
|
101
101
|
def initialize(gross_amount_decimal: nil)
|
|
@@ -86,7 +86,7 @@ module Stripe
|
|
|
86
86
|
|
|
87
87
|
class ReportedBreakdown < ::Stripe::RequestParams
|
|
88
88
|
class Fuel < ::Stripe::RequestParams
|
|
89
|
-
# Gross fuel amount that should equal Fuel Volume
|
|
89
|
+
# Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
|
|
90
90
|
attr_accessor :gross_amount_decimal
|
|
91
91
|
|
|
92
92
|
def initialize(gross_amount_decimal: nil)
|
|
@@ -5377,9 +5377,18 @@ module Stripe
|
|
|
5377
5377
|
#
|
|
5378
5378
|
# If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
|
|
5379
5379
|
attr_accessor :capture_method
|
|
5380
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
5381
|
+
#
|
|
5382
|
+
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
|
5383
|
+
#
|
|
5384
|
+
# If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
|
|
5385
|
+
#
|
|
5386
|
+
# When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
|
|
5387
|
+
attr_accessor :setup_future_usage
|
|
5380
5388
|
|
|
5381
|
-
def initialize(capture_method: nil)
|
|
5389
|
+
def initialize(capture_method: nil, setup_future_usage: nil)
|
|
5382
5390
|
@capture_method = capture_method
|
|
5391
|
+
@setup_future_usage = setup_future_usage
|
|
5383
5392
|
end
|
|
5384
5393
|
end
|
|
5385
5394
|
|
|
@@ -5391,9 +5391,18 @@ module Stripe
|
|
|
5391
5391
|
#
|
|
5392
5392
|
# If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
|
|
5393
5393
|
attr_accessor :capture_method
|
|
5394
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
5395
|
+
#
|
|
5396
|
+
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
|
5397
|
+
#
|
|
5398
|
+
# If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
|
|
5399
|
+
#
|
|
5400
|
+
# When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
|
|
5401
|
+
attr_accessor :setup_future_usage
|
|
5394
5402
|
|
|
5395
|
-
def initialize(capture_method: nil)
|
|
5403
|
+
def initialize(capture_method: nil, setup_future_usage: nil)
|
|
5396
5404
|
@capture_method = capture_method
|
|
5405
|
+
@setup_future_usage = setup_future_usage
|
|
5397
5406
|
end
|
|
5398
5407
|
end
|
|
5399
5408
|
|
|
@@ -5369,9 +5369,18 @@ module Stripe
|
|
|
5369
5369
|
#
|
|
5370
5370
|
# If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
|
|
5371
5371
|
attr_accessor :capture_method
|
|
5372
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
5373
|
+
#
|
|
5374
|
+
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
|
5375
|
+
#
|
|
5376
|
+
# If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
|
|
5377
|
+
#
|
|
5378
|
+
# When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
|
|
5379
|
+
attr_accessor :setup_future_usage
|
|
5372
5380
|
|
|
5373
|
-
def initialize(capture_method: nil)
|
|
5381
|
+
def initialize(capture_method: nil, setup_future_usage: nil)
|
|
5374
5382
|
@capture_method = capture_method
|
|
5383
|
+
@setup_future_usage = setup_future_usage
|
|
5375
5384
|
end
|
|
5376
5385
|
end
|
|
5377
5386
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class PaymentRecordCreateParams < ::Stripe::RequestParams
|
|
6
|
+
class Amount < ::Stripe::RequestParams
|
|
7
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
8
|
+
attr_accessor :currency
|
|
9
|
+
# A positive integer representing the amount in the currency's [minor unit](https://docs.stripe.com/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
|
|
12
|
+
def initialize(currency: nil, value: nil)
|
|
13
|
+
@currency = currency
|
|
14
|
+
@value = value
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class Closed < ::Stripe::RequestParams
|
|
19
|
+
# When the dispute was closed. Measured in seconds since the Unix epoch.
|
|
20
|
+
attr_accessor :closed_at
|
|
21
|
+
|
|
22
|
+
def initialize(closed_at: nil)
|
|
23
|
+
@closed_at = closed_at
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class Funded < ::Stripe::RequestParams
|
|
28
|
+
class Amount < ::Stripe::RequestParams
|
|
29
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
30
|
+
attr_accessor :currency
|
|
31
|
+
# A positive integer representing the amount in the currency's [minor unit](https://docs.stripe.com/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
|
|
32
|
+
attr_accessor :value
|
|
33
|
+
|
|
34
|
+
def initialize(currency: nil, value: nil)
|
|
35
|
+
@currency = currency
|
|
36
|
+
@value = value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
# The amount that has been lost to the customer due to disputes on this payment.
|
|
40
|
+
attr_accessor :amount
|
|
41
|
+
# When the dispute funding event occurred. Measured in seconds since the Unix epoch.
|
|
42
|
+
attr_accessor :funded_at
|
|
43
|
+
# The type of dispute funding event.
|
|
44
|
+
attr_accessor :type
|
|
45
|
+
|
|
46
|
+
def initialize(amount: nil, funded_at: nil, type: nil)
|
|
47
|
+
@amount = amount
|
|
48
|
+
@funded_at = funded_at
|
|
49
|
+
@type = type
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class ProcessorDetails < ::Stripe::RequestParams
|
|
54
|
+
class Custom < ::Stripe::RequestParams
|
|
55
|
+
# A reference to the external dispute. This field must be unique across all disputes.
|
|
56
|
+
attr_accessor :dispute_reference
|
|
57
|
+
|
|
58
|
+
def initialize(dispute_reference: nil)
|
|
59
|
+
@dispute_reference = dispute_reference
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
# Information about the custom processor used to make this payment.
|
|
63
|
+
attr_accessor :custom
|
|
64
|
+
# The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor.
|
|
65
|
+
attr_accessor :type
|
|
66
|
+
|
|
67
|
+
def initialize(custom: nil, type: nil)
|
|
68
|
+
@custom = custom
|
|
69
|
+
@type = type
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
# The amount that has been lost to the customer due to disputes on this payment.
|
|
73
|
+
attr_accessor :amount
|
|
74
|
+
# Information about the dispute closing.
|
|
75
|
+
attr_accessor :closed
|
|
76
|
+
# Specifies which fields in the response should be expanded.
|
|
77
|
+
attr_accessor :expand
|
|
78
|
+
# Information about the dispute funding event.
|
|
79
|
+
attr_accessor :funded
|
|
80
|
+
# When the reported payment was initiated. Measured in seconds since the Unix epoch.
|
|
81
|
+
attr_accessor :initiated_at
|
|
82
|
+
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
83
|
+
attr_accessor :metadata
|
|
84
|
+
# Processor information for this payment.
|
|
85
|
+
attr_accessor :processor_details
|
|
86
|
+
# The reason the payment was disputed.
|
|
87
|
+
attr_accessor :reason
|
|
88
|
+
|
|
89
|
+
def initialize(
|
|
90
|
+
amount: nil,
|
|
91
|
+
closed: nil,
|
|
92
|
+
expand: nil,
|
|
93
|
+
funded: nil,
|
|
94
|
+
initiated_at: nil,
|
|
95
|
+
metadata: nil,
|
|
96
|
+
processor_details: nil,
|
|
97
|
+
reason: nil
|
|
98
|
+
)
|
|
99
|
+
@amount = amount
|
|
100
|
+
@closed = closed
|
|
101
|
+
@expand = expand
|
|
102
|
+
@funded = funded
|
|
103
|
+
@initiated_at = initiated_at
|
|
104
|
+
@metadata = metadata
|
|
105
|
+
@processor_details = processor_details
|
|
106
|
+
@reason = reason
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
@@ -24,7 +24,7 @@ module Stripe
|
|
|
24
24
|
@minimum_amount = minimum_amount
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
-
# Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
|
27
|
+
# Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). Each currency must be different from the `minimum_amount_currency` set on the promotion code.
|
|
28
28
|
attr_accessor :currency_options
|
|
29
29
|
# A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
|
|
30
30
|
attr_accessor :first_time_transaction
|
|
@@ -12,7 +12,7 @@ module Stripe
|
|
|
12
12
|
@minimum_amount = minimum_amount
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
|
-
# Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
|
15
|
+
# Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). Each currency must be different from the `minimum_amount_currency` set on the promotion code.
|
|
16
16
|
attr_accessor :currency_options
|
|
17
17
|
|
|
18
18
|
def initialize(currency_options: nil)
|
|
@@ -23,6 +23,8 @@ module Stripe
|
|
|
23
23
|
attr_accessor :payment_attempt_record
|
|
24
24
|
# The identifier of the PaymentIntent to refund.
|
|
25
25
|
attr_accessor :payment_intent
|
|
26
|
+
# The identifier of the PaymentRecord to refund.
|
|
27
|
+
attr_accessor :payment_record
|
|
26
28
|
# String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://docs.stripe.com/radar/lists), and will also help us improve our fraud detection algorithms.
|
|
27
29
|
attr_accessor :reason
|
|
28
30
|
# Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
|
|
@@ -41,6 +43,7 @@ module Stripe
|
|
|
41
43
|
origin: nil,
|
|
42
44
|
payment_attempt_record: nil,
|
|
43
45
|
payment_intent: nil,
|
|
46
|
+
payment_record: nil,
|
|
44
47
|
reason: nil,
|
|
45
48
|
refund_application_fee: nil,
|
|
46
49
|
reverse_transfer: nil
|
|
@@ -55,6 +58,7 @@ module Stripe
|
|
|
55
58
|
@origin = origin
|
|
56
59
|
@payment_attempt_record = payment_attempt_record
|
|
57
60
|
@payment_intent = payment_intent
|
|
61
|
+
@payment_record = payment_record
|
|
58
62
|
@reason = reason
|
|
59
63
|
@refund_application_fee = refund_application_fee
|
|
60
64
|
@reverse_transfer = reverse_transfer
|
|
@@ -198,6 +198,138 @@ module Stripe
|
|
|
198
198
|
end
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
+
class PauseSchedule < ::Stripe::RequestParams
|
|
202
|
+
class Pause < ::Stripe::RequestParams
|
|
203
|
+
class PauseAt < ::Stripe::RequestParams
|
|
204
|
+
# The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`.
|
|
205
|
+
attr_accessor :timestamp
|
|
206
|
+
# When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time.
|
|
207
|
+
attr_accessor :type
|
|
208
|
+
|
|
209
|
+
def initialize(timestamp: nil, type: nil)
|
|
210
|
+
@timestamp = timestamp
|
|
211
|
+
@type = type
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
class Settings < ::Stripe::RequestParams
|
|
216
|
+
class BillFor < ::Stripe::RequestParams
|
|
217
|
+
class OutstandingUsageThrough < ::Stripe::RequestParams
|
|
218
|
+
# Determines whether to collect metered usage accrued up to the pause date.
|
|
219
|
+
attr_accessor :type
|
|
220
|
+
|
|
221
|
+
def initialize(type: nil)
|
|
222
|
+
@type = type
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
class UnusedTimeFrom < ::Stripe::RequestParams
|
|
227
|
+
# Determines which point in the billing period unused time is credited from.
|
|
228
|
+
attr_accessor :type
|
|
229
|
+
|
|
230
|
+
def initialize(type: nil)
|
|
231
|
+
@type = type
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
# Controls whether to collect metered usage accrued up to the pause date.
|
|
235
|
+
attr_accessor :outstanding_usage_through
|
|
236
|
+
# Controls how unused time on subscription items is credited when pausing.
|
|
237
|
+
attr_accessor :unused_time_from
|
|
238
|
+
|
|
239
|
+
def initialize(outstanding_usage_through: nil, unused_time_from: nil)
|
|
240
|
+
@outstanding_usage_through = outstanding_usage_through
|
|
241
|
+
@unused_time_from = unused_time_from
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
# Controls what to bill for when pausing the subscription.
|
|
245
|
+
attr_accessor :bill_for
|
|
246
|
+
# Determines whether to generate an invoice for outstanding amounts when pausing.
|
|
247
|
+
attr_accessor :invoicing_behavior
|
|
248
|
+
# The pause type. Currently only `subscription` is supported.
|
|
249
|
+
attr_accessor :type
|
|
250
|
+
|
|
251
|
+
def initialize(bill_for: nil, invoicing_behavior: nil, type: nil)
|
|
252
|
+
@bill_for = bill_for
|
|
253
|
+
@invoicing_behavior = invoicing_behavior
|
|
254
|
+
@type = type
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
# When to pause the subscription.
|
|
258
|
+
attr_accessor :pause_at
|
|
259
|
+
# Settings controlling billing behavior during the pause.
|
|
260
|
+
attr_accessor :settings
|
|
261
|
+
|
|
262
|
+
def initialize(pause_at: nil, settings: nil)
|
|
263
|
+
@pause_at = pause_at
|
|
264
|
+
@settings = settings
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
class Resume < ::Stripe::RequestParams
|
|
269
|
+
class ResumeAt < ::Stripe::RequestParams
|
|
270
|
+
class Duration < ::Stripe::RequestParams
|
|
271
|
+
# The time unit for the resume duration. One of `day`, `week`, `month`, or `year`.
|
|
272
|
+
attr_accessor :interval
|
|
273
|
+
# The number of intervals after which the subscription resumes.
|
|
274
|
+
attr_accessor :interval_count
|
|
275
|
+
|
|
276
|
+
def initialize(interval: nil, interval_count: nil)
|
|
277
|
+
@interval = interval
|
|
278
|
+
@interval_count = interval_count
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
# The duration after which to resume the subscription. Required when `type` is `duration`.
|
|
282
|
+
attr_accessor :duration
|
|
283
|
+
# The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`.
|
|
284
|
+
attr_accessor :timestamp
|
|
285
|
+
# When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time.
|
|
286
|
+
attr_accessor :type
|
|
287
|
+
|
|
288
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
289
|
+
@duration = duration
|
|
290
|
+
@timestamp = timestamp
|
|
291
|
+
@type = type
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
class Settings < ::Stripe::RequestParams
|
|
296
|
+
# Controls the billing cycle anchor when the subscription resumes.
|
|
297
|
+
attr_accessor :billing_cycle_anchor
|
|
298
|
+
# Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_attempt`.
|
|
299
|
+
attr_accessor :payment_behavior
|
|
300
|
+
# Determines how to handle prorations when the subscription resumes. The default is `create_prorations`.
|
|
301
|
+
attr_accessor :proration_behavior
|
|
302
|
+
|
|
303
|
+
def initialize(billing_cycle_anchor: nil, payment_behavior: nil, proration_behavior: nil)
|
|
304
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
|
305
|
+
@payment_behavior = payment_behavior
|
|
306
|
+
@proration_behavior = proration_behavior
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
# When to resume the subscription.
|
|
310
|
+
attr_accessor :resume_at
|
|
311
|
+
# Settings controlling how the subscription resumes.
|
|
312
|
+
attr_accessor :settings
|
|
313
|
+
|
|
314
|
+
def initialize(resume_at: nil, settings: nil)
|
|
315
|
+
@resume_at = resume_at
|
|
316
|
+
@settings = settings
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
# A unique identifier for this pause schedule entry.
|
|
320
|
+
attr_accessor :key
|
|
321
|
+
# Configuration for when and how the subscription pauses.
|
|
322
|
+
attr_accessor :pause
|
|
323
|
+
# Configuration for when and how the subscription resumes.
|
|
324
|
+
attr_accessor :resume
|
|
325
|
+
|
|
326
|
+
def initialize(key: nil, pause: nil, resume: nil)
|
|
327
|
+
@key = key
|
|
328
|
+
@pause = pause
|
|
329
|
+
@resume = resume
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
|
|
201
333
|
class Phase < ::Stripe::RequestParams
|
|
202
334
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
203
335
|
class Discount < ::Stripe::RequestParams
|
|
@@ -508,7 +640,7 @@ module Stripe
|
|
|
508
640
|
end
|
|
509
641
|
# The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
|
510
642
|
attr_accessor :account_tax_ids
|
|
511
|
-
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `
|
|
643
|
+
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
|
|
512
644
|
attr_accessor :days_until_due
|
|
513
645
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
514
646
|
attr_accessor :issuer
|
|
@@ -927,11 +1059,13 @@ module Stripe
|
|
|
927
1059
|
attr_accessor :from_subscription
|
|
928
1060
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
929
1061
|
attr_accessor :metadata
|
|
1062
|
+
# Sets the pause schedules for the subscription schedule. Each entry configures when and how the subscription pauses and optionally when and how it resumes.
|
|
1063
|
+
attr_accessor :pause_schedules
|
|
930
1064
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
|
931
1065
|
attr_accessor :phases
|
|
932
1066
|
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
933
1067
|
attr_accessor :prebilling
|
|
934
|
-
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
|
1068
|
+
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately, and to avoid unexpected behavior due to request delays or clock skew resulting in a slightly backdated or postdated start. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
|
935
1069
|
attr_accessor :start_date
|
|
936
1070
|
|
|
937
1071
|
def initialize(
|
|
@@ -945,6 +1079,7 @@ module Stripe
|
|
|
945
1079
|
expand: nil,
|
|
946
1080
|
from_subscription: nil,
|
|
947
1081
|
metadata: nil,
|
|
1082
|
+
pause_schedules: nil,
|
|
948
1083
|
phases: nil,
|
|
949
1084
|
prebilling: nil,
|
|
950
1085
|
start_date: nil
|
|
@@ -959,6 +1094,7 @@ module Stripe
|
|
|
959
1094
|
@expand = expand
|
|
960
1095
|
@from_subscription = from_subscription
|
|
961
1096
|
@metadata = metadata
|
|
1097
|
+
@pause_schedules = pause_schedules
|
|
962
1098
|
@phases = phases
|
|
963
1099
|
@prebilling = prebilling
|
|
964
1100
|
@start_date = start_date
|
|
@@ -80,7 +80,7 @@ module Stripe
|
|
|
80
80
|
attr_accessor :completed_at
|
|
81
81
|
# Only return subscription schedules that were created during the given date interval.
|
|
82
82
|
attr_accessor :created
|
|
83
|
-
# Only return subscription schedules for the given customer.
|
|
83
|
+
# Only return subscription schedules for the given customer. The response will not include subscription schedules for customers with a test clock attached if this parameter is not set.
|
|
84
84
|
attr_accessor :customer
|
|
85
85
|
# Only return subscription schedules for the given account.
|
|
86
86
|
attr_accessor :customer_account
|