stripe 17.3.0.pre.alpha.2 → 18.1.0.pre.alpha.1

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_version.rb +1 -1
  3. data/lib/stripe/object_types.rb +2 -0
  4. data/lib/stripe/params/account_create_params.rb +27 -10
  5. data/lib/stripe/params/account_person_create_params.rb +9 -9
  6. data/lib/stripe/params/account_person_update_params.rb +9 -9
  7. data/lib/stripe/params/account_update_params.rb +27 -10
  8. data/lib/stripe/params/balance_transfer_create_params.rb +66 -0
  9. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +2 -2
  10. data/lib/stripe/params/charge_capture_params.rb +941 -2
  11. data/lib/stripe/params/charge_update_params.rb +941 -2
  12. data/lib/stripe/params/checkout/session_create_params.rb +3 -3
  13. data/lib/stripe/params/customer_balance_transaction_list_params.rb +21 -1
  14. data/lib/stripe/params/customer_session_create_params.rb +1 -1
  15. data/lib/stripe/params/invoice_create_preview_params.rb +28 -1
  16. data/lib/stripe/params/invoice_payment_list_params.rb +22 -0
  17. data/lib/stripe/params/issuing/authorization_create_params.rb +16 -1
  18. data/lib/stripe/params/order_create_params.rb +938 -1
  19. data/lib/stripe/params/order_update_params.rb +938 -1
  20. data/lib/stripe/params/payment_intent_capture_params.rb +962 -13
  21. data/lib/stripe/params/payment_intent_confirm_params.rb +2017 -123
  22. data/lib/stripe/params/payment_intent_create_params.rb +2017 -123
  23. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +29 -13
  24. data/lib/stripe/params/payment_intent_update_params.rb +2017 -123
  25. data/lib/stripe/params/payment_method_list_params.rb +8 -0
  26. data/lib/stripe/params/quote_create_params.rb +18 -18
  27. data/lib/stripe/params/quote_update_params.rb +18 -18
  28. data/lib/stripe/params/radar/account_evaluation_create_params.rb +81 -0
  29. data/lib/stripe/params/radar/account_evaluation_retrieve_params.rb +15 -0
  30. data/lib/stripe/params/radar/account_evaluation_update_params.rb +18 -0
  31. data/lib/stripe/params/setup_intent_confirm_params.rb +3 -3
  32. data/lib/stripe/params/setup_intent_create_params.rb +3 -3
  33. data/lib/stripe/params/setup_intent_update_params.rb +3 -3
  34. data/lib/stripe/params/subscription_schedule_amend_params.rb +28 -1
  35. data/lib/stripe/params/tax/registration_create_params.rb +1 -1
  36. data/lib/stripe/params/terminal/configuration_create_params.rb +9 -9
  37. data/lib/stripe/params/terminal/configuration_update_params.rb +9 -9
  38. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +16 -1
  39. data/lib/stripe/params/token_create_params.rb +18 -18
  40. data/lib/stripe/params/transfer_create_params.rb +5 -5
  41. data/lib/stripe/params.rb +4 -0
  42. data/lib/stripe/resources/account.rb +19 -1
  43. data/lib/stripe/resources/application_fee.rb +2 -2
  44. data/lib/stripe/resources/balance_transfer.rb +139 -0
  45. data/lib/stripe/resources/bank_account.rb +2 -2
  46. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +2 -2
  47. data/lib/stripe/resources/billing_portal/configuration.rb +2 -0
  48. data/lib/stripe/resources/capital/financing_offer.rb +6 -6
  49. data/lib/stripe/resources/capital/financing_summary.rb +7 -7
  50. data/lib/stripe/resources/charge.rb +5 -3
  51. data/lib/stripe/resources/checkout/session.rb +3 -3
  52. data/lib/stripe/resources/confirmation_token.rb +1 -1
  53. data/lib/stripe/resources/delegated_checkout/requested_session.rb +50 -50
  54. data/lib/stripe/resources/financial_connections/account.rb +22 -0
  55. data/lib/stripe/resources/invoice.rb +1 -1
  56. data/lib/stripe/resources/issuing/card.rb +18 -0
  57. data/lib/stripe/resources/mandate.rb +3 -3
  58. data/lib/stripe/resources/payment_attempt_record.rb +8 -6
  59. data/lib/stripe/resources/payment_intent.rb +38 -26
  60. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +13 -7
  61. data/lib/stripe/resources/payment_method.rb +1 -1
  62. data/lib/stripe/resources/payment_record.rb +8 -6
  63. data/lib/stripe/resources/person.rb +36 -36
  64. data/lib/stripe/resources/quote.rb +27 -27
  65. data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
  66. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +9 -9
  67. data/lib/stripe/resources/radar/account_evaluation.rb +116 -0
  68. data/lib/stripe/resources/refund.rb +31 -0
  69. data/lib/stripe/resources/setup_attempt.rb +1 -1
  70. data/lib/stripe/resources/setup_intent.rb +3 -3
  71. data/lib/stripe/resources/subscription.rb +9 -9
  72. data/lib/stripe/resources/subscription_schedule.rb +9 -9
  73. data/lib/stripe/resources/transfer.rb +4 -4
  74. data/lib/stripe/resources.rb +2 -0
  75. data/lib/stripe/services/balance_transfer_service.rb +17 -0
  76. data/lib/stripe/services/radar/account_evaluation_service.rb +41 -0
  77. data/lib/stripe/services/radar_service.rb +2 -1
  78. data/lib/stripe/services/v1_services.rb +2 -1
  79. data/lib/stripe/services.rb +2 -0
  80. data/lib/stripe/util.rb +2 -5
  81. data/lib/stripe/version.rb +1 -1
  82. data/rbi/stripe.rbi +17737 -652
  83. metadata +10 -2
@@ -1620,15 +1620,15 @@ module Stripe
1620
1620
  class MandateOptions < ::Stripe::RequestParams
1621
1621
  # Amount that will be collected. It is required when `amount_type` is `fixed`.
1622
1622
  attr_accessor :amount
1623
- # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
1623
+ # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.
1624
1624
  attr_accessor :amount_type
1625
1625
  # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1626
1626
  attr_accessor :end_date
1627
- # The periodicity at which payments will be collected.
1627
+ # The periodicity at which payments will be collected. Defaults to `adhoc`.
1628
1628
  attr_accessor :payment_schedule
1629
1629
  # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
1630
1630
  attr_accessor :payments_per_period
1631
- # The purpose for which payments are made. Defaults to retail.
1631
+ # The purpose for which payments are made. Has a default value based on your merchant category code.
1632
1632
  attr_accessor :purpose
1633
1633
  # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
1634
1634
  attr_accessor :start_date
@@ -3,6 +3,25 @@
3
3
 
4
4
  module Stripe
5
5
  class CustomerBalanceTransactionListParams < ::Stripe::RequestParams
6
+ class Created < ::Stripe::RequestParams
7
+ # Minimum value to filter by (exclusive)
8
+ attr_accessor :gt
9
+ # Minimum value to filter by (inclusive)
10
+ attr_accessor :gte
11
+ # Maximum value to filter by (exclusive)
12
+ attr_accessor :lt
13
+ # Maximum value to filter by (inclusive)
14
+ attr_accessor :lte
15
+
16
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
17
+ @gt = gt
18
+ @gte = gte
19
+ @lt = lt
20
+ @lte = lte
21
+ end
22
+ end
23
+ # Only return customer balance transactions that were created during the given date interval.
24
+ attr_accessor :created
6
25
  # 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.
7
26
  attr_accessor :ending_before
8
27
  # Specifies which fields in the response should be expanded.
@@ -12,7 +31,8 @@ module Stripe
12
31
  # 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.
13
32
  attr_accessor :starting_after
14
33
 
15
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
34
+ def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
35
+ @created = created
16
36
  @ending_before = ending_before
17
37
  @expand = expand
18
38
  @limit = limit
@@ -200,7 +200,7 @@ module Stripe
200
200
  @tax_id_element = tax_id_element
201
201
  end
202
202
  end
203
- # Configuration for each component. Exactly 1 component must be enabled.
203
+ # Configuration for each component. At least 1 component must be enabled.
204
204
  attr_accessor :components
205
205
  # The ID of an existing customer for which to create the Customer Session.
206
206
  attr_accessor :customer
@@ -425,6 +425,29 @@ module Stripe
425
425
  end
426
426
  end
427
427
 
428
+ class BillingSchedulesAction < ::Stripe::RequestParams
429
+ class AppliesTo < ::Stripe::RequestParams
430
+ # The ID of the price object.
431
+ attr_accessor :price
432
+ # Controls which subscription items the billing schedule applies to.
433
+ attr_accessor :type
434
+
435
+ def initialize(price: nil, type: nil)
436
+ @price = price
437
+ @type = type
438
+ end
439
+ end
440
+ # Specify which subscription items the billing schedule applies to.
441
+ attr_accessor :applies_to
442
+ # Select the action.
443
+ attr_accessor :type
444
+
445
+ def initialize(applies_to: nil, type: nil)
446
+ @applies_to = applies_to
447
+ @type = type
448
+ end
449
+ end
450
+
428
451
  class DiscountAction < ::Stripe::RequestParams
429
452
  class Add < ::Stripe::RequestParams
430
453
  class DiscountEnd < ::Stripe::RequestParams
@@ -777,6 +800,8 @@ module Stripe
777
800
  attr_accessor :set_schedule_end
778
801
  # Settings related to subscription trials.
779
802
  attr_accessor :trial_settings
803
+ # Actions to apply to the billing schedules.
804
+ attr_accessor :billing_schedules_actions
780
805
 
781
806
  def initialize(
782
807
  amendment_end: nil,
@@ -788,7 +813,8 @@ module Stripe
788
813
  proration_behavior: nil,
789
814
  set_pause_collection: nil,
790
815
  set_schedule_end: nil,
791
- trial_settings: nil
816
+ trial_settings: nil,
817
+ billing_schedules_actions: nil
792
818
  )
793
819
  @amendment_end = amendment_end
794
820
  @amendment_start = amendment_start
@@ -800,6 +826,7 @@ module Stripe
800
826
  @set_pause_collection = set_pause_collection
801
827
  @set_schedule_end = set_schedule_end
802
828
  @trial_settings = trial_settings
829
+ @billing_schedules_actions = billing_schedules_actions
803
830
  end
804
831
  end
805
832
 
@@ -3,6 +3,24 @@
3
3
 
4
4
  module Stripe
5
5
  class InvoicePaymentListParams < ::Stripe::RequestParams
6
+ class Created < ::Stripe::RequestParams
7
+ # Minimum value to filter by (exclusive)
8
+ attr_accessor :gt
9
+ # Minimum value to filter by (inclusive)
10
+ attr_accessor :gte
11
+ # Maximum value to filter by (exclusive)
12
+ attr_accessor :lt
13
+ # Maximum value to filter by (inclusive)
14
+ attr_accessor :lte
15
+
16
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
17
+ @gt = gt
18
+ @gte = gte
19
+ @lt = lt
20
+ @lte = lte
21
+ end
22
+ end
23
+
6
24
  class Payment < ::Stripe::RequestParams
7
25
  # Only return invoice payments associated by this payment intent ID.
8
26
  attr_accessor :payment_intent
@@ -17,6 +35,8 @@ module Stripe
17
35
  @type = type
18
36
  end
19
37
  end
38
+ # Only return invoice payments that were created during the given date interval.
39
+ attr_accessor :created
20
40
  # 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.
21
41
  attr_accessor :ending_before
22
42
  # Specifies which fields in the response should be expanded.
@@ -33,6 +53,7 @@ module Stripe
33
53
  attr_accessor :status
34
54
 
35
55
  def initialize(
56
+ created: nil,
36
57
  ending_before: nil,
37
58
  expand: nil,
38
59
  invoice: nil,
@@ -41,6 +62,7 @@ module Stripe
41
62
  starting_after: nil,
42
63
  status: nil
43
64
  )
65
+ @created = created
44
66
  @ending_before = ending_before
45
67
  @expand = expand
46
68
  @invoice = invoice
@@ -208,6 +208,18 @@ module Stripe
208
208
  end
209
209
  end
210
210
 
211
+ class FraudRisk < ::Stripe::RequestParams
212
+ # Stripe’s assessment of the likelihood of fraud on an authorization.
213
+ attr_accessor :level
214
+ # Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher score means a higher likelihood of fraudulent activity, and anything above 25 is considered high risk.
215
+ attr_accessor :score
216
+
217
+ def initialize(level: nil, score: nil)
218
+ @level = level
219
+ @score = score
220
+ end
221
+ end
222
+
211
223
  class MerchantDisputeRisk < ::Stripe::RequestParams
212
224
  # The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100.
213
225
  attr_accessor :dispute_rate
@@ -221,11 +233,14 @@ module Stripe
221
233
  end
222
234
  # Stripe's assessment of this authorization's likelihood of being card testing activity.
223
235
  attr_accessor :card_testing_risk
236
+ # Stripe’s assessment of this authorization’s likelihood to be fraudulent.
237
+ attr_accessor :fraud_risk
224
238
  # The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity.
225
239
  attr_accessor :merchant_dispute_risk
226
240
 
227
- def initialize(card_testing_risk: nil, merchant_dispute_risk: nil)
241
+ def initialize(card_testing_risk: nil, fraud_risk: nil, merchant_dispute_risk: nil)
228
242
  @card_testing_risk = card_testing_risk
243
+ @fraud_risk = fraud_risk
229
244
  @merchant_dispute_risk = merchant_dispute_risk
230
245
  end
231
246
  end