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
@@ -712,23 +712,23 @@ module Stripe
712
712
  @field_remappings = {}
713
713
  end
714
714
  end
715
+ # Use an index to specify the position of an amendment to end prebilling with.
716
+ attr_reader :amendment_end
715
717
  # The timestamp the billing schedule will apply until.
716
718
  attr_reader :computed_timestamp
717
719
  # Specifies the billing period.
718
720
  attr_reader :duration
721
+ # Lets you bill the period ending at a particular Quote line.
722
+ attr_reader :line_ends_at
719
723
  # If specified, the billing schedule will apply until the specified timestamp.
720
724
  attr_reader :timestamp
721
725
  # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
722
726
  attr_reader :type
723
- # Use an index to specify the position of an amendment to end prebilling with.
724
- attr_reader :amendment_end
725
- # Lets you bill the period ending at a particular Quote line.
726
- attr_reader :line_ends_at
727
727
 
728
728
  def self.inner_class_types
729
729
  @inner_class_types = {
730
- duration: Duration,
731
730
  amendment_end: AmendmentEnd,
731
+ duration: Duration,
732
732
  line_ends_at: LineEndsAt,
733
733
  }
734
734
  end
@@ -739,15 +739,15 @@ module Stripe
739
739
  end
740
740
  # Specifies which subscription items the billing schedule applies to.
741
741
  attr_reader :applies_to
742
- # Specifies the billing period.
742
+ # Specifies the start of the billing period.
743
+ attr_reader :bill_from
744
+ # Specifies the end of billing period.
743
745
  attr_reader :bill_until
744
746
  # Unique identifier for the billing schedule.
745
747
  attr_reader :key
746
- # Specifies the start of the billing period.
747
- attr_reader :bill_from
748
748
 
749
749
  def self.inner_class_types
750
- @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
750
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
751
751
  end
752
752
 
753
753
  def self.field_remappings
@@ -775,6 +775,8 @@ module Stripe
775
775
  attr_reader :billing_cycle_anchor
776
776
  # The billing mode of the quote.
777
777
  attr_reader :billing_mode
778
+ # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
779
+ attr_reader :billing_schedules
778
780
  # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
779
781
  attr_reader :description
780
782
  # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
@@ -785,23 +787,21 @@ module Stripe
785
787
  attr_reader :from_subscription
786
788
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
787
789
  attr_reader :metadata
790
+ # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
791
+ attr_reader :phase_effective_at
788
792
  # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
789
793
  attr_reader :prebilling
790
794
  # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
791
795
  attr_reader :proration_behavior
792
796
  # Integer representing the number of trial period days before the customer is charged for the first time.
793
797
  attr_reader :trial_period_days
794
- # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
795
- attr_reader :billing_schedules
796
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
797
- attr_reader :phase_effective_at
798
798
 
799
799
  def self.inner_class_types
800
800
  @inner_class_types = {
801
801
  bill_on_acceptance: BillOnAcceptance,
802
802
  billing_mode: BillingMode,
803
- prebilling: Prebilling,
804
803
  billing_schedules: BillingSchedule,
804
+ prebilling: Prebilling,
805
805
  }
806
806
  end
807
807
 
@@ -1045,23 +1045,23 @@ module Stripe
1045
1045
  @field_remappings = {}
1046
1046
  end
1047
1047
  end
1048
+ # Use an index to specify the position of an amendment to end prebilling with.
1049
+ attr_reader :amendment_end
1048
1050
  # The timestamp the billing schedule will apply until.
1049
1051
  attr_reader :computed_timestamp
1050
1052
  # Specifies the billing period.
1051
1053
  attr_reader :duration
1054
+ # Lets you bill the period ending at a particular Quote line.
1055
+ attr_reader :line_ends_at
1052
1056
  # If specified, the billing schedule will apply until the specified timestamp.
1053
1057
  attr_reader :timestamp
1054
1058
  # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
1055
1059
  attr_reader :type
1056
- # Use an index to specify the position of an amendment to end prebilling with.
1057
- attr_reader :amendment_end
1058
- # Lets you bill the period ending at a particular Quote line.
1059
- attr_reader :line_ends_at
1060
1060
 
1061
1061
  def self.inner_class_types
1062
1062
  @inner_class_types = {
1063
- duration: Duration,
1064
1063
  amendment_end: AmendmentEnd,
1064
+ duration: Duration,
1065
1065
  line_ends_at: LineEndsAt,
1066
1066
  }
1067
1067
  end
@@ -1072,15 +1072,15 @@ module Stripe
1072
1072
  end
1073
1073
  # Specifies which subscription items the billing schedule applies to.
1074
1074
  attr_reader :applies_to
1075
- # Specifies the billing period.
1075
+ # Specifies the start of the billing period.
1076
+ attr_reader :bill_from
1077
+ # Specifies the end of billing period.
1076
1078
  attr_reader :bill_until
1077
1079
  # Unique identifier for the billing schedule.
1078
1080
  attr_reader :key
1079
- # Specifies the start of the billing period.
1080
- attr_reader :bill_from
1081
1081
 
1082
1082
  def self.inner_class_types
1083
- @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
1083
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
1084
1084
  end
1085
1085
 
1086
1086
  def self.field_remappings
@@ -1093,18 +1093,18 @@ module Stripe
1093
1093
  attr_reader :bill_on_acceptance
1094
1094
  # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1095
1095
  attr_reader :billing_behavior
1096
+ # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
1097
+ attr_reader :billing_schedules
1096
1098
  # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1097
1099
  attr_reader :customer
1098
1100
  # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1099
1101
  attr_reader :description
1100
1102
  # Behavior of the subscription schedule and underlying subscription when it ends.
1101
1103
  attr_reader :end_behavior
1102
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
1103
- attr_reader :proration_behavior
1104
- # Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
1105
- attr_reader :billing_schedules
1106
1104
  # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1107
1105
  attr_reader :phase_effective_at
1106
+ # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
1107
+ attr_reader :proration_behavior
1108
1108
 
1109
1109
  def self.inner_class_types
1110
1110
  @inner_class_types = {
@@ -1005,7 +1005,7 @@ module Stripe
1005
1005
  # * `subscription_cycle`: A subscription advanced into a new period.
1006
1006
  # * `subscription_threshold`: A subscription reached a billing threshold.
1007
1007
  # * `subscription_update`: A subscription was updated.
1008
- # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
1008
+ # * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription.
1009
1009
  attr_reader :billing_reason
1010
1010
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
1011
1011
  attr_reader :collection_method
@@ -791,23 +791,23 @@ module Stripe
791
791
  @field_remappings = {}
792
792
  end
793
793
  end
794
+ # Use an index to specify the position of an amendment to end prebilling with.
795
+ attr_reader :amendment_end
794
796
  # The timestamp the billing schedule will apply until.
795
797
  attr_reader :computed_timestamp
796
798
  # Specifies the billing period.
797
799
  attr_reader :duration
800
+ # Lets you bill the period ending at a particular Quote line.
801
+ attr_reader :line_ends_at
798
802
  # If specified, the billing schedule will apply until the specified timestamp.
799
803
  attr_reader :timestamp
800
804
  # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
801
805
  attr_reader :type
802
- # Use an index to specify the position of an amendment to end prebilling with.
803
- attr_reader :amendment_end
804
- # Lets you bill the period ending at a particular Quote line.
805
- attr_reader :line_ends_at
806
806
 
807
807
  def self.inner_class_types
808
808
  @inner_class_types = {
809
- duration: Duration,
810
809
  amendment_end: AmendmentEnd,
810
+ duration: Duration,
811
811
  line_ends_at: LineEndsAt,
812
812
  }
813
813
  end
@@ -818,15 +818,15 @@ module Stripe
818
818
  end
819
819
  # Specifies which subscription items the billing schedule applies to.
820
820
  attr_reader :applies_to
821
- # Specifies the billing period.
821
+ # Specifies the start of the billing period.
822
+ attr_reader :bill_from
823
+ # Specifies the end of billing period.
822
824
  attr_reader :bill_until
823
825
  # Unique identifier for the billing schedule.
824
826
  attr_reader :key
825
- # Specifies the start of the billing period.
826
- attr_reader :bill_from
827
827
 
828
828
  def self.inner_class_types
829
- @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
829
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
830
830
  end
831
831
 
832
832
  def self.field_remappings
@@ -0,0 +1,116 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Radar
6
+ # Account Evaluation resource returned by the Radar Account Evaluations API.
7
+ class AccountEvaluation < APIResource
8
+ extend Stripe::APIOperations::Create
9
+ include Stripe::APIOperations::Save
10
+
11
+ OBJECT_NAME = "radar.account_evaluation"
12
+ def self.object_name
13
+ "radar.account_evaluation"
14
+ end
15
+
16
+ class Event < ::Stripe::StripeObject
17
+ # Time at which the event occurred. Measured in seconds since the Unix epoch.
18
+ attr_reader :occurred_at
19
+ # The type of event that occurred.
20
+ attr_reader :type
21
+
22
+ def self.inner_class_types
23
+ @inner_class_types = {}
24
+ end
25
+
26
+ def self.field_remappings
27
+ @field_remappings = {}
28
+ end
29
+ end
30
+
31
+ class Signals < ::Stripe::StripeObject
32
+ class AccountSharing < ::Stripe::StripeObject
33
+ # Score for this signal (float between 0.0-100.0).
34
+ attr_reader :score
35
+
36
+ def self.inner_class_types
37
+ @inner_class_types = {}
38
+ end
39
+
40
+ def self.field_remappings
41
+ @field_remappings = {}
42
+ end
43
+ end
44
+
45
+ class MultiAccounting < ::Stripe::StripeObject
46
+ # Score for this signal (float between 0.0-100.0).
47
+ attr_reader :score
48
+
49
+ def self.inner_class_types
50
+ @inner_class_types = {}
51
+ end
52
+
53
+ def self.field_remappings
54
+ @field_remappings = {}
55
+ end
56
+ end
57
+ # Attribute for field account_sharing
58
+ attr_reader :account_sharing
59
+ # Attribute for field multi_accounting
60
+ attr_reader :multi_accounting
61
+
62
+ def self.inner_class_types
63
+ @inner_class_types = { account_sharing: AccountSharing, multi_accounting: MultiAccounting }
64
+ end
65
+
66
+ def self.field_remappings
67
+ @field_remappings = {}
68
+ end
69
+ end
70
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
71
+ attr_reader :created_at
72
+ # The ID of the Stripe customer the account evaluation is associated with.
73
+ attr_reader :customer
74
+ # The list of events that were reported for this Account Evaluation object via the report API.
75
+ attr_reader :events
76
+ # Unique identifier for the object.
77
+ attr_reader :id
78
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
79
+ attr_reader :livemode
80
+ # String representing the object's type. Objects of the same type share the same value.
81
+ attr_reader :object
82
+ # A hash of signal objects providing Radar's evaluation for the lifecycle event.
83
+ attr_reader :signals
84
+ # The type of evaluation returned, based on the user's request.
85
+ attr_reader :type
86
+
87
+ # Creates a new AccountEvaluation object.
88
+ def self.create(params = {}, opts = {})
89
+ request_stripe_object(
90
+ method: :post,
91
+ path: "/v1/radar/account_evaluations",
92
+ params: params,
93
+ opts: opts
94
+ )
95
+ end
96
+
97
+ # Reports an event on an AccountEvaluation object.
98
+ def self.update(account_evaluation, params = {}, opts = {})
99
+ request_stripe_object(
100
+ method: :post,
101
+ path: format("/v1/radar/account_evaluations/%<account_evaluation>s/report_event", { account_evaluation: CGI.escape(account_evaluation) }),
102
+ params: params,
103
+ opts: opts
104
+ )
105
+ end
106
+
107
+ def self.inner_class_types
108
+ @inner_class_types = { events: Event, signals: Signals }
109
+ end
110
+
111
+ def self.field_remappings
112
+ @field_remappings = {}
113
+ end
114
+ end
115
+ end
116
+ end
@@ -262,6 +262,21 @@ module Stripe
262
262
  end
263
263
  end
264
264
 
265
+ class MbWay < ::Stripe::StripeObject
266
+ # The reference assigned to the refund.
267
+ attr_reader :reference
268
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
269
+ attr_reader :reference_status
270
+
271
+ def self.inner_class_types
272
+ @inner_class_types = {}
273
+ end
274
+
275
+ def self.field_remappings
276
+ @field_remappings = {}
277
+ end
278
+ end
279
+
265
280
  class Multibanco < ::Stripe::StripeObject
266
281
  # The reference assigned to the refund.
267
282
  attr_reader :reference
@@ -402,6 +417,16 @@ module Stripe
402
417
  end
403
418
  end
404
419
 
420
+ class Twint < ::Stripe::StripeObject
421
+ def self.inner_class_types
422
+ @inner_class_types = {}
423
+ end
424
+
425
+ def self.field_remappings
426
+ @field_remappings = {}
427
+ end
428
+ end
429
+
405
430
  class UsBankTransfer < ::Stripe::StripeObject
406
431
  # The reference assigned to the refund.
407
432
  attr_reader :reference
@@ -476,6 +501,8 @@ module Stripe
476
501
  attr_reader :jp_bank_transfer
477
502
  # Attribute for field klarna
478
503
  attr_reader :klarna
504
+ # Attribute for field mb_way
505
+ attr_reader :mb_way
479
506
  # Attribute for field multibanco
480
507
  attr_reader :multibanco
481
508
  # Attribute for field mx_bank_transfer
@@ -498,6 +525,8 @@ module Stripe
498
525
  attr_reader :swish
499
526
  # Attribute for field th_bank_transfer
500
527
  attr_reader :th_bank_transfer
528
+ # Attribute for field twint
529
+ attr_reader :twint
501
530
  # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
502
531
  attr_reader :type
503
532
  # Attribute for field us_bank_transfer
@@ -529,6 +558,7 @@ module Stripe
529
558
  id_bank_transfer: IdBankTransfer,
530
559
  jp_bank_transfer: JpBankTransfer,
531
560
  klarna: Klarna,
561
+ mb_way: MbWay,
532
562
  multibanco: Multibanco,
533
563
  mx_bank_transfer: MxBankTransfer,
534
564
  nz_bank_transfer: NzBankTransfer,
@@ -540,6 +570,7 @@ module Stripe
540
570
  sofort: Sofort,
541
571
  swish: Swish,
542
572
  th_bank_transfer: ThBankTransfer,
573
+ twint: Twint,
543
574
  us_bank_transfer: UsBankTransfer,
544
575
  wechat_pay: WechatPay,
545
576
  zip: Zip,
@@ -273,7 +273,7 @@ module Stripe
273
273
  end
274
274
 
275
275
  class Ideal < ::Stripe::StripeObject
276
- # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
276
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
277
277
  attr_reader :bank
278
278
  # The Bank Identifier Code of the customer's bank.
279
279
  attr_reader :bic
@@ -434,15 +434,15 @@ module Stripe
434
434
  class MandateOptions < ::Stripe::StripeObject
435
435
  # Amount that will be collected. It is required when `amount_type` is `fixed`.
436
436
  attr_reader :amount
437
- # 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.
437
+ # 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`.
438
438
  attr_reader :amount_type
439
439
  # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
440
440
  attr_reader :end_date
441
- # The periodicity at which payments will be collected.
441
+ # The periodicity at which payments will be collected. Defaults to `adhoc`.
442
442
  attr_reader :payment_schedule
443
443
  # 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.
444
444
  attr_reader :payments_per_period
445
- # The purpose for which payments are made. Defaults to retail.
445
+ # The purpose for which payments are made. Has a default value based on your merchant category code.
446
446
  attr_reader :purpose
447
447
  # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
448
448
  attr_reader :start_date
@@ -221,23 +221,23 @@ module Stripe
221
221
  @field_remappings = {}
222
222
  end
223
223
  end
224
+ # Use an index to specify the position of an amendment to end prebilling with.
225
+ attr_reader :amendment_end
224
226
  # The timestamp the billing schedule will apply until.
225
227
  attr_reader :computed_timestamp
226
228
  # Specifies the billing period.
227
229
  attr_reader :duration
230
+ # Lets you bill the period ending at a particular Quote line.
231
+ attr_reader :line_ends_at
228
232
  # If specified, the billing schedule will apply until the specified timestamp.
229
233
  attr_reader :timestamp
230
234
  # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
231
235
  attr_reader :type
232
- # Use an index to specify the position of an amendment to end prebilling with.
233
- attr_reader :amendment_end
234
- # Lets you bill the period ending at a particular Quote line.
235
- attr_reader :line_ends_at
236
236
 
237
237
  def self.inner_class_types
238
238
  @inner_class_types = {
239
- duration: Duration,
240
239
  amendment_end: AmendmentEnd,
240
+ duration: Duration,
241
241
  line_ends_at: LineEndsAt,
242
242
  }
243
243
  end
@@ -248,15 +248,15 @@ module Stripe
248
248
  end
249
249
  # Specifies which subscription items the billing schedule applies to.
250
250
  attr_reader :applies_to
251
- # Specifies the billing period.
251
+ # Specifies the start of the billing period.
252
+ attr_reader :bill_from
253
+ # Specifies the end of billing period.
252
254
  attr_reader :bill_until
253
255
  # Unique identifier for the billing schedule.
254
256
  attr_reader :key
255
- # Specifies the start of the billing period.
256
- attr_reader :bill_from
257
257
 
258
258
  def self.inner_class_types
259
- @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
259
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
260
260
  end
261
261
 
262
262
  def self.field_remappings
@@ -781,23 +781,23 @@ module Stripe
781
781
  @field_remappings = {}
782
782
  end
783
783
  end
784
+ # Use an index to specify the position of an amendment to end prebilling with.
785
+ attr_reader :amendment_end
784
786
  # The timestamp the billing schedule will apply until.
785
787
  attr_reader :computed_timestamp
786
788
  # Specifies the billing period.
787
789
  attr_reader :duration
790
+ # Lets you bill the period ending at a particular Quote line.
791
+ attr_reader :line_ends_at
788
792
  # If specified, the billing schedule will apply until the specified timestamp.
789
793
  attr_reader :timestamp
790
794
  # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
791
795
  attr_reader :type
792
- # Use an index to specify the position of an amendment to end prebilling with.
793
- attr_reader :amendment_end
794
- # Lets you bill the period ending at a particular Quote line.
795
- attr_reader :line_ends_at
796
796
 
797
797
  def self.inner_class_types
798
798
  @inner_class_types = {
799
- duration: Duration,
800
799
  amendment_end: AmendmentEnd,
800
+ duration: Duration,
801
801
  line_ends_at: LineEndsAt,
802
802
  }
803
803
  end
@@ -808,15 +808,15 @@ module Stripe
808
808
  end
809
809
  # Specifies which subscription items the billing schedule applies to.
810
810
  attr_reader :applies_to
811
- # Specifies the billing period.
811
+ # Specifies the start of the billing period.
812
+ attr_reader :bill_from
813
+ # Specifies the end of billing period.
812
814
  attr_reader :bill_until
813
815
  # Unique identifier for the billing schedule.
814
816
  attr_reader :key
815
- # Specifies the start of the billing period.
816
- attr_reader :bill_from
817
817
 
818
818
  def self.inner_class_types
819
- @inner_class_types = { applies_to: AppliesTo, bill_until: BillUntil, bill_from: BillFrom }
819
+ @inner_class_types = { applies_to: AppliesTo, bill_from: BillFrom, bill_until: BillUntil }
820
820
  end
821
821
 
822
822
  def self.field_remappings
@@ -29,6 +29,10 @@ module Stripe
29
29
  attr_reader :amount
30
30
  # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
31
31
  attr_reader :amount_reversed
32
+ # Attribute for field application_fee
33
+ attr_reader :application_fee
34
+ # Attribute for field application_fee_amount
35
+ attr_reader :application_fee_amount
32
36
  # Balance transaction that describes the impact of this transfer on your account balance.
33
37
  attr_reader :balance_transaction
34
38
  # Time that this record of the transfer was first created.
@@ -61,10 +65,6 @@ module Stripe
61
65
  attr_reader :source_type
62
66
  # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
63
67
  attr_reader :transfer_group
64
- # Attribute for field application_fee
65
- attr_reader :application_fee
66
- # Attribute for field application_fee_amount
67
- attr_reader :application_fee_amount
68
68
 
69
69
  # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://docs.stripe.com/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
70
70
  def self.create(params = {}, opts = {})
@@ -13,6 +13,7 @@ require "stripe/resources/apps/secret"
13
13
  require "stripe/resources/balance"
14
14
  require "stripe/resources/balance_settings"
15
15
  require "stripe/resources/balance_transaction"
16
+ require "stripe/resources/balance_transfer"
16
17
  require "stripe/resources/bank_account"
17
18
  require "stripe/resources/billing/alert"
18
19
  require "stripe/resources/billing/alert_triggered"
@@ -117,6 +118,7 @@ require "stripe/resources/quote"
117
118
  require "stripe/resources/quote_line"
118
119
  require "stripe/resources/quote_preview_invoice"
119
120
  require "stripe/resources/quote_preview_subscription_schedule"
121
+ require "stripe/resources/radar/account_evaluation"
120
122
  require "stripe/resources/radar/early_fraud_warning"
121
123
  require "stripe/resources/radar/value_list"
122
124
  require "stripe/resources/radar/value_list_item"
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class BalanceTransferService < StripeService
6
+ # Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
7
+ def create(params = {}, opts = {})
8
+ request(
9
+ method: :post,
10
+ path: "/v1/balance_transfers",
11
+ params: params,
12
+ opts: opts,
13
+ base_address: :api
14
+ )
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,41 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Radar
6
+ class AccountEvaluationService < StripeService
7
+ # Creates a new AccountEvaluation object.
8
+ def create(params = {}, opts = {})
9
+ request(
10
+ method: :post,
11
+ path: "/v1/radar/account_evaluations",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
18
+ # Retrieves an AccountEvaluation object.
19
+ def retrieve(account_evaluation, params = {}, opts = {})
20
+ request(
21
+ method: :get,
22
+ path: format("/v1/radar/account_evaluations/%<account_evaluation>s", { account_evaluation: CGI.escape(account_evaluation) }),
23
+ params: params,
24
+ opts: opts,
25
+ base_address: :api
26
+ )
27
+ end
28
+
29
+ # Reports an event on an AccountEvaluation object.
30
+ def update(account_evaluation, params = {}, opts = {})
31
+ request(
32
+ method: :post,
33
+ path: format("/v1/radar/account_evaluations/%<account_evaluation>s/report_event", { account_evaluation: CGI.escape(account_evaluation) }),
34
+ params: params,
35
+ opts: opts,
36
+ base_address: :api
37
+ )
38
+ end
39
+ end
40
+ end
41
+ end
@@ -3,10 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  class RadarService < StripeService
6
- attr_reader :early_fraud_warnings, :value_lists, :value_list_items
6
+ attr_reader :account_evaluations, :early_fraud_warnings, :value_lists, :value_list_items
7
7
 
8
8
  def initialize(requestor)
9
9
  super
10
+ @account_evaluations = Stripe::Radar::AccountEvaluationService.new(@requestor)
10
11
  @early_fraud_warnings = Stripe::Radar::EarlyFraudWarningService.new(@requestor)
11
12
  @value_lists = Stripe::Radar::ValueListService.new(@requestor)
12
13
  @value_list_items = Stripe::Radar::ValueListItemService.new(@requestor)