stripe 19.4.0.pre.alpha.1 → 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 (158) 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/object_types.rb +5 -0
  10. data/lib/stripe/params/account_create_params.rb +1 -1
  11. data/lib/stripe/params/account_update_params.rb +1 -1
  12. data/lib/stripe/params/balance_transaction_list_params.rb +1 -1
  13. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +1 -1
  14. data/lib/stripe/params/billing/credit_grant_create_params.rb +1 -1
  15. data/lib/stripe/params/capital/financing_transaction_list_params.rb +2 -2
  16. data/lib/stripe/params/checkout/session_create_params.rb +56 -4
  17. data/lib/stripe/params/confirmation_token_create_params.rb +1 -1
  18. data/lib/stripe/params/credit_note_create_params.rb +1 -1
  19. data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +1 -1
  20. data/lib/stripe/params/credit_note_preview_lines_list_params.rb +1 -1
  21. data/lib/stripe/params/credit_note_preview_params.rb +1 -1
  22. data/lib/stripe/params/crypto/customer_consumer_wallet_list_params.rb +24 -0
  23. data/lib/stripe/params/crypto/customer_payment_token_list_params.rb +24 -0
  24. data/lib/stripe/params/crypto/customer_retrieve_params.rb +15 -0
  25. data/lib/stripe/params/crypto/onramp_session_checkout_params.rb +56 -0
  26. data/lib/stripe/params/crypto/onramp_session_create_params.rb +122 -0
  27. data/lib/stripe/params/crypto/onramp_session_list_params.rb +62 -0
  28. data/lib/stripe/params/crypto/onramp_session_quote_params.rb +15 -0
  29. data/lib/stripe/params/crypto/onramp_session_retrieve_params.rb +15 -0
  30. data/lib/stripe/params/crypto/onramp_transaction_limits_retrieve_params.rb +33 -0
  31. data/lib/stripe/params/dispute_update_params.rb +17 -1
  32. data/lib/stripe/params/financial_connections/session_create_params.rb +1 -1
  33. data/lib/stripe/params/invoice_add_lines_params.rb +1 -1
  34. data/lib/stripe/params/invoice_create_preview_params.rb +53 -2
  35. data/lib/stripe/params/invoice_line_item_update_params.rb +1 -1
  36. data/lib/stripe/params/invoice_update_lines_params.rb +1 -1
  37. data/lib/stripe/params/order_create_params.rb +1 -1
  38. data/lib/stripe/params/order_update_params.rb +1 -1
  39. data/lib/stripe/params/payment_attempt_record_report_failed_params.rb +38 -0
  40. data/lib/stripe/params/payment_attempt_record_report_refund_params.rb +4 -0
  41. data/lib/stripe/params/payment_intent_confirm_params.rb +61 -4
  42. data/lib/stripe/params/payment_intent_create_params.rb +61 -4
  43. data/lib/stripe/params/payment_intent_search_params.rb +1 -1
  44. data/lib/stripe/params/payment_intent_update_params.rb +61 -4
  45. data/lib/stripe/params/payment_link_create_params.rb +1 -1
  46. data/lib/stripe/params/payment_method_create_params.rb +1 -1
  47. data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +38 -0
  48. data/lib/stripe/params/payment_record_report_refund_params.rb +4 -0
  49. data/lib/stripe/params/promotion_code_create_params.rb +1 -1
  50. data/lib/stripe/params/promotion_code_update_params.rb +1 -1
  51. data/lib/stripe/params/setup_intent_confirm_params.rb +1 -1
  52. data/lib/stripe/params/setup_intent_create_params.rb +1 -1
  53. data/lib/stripe/params/setup_intent_update_params.rb +1 -1
  54. data/lib/stripe/params/subscription_create_params.rb +28 -1
  55. data/lib/stripe/params/subscription_pause_params.rb +1 -1
  56. data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
  57. data/lib/stripe/params/subscription_schedule_list_params.rb +1 -1
  58. data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
  59. data/lib/stripe/params/subscription_update_params.rb +29 -2
  60. data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +35 -0
  61. data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +21 -0
  62. data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +21 -0
  63. data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +4 -0
  64. data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +4 -0
  65. data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +27 -0
  66. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +1 -1
  67. data/lib/stripe/params/topup_create_params.rb +24 -0
  68. data/lib/stripe/params/v2/billing/contract_cancel_params.rb +1 -1
  69. data/lib/stripe/params/v2/billing/contract_create_params.rb +13 -175
  70. data/lib/stripe/params/v2/billing/contract_list_params.rb +1 -1
  71. data/lib/stripe/params/v2/billing/contract_update_params.rb +48 -495
  72. data/lib/stripe/params/v2/core/account_list_params.rb +9 -1
  73. data/lib/stripe/params/v2/data/analytics/metric_query_create_params.rb +2 -2
  74. data/lib/stripe/params/v2/iam/api_key_create_params.rb +18 -1
  75. data/lib/stripe/params/v2/iam/api_key_update_params.rb +7 -1
  76. data/lib/stripe/params.rb +29 -0
  77. data/lib/stripe/resources/account.rb +55 -3
  78. data/lib/stripe/resources/balance_transaction.rb +3 -3
  79. data/lib/stripe/resources/bank_account.rb +2 -2
  80. data/lib/stripe/resources/billing/alert_recovered.rb +17 -1
  81. data/lib/stripe/resources/capability.rb +2 -2
  82. data/lib/stripe/resources/capital/financing_offer.rb +2 -0
  83. data/lib/stripe/resources/capital/financing_summary.rb +2 -0
  84. data/lib/stripe/resources/capital/financing_transaction.rb +1 -1
  85. data/lib/stripe/resources/card.rb +16 -1
  86. data/lib/stripe/resources/charge.rb +31 -1
  87. data/lib/stripe/resources/checkout/session.rb +176 -4
  88. data/lib/stripe/resources/confirmation_token.rb +10 -1
  89. data/lib/stripe/resources/credit_note.rb +2 -0
  90. data/lib/stripe/resources/crypto/customer.rb +73 -0
  91. data/lib/stripe/resources/crypto/customer_consumer_wallet.rb +35 -0
  92. data/lib/stripe/resources/crypto/customer_payment_token.rb +84 -0
  93. data/lib/stripe/resources/crypto/onramp_session.rb +218 -0
  94. data/lib/stripe/resources/crypto/onramp_transaction_limits.rb +33 -0
  95. data/lib/stripe/resources/customer.rb +16 -0
  96. data/lib/stripe/resources/dispute.rb +36 -2
  97. data/lib/stripe/resources/financial_connections/account.rb +20 -1
  98. data/lib/stripe/resources/financial_connections/authorization.rb +18 -1
  99. data/lib/stripe/resources/financial_connections/session.rb +2 -0
  100. data/lib/stripe/resources/gift_card_operation.rb +1 -14
  101. data/lib/stripe/resources/invoice.rb +3 -0
  102. data/lib/stripe/resources/issuing/authorization.rb +72 -1
  103. data/lib/stripe/resources/issuing/card.rb +18 -0
  104. data/lib/stripe/resources/issuing/cardholder.rb +16 -0
  105. data/lib/stripe/resources/issuing/dispute.rb +16 -0
  106. data/lib/stripe/resources/issuing/token.rb +2 -0
  107. data/lib/stripe/resources/issuing/transaction.rb +65 -1
  108. data/lib/stripe/resources/order.rb +1 -1
  109. data/lib/stripe/resources/payment_attempt_record.rb +10 -4
  110. data/lib/stripe/resources/payment_intent.rb +93 -1
  111. data/lib/stripe/resources/payment_method.rb +26 -1
  112. data/lib/stripe/resources/payment_record.rb +10 -4
  113. data/lib/stripe/resources/person.rb +2 -2
  114. data/lib/stripe/resources/quote.rb +22 -1
  115. data/lib/stripe/resources/quote_preview_invoice.rb +3 -0
  116. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +44 -2
  117. data/lib/stripe/resources/radar/value_list_item.rb +15 -1
  118. data/lib/stripe/resources/reserve/hold.rb +18 -1
  119. data/lib/stripe/resources/setup_attempt.rb +32 -0
  120. data/lib/stripe/resources/setup_intent.rb +19 -0
  121. data/lib/stripe/resources/shared_payment/granted_token.rb +10 -1
  122. data/lib/stripe/resources/source.rb +16 -0
  123. data/lib/stripe/resources/subscription.rb +24 -3
  124. data/lib/stripe/resources/subscription_schedule.rb +44 -2
  125. data/lib/stripe/resources/tax/registration.rb +32 -0
  126. data/lib/stripe/resources/tax_fund.rb +16 -16
  127. data/lib/stripe/resources/terminal/reader.rb +173 -0
  128. data/lib/stripe/resources/token.rb +15 -1
  129. data/lib/stripe/resources/v2/billing/contract.rb +47 -330
  130. data/lib/stripe/resources/v2/billing/contract_pricing_line_quantity_change.rb +2 -2
  131. data/lib/stripe/resources/v2/core/account.rb +18 -0
  132. data/lib/stripe/resources/v2/iam/api_key.rb +4 -0
  133. data/lib/stripe/resources/v2/money_management/financial_account.rb +44 -0
  134. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +1 -1
  135. data/lib/stripe/resources/v2/money_management/payout_method.rb +16 -0
  136. data/lib/stripe/resources/v2/money_management/received_credit.rb +30 -0
  137. data/lib/stripe/resources/v2/money_management/transaction.rb +8 -0
  138. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +8 -0
  139. data/lib/stripe/resources.rb +28 -0
  140. data/lib/stripe/services/account_service.rb +1 -1
  141. data/lib/stripe/services/balance_transaction_service.rb +2 -2
  142. data/lib/stripe/services/credit_note_service.rb +2 -0
  143. data/lib/stripe/services/crypto/customer_consumer_wallet_service.rb +19 -0
  144. data/lib/stripe/services/crypto/customer_payment_token_service.rb +19 -0
  145. data/lib/stripe/services/crypto/customer_service.rb +27 -0
  146. data/lib/stripe/services/crypto/onramp_session_service.rb +69 -0
  147. data/lib/stripe/services/crypto/onramp_transaction_limits_service.rb +19 -0
  148. data/lib/stripe/services/crypto_service.rb +15 -0
  149. data/lib/stripe/services/dispute_service.rb +1 -1
  150. data/lib/stripe/services/subscription_service.rb +1 -1
  151. data/lib/stripe/services/terminal/reader_service.rb +44 -0
  152. data/lib/stripe/services/v1_services.rb +2 -1
  153. data/lib/stripe/services/v2/billing/contract_service.rb +7 -7
  154. data/lib/stripe/services.rb +15 -0
  155. data/lib/stripe/stripe_event_notification_handler.rb +30 -0
  156. data/lib/stripe/version.rb +1 -1
  157. data/rbi/stripe.rbi +3507 -1266
  158. metadata +31 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0f7fbd0197d8f612f40f802b4b6883f9789610bbb2e6b128bcc3a9da99171b4
4
- data.tar.gz: 3ab3a92a03ac7209d759e45ddd49962e2cf56d0504e1b68e92a46bb44474a647
3
+ metadata.gz: dc92f0d6b95ef6c9484b61852f7651c905cd76bc63c93530c2b5d0a9967f496e
4
+ data.tar.gz: 69dfe990e13f1ab11530560c136f5b14378d754d66c66d99f0c8b9444743270a
5
5
  SHA512:
6
- metadata.gz: d624ffdd7b9976b65c8de6f68bfbf66eb96b1f486bbd4686a8b83c43b7c3a5af797ebfb69a92b0048d4762ceb37fab84c40f0fe54f81515ff47d5b75269a3d57
7
- data.tar.gz: e70acd35a79056ca32a01065a1972c6f2235e8139d3074d095c38e6d976b9fb36a6b6e34dec45e327e9fa3c2edf6b6d031e743df20c39116bc901af43b765739
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-06-24.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
@@ -58,6 +58,11 @@ module Stripe
58
58
  Coupon.object_name => Coupon,
59
59
  CreditNote.object_name => CreditNote,
60
60
  CreditNoteLineItem.object_name => CreditNoteLineItem,
61
+ Crypto::Customer.object_name => Crypto::Customer,
62
+ Crypto::CustomerConsumerWallet.object_name => Crypto::CustomerConsumerWallet,
63
+ Crypto::CustomerPaymentToken.object_name => Crypto::CustomerPaymentToken,
64
+ Crypto::OnrampSession.object_name => Crypto::OnrampSession,
65
+ Crypto::OnrampTransactionLimits.object_name => Crypto::OnrampTransactionLimits,
61
66
  Customer.object_name => Customer,
62
67
  CustomerBalanceTransaction.object_name => CustomerBalanceTransaction,
63
68
  CustomerCashBalanceTransaction.object_name => CustomerCashBalanceTransaction,
@@ -1755,7 +1755,7 @@ module Stripe
1755
1755
  attr_accessor :bank_account_ownership_verification
1756
1756
  # One or more documents that demonstrate proof of a company's license to operate.
1757
1757
  attr_accessor :company_license
1758
- # One or more documents showing the company's Memorandum of Association.
1758
+ # One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association).
1759
1759
  attr_accessor :company_memorandum_of_association
1760
1760
  # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
1761
1761
  attr_accessor :company_ministerial_decree
@@ -1674,7 +1674,7 @@ module Stripe
1674
1674
  attr_accessor :bank_account_ownership_verification
1675
1675
  # One or more documents that demonstrate proof of a company's license to operate.
1676
1676
  attr_accessor :company_license
1677
- # One or more documents showing the company's Memorandum of Association.
1677
+ # One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association).
1678
1678
  attr_accessor :company_memorandum_of_association
1679
1679
  # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
1680
1680
  attr_accessor :company_ministerial_decree
@@ -36,7 +36,7 @@ module Stripe
36
36
  attr_accessor :source
37
37
  # 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.
38
38
  attr_accessor :starting_after
39
- # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`.
39
+ # Only returns transactions of the given type. One of: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`.
40
40
  attr_accessor :type
41
41
 
42
42
  def initialize(
@@ -27,7 +27,7 @@ module Stripe
27
27
  attr_accessor :billable_items
28
28
  # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
29
29
  attr_accessor :price_type
30
- # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
30
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices.
31
31
  attr_accessor :prices
32
32
 
33
33
  def initialize(billable_items: nil, price_type: nil, prices: nil)
@@ -75,7 +75,7 @@ module Stripe
75
75
  attr_accessor :billable_items
76
76
  # The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
77
77
  attr_accessor :price_type
78
- # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
78
+ # A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices.
79
79
  attr_accessor :prices
80
80
 
81
81
  def initialize(billable_items: nil, price_type: nil, prices: nil)
@@ -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(
@@ -62,6 +62,12 @@ module Stripe
62
62
  @type = type
63
63
  end
64
64
  end
65
+ # Controls how much address information Checkout collects when [automatic_tax](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-automatic_tax-enabled) is enabled.
66
+ #
67
+ # Defaults to `full`, which collects the address fields needed for the most accurate tax calculation. Set to `minimal` to collect only the fields required for tax in the buyer's country, accepting potentially less precise tax calculation in exchange for a streamlined form.
68
+ #
69
+ # Only honored when `automatic_tax.enabled` is `true`, `billing_address_collection` is `auto`, the resolved tax address source is the session billing address, and `ui_mode` is `form`.
70
+ attr_accessor :address_collection_precision
65
71
  # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
66
72
  #
67
73
  # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
@@ -69,7 +75,8 @@ module Stripe
69
75
  # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
70
76
  attr_accessor :liability
71
77
 
72
- def initialize(enabled: nil, liability: nil)
78
+ def initialize(address_collection_precision: nil, enabled: nil, liability: nil)
79
+ @address_collection_precision = address_collection_precision
73
80
  @enabled = enabled
74
81
  @liability = liability
75
82
  end
@@ -2194,6 +2201,24 @@ module Stripe
2194
2201
  end
2195
2202
  end
2196
2203
 
2204
+ class Sunbit < ::Stripe::RequestParams
2205
+ # Controls when the funds will be captured from the customer's account.
2206
+ attr_accessor :capture_method
2207
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2208
+ #
2209
+ # 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.
2210
+ #
2211
+ # 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.
2212
+ #
2213
+ # 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).
2214
+ attr_accessor :setup_future_usage
2215
+
2216
+ def initialize(capture_method: nil, setup_future_usage: nil)
2217
+ @capture_method = capture_method
2218
+ @setup_future_usage = setup_future_usage
2219
+ end
2220
+ end
2221
+
2197
2222
  class Swish < ::Stripe::RequestParams
2198
2223
  # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
2199
2224
  attr_accessor :reference
@@ -2397,6 +2422,8 @@ module Stripe
2397
2422
  attr_accessor :sepa_debit
2398
2423
  # contains details about the Sofort payment method options.
2399
2424
  attr_accessor :sofort
2425
+ # contains details about the Sunbit payment method options.
2426
+ attr_accessor :sunbit
2400
2427
  # contains details about the Swish payment method options.
2401
2428
  attr_accessor :swish
2402
2429
  # contains details about the TWINT payment method options.
@@ -2454,6 +2481,7 @@ module Stripe
2454
2481
  scalapay: nil,
2455
2482
  sepa_debit: nil,
2456
2483
  sofort: nil,
2484
+ sunbit: nil,
2457
2485
  swish: nil,
2458
2486
  twint: nil,
2459
2487
  upi: nil,
@@ -2505,6 +2533,7 @@ module Stripe
2505
2533
  @scalapay = scalapay
2506
2534
  @sepa_debit = sepa_debit
2507
2535
  @sofort = sofort
2536
+ @sunbit = sunbit
2508
2537
  @swish = swish
2509
2538
  @twint = twint
2510
2539
  @upi = upi
@@ -2727,6 +2756,27 @@ module Stripe
2727
2756
  end
2728
2757
 
2729
2758
  class SubscriptionData < ::Stripe::RequestParams
2759
+ class BillingCycleAnchorConfig < ::Stripe::RequestParams
2760
+ # The day of the month the anchor should be. Ranges from 1 to 31.
2761
+ attr_accessor :day_of_month
2762
+ # The hour of the day the anchor should be. Ranges from 0 to 23.
2763
+ attr_accessor :hour
2764
+ # The minute of the hour the anchor should be. Ranges from 0 to 59.
2765
+ attr_accessor :minute
2766
+ # The month to start full cycle periods. Ranges from 1 to 12.
2767
+ attr_accessor :month
2768
+ # The second of the minute the anchor should be. Ranges from 0 to 59.
2769
+ attr_accessor :second
2770
+
2771
+ def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
2772
+ @day_of_month = day_of_month
2773
+ @hour = hour
2774
+ @minute = minute
2775
+ @month = month
2776
+ @second = second
2777
+ end
2778
+ end
2779
+
2730
2780
  class BillingMode < ::Stripe::RequestParams
2731
2781
  class Flexible < ::Stripe::RequestParams
2732
2782
  # Controls how invoices and invoice items display proration amounts and discount amounts.
@@ -2809,8 +2859,10 @@ module Stripe
2809
2859
  end
2810
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).
2811
2861
  attr_accessor :application_fee_percent
2812
- # 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.
2813
2863
  attr_accessor :billing_cycle_anchor
2864
+ # Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
2865
+ attr_accessor :billing_cycle_anchor_config
2814
2866
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2815
2867
  attr_accessor :billing_mode
2816
2868
  # The tax rates that will apply to any subscription item that does not have
@@ -2843,6 +2895,7 @@ module Stripe
2843
2895
  def initialize(
2844
2896
  application_fee_percent: nil,
2845
2897
  billing_cycle_anchor: nil,
2898
+ billing_cycle_anchor_config: nil,
2846
2899
  billing_mode: nil,
2847
2900
  default_tax_rates: nil,
2848
2901
  description: nil,
@@ -2858,6 +2911,7 @@ module Stripe
2858
2911
  )
2859
2912
  @application_fee_percent = application_fee_percent
2860
2913
  @billing_cycle_anchor = billing_cycle_anchor
2914
+ @billing_cycle_anchor_config = billing_cycle_anchor_config
2861
2915
  @billing_mode = billing_mode
2862
2916
  @default_tax_rates = default_tax_rates
2863
2917
  @description = description
@@ -3006,8 +3060,6 @@ module Stripe
3006
3060
  # You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional.
3007
3061
  #
3008
3062
  # If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well.
3009
- #
3010
- # You can't set this parameter if `ui_mode` is `custom`.
3011
3063
  attr_accessor :name_collection
3012
3064
  # A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/prices).
3013
3065
  #
@@ -526,7 +526,7 @@ module Stripe
526
526
  attr_accessor :sofort
527
527
  # This hash contains details about the Stripe balance payment method.
528
528
  attr_accessor :stripe_balance
529
- # If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method.
529
+ # If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method.
530
530
  attr_accessor :sunbit
531
531
  # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
532
532
  attr_accessor :swish
@@ -28,7 +28,7 @@ module Stripe
28
28
  attr_accessor :metadata
29
29
  # The line item quantity to credit.
30
30
  attr_accessor :quantity
31
- # A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
31
+ # A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
32
32
  attr_accessor :tax_amounts
33
33
  # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and `tax_amounts` is not used.
34
34
  attr_accessor :tax_rates
@@ -28,7 +28,7 @@ module Stripe
28
28
  attr_accessor :metadata
29
29
  # The line item quantity to credit.
30
30
  attr_accessor :quantity
31
- # A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
31
+ # A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
32
32
  attr_accessor :tax_amounts
33
33
  # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and `tax_amounts` is not used.
34
34
  attr_accessor :tax_rates
@@ -28,7 +28,7 @@ module Stripe
28
28
  attr_accessor :metadata
29
29
  # The line item quantity to credit.
30
30
  attr_accessor :quantity
31
- # A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
31
+ # A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
32
32
  attr_accessor :tax_amounts
33
33
  # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and `tax_amounts` is not used.
34
34
  attr_accessor :tax_rates
@@ -28,7 +28,7 @@ module Stripe
28
28
  attr_accessor :metadata
29
29
  # The line item quantity to credit.
30
30
  attr_accessor :quantity
31
- # A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
31
+ # A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`.
32
32
  attr_accessor :tax_amounts
33
33
  # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and `tax_amounts` is not used.
34
34
  attr_accessor :tax_rates
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Crypto
6
+ class CustomerConsumerWalletListParams < ::Stripe::RequestParams
7
+ # 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.
8
+ attr_accessor :ending_before
9
+ # Specifies which fields in the response should be expanded.
10
+ attr_accessor :expand
11
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
12
+ attr_accessor :limit
13
+ # 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.
14
+ attr_accessor :starting_after
15
+
16
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
17
+ @ending_before = ending_before
18
+ @expand = expand
19
+ @limit = limit
20
+ @starting_after = starting_after
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Crypto
6
+ class CustomerPaymentTokenListParams < ::Stripe::RequestParams
7
+ # 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.
8
+ attr_accessor :ending_before
9
+ # Specifies which fields in the response should be expanded.
10
+ attr_accessor :expand
11
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
12
+ attr_accessor :limit
13
+ # 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.
14
+ attr_accessor :starting_after
15
+
16
+ def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
17
+ @ending_before = ending_before
18
+ @expand = expand
19
+ @limit = limit
20
+ @starting_after = starting_after
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Crypto
6
+ class CustomerRetrieveParams < ::Stripe::RequestParams
7
+ # Specifies which fields in the response should be expanded.
8
+ attr_accessor :expand
9
+
10
+ def initialize(expand: nil)
11
+ @expand = expand
12
+ end
13
+ end
14
+ end
15
+ end