stripe 19.4.0.pre.alpha.2 → 19.4.0.pre.alpha.3

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_version.rb +1 -1
  3. data/lib/stripe/event_types.rb +15 -0
  4. data/lib/stripe/events/v2_billing_contract_activated_event.rb +44 -0
  5. data/lib/stripe/events/v2_billing_contract_canceled_event.rb +44 -0
  6. data/lib/stripe/events/v2_billing_contract_created_event.rb +44 -0
  7. data/lib/stripe/events/v2_billing_contract_ended_event.rb +44 -0
  8. data/lib/stripe/events/v2_billing_contract_updated_event.rb +44 -0
  9. data/lib/stripe/params/capital/financing_transaction_list_params.rb +2 -2
  10. data/lib/stripe/params/checkout/session_create_params.rb +1 -1
  11. data/lib/stripe/params/invoice_create_preview_params.rb +1 -1
  12. data/lib/stripe/params/payment_intent_confirm_params.rb +10 -1
  13. data/lib/stripe/params/payment_intent_create_params.rb +10 -1
  14. data/lib/stripe/params/payment_intent_update_params.rb +10 -1
  15. data/lib/stripe/params/promotion_code_create_params.rb +1 -1
  16. data/lib/stripe/params/promotion_code_update_params.rb +1 -1
  17. data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
  18. data/lib/stripe/params/subscription_schedule_list_params.rb +1 -1
  19. data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
  20. data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +35 -0
  21. data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +21 -0
  22. data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +21 -0
  23. data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +4 -0
  24. data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +4 -0
  25. data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +27 -0
  26. data/lib/stripe/params/v2/billing/contract_cancel_params.rb +1 -1
  27. data/lib/stripe/params/v2/billing/contract_create_params.rb +13 -175
  28. data/lib/stripe/params/v2/billing/contract_list_params.rb +1 -1
  29. data/lib/stripe/params/v2/billing/contract_update_params.rb +48 -495
  30. data/lib/stripe/params/v2/core/account_list_params.rb +9 -1
  31. data/lib/stripe/params/v2/data/analytics/metric_query_create_params.rb +2 -2
  32. data/lib/stripe/params.rb +8 -0
  33. data/lib/stripe/resources/account.rb +55 -3
  34. data/lib/stripe/resources/bank_account.rb +2 -2
  35. data/lib/stripe/resources/billing/alert_recovered.rb +17 -1
  36. data/lib/stripe/resources/capability.rb +2 -2
  37. data/lib/stripe/resources/capital/financing_transaction.rb +1 -1
  38. data/lib/stripe/resources/charge.rb +1 -1
  39. data/lib/stripe/resources/checkout/session.rb +21 -3
  40. data/lib/stripe/resources/confirmation_token.rb +1 -1
  41. data/lib/stripe/resources/dispute.rb +4 -2
  42. data/lib/stripe/resources/financial_connections/session.rb +2 -0
  43. data/lib/stripe/resources/invoice.rb +3 -0
  44. data/lib/stripe/resources/issuing/authorization.rb +52 -1
  45. data/lib/stripe/resources/issuing/transaction.rb +47 -1
  46. data/lib/stripe/resources/payment_attempt_record.rb +2 -2
  47. data/lib/stripe/resources/payment_intent.rb +28 -0
  48. data/lib/stripe/resources/payment_method.rb +1 -1
  49. data/lib/stripe/resources/payment_record.rb +2 -2
  50. data/lib/stripe/resources/person.rb +2 -2
  51. data/lib/stripe/resources/quote.rb +22 -1
  52. data/lib/stripe/resources/quote_preview_invoice.rb +3 -0
  53. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +44 -2
  54. data/lib/stripe/resources/setup_attempt.rb +16 -0
  55. data/lib/stripe/resources/setup_intent.rb +3 -0
  56. data/lib/stripe/resources/shared_payment/granted_token.rb +1 -1
  57. data/lib/stripe/resources/subscription_schedule.rb +44 -2
  58. data/lib/stripe/resources/tax/registration.rb +32 -0
  59. data/lib/stripe/resources/terminal/reader.rb +173 -0
  60. data/lib/stripe/resources/v2/billing/contract.rb +47 -330
  61. data/lib/stripe/resources/v2/billing/contract_pricing_line_quantity_change.rb +2 -2
  62. data/lib/stripe/resources/v2/core/account.rb +18 -0
  63. data/lib/stripe/resources/v2/money_management/payout_method.rb +16 -0
  64. data/lib/stripe/resources/v2/money_management/received_credit.rb +30 -0
  65. data/lib/stripe/resources.rb +15 -0
  66. data/lib/stripe/services/account_service.rb +1 -1
  67. data/lib/stripe/services/dispute_service.rb +1 -1
  68. data/lib/stripe/services/terminal/reader_service.rb +44 -0
  69. data/lib/stripe/services/v2/billing/contract_service.rb +7 -7
  70. data/lib/stripe/stripe_event_notification_handler.rb +30 -0
  71. data/lib/stripe/version.rb +1 -1
  72. data/rbi/stripe.rbi +1039 -1148
  73. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0c815e9e3f3c935dd648164ab13ca0e342f52f45b7abf00c5bfa4f58a86f319
4
- data.tar.gz: fe34a7949ae94ce9bfb4f8cb0c37a6692e2219b2b01cb7bb21b991018471fef5
3
+ metadata.gz: dc92f0d6b95ef6c9484b61852f7651c905cd76bc63c93530c2b5d0a9967f496e
4
+ data.tar.gz: 69dfe990e13f1ab11530560c136f5b14378d754d66c66d99f0c8b9444743270a
5
5
  SHA512:
6
- metadata.gz: 4bd1ffd2bf9b22df5f7f3e8261914351d57515c1b9636142cfa178fd40bfdb1097e40ea921e0f3878be8070a4a57f594b50395f00ac37762e676754708e3383e
7
- data.tar.gz: ed13bbe042eca90940612cdcd786f3abbfa30b6d0e3d6d24e4fbdbd36072bce728db5c716ce05cc4442188fcbba6ac9d63064301211dc001bb7f1704dc84d2b0
6
+ metadata.gz: 202a8909d9d0bbe087f1ec32cff0c3306946bc0abfc05bd8321fa2b10d2fe483cebdfefa85c7db9a9851130de1218c679338238d597942eb7f97771bdc9c52ea
7
+ data.tar.gz: 4ed2df46a47f2a8a414bca75565604f267344c32367a18a6f24eb9f6e0056522e97b6ecabc203bea7e9f7f58bcac7f801d7b475d81ca12649214ac8819b5997e
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2026-07-01.preview"
6
+ CURRENT = "2026-07-08.preview"
7
7
  end
8
8
  end
@@ -282,6 +282,11 @@ module Stripe
282
282
  Events::V2BillingCadenceBilledEvent.lookup_type => Events::V2BillingCadenceBilledEvent,
283
283
  Events::V2BillingCadenceCanceledEvent.lookup_type => Events::V2BillingCadenceCanceledEvent,
284
284
  Events::V2BillingCadenceCreatedEvent.lookup_type => Events::V2BillingCadenceCreatedEvent,
285
+ Events::V2BillingContractActivatedEvent.lookup_type => Events::V2BillingContractActivatedEvent,
286
+ Events::V2BillingContractCanceledEvent.lookup_type => Events::V2BillingContractCanceledEvent,
287
+ Events::V2BillingContractCreatedEvent.lookup_type => Events::V2BillingContractCreatedEvent,
288
+ Events::V2BillingContractEndedEvent.lookup_type => Events::V2BillingContractEndedEvent,
289
+ Events::V2BillingContractUpdatedEvent.lookup_type => Events::V2BillingContractUpdatedEvent,
285
290
  Events::V2BillingLicenseFeeCreatedEvent.lookup_type => Events::V2BillingLicenseFeeCreatedEvent,
286
291
  Events::V2BillingLicenseFeeUpdatedEvent.lookup_type => Events::V2BillingLicenseFeeUpdatedEvent,
287
292
  Events::V2BillingLicenseFeeVersionCreatedEvent.lookup_type =>
@@ -1013,6 +1018,16 @@ module Stripe
1013
1018
  Events::V2BillingCadenceCanceledEventNotification,
1014
1019
  Events::V2BillingCadenceCreatedEventNotification.lookup_type =>
1015
1020
  Events::V2BillingCadenceCreatedEventNotification,
1021
+ Events::V2BillingContractActivatedEventNotification.lookup_type =>
1022
+ Events::V2BillingContractActivatedEventNotification,
1023
+ Events::V2BillingContractCanceledEventNotification.lookup_type =>
1024
+ Events::V2BillingContractCanceledEventNotification,
1025
+ Events::V2BillingContractCreatedEventNotification.lookup_type =>
1026
+ Events::V2BillingContractCreatedEventNotification,
1027
+ Events::V2BillingContractEndedEventNotification.lookup_type =>
1028
+ Events::V2BillingContractEndedEventNotification,
1029
+ Events::V2BillingContractUpdatedEventNotification.lookup_type =>
1030
+ Events::V2BillingContractUpdatedEventNotification,
1016
1031
  Events::V2BillingLicenseFeeCreatedEventNotification.lookup_type =>
1017
1032
  Events::V2BillingLicenseFeeCreatedEventNotification,
1018
1033
  Events::V2BillingLicenseFeeUpdatedEventNotification.lookup_type =>
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Contract transitions from Draft to Active.
7
+ class V2BillingContractActivatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.billing.contract.activated"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Contract transitions from Draft to Active.
25
+ class V2BillingContractActivatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.billing.contract.activated"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Contract related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Contract transitions to canceled.
7
+ class V2BillingContractCanceledEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.billing.contract.canceled"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Contract transitions to canceled.
25
+ class V2BillingContractCanceledEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.billing.contract.canceled"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Contract related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Contract is created.
7
+ class V2BillingContractCreatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.billing.contract.created"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Contract is created.
25
+ class V2BillingContractCreatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.billing.contract.created"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Contract related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Contract reaches the end of all its Pricing Lines and transitions to ended.
7
+ class V2BillingContractEndedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.billing.contract.ended"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Contract reaches the end of all its Pricing Lines and transitions to ended.
25
+ class V2BillingContractEndedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.billing.contract.ended"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Contract related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Contract is updated.
7
+ class V2BillingContractUpdatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.billing.contract.updated"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Contract is updated.
25
+ class V2BillingContractUpdatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.billing.contract.updated"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Contract related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Capital
6
6
  class FinancingTransactionListParams < ::Stripe::RequestParams
7
- # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge.
7
+ # For transactions of type `payment` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge.
8
8
  attr_accessor :charge
9
9
  # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
10
10
  attr_accessor :ending_before
@@ -18,7 +18,7 @@ module Stripe
18
18
  attr_accessor :reversed_transaction
19
19
  # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
20
20
  attr_accessor :starting_after
21
- # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction.
21
+ # For transactions of type `payment` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction.
22
22
  attr_accessor :treasury_transaction
23
23
 
24
24
  def initialize(
@@ -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. You can't set this parameter if `ui_mode` is `elements`.
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
@@ -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
 
@@ -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)
@@ -508,7 +508,7 @@ module Stripe
508
508
  end
509
509
  # 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
510
  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 `billing=charge_automatically`.
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 `collection_method=charge_automatically`.
512
512
  attr_accessor :days_until_due
513
513
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
514
514
  attr_accessor :issuer
@@ -931,7 +931,7 @@ module Stripe
931
931
  attr_accessor :phases
932
932
  # If specified, the invoicing for the given billing cycle iterations will be processed now.
933
933
  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.
934
+ # 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
935
  attr_accessor :start_date
936
936
 
937
937
  def initialize(
@@ -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
@@ -488,7 +488,7 @@ module Stripe
488
488
  end
489
489
  # 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.
490
490
  attr_accessor :account_tax_ids
491
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
491
+ # 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`.
492
492
  attr_accessor :days_until_due
493
493
  # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
494
494
  attr_accessor :issuer
@@ -791,7 +791,7 @@ module Stripe
791
791
  attr_accessor :pause_collection
792
792
  # 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.
793
793
  attr_accessor :proration_behavior
794
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
794
+ # 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.
795
795
  attr_accessor :start_date
796
796
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
797
797
  attr_accessor :transfer_data
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class ReaderActivateGiftCardParams < ::Stripe::RequestParams
7
+ class Balance < ::Stripe::RequestParams
8
+ # The initial balance amount to be loaded when activating the gift card, in the smallest currency unit
9
+ attr_accessor :amount
10
+ # 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).
11
+ attr_accessor :currency
12
+
13
+ def initialize(amount: nil, currency: nil)
14
+ @amount = amount
15
+ @currency = currency
16
+ end
17
+ end
18
+ # The initial balance to set on the gift card.
19
+ attr_accessor :balance
20
+ # The brand of the gift card.
21
+ attr_accessor :brand
22
+ # Specifies which fields in the response should be expanded.
23
+ attr_accessor :expand
24
+ # The Stripe account ID to process the gift card operation on behalf of.
25
+ attr_accessor :on_behalf_of
26
+
27
+ def initialize(balance: nil, brand: nil, expand: nil, on_behalf_of: nil)
28
+ @balance = balance
29
+ @brand = brand
30
+ @expand = expand
31
+ @on_behalf_of = on_behalf_of
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class ReaderCashoutGiftCardParams < ::Stripe::RequestParams
7
+ # The brand of the gift card.
8
+ attr_accessor :brand
9
+ # Specifies which fields in the response should be expanded.
10
+ attr_accessor :expand
11
+ # The Stripe account ID to process the gift card operation on behalf of.
12
+ attr_accessor :on_behalf_of
13
+
14
+ def initialize(brand: nil, expand: nil, on_behalf_of: nil)
15
+ @brand = brand
16
+ @expand = expand
17
+ @on_behalf_of = on_behalf_of
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class ReaderCheckGiftCardBalanceParams < ::Stripe::RequestParams
7
+ # The brand of the gift card.
8
+ attr_accessor :brand
9
+ # Specifies which fields in the response should be expanded.
10
+ attr_accessor :expand
11
+ # The Stripe account ID to process the gift card operation on behalf of.
12
+ attr_accessor :on_behalf_of
13
+
14
+ def initialize(brand: nil, expand: nil, on_behalf_of: nil)
15
+ @brand = brand
16
+ @expand = expand
17
+ @on_behalf_of = on_behalf_of
18
+ end
19
+ end
20
+ end
21
+ end
@@ -17,6 +17,8 @@ module Stripe
17
17
  attr_accessor :allow_redisplay
18
18
  # Enables cancel button on transaction screens.
19
19
  attr_accessor :enable_customer_cancellation
20
+ # The gift card brand to use in the transaction.
21
+ attr_accessor :gift_card_brand
20
22
  # Override showing a tipping selection screen on this transaction.
21
23
  attr_accessor :skip_tipping
22
24
  # Tipping configuration for this transaction.
@@ -25,11 +27,13 @@ module Stripe
25
27
  def initialize(
26
28
  allow_redisplay: nil,
27
29
  enable_customer_cancellation: nil,
30
+ gift_card_brand: nil,
28
31
  skip_tipping: nil,
29
32
  tipping: nil
30
33
  )
31
34
  @allow_redisplay = allow_redisplay
32
35
  @enable_customer_cancellation = enable_customer_cancellation
36
+ @gift_card_brand = gift_card_brand
33
37
  @skip_tipping = skip_tipping
34
38
  @tipping = tipping
35
39
  end
@@ -17,6 +17,8 @@ module Stripe
17
17
  attr_accessor :allow_redisplay
18
18
  # Enables cancel button on transaction screens.
19
19
  attr_accessor :enable_customer_cancellation
20
+ # The gift card brand to use in the transaction.
21
+ attr_accessor :gift_card_brand
20
22
  # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
21
23
  attr_accessor :return_url
22
24
  # Override showing a tipping selection screen on this transaction.
@@ -27,12 +29,14 @@ module Stripe
27
29
  def initialize(
28
30
  allow_redisplay: nil,
29
31
  enable_customer_cancellation: nil,
32
+ gift_card_brand: nil,
30
33
  return_url: nil,
31
34
  skip_tipping: nil,
32
35
  tipping: nil
33
36
  )
34
37
  @allow_redisplay = allow_redisplay
35
38
  @enable_customer_cancellation = enable_customer_cancellation
39
+ @gift_card_brand = gift_card_brand
36
40
  @return_url = return_url
37
41
  @skip_tipping = skip_tipping
38
42
  @tipping = tipping
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class ReaderReloadGiftCardParams < ::Stripe::RequestParams
7
+ # The amount to add to the gift card balance, in the smallest currency unit.
8
+ attr_accessor :amount
9
+ # The brand of the gift card.
10
+ attr_accessor :brand
11
+ # 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).
12
+ attr_accessor :currency
13
+ # Specifies which fields in the response should be expanded.
14
+ attr_accessor :expand
15
+ # The Stripe account ID to process the gift card operation on behalf of.
16
+ attr_accessor :on_behalf_of
17
+
18
+ def initialize(amount: nil, brand: nil, currency: nil, expand: nil, on_behalf_of: nil)
19
+ @amount = amount
20
+ @brand = brand
21
+ @currency = currency
22
+ @expand = expand
23
+ @on_behalf_of = on_behalf_of
24
+ end
25
+ end
26
+ end
27
+ end
@@ -6,7 +6,7 @@ module Stripe
6
6
  module Billing
7
7
  class ContractCancelParams < ::Stripe::RequestParams
8
8
  class CancelPricingLine < ::Stripe::RequestParams
9
- # The ID of the pricing line.
9
+ # The id of the pricing line.
10
10
  attr_accessor :id
11
11
  # The lookup key of the pricing line.
12
12
  attr_accessor :lookup_key