stripe 21.2.0.pre.alpha.1 → 21.2.0.pre.alpha.2

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_operations/singleton_save.rb +4 -4
  3. data/lib/stripe/api_version.rb +1 -1
  4. data/lib/stripe/event_types.rb +22 -0
  5. data/lib/stripe/events/v2_money_management_dispute_adjustment_created_event.rb +44 -0
  6. data/lib/stripe/events/v2_money_management_dispute_created_event.rb +44 -0
  7. data/lib/stripe/events/v2_money_management_dispute_lost_event.rb +44 -0
  8. data/lib/stripe/events/v2_money_management_dispute_updated_event.rb +44 -0
  9. data/lib/stripe/events/v2_money_management_dispute_won_event.rb +44 -0
  10. data/lib/stripe/events/v2_risk_evaluation_outcome_delinquency_ready_event.rb +44 -0
  11. data/lib/stripe/object_types.rb +3 -0
  12. data/lib/stripe/params/balance_transaction_list_params.rb +2 -2
  13. data/lib/stripe/params/billing_portal/session_create_params.rb +13 -0
  14. data/lib/stripe/params/checkout/session_create_params.rb +208 -4
  15. data/lib/stripe/params/crypto/onramp_session_checkout_params.rb +37 -1
  16. data/lib/stripe/params/crypto/onramp_session_create_params.rb +4 -0
  17. data/lib/stripe/params/customer_create_params.rb +7 -1
  18. data/lib/stripe/params/customer_update_params.rb +7 -1
  19. data/lib/stripe/params/invoice_rendering_template_create_params.rb +14 -2
  20. data/lib/stripe/params/invoice_rendering_template_update_params.rb +14 -2
  21. data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
  22. data/lib/stripe/params/payment_intent_confirm_params.rb +96 -4
  23. data/lib/stripe/params/payment_intent_create_params.rb +96 -4
  24. data/lib/stripe/params/payment_intent_update_params.rb +96 -4
  25. data/lib/stripe/params/payment_method_configuration_create_params.rb +63 -0
  26. data/lib/stripe/params/payment_method_configuration_update_params.rb +63 -0
  27. data/lib/stripe/params/tax/calculation_create_params.rb +1 -1
  28. data/lib/stripe/params/terminal/configuration_create_params.rb +1 -1
  29. data/lib/stripe/params/terminal/configuration_update_params.rb +1 -1
  30. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +15 -1
  31. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
  32. data/lib/stripe/params/v2/billing/contract_create_params.rb +182 -9
  33. data/lib/stripe/params/v2/billing/contract_update_params.rb +328 -16
  34. data/lib/stripe/params/v2/core/account_create_params.rb +432 -3
  35. data/lib/stripe/params/v2/core/account_token_create_params.rb +4 -1
  36. data/lib/stripe/params/v2/core/account_update_params.rb +436 -4
  37. data/lib/stripe/params/v2/core/fee_batch_list_params.rb +7 -1
  38. data/lib/stripe/params/v2/money_management/dispute_adjustment_list_params.rb +23 -0
  39. data/lib/stripe/params/v2/money_management/dispute_adjustment_retrieve_params.rb +10 -0
  40. data/lib/stripe/params/v2/money_management/dispute_create_params.rb +37 -0
  41. data/lib/stripe/params/v2/money_management/dispute_list_params.rb +26 -0
  42. data/lib/stripe/params/v2/money_management/dispute_retrieve_params.rb +10 -0
  43. data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +41 -1
  44. data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_create_params.rb +24 -8
  45. data/lib/stripe/params/v2/money_management/spending_mandate_create_params.rb +51 -0
  46. data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +4 -1
  47. data/lib/stripe/params/v2/money_management/spending_mandate_update_params.rb +39 -0
  48. data/lib/stripe/params/v2/money_management/test_helpers/financial_address_debit_params.rb +20 -1
  49. data/lib/stripe/params/v2/risk/evaluation_outcome_list_params.rb +34 -0
  50. data/lib/stripe/params/v2/risk/evaluation_outcome_retrieve_params.rb +10 -0
  51. data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_fail_params.rb +19 -0
  52. data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_succeed_params.rb +12 -0
  53. data/lib/stripe/params.rb +27 -5
  54. data/lib/stripe/resources/billing_portal/session.rb +16 -0
  55. data/lib/stripe/resources/cash_balance.rb +1 -1
  56. data/lib/stripe/resources/charge.rb +32 -0
  57. data/lib/stripe/resources/checkout/session.rb +65 -2
  58. data/lib/stripe/resources/confirmation_token.rb +54 -2
  59. data/lib/stripe/resources/customer.rb +4 -0
  60. data/lib/stripe/resources/customer_tax_exemption.rb +2 -0
  61. data/lib/stripe/resources/dispute.rb +4 -0
  62. data/lib/stripe/resources/identity/verification_report.rb +34 -0
  63. data/lib/stripe/resources/invoice.rb +0 -30
  64. data/lib/stripe/resources/invoice_rendering_template.rb +19 -1
  65. data/lib/stripe/resources/issuing/authorization.rb +18 -0
  66. data/lib/stripe/resources/issuing/card.rb +28 -0
  67. data/lib/stripe/resources/issuing/transaction.rb +18 -0
  68. data/lib/stripe/resources/mandate.rb +65 -0
  69. data/lib/stripe/resources/payment_attempt_record.rb +46 -0
  70. data/lib/stripe/resources/payment_intent.rb +113 -103
  71. data/lib/stripe/resources/payment_link.rb +2 -0
  72. data/lib/stripe/resources/payment_method.rb +53 -1
  73. data/lib/stripe/resources/payment_method_configuration.rb +102 -0
  74. data/lib/stripe/resources/payment_record.rb +46 -0
  75. data/lib/stripe/resources/quote_preview_invoice.rb +0 -30
  76. data/lib/stripe/resources/radar/account_evaluation.rb +36 -2
  77. data/lib/stripe/resources/reserve/plan.rb +1 -1
  78. data/lib/stripe/resources/risk/form.rb +44 -1
  79. data/lib/stripe/resources/setup_attempt.rb +91 -0
  80. data/lib/stripe/resources/setup_intent.rb +1 -1
  81. data/lib/stripe/resources/source.rb +2 -2
  82. data/lib/stripe/resources/subscription.rb +0 -20
  83. data/lib/stripe/resources/tax/calculation.rb +1 -1
  84. data/lib/stripe/resources/tax/form.rb +6 -0
  85. data/lib/stripe/resources/tax/transaction.rb +1 -1
  86. data/lib/stripe/resources/terminal/configuration.rb +1 -1
  87. data/lib/stripe/resources/terminal/onboarding_link.rb +2 -1
  88. data/lib/stripe/resources/terminal/reader.rb +17 -1
  89. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -1
  90. data/lib/stripe/resources/three_d_secure/authentication.rb +1 -1
  91. data/lib/stripe/resources/v2/billing/contract.rb +285 -6
  92. data/lib/stripe/resources/v2/billing/contract_term.rb +133 -6
  93. data/lib/stripe/resources/v2/core/account.rb +2709 -322
  94. data/lib/stripe/resources/v2/core/fee_batch.rb +3 -0
  95. data/lib/stripe/resources/v2/core/fee_entry.rb +33 -3
  96. data/lib/stripe/resources/v2/money_management/dispute.rb +78 -0
  97. data/lib/stripe/resources/v2/money_management/dispute_adjustment.rb +53 -0
  98. data/lib/stripe/resources/v2/money_management/financial_account.rb +45 -0
  99. data/lib/stripe/resources/v2/money_management/inbound_transfer_mandate.rb +6 -4
  100. data/lib/stripe/resources/v2/money_management/received_debit.rb +27 -1
  101. data/lib/stripe/resources/v2/money_management/spending_mandate.rb +18 -2
  102. data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
  103. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
  104. data/lib/stripe/resources/v2/risk/evaluation_outcome.rb +305 -0
  105. data/lib/stripe/resources/v2/signals/account_evaluation.rb +34 -0
  106. data/lib/stripe/resources/v2/signals/account_signal.rb +23 -0
  107. data/lib/stripe/resources.rb +30 -0
  108. data/lib/stripe/services/checkout/session_service.rb +1 -1
  109. data/lib/stripe/services/payment_intent_service.rb +0 -11
  110. data/lib/stripe/services/risk/form_service.rb +44 -1
  111. data/lib/stripe/services/subscription_service.rb +0 -11
  112. data/lib/stripe/services/terminal/onboarding_link_service.rb +1 -0
  113. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +1 -1
  114. data/lib/stripe/services/v2/core/fee_batch_service.rb +4 -1
  115. data/lib/stripe/services/v2/core/fee_entry_service.rb +3 -1
  116. data/lib/stripe/services/v2/money_management/debit_dispute_service.rb +1 -0
  117. data/lib/stripe/services/v2/money_management/dispute_adjustment_service.rb +32 -0
  118. data/lib/stripe/services/v2/money_management/dispute_service.rb +46 -0
  119. data/lib/stripe/services/v2/money_management/inbound_transfer_mandate_service.rb +6 -3
  120. data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +26 -0
  121. data/lib/stripe/services/v2/money_management_service.rb +3 -1
  122. data/lib/stripe/services/v2/risk/evaluation_outcome_service.rb +32 -0
  123. data/lib/stripe/services/v2/risk_service.rb +2 -1
  124. data/lib/stripe/services/v2/test_helpers/money_management/inbound_transfer_service.rb +34 -0
  125. data/lib/stripe/services/v2/test_helpers/money_management_service.rb +8 -0
  126. data/lib/stripe/services.rb +11 -0
  127. data/lib/stripe/stripe_client.rb +1 -1
  128. data/lib/stripe/stripe_event_notification_handler.rb +24 -0
  129. data/lib/stripe/stripe_object.rb +14 -4
  130. data/lib/stripe/util.rb +21 -2
  131. data/lib/stripe/v2_type_coercion.rb +6 -2
  132. data/lib/stripe/version.rb +1 -1
  133. data/lib/stripe/webhook.rb +1 -0
  134. data/rbi/stripe.rbi +8211 -782
  135. metadata +26 -4
  136. data/lib/stripe/params/payment_intent_update_crypto_refund_address_params.rb +0 -19
  137. data/lib/stripe/params/subscription_attach_cadence_params.rb +0 -16
@@ -522,10 +522,13 @@ module Stripe
522
522
  attr_accessor :amount_tax_display
523
523
  # ID of the invoice rendering template to use for this invoice.
524
524
  attr_accessor :template
525
+ # The specific version of the invoice rendering template to use for this invoice. If not specified, the latest version of the template will be used. Only available in unified mode.
526
+ attr_accessor :template_version
525
527
 
526
- def initialize(amount_tax_display: nil, template: nil)
528
+ def initialize(amount_tax_display: nil, template: nil, template_version: nil)
527
529
  @amount_tax_display = amount_tax_display
528
530
  @template = template
531
+ @template_version = template_version
529
532
  end
530
533
  end
531
534
  # The account tax IDs associated with the invoice.
@@ -837,6 +840,161 @@ module Stripe
837
840
  end
838
841
  end
839
842
 
843
+ class OneTimePrice < ::Stripe::RequestParams
844
+ class Item < ::Stripe::RequestParams
845
+ class AdjustableQuantity < ::Stripe::RequestParams
846
+ # Set to true if the quantity can be adjusted to any non-negative integer.
847
+ attr_accessor :enabled
848
+ # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
849
+ attr_accessor :maximum
850
+ # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
851
+ attr_accessor :minimum
852
+
853
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
854
+ @enabled = enabled
855
+ @maximum = maximum
856
+ @minimum = minimum
857
+ end
858
+ end
859
+
860
+ class PriceData < ::Stripe::RequestParams
861
+ class ProductData < ::Stripe::RequestParams
862
+ class TaxDetails < ::Stripe::RequestParams
863
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
864
+ attr_accessor :performance_location
865
+ # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
866
+ attr_accessor :tax_code
867
+
868
+ def initialize(performance_location: nil, tax_code: nil)
869
+ @performance_location = performance_location
870
+ @tax_code = tax_code
871
+ end
872
+ end
873
+ # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
874
+ attr_accessor :description
875
+ # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
876
+ attr_accessor :images
877
+ # 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`.
878
+ attr_accessor :metadata
879
+ # The product's name, meant to be displayable to the customer.
880
+ attr_accessor :name
881
+ # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
882
+ attr_accessor :tax_code
883
+ # Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
884
+ attr_accessor :tax_details
885
+ # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
886
+ attr_accessor :unit_label
887
+
888
+ def initialize(
889
+ description: nil,
890
+ images: nil,
891
+ metadata: nil,
892
+ name: nil,
893
+ tax_code: nil,
894
+ tax_details: nil,
895
+ unit_label: nil
896
+ )
897
+ @description = description
898
+ @images = images
899
+ @metadata = metadata
900
+ @name = name
901
+ @tax_code = tax_code
902
+ @tax_details = tax_details
903
+ @unit_label = unit_label
904
+ end
905
+ end
906
+ # 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).
907
+ attr_accessor :currency
908
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
909
+ attr_accessor :product
910
+ # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
911
+ attr_accessor :product_data
912
+ # Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
913
+ attr_accessor :tax_behavior
914
+ # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
915
+ attr_accessor :unit_amount
916
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
917
+ attr_accessor :unit_amount_decimal
918
+
919
+ def initialize(
920
+ currency: nil,
921
+ product: nil,
922
+ product_data: nil,
923
+ tax_behavior: nil,
924
+ unit_amount: nil,
925
+ unit_amount_decimal: nil
926
+ )
927
+ @currency = currency
928
+ @product = product
929
+ @product_data = product_data
930
+ @tax_behavior = tax_behavior
931
+ @unit_amount = unit_amount
932
+ @unit_amount_decimal = unit_amount_decimal
933
+ end
934
+
935
+ def self.field_encodings
936
+ @field_encodings = { unit_amount_decimal: :decimal_string }
937
+ end
938
+ end
939
+ # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
940
+ attr_accessor :adjustable_quantity
941
+ # The ID of the [Price](https://docs.stripe.com/api/prices). One of `price` or `price_data` is required.
942
+ attr_accessor :price
943
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
944
+ attr_accessor :price_data
945
+ # Quantity for this item.
946
+ attr_accessor :quantity
947
+ # The [tax rates](https://docs.stripe.com/api/tax_rates) which apply to this line item.
948
+ attr_accessor :tax_rates
949
+
950
+ def initialize(
951
+ adjustable_quantity: nil,
952
+ price: nil,
953
+ price_data: nil,
954
+ quantity: nil,
955
+ tax_rates: nil
956
+ )
957
+ @adjustable_quantity = adjustable_quantity
958
+ @price = price
959
+ @price_data = price_data
960
+ @quantity = quantity
961
+ @tax_rates = tax_rates
962
+ end
963
+
964
+ def self.field_encodings
965
+ @field_encodings = {
966
+ price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } },
967
+ }
968
+ end
969
+ end
970
+ # The one-time price's description, meant to be displayable to the customer.
971
+ attr_accessor :description
972
+ # The list of items for the one-time price.
973
+ attr_accessor :items
974
+ # 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`.
975
+ attr_accessor :metadata
976
+
977
+ def initialize(description: nil, items: nil, metadata: nil)
978
+ @description = description
979
+ @items = items
980
+ @metadata = metadata
981
+ end
982
+
983
+ def self.field_encodings
984
+ @field_encodings = {
985
+ items: {
986
+ kind: :array,
987
+ element: {
988
+ kind: :object,
989
+ fields: {
990
+ price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } },
991
+ },
992
+ },
993
+ },
994
+ }
995
+ end
996
+ end
997
+
840
998
  class Subscription < ::Stripe::RequestParams
841
999
  class BillingCycleAnchorConfig < ::Stripe::RequestParams
842
1000
  # The day of the month the anchor should be. Ranges from 1 to 31.
@@ -1127,13 +1285,16 @@ module Stripe
1127
1285
  end
1128
1286
  # Configuration for the Metronome commit item.
1129
1287
  attr_accessor :metronome_commit
1288
+ # Configuration for the one-time price item.
1289
+ attr_accessor :one_time_price
1130
1290
  # Configuration for the subscription item.
1131
1291
  attr_accessor :subscription
1132
1292
  # The type of item.
1133
1293
  attr_accessor :type
1134
1294
 
1135
- def initialize(metronome_commit: nil, subscription: nil, type: nil)
1295
+ def initialize(metronome_commit: nil, one_time_price: nil, subscription: nil, type: nil)
1136
1296
  @metronome_commit = metronome_commit
1297
+ @one_time_price = one_time_price
1137
1298
  @subscription = subscription
1138
1299
  @type = type
1139
1300
  end
@@ -1164,6 +1325,20 @@ module Stripe
1164
1325
  },
1165
1326
  },
1166
1327
  },
1328
+ one_time_price: {
1329
+ kind: :object,
1330
+ fields: {
1331
+ items: {
1332
+ kind: :array,
1333
+ element: {
1334
+ kind: :object,
1335
+ fields: {
1336
+ price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } },
1337
+ },
1338
+ },
1339
+ },
1340
+ },
1341
+ },
1167
1342
  subscription: {
1168
1343
  kind: :object,
1169
1344
  fields: {
@@ -1342,9 +1517,15 @@ module Stripe
1342
1517
  class AdConversion < ::Stripe::RequestParams
1343
1518
  # Whether the customer consented to sending conversion data to an advertising platform.
1344
1519
  attr_accessor :consent_collected
1520
+ # The URL of the web page where the customer converted.
1521
+ attr_accessor :source_url
1522
+ # The user agent of the browser where the customer converted.
1523
+ attr_accessor :user_agent
1345
1524
 
1346
- def initialize(consent_collected: nil)
1525
+ def initialize(consent_collected: nil, source_url: nil, user_agent: nil)
1347
1526
  @consent_collected = consent_collected
1527
+ @source_url = source_url
1528
+ @user_agent = user_agent
1348
1529
  end
1349
1530
  end
1350
1531
  # Information used when sending conversions to an advertising platform.
@@ -1837,7 +2018,13 @@ module Stripe
1837
2018
  end
1838
2019
  # Additional fields for Mandate creation
1839
2020
  attr_accessor :mandate_options
1840
- # Attribute for param field setup_future_usage
2021
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2022
+ #
2023
+ # 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.
2024
+ #
2025
+ # 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.
2026
+ #
2027
+ # 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).
1841
2028
  attr_accessor :setup_future_usage
1842
2029
 
1843
2030
  def initialize(mandate_options: nil, setup_future_usage: nil)
@@ -4000,6 +4187,23 @@ module Stripe
4000
4187
  },
4001
4188
  },
4002
4189
  },
4190
+ one_time_price: {
4191
+ kind: :object,
4192
+ fields: {
4193
+ items: {
4194
+ kind: :array,
4195
+ element: {
4196
+ kind: :object,
4197
+ fields: {
4198
+ price_data: {
4199
+ kind: :object,
4200
+ fields: { unit_amount_decimal: :decimal_string },
4201
+ },
4202
+ },
4203
+ },
4204
+ },
4205
+ },
4206
+ },
4003
4207
  subscription: {
4004
4208
  kind: :object,
4005
4209
  fields: {
@@ -42,14 +42,50 @@ module Stripe
42
42
  @customer_acceptance = customer_acceptance
43
43
  end
44
44
  end
45
+
46
+ class PaymentMethodOptions < ::Stripe::RequestParams
47
+ class Card < ::Stripe::RequestParams
48
+ class NetworkToken < ::Stripe::RequestParams
49
+ # The cryptogram, also known as the "token authentication verification value" (TAVV).
50
+ # This value is base64-encoded and is retrieved from your Token Service
51
+ # Provider. Provide a fresh cryptogram for each new authorization attempt.
52
+ attr_accessor :cryptogram
53
+ # The Electronic Commerce Indicator (ECI) returned by your Token Service
54
+ # Provider along with the cryptogram for Visa network tokens. When used
55
+ # alongside 3-D Secure, provide the ECI returned by your Token Service
56
+ # Provider. Required for Visa network tokens. Omit for Mastercard network tokens.
57
+ attr_accessor :electronic_commerce_indicator
58
+
59
+ def initialize(cryptogram: nil, electronic_commerce_indicator: nil)
60
+ @cryptogram = cryptogram
61
+ @electronic_commerce_indicator = electronic_commerce_indicator
62
+ end
63
+ end
64
+ # Network token specific transaction options.
65
+ attr_accessor :network_token
66
+
67
+ def initialize(network_token: nil)
68
+ @network_token = network_token
69
+ end
70
+ end
71
+ # Configuration for any card payments attempted during checkout.
72
+ attr_accessor :card
73
+
74
+ def initialize(card: nil)
75
+ @card = card
76
+ end
77
+ end
45
78
  # Specifies which fields in the response should be expanded.
46
79
  attr_accessor :expand
47
80
  # This hash contains details about the mandate to create
48
81
  attr_accessor :mandate_data
82
+ # Payment method-specific configuration for this checkout.
83
+ attr_accessor :payment_method_options
49
84
 
50
- def initialize(expand: nil, mandate_data: nil)
85
+ def initialize(expand: nil, mandate_data: nil, payment_method_options: nil)
51
86
  @expand = expand
52
87
  @mandate_data = mandate_data
88
+ @payment_method_options = payment_method_options
53
89
  end
54
90
  end
55
91
  end
@@ -65,6 +65,8 @@ module Stripe
65
65
  attr_accessor :lock_wallet_address
66
66
  # 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`.
67
67
  attr_accessor :metadata
68
+ # ID of a card PaymentMethod (pm_...) owned by the authenticated merchant. Only supported for headless sessions. Mutually exclusive with `payment_token`.
69
+ attr_accessor :payment_method
68
70
  # Speed at which the cryptocurrency is delivered to the wallet
69
71
  # One of:
70
72
  # `instant` (default): crypto is delivered when payment is confirmed
@@ -97,6 +99,7 @@ module Stripe
97
99
  kyc_details: nil,
98
100
  lock_wallet_address: nil,
99
101
  metadata: nil,
102
+ payment_method: nil,
100
103
  settlement_speed: nil,
101
104
  source_amount: nil,
102
105
  source_currency: nil,
@@ -112,6 +115,7 @@ module Stripe
112
115
  @kyc_details = kyc_details
113
116
  @lock_wallet_address = lock_wallet_address
114
117
  @metadata = metadata
118
+ @payment_method = payment_method
115
119
  @settlement_speed = settlement_speed
116
120
  @source_amount = source_amount
117
121
  @source_currency = source_currency
@@ -95,9 +95,15 @@ module Stripe
95
95
  class AdConversion < ::Stripe::RequestParams
96
96
  # Whether the customer consented to sending conversion data to an advertising platform.
97
97
  attr_accessor :consent_collected
98
+ # The URL of the web page where the customer converted.
99
+ attr_accessor :source_url
100
+ # The user agent of the browser where the customer converted.
101
+ attr_accessor :user_agent
98
102
 
99
- def initialize(consent_collected: nil)
103
+ def initialize(consent_collected: nil, source_url: nil, user_agent: nil)
100
104
  @consent_collected = consent_collected
105
+ @source_url = source_url
106
+ @user_agent = user_agent
101
107
  end
102
108
  end
103
109
  # Information used when sending conversions to an advertising platform.
@@ -95,9 +95,15 @@ module Stripe
95
95
  class AdConversion < ::Stripe::RequestParams
96
96
  # Whether the customer consented to sending conversion data to an advertising platform.
97
97
  attr_accessor :consent_collected
98
+ # The URL of the web page where the customer converted.
99
+ attr_accessor :source_url
100
+ # The user agent of the browser where the customer converted.
101
+ attr_accessor :user_agent
98
102
 
99
- def initialize(consent_collected: nil)
103
+ def initialize(consent_collected: nil, source_url: nil, user_agent: nil)
100
104
  @consent_collected = consent_collected
105
+ @source_url = source_url
106
+ @user_agent = user_agent
101
107
  end
102
108
  end
103
109
  # Information used when sending conversions to an advertising platform.
@@ -15,6 +15,15 @@ module Stripe
15
15
  class RenderingSettings < ::Stripe::RequestParams
16
16
  class InvoicePdf < ::Stripe::RequestParams
17
17
  class Block < ::Stripe::RequestParams
18
+ class CustomPlainText < ::Stripe::RequestParams
19
+ # Literal text to render, preserving whitespace and newlines. Required, at most 10,000 characters; an empty string renders no text.
20
+ attr_accessor :plain_text
21
+
22
+ def initialize(plain_text: nil)
23
+ @plain_text = plain_text
24
+ end
25
+ end
26
+
18
27
  class CustomPlainTextCel < ::Stripe::RequestParams
19
28
  # A CEL expression that returns text using the invoice context.
20
29
  attr_accessor :cel_expression
@@ -23,6 +32,8 @@ module Stripe
23
32
  @cel_expression = cel_expression
24
33
  end
25
34
  end
35
+ # Configuration for a repeatable literal text block. Omit this hash on a keyed update to retain saved text; supply it to replace the text.
36
+ attr_accessor :custom_plain_text
26
37
  # Configuration for a custom CEL text block.
27
38
  attr_accessor :custom_plain_text_cel
28
39
  # A unique key within this template's blocks. Generated when omitted.
@@ -30,13 +41,14 @@ module Stripe
30
41
  # The type of content block.
31
42
  attr_accessor :type
32
43
 
33
- def initialize(custom_plain_text_cel: nil, key: nil, type: nil)
44
+ def initialize(custom_plain_text: nil, custom_plain_text_cel: nil, key: nil, type: nil)
45
+ @custom_plain_text = custom_plain_text
34
46
  @custom_plain_text_cel = custom_plain_text_cel
35
47
  @key = key
36
48
  @type = type
37
49
  end
38
50
  end
39
- # Ordered invoice PDF blocks. A maximum of 20 blocks is allowed.
51
+ # Ordered invoice PDF blocks, at most 20. Include every default type exactly once; custom text blocks may repeat.
40
52
  attr_accessor :blocks
41
53
 
42
54
  def initialize(blocks: nil)
@@ -15,6 +15,15 @@ module Stripe
15
15
  class RenderingSettings < ::Stripe::RequestParams
16
16
  class InvoicePdf < ::Stripe::RequestParams
17
17
  class Block < ::Stripe::RequestParams
18
+ class CustomPlainText < ::Stripe::RequestParams
19
+ # Literal text to render, preserving whitespace and newlines. Required, at most 10,000 characters; an empty string renders no text.
20
+ attr_accessor :plain_text
21
+
22
+ def initialize(plain_text: nil)
23
+ @plain_text = plain_text
24
+ end
25
+ end
26
+
18
27
  class CustomPlainTextCel < ::Stripe::RequestParams
19
28
  # A CEL expression that returns text using the invoice context.
20
29
  attr_accessor :cel_expression
@@ -23,6 +32,8 @@ module Stripe
23
32
  @cel_expression = cel_expression
24
33
  end
25
34
  end
35
+ # Configuration for a repeatable literal text block. Omit this hash on a keyed update to retain saved text; supply it to replace the text.
36
+ attr_accessor :custom_plain_text
26
37
  # Configuration for a custom CEL text block.
27
38
  attr_accessor :custom_plain_text_cel
28
39
  # A unique key within this template's blocks. Generated when omitted.
@@ -30,13 +41,14 @@ module Stripe
30
41
  # The type of content block. Required when updating a block without a key matching an existing block in the current template version. For a matching key, omit type to retain the existing type; if supplied, it must match.
31
42
  attr_accessor :type
32
43
 
33
- def initialize(custom_plain_text_cel: nil, key: nil, type: nil)
44
+ def initialize(custom_plain_text: nil, custom_plain_text_cel: nil, key: nil, type: nil)
45
+ @custom_plain_text = custom_plain_text
34
46
  @custom_plain_text_cel = custom_plain_text_cel
35
47
  @key = key
36
48
  @type = type
37
49
  end
38
50
  end
39
- # Ordered invoice PDF blocks. A maximum of 20 blocks is allowed.
51
+ # The complete replacement order of at most 20 invoice PDF blocks. Keys retain saved configuration when its hash is omitted. Omitted custom blocks are removed; include every default type exactly once. Omit blocks to preserve settings, or supply an empty string to reset to defaults.
40
52
  attr_accessor :blocks
41
53
 
42
54
  def initialize(blocks: nil)
@@ -422,7 +422,7 @@ module Stripe
422
422
  attr_accessor :merchant_amount_exchange_rate
423
423
  # The currency of the authorization. If not provided, defaults to the currency of the card. 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).
424
424
  attr_accessor :merchant_currency
425
- # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
425
+ # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. Provide `merchant_data.state` and `merchant_data.postal_code` only if `merchant_data.country` is `US` or `CA`, or they will be ignored.
426
426
  attr_accessor :merchant_data
427
427
  # Details about the authorization, such as identifiers, set by the card network.
428
428
  attr_accessor :network_data