stripe 19.1.0 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +3 -0
  3. data/lib/stripe/api_version.rb +1 -1
  4. data/lib/stripe/event_types.rb +16 -0
  5. data/lib/stripe/events/v2_commerce_product_catalog_imports_failed_event.rb +44 -0
  6. data/lib/stripe/events/v2_commerce_product_catalog_imports_processing_event.rb +44 -0
  7. data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_event.rb +44 -0
  8. data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_with_errors_event.rb +44 -0
  9. data/lib/stripe/object_types.rb +1 -0
  10. data/lib/stripe/params/account_create_params.rb +26 -0
  11. data/lib/stripe/params/account_update_params.rb +26 -0
  12. data/lib/stripe/params/balance_settings_update_params.rb +42 -2
  13. data/lib/stripe/params/charge_create_params.rb +4 -1
  14. data/lib/stripe/params/checkout/session_create_params.rb +28 -15
  15. data/lib/stripe/params/confirmation_token_create_params.rb +11 -1
  16. data/lib/stripe/params/invoice_create_preview_params.rb +60 -0
  17. data/lib/stripe/params/payment_intent_capture_params.rb +2 -2
  18. data/lib/stripe/params/payment_intent_confirm_params.rb +38 -5
  19. data/lib/stripe/params/payment_intent_create_params.rb +65 -6
  20. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +2 -2
  21. data/lib/stripe/params/payment_intent_update_params.rb +58 -5
  22. data/lib/stripe/params/payment_link_create_params.rb +30 -1
  23. data/lib/stripe/params/payment_link_update_params.rb +29 -0
  24. data/lib/stripe/params/payment_method_configuration_create_params.rb +43 -1
  25. data/lib/stripe/params/payment_method_configuration_list_params.rb +4 -0
  26. data/lib/stripe/params/payment_method_configuration_update_params.rb +43 -1
  27. data/lib/stripe/params/payment_method_create_params.rb +11 -1
  28. data/lib/stripe/params/payout_create_params.rb +1 -1
  29. data/lib/stripe/params/setup_intent_confirm_params.rb +18 -2
  30. data/lib/stripe/params/setup_intent_create_params.rb +18 -2
  31. data/lib/stripe/params/setup_intent_update_params.rb +18 -2
  32. data/lib/stripe/params/subscription_create_params.rb +61 -11
  33. data/lib/stripe/params/subscription_item_create_params.rb +1 -7
  34. data/lib/stripe/params/subscription_item_delete_params.rb +1 -7
  35. data/lib/stripe/params/subscription_item_update_params.rb +1 -7
  36. data/lib/stripe/params/subscription_schedule_create_params.rb +4 -0
  37. data/lib/stripe/params/subscription_schedule_update_params.rb +4 -0
  38. data/lib/stripe/params/subscription_update_params.rb +62 -8
  39. data/lib/stripe/params/terminal/configuration_create_params.rb +52 -0
  40. data/lib/stripe/params/terminal/configuration_update_params.rb +52 -0
  41. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +11 -1
  42. data/lib/stripe/params/test_helpers/test_clock_create_params.rb +4 -1
  43. data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +2 -2
  44. data/lib/stripe/params/v2/commerce/product_catalog/import_create_params.rb +25 -0
  45. data/lib/stripe/params/v2/commerce/product_catalog/import_list_params.rb +54 -0
  46. data/lib/stripe/params/v2/commerce/product_catalog/import_retrieve_params.rb +12 -0
  47. data/lib/stripe/params/v2/core/account_create_params.rb +28 -6
  48. data/lib/stripe/params/v2/core/account_token_create_params.rb +27 -5
  49. data/lib/stripe/params/v2/core/account_update_params.rb +29 -7
  50. data/lib/stripe/params/v2/core/event_destination_create_params.rb +23 -0
  51. data/lib/stripe/params.rb +1342 -614
  52. data/lib/stripe/railtie.rb +8 -0
  53. data/lib/stripe/resources/account.rb +4 -0
  54. data/lib/stripe/resources/balance_settings.rb +42 -2
  55. data/lib/stripe/resources/charge.rb +35 -0
  56. data/lib/stripe/resources/checkout/session.rb +23 -7
  57. data/lib/stripe/resources/confirmation_token.rb +26 -0
  58. data/lib/stripe/resources/discount.rb +2 -2
  59. data/lib/stripe/resources/invoice.rb +2 -0
  60. data/lib/stripe/resources/invoice_item.rb +34 -1
  61. data/lib/stripe/resources/issuing/dispute.rb +1 -1
  62. data/lib/stripe/resources/issuing/personalization_design.rb +1 -1
  63. data/lib/stripe/resources/mandate.rb +13 -0
  64. data/lib/stripe/resources/payment_attempt_record.rb +40 -10
  65. data/lib/stripe/resources/payment_intent.rb +71 -5
  66. data/lib/stripe/resources/payment_link.rb +40 -0
  67. data/lib/stripe/resources/payment_method.rb +26 -0
  68. data/lib/stripe/resources/payment_method_configuration.rb +68 -0
  69. data/lib/stripe/resources/payment_record.rb +40 -10
  70. data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
  71. data/lib/stripe/resources/refund.rb +13 -0
  72. data/lib/stripe/resources/setup_attempt.rb +13 -0
  73. data/lib/stripe/resources/setup_intent.rb +26 -0
  74. data/lib/stripe/resources/subscription.rb +77 -4
  75. data/lib/stripe/resources/subscription_item.rb +2 -0
  76. data/lib/stripe/resources/subscription_schedule.rb +2 -0
  77. data/lib/stripe/resources/terminal/configuration.rb +64 -0
  78. data/lib/stripe/resources/terminal/reader.rb +116 -0
  79. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +3 -3
  80. data/lib/stripe/resources/v2/billing/meter_event_session.rb +3 -3
  81. data/lib/stripe/resources/v2/commerce/product_catalog_import.rb +274 -0
  82. data/lib/stripe/resources/v2/core/account.rb +37 -10
  83. data/lib/stripe/resources/v2/core/account_token.rb +1 -1
  84. data/lib/stripe/resources/v2/core/event.rb +1 -0
  85. data/lib/stripe/resources/v2/core/event_destination.rb +24 -0
  86. data/lib/stripe/resources.rb +500 -178
  87. data/lib/stripe/services/payment_intent_service.rb +3 -1
  88. data/lib/stripe/services/subscription_service.rb +2 -2
  89. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -1
  90. data/lib/stripe/services/v2/commerce/product_catalog/import_service.rb +45 -0
  91. data/lib/stripe/services/v2/commerce/product_catalog_service.rb +17 -0
  92. data/lib/stripe/services/v2/commerce_service.rb +15 -0
  93. data/lib/stripe/services/v2/core/account_service.rb +1 -1
  94. data/lib/stripe/services/v2/core/account_token_service.rb +5 -1
  95. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
  96. data/lib/stripe/services/v2/core/event_service.rb +2 -1
  97. data/lib/stripe/services/v2_services.rb +2 -1
  98. data/lib/stripe/services.rb +469 -189
  99. data/lib/stripe/version.rb +1 -1
  100. data/lib/stripe.rb +25 -4
  101. data/rbi/stripe.rbi +2785 -253
  102. metadata +14 -2
@@ -996,7 +996,7 @@ module Stripe
996
996
  @capabilities = capabilities
997
997
  end
998
998
  end
999
- # The Customer Configuration allows the Account to be used in inbound payment flows.
999
+ # The Customer Configuration allows the Account to be used in inbound payment flows (i.e. customer-facing payment and billing flows).
1000
1000
  attr_accessor :customer
1001
1001
  # Enables the Account to act as a connected account and collect payments facilitated by a Connect platform. You must onboard your platform to Connect before you can add this configuration to your connected accounts. Utilize this configuration when the Account will be the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of set.
1002
1002
  attr_accessor :merchant
@@ -1329,25 +1329,47 @@ module Stripe
1329
1329
  end
1330
1330
 
1331
1331
  class ProofOfRegistration < ::Stripe::RequestParams
1332
+ class Signer < ::Stripe::RequestParams
1333
+ # Person signing the document.
1334
+ attr_accessor :person
1335
+
1336
+ def initialize(person: nil)
1337
+ @person = person
1338
+ end
1339
+ end
1332
1340
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
1333
1341
  attr_accessor :files
1342
+ # Person that is signing the document.
1343
+ attr_accessor :signer
1334
1344
  # The format of the document. Currently supports `files` only.
1335
1345
  attr_accessor :type
1336
1346
 
1337
- def initialize(files: nil, type: nil)
1347
+ def initialize(files: nil, signer: nil, type: nil)
1338
1348
  @files = files
1349
+ @signer = signer
1339
1350
  @type = type
1340
1351
  end
1341
1352
  end
1342
1353
 
1343
1354
  class ProofOfUltimateBeneficialOwnership < ::Stripe::RequestParams
1355
+ class Signer < ::Stripe::RequestParams
1356
+ # Person signing the document.
1357
+ attr_accessor :person
1358
+
1359
+ def initialize(person: nil)
1360
+ @person = person
1361
+ end
1362
+ end
1344
1363
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
1345
1364
  attr_accessor :files
1365
+ # Person that is signing the document.
1366
+ attr_accessor :signer
1346
1367
  # The format of the document. Currently supports `files` only.
1347
1368
  attr_accessor :type
1348
1369
 
1349
- def initialize(files: nil, type: nil)
1370
+ def initialize(files: nil, signer: nil, type: nil)
1350
1371
  @files = files
1372
+ @signer = signer
1351
1373
  @type = type
1352
1374
  end
1353
1375
  end
@@ -1983,7 +2005,7 @@ module Stripe
1983
2005
  attr_accessor :date_of_birth
1984
2006
  # Documents that may be submitted to satisfy various informational requests.
1985
2007
  attr_accessor :documents
1986
- # The individual's email address.
2008
+ # The individual's email address. You can only set this field when the Account is configured as a `merchant` or `recipient`. Use `contact_email` as the primary contact email for this Account.
1987
2009
  attr_accessor :email
1988
2010
  # The individual's first name.
1989
2011
  attr_accessor :given_name
@@ -2058,7 +2080,7 @@ module Stripe
2058
2080
  attr_accessor :business_details
2059
2081
  # The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
2060
2082
  attr_accessor :country
2061
- # The entity type.
2083
+ # The entity type represented by the Account. Ensure this field is accurate before adding configurations that rely on identity information, as it determines which identity fields apply and how the Account is validated.
2062
2084
  attr_accessor :entity_type
2063
2085
  # Information about the person represented by the account.
2064
2086
  attr_accessor :individual
@@ -2092,7 +2114,7 @@ module Stripe
2092
2114
  attr_accessor :account_token
2093
2115
  # An Account Configuration which allows the Account to take on a key persona across Stripe products.
2094
2116
  attr_accessor :configuration
2095
- # The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
2117
+ # The primary contact email address for the Account.
2096
2118
  attr_accessor :contact_email
2097
2119
  # The default contact phone for the Account.
2098
2120
  attr_accessor :contact_phone
@@ -256,25 +256,47 @@ module Stripe
256
256
  end
257
257
 
258
258
  class ProofOfRegistration < ::Stripe::RequestParams
259
+ class Signer < ::Stripe::RequestParams
260
+ # Person signing the document.
261
+ attr_accessor :person
262
+
263
+ def initialize(person: nil)
264
+ @person = person
265
+ end
266
+ end
259
267
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
260
268
  attr_accessor :files
269
+ # Person that is signing the document.
270
+ attr_accessor :signer
261
271
  # The format of the document. Currently supports `files` only.
262
272
  attr_accessor :type
263
273
 
264
- def initialize(files: nil, type: nil)
274
+ def initialize(files: nil, signer: nil, type: nil)
265
275
  @files = files
276
+ @signer = signer
266
277
  @type = type
267
278
  end
268
279
  end
269
280
 
270
281
  class ProofOfUltimateBeneficialOwnership < ::Stripe::RequestParams
282
+ class Signer < ::Stripe::RequestParams
283
+ # Person signing the document.
284
+ attr_accessor :person
285
+
286
+ def initialize(person: nil)
287
+ @person = person
288
+ end
289
+ end
271
290
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
272
291
  attr_accessor :files
292
+ # Person that is signing the document.
293
+ attr_accessor :signer
273
294
  # The format of the document. Currently supports `files` only.
274
295
  attr_accessor :type
275
296
 
276
- def initialize(files: nil, type: nil)
297
+ def initialize(files: nil, signer: nil, type: nil)
277
298
  @files = files
299
+ @signer = signer
278
300
  @type = type
279
301
  end
280
302
  end
@@ -294,7 +316,7 @@ module Stripe
294
316
  attr_accessor :primary_verification
295
317
  # One or more documents that demonstrate proof of address.
296
318
  attr_accessor :proof_of_address
297
- # One or more documents showing the company’s proof of registration with the national business registry.
319
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
298
320
  attr_accessor :proof_of_registration
299
321
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
300
322
  attr_accessor :proof_of_ultimate_beneficial_ownership
@@ -910,7 +932,7 @@ module Stripe
910
932
  attr_accessor :date_of_birth
911
933
  # Documents that may be submitted to satisfy various informational requests.
912
934
  attr_accessor :documents
913
- # The individual's email address.
935
+ # The individual's email address. You can only set this field when the Account is configured as a `merchant` or `recipient`. Use `contact_email` as the primary contact email for this Account.
914
936
  attr_accessor :email
915
937
  # The individual's first name.
916
938
  attr_accessor :given_name
@@ -1011,7 +1033,7 @@ module Stripe
1011
1033
  }
1012
1034
  end
1013
1035
  end
1014
- # The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
1036
+ # The primary contact email address for the Account.
1015
1037
  attr_accessor :contact_email
1016
1038
  # The default contact phone for the Account.
1017
1039
  attr_accessor :contact_phone
@@ -72,7 +72,7 @@ module Stripe
72
72
  @rendering = rendering
73
73
  end
74
74
  end
75
- # ID of a PaymentMethod attached to the customer account to use as the default for invoices and subscriptions.
75
+ # The ID of a `PaymentMethod` attached to this Account's `customer` configuration, used as the default payment method for invoices and subscriptions.
76
76
  attr_accessor :default_payment_method
77
77
  # Default invoice settings for the customer account.
78
78
  attr_accessor :invoice
@@ -1382,25 +1382,47 @@ module Stripe
1382
1382
  end
1383
1383
 
1384
1384
  class ProofOfRegistration < ::Stripe::RequestParams
1385
+ class Signer < ::Stripe::RequestParams
1386
+ # Person signing the document.
1387
+ attr_accessor :person
1388
+
1389
+ def initialize(person: nil)
1390
+ @person = person
1391
+ end
1392
+ end
1385
1393
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
1386
1394
  attr_accessor :files
1395
+ # Person that is signing the document.
1396
+ attr_accessor :signer
1387
1397
  # The format of the document. Currently supports `files` only.
1388
1398
  attr_accessor :type
1389
1399
 
1390
- def initialize(files: nil, type: nil)
1400
+ def initialize(files: nil, signer: nil, type: nil)
1391
1401
  @files = files
1402
+ @signer = signer
1392
1403
  @type = type
1393
1404
  end
1394
1405
  end
1395
1406
 
1396
1407
  class ProofOfUltimateBeneficialOwnership < ::Stripe::RequestParams
1408
+ class Signer < ::Stripe::RequestParams
1409
+ # Person signing the document.
1410
+ attr_accessor :person
1411
+
1412
+ def initialize(person: nil)
1413
+ @person = person
1414
+ end
1415
+ end
1397
1416
  # One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
1398
1417
  attr_accessor :files
1418
+ # Person that is signing the document.
1419
+ attr_accessor :signer
1399
1420
  # The format of the document. Currently supports `files` only.
1400
1421
  attr_accessor :type
1401
1422
 
1402
- def initialize(files: nil, type: nil)
1423
+ def initialize(files: nil, signer: nil, type: nil)
1403
1424
  @files = files
1425
+ @signer = signer
1404
1426
  @type = type
1405
1427
  end
1406
1428
  end
@@ -1420,7 +1442,7 @@ module Stripe
1420
1442
  attr_accessor :primary_verification
1421
1443
  # One or more documents that demonstrate proof of address.
1422
1444
  attr_accessor :proof_of_address
1423
- # One or more documents showing the company’s proof of registration with the national business registry.
1445
+ # One or more documents that demonstrate proof of ultimate beneficial ownership.
1424
1446
  attr_accessor :proof_of_registration
1425
1447
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
1426
1448
  attr_accessor :proof_of_ultimate_beneficial_ownership
@@ -2036,7 +2058,7 @@ module Stripe
2036
2058
  attr_accessor :date_of_birth
2037
2059
  # Documents that may be submitted to satisfy various informational requests.
2038
2060
  attr_accessor :documents
2039
- # The individual's email address.
2061
+ # The individual's email address. You can only set this field when the Account is configured as a `merchant` or `recipient`. Use `contact_email` as the primary contact email for this Account.
2040
2062
  attr_accessor :email
2041
2063
  # The individual's first name.
2042
2064
  attr_accessor :given_name
@@ -2111,7 +2133,7 @@ module Stripe
2111
2133
  attr_accessor :business_details
2112
2134
  # The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
2113
2135
  attr_accessor :country
2114
- # The entity type.
2136
+ # The entity type represented by the Account. Ensure this field is accurate before adding configurations that rely on identity information, as it determines which identity fields apply and how the Account is validated.
2115
2137
  attr_accessor :entity_type
2116
2138
  # Information about the individual represented by the Account. This property is `null` unless `entity_type` is set to `individual`.
2117
2139
  attr_accessor :individual
@@ -2145,7 +2167,7 @@ module Stripe
2145
2167
  attr_accessor :account_token
2146
2168
  # An Account Configuration which allows the Account to take on a key persona across Stripe products.
2147
2169
  attr_accessor :configuration
2148
- # The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
2170
+ # The primary contact email address for the Account.
2149
2171
  attr_accessor :contact_email
2150
2172
  # The default contact phone for the Account.
2151
2173
  attr_accessor :contact_phone
@@ -17,6 +17,25 @@ module Stripe
17
17
  end
18
18
  end
19
19
 
20
+ class AzureEventGrid < ::Stripe::RequestParams
21
+ # The Azure region.
22
+ attr_accessor :azure_region
23
+ # The name of the Azure resource group.
24
+ attr_accessor :azure_resource_group_name
25
+ # The Azure subscription ID.
26
+ attr_accessor :azure_subscription_id
27
+
28
+ def initialize(
29
+ azure_region: nil,
30
+ azure_resource_group_name: nil,
31
+ azure_subscription_id: nil
32
+ )
33
+ @azure_region = azure_region
34
+ @azure_resource_group_name = azure_resource_group_name
35
+ @azure_subscription_id = azure_subscription_id
36
+ end
37
+ end
38
+
20
39
  class WebhookEndpoint < ::Stripe::RequestParams
21
40
  # The URL of the webhook endpoint.
22
41
  attr_accessor :url
@@ -27,6 +46,8 @@ module Stripe
27
46
  end
28
47
  # Amazon EventBridge configuration.
29
48
  attr_accessor :amazon_eventbridge
49
+ # Azure Event Grid configuration.
50
+ attr_accessor :azure_event_grid
30
51
  # An optional description of what the event destination is used for.
31
52
  attr_accessor :description
32
53
  # The list of events to enable for this endpoint.
@@ -54,6 +75,7 @@ module Stripe
54
75
 
55
76
  def initialize(
56
77
  amazon_eventbridge: nil,
78
+ azure_event_grid: nil,
57
79
  description: nil,
58
80
  enabled_events: nil,
59
81
  event_payload: nil,
@@ -66,6 +88,7 @@ module Stripe
66
88
  webhook_endpoint: nil
67
89
  )
68
90
  @amazon_eventbridge = amazon_eventbridge
91
+ @azure_event_grid = azure_event_grid
69
92
  @description = description
70
93
  @enabled_events = enabled_events
71
94
  @event_payload = event_payload