stripe 15.5.0.pre.beta.2 → 15.6.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 (207) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +117 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +6 -4
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +20 -18
  8. data/lib/stripe/api_version.rb +1 -1
  9. data/lib/stripe/errors.rb +26 -23
  10. data/lib/stripe/event_types.rb +83 -0
  11. data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
  12. data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
  13. data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
  14. data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
  15. data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
  16. data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
  17. data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
  18. data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
  19. data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
  20. data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
  21. data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
  22. data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
  23. data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
  24. data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
  25. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
  26. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
  27. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
  28. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
  29. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
  30. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
  31. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
  32. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
  33. data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
  34. data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
  35. data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
  36. data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
  37. data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
  38. data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
  39. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
  40. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
  41. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
  42. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
  43. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
  44. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
  45. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
  46. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
  47. data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
  48. data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
  49. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
  50. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
  51. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
  52. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
  53. data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
  54. data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
  55. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
  56. data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
  57. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
  58. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
  59. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
  60. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
  61. data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
  62. data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
  63. data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
  64. data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
  65. data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
  66. data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
  67. data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
  68. data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
  69. data/lib/stripe/object_types.rb +27 -0
  70. data/lib/stripe/resources/account.rb +2 -2
  71. data/lib/stripe/resources/account_session.rb +94 -13
  72. data/lib/stripe/resources/balance.rb +2 -7
  73. data/lib/stripe/resources/balance_settings.rb +72 -65
  74. data/lib/stripe/resources/billing/alert.rb +128 -1
  75. data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
  76. data/lib/stripe/resources/billing/credit_balance_summary.rb +50 -0
  77. data/lib/stripe/resources/billing/credit_balance_transaction.rb +50 -0
  78. data/lib/stripe/resources/billing/credit_grant.rb +61 -2
  79. data/lib/stripe/resources/billing/meter.rb +2 -2
  80. data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
  81. data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
  82. data/lib/stripe/resources/charge.rb +36 -5
  83. data/lib/stripe/resources/checkout/session.rb +237 -6
  84. data/lib/stripe/resources/credit_note.rb +3 -3
  85. data/lib/stripe/resources/dispute.rb +1 -1
  86. data/lib/stripe/resources/file.rb +1 -1
  87. data/lib/stripe/resources/file_link.rb +1 -1
  88. data/lib/stripe/resources/invoice.rb +55 -1
  89. data/lib/stripe/resources/invoice_item.rb +48 -0
  90. data/lib/stripe/resources/invoice_line_item.rb +52 -0
  91. data/lib/stripe/resources/invoice_payment.rb +1 -1
  92. data/lib/stripe/resources/mandate.rb +65 -1
  93. data/lib/stripe/resources/payment_attempt_record.rb +86 -10
  94. data/lib/stripe/resources/payment_intent.rb +182 -4
  95. data/lib/stripe/resources/payment_link.rb +1 -1
  96. data/lib/stripe/resources/payment_method.rb +2 -0
  97. data/lib/stripe/resources/payment_record.rb +107 -14
  98. data/lib/stripe/resources/promotion_code.rb +5 -2
  99. data/lib/stripe/resources/quote_preview_invoice.rb +8 -1
  100. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
  101. data/lib/stripe/resources/setup_attempt.rb +4 -1
  102. data/lib/stripe/resources/setup_intent.rb +194 -1
  103. data/lib/stripe/resources/subscription.rb +145 -9
  104. data/lib/stripe/resources/subscription_schedule.rb +124 -2
  105. data/lib/stripe/resources/terminal/configuration.rb +82 -0
  106. data/lib/stripe/resources/terminal/reader.rb +22 -0
  107. data/lib/stripe/resources/v2/billing/bill_setting.rb +62 -0
  108. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +50 -0
  109. data/lib/stripe/resources/v2/billing/cadence.rb +182 -0
  110. data/lib/stripe/resources/v2/billing/collection_setting.rb +148 -0
  111. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +136 -0
  112. data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +35 -0
  113. data/lib/stripe/resources/v2/billing/intent.rb +59 -0
  114. data/lib/stripe/resources/v2/billing/intent_action.rb +200 -0
  115. data/lib/stripe/resources/v2/billing/license_fee.rb +79 -0
  116. data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +36 -0
  117. data/lib/stripe/resources/v2/billing/license_fee_version.rb +56 -0
  118. data/lib/stripe/resources/v2/billing/licensed_item.rb +44 -0
  119. data/lib/stripe/resources/v2/billing/metered_item.rb +58 -0
  120. data/lib/stripe/resources/v2/billing/pricing_plan.rb +43 -0
  121. data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +58 -0
  122. data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +63 -0
  123. data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +30 -0
  124. data/lib/stripe/resources/v2/billing/profile.rb +38 -0
  125. data/lib/stripe/resources/v2/billing/rate_card.rb +53 -0
  126. data/lib/stripe/resources/v2/billing/rate_card_rate.rb +71 -0
  127. data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +63 -0
  128. data/lib/stripe/resources/v2/billing/rate_card_version.rb +26 -0
  129. data/lib/stripe/resources/v2/billing/service_action.rb +117 -0
  130. data/lib/stripe/resources/v2/core/account.rb +8 -0
  131. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +57 -0
  132. data/lib/stripe/resources/v2/event.rb +2 -0
  133. data/lib/stripe/resources/v2/money_management/financial_account.rb +4 -2
  134. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
  135. data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
  136. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
  137. data/lib/stripe/resources/v2/reporting/report.rb +64 -0
  138. data/lib/stripe/resources/v2/reporting/report_run.rb +89 -0
  139. data/lib/stripe/resources/v2/tax/automatic_rule.rb +31 -0
  140. data/lib/stripe/resources.rb +85 -0
  141. data/lib/stripe/services/account_session_service.rb +64 -13
  142. data/lib/stripe/services/balance_settings_service.rb +44 -41
  143. data/lib/stripe/services/billing/alert_service.rb +75 -1
  144. data/lib/stripe/services/billing/credit_balance_summary_service.rb +13 -1
  145. data/lib/stripe/services/billing/credit_grant_service.rb +29 -2
  146. data/lib/stripe/services/billing/meter_service.rb +1 -1
  147. data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
  148. data/lib/stripe/services/checkout/session_service.rb +166 -5
  149. data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
  150. data/lib/stripe/services/credit_note_service.rb +2 -2
  151. data/lib/stripe/services/customer_service.rb +4 -4
  152. data/lib/stripe/services/file_link_service.rb +1 -1
  153. data/lib/stripe/services/file_service.rb +1 -1
  154. data/lib/stripe/services/invoice_payment_service.rb +1 -1
  155. data/lib/stripe/services/invoice_service.rb +47 -0
  156. data/lib/stripe/services/mandate_service.rb +40 -0
  157. data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
  158. data/lib/stripe/services/payment_intent_service.rb +157 -3
  159. data/lib/stripe/services/payment_link_service.rb +1 -1
  160. data/lib/stripe/services/payment_record_service.rb +25 -5
  161. data/lib/stripe/services/quote_service.rb +4 -4
  162. data/lib/stripe/services/setup_intent_service.rb +153 -0
  163. data/lib/stripe/services/subscription_schedule_service.rb +100 -2
  164. data/lib/stripe/services/subscription_service.rb +134 -9
  165. data/lib/stripe/services/terminal/configuration_service.rb +64 -0
  166. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
  167. data/lib/stripe/services/v1_services.rb +5 -5
  168. data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
  169. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
  170. data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
  171. data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
  172. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
  173. data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
  174. data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
  175. data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
  176. data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
  177. data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
  178. data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
  179. data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
  180. data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
  181. data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
  182. data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
  183. data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
  184. data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
  185. data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
  186. data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
  187. data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
  188. data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
  189. data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
  190. data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
  191. data/lib/stripe/services/v2/billing_service.rb +19 -2
  192. data/lib/stripe/services/v2/core/account_service.rb +16 -2
  193. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
  194. data/lib/stripe/services/v2/core_service.rb +4 -3
  195. data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
  196. data/lib/stripe/services/v2/money_management_service.rb +3 -3
  197. data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
  198. data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
  199. data/lib/stripe/services/v2/reporting_service.rb +16 -0
  200. data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
  201. data/lib/stripe/services/v2/tax_service.rb +15 -0
  202. data/lib/stripe/services/v2_services.rb +3 -1
  203. data/lib/stripe/services.rb +29 -0
  204. data/lib/stripe/stripe_service.rb +3 -1
  205. data/lib/stripe/version.rb +1 -1
  206. metadata +116 -3
  207. data/rbi/stripe.rbi +0 -199145
@@ -2973,6 +2973,41 @@ module Stripe
2973
2973
  end
2974
2974
  end
2975
2975
 
2976
+ class Period < Stripe::RequestParams
2977
+ class End < Stripe::RequestParams
2978
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
2979
+ attr_accessor :timestamp
2980
+ # Select how to calculate the end of the invoice item period.
2981
+ attr_accessor :type
2982
+
2983
+ def initialize(timestamp: nil, type: nil)
2984
+ @timestamp = timestamp
2985
+ @type = type
2986
+ end
2987
+ end
2988
+
2989
+ class Start < Stripe::RequestParams
2990
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
2991
+ attr_accessor :timestamp
2992
+ # Select how to calculate the start of the invoice item period.
2993
+ attr_accessor :type
2994
+
2995
+ def initialize(timestamp: nil, type: nil)
2996
+ @timestamp = timestamp
2997
+ @type = type
2998
+ end
2999
+ end
3000
+ # End of the invoice item period.
3001
+ attr_accessor :end
3002
+ # Start of the invoice item period.
3003
+ attr_accessor :start
3004
+
3005
+ def initialize(end_: nil, start: nil)
3006
+ @end = end_
3007
+ @start = start
3008
+ end
3009
+ end
3010
+
2976
3011
  class PriceData < Stripe::RequestParams
2977
3012
  # 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).
2978
3013
  attr_accessor :currency
@@ -3001,6 +3036,10 @@ module Stripe
3001
3036
  end
3002
3037
  # The coupons to redeem into discounts for the item.
3003
3038
  attr_accessor :discounts
3039
+ # Set of [key-value pairs](https://stripe.com/docs/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`.
3040
+ attr_accessor :metadata
3041
+ # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
3042
+ attr_accessor :period
3004
3043
  # The ID of the price object. One of `price` or `price_data` is required.
3005
3044
  attr_accessor :price
3006
3045
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
@@ -3012,12 +3051,16 @@ module Stripe
3012
3051
 
3013
3052
  def initialize(
3014
3053
  discounts: nil,
3054
+ metadata: nil,
3055
+ period: nil,
3015
3056
  price: nil,
3016
3057
  price_data: nil,
3017
3058
  quantity: nil,
3018
3059
  tax_rates: nil
3019
3060
  )
3020
3061
  @discounts = discounts
3062
+ @metadata = metadata
3063
+ @period = period
3021
3064
  @price = price
3022
3065
  @price_data = price_data
3023
3066
  @quantity = quantity
@@ -3739,6 +3782,8 @@ module Stripe
3739
3782
  end
3740
3783
  # Settings for automatic tax lookup for this invoice preview.
3741
3784
  attr_accessor :automatic_tax
3785
+ # The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
3786
+ attr_accessor :billing_cadence
3742
3787
  # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
3743
3788
  attr_accessor :currency
3744
3789
  # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
@@ -3770,6 +3815,7 @@ module Stripe
3770
3815
 
3771
3816
  def initialize(
3772
3817
  automatic_tax: nil,
3818
+ billing_cadence: nil,
3773
3819
  currency: nil,
3774
3820
  customer: nil,
3775
3821
  customer_account: nil,
@@ -3786,6 +3832,7 @@ module Stripe
3786
3832
  subscription_details: nil
3787
3833
  )
3788
3834
  @automatic_tax = automatic_tax
3835
+ @billing_cadence = billing_cadence
3789
3836
  @currency = currency
3790
3837
  @customer = customer
3791
3838
  @customer_account = customer_account
@@ -3,6 +3,41 @@
3
3
 
4
4
  module Stripe
5
5
  class MandateService < StripeService
6
+ class ListParams < Stripe::RequestParams
7
+ # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
8
+ attr_accessor :ending_before
9
+ # Specifies which fields in the response should be expanded.
10
+ attr_accessor :expand
11
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
12
+ attr_accessor :limit
13
+ # The Stripe account ID that the mandates are intended for. Learn more about the [use case for connected accounts payments](https://stripe.com/docs/payments/connected-accounts).
14
+ attr_accessor :on_behalf_of
15
+ # Attribute for param field payment_method
16
+ attr_accessor :payment_method
17
+ # 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.
18
+ attr_accessor :starting_after
19
+ # The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`.
20
+ attr_accessor :status
21
+
22
+ def initialize(
23
+ ending_before: nil,
24
+ expand: nil,
25
+ limit: nil,
26
+ on_behalf_of: nil,
27
+ payment_method: nil,
28
+ starting_after: nil,
29
+ status: nil
30
+ )
31
+ @ending_before = ending_before
32
+ @expand = expand
33
+ @limit = limit
34
+ @on_behalf_of = on_behalf_of
35
+ @payment_method = payment_method
36
+ @starting_after = starting_after
37
+ @status = status
38
+ end
39
+ end
40
+
6
41
  class RetrieveParams < Stripe::RequestParams
7
42
  # Specifies which fields in the response should be expanded.
8
43
  attr_accessor :expand
@@ -12,6 +47,11 @@ module Stripe
12
47
  end
13
48
  end
14
49
 
50
+ # Retrieves a list of Mandates for a given PaymentMethod.
51
+ def list(params = {}, opts = {})
52
+ request(method: :get, path: "/v1/mandates", params: params, opts: opts, base_address: :api)
53
+ end
54
+
15
55
  # Retrieves a Mandate object.
16
56
  def retrieve(mandate, params = {}, opts = {})
17
57
  request(
@@ -6,11 +6,14 @@ module Stripe
6
6
  class ListParams < Stripe::RequestParams
7
7
  # Specifies which fields in the response should be expanded.
8
8
  attr_accessor :expand
9
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
10
+ attr_accessor :limit
9
11
  # The ID of the Payment Record.
10
12
  attr_accessor :payment_record
11
13
 
12
- def initialize(expand: nil, payment_record: nil)
14
+ def initialize(expand: nil, limit: nil, payment_record: nil)
13
15
  @expand = expand
16
+ @limit = limit
14
17
  @payment_record = payment_record
15
18
  end
16
19
  end
@@ -2961,10 +2961,52 @@ module Stripe
2961
2961
  end
2962
2962
 
2963
2963
  class Pix < Stripe::RequestParams
2964
+ class MandateOptions < Stripe::RequestParams
2965
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
2966
+ attr_accessor :amount
2967
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
2968
+ attr_accessor :amount_includes_iof
2969
+ # Type of amount. Defaults to `maximum`.
2970
+ attr_accessor :amount_type
2971
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
2972
+ attr_accessor :currency
2973
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
2974
+ attr_accessor :end_date
2975
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
2976
+ attr_accessor :payment_schedule
2977
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
2978
+ attr_accessor :reference
2979
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
2980
+ attr_accessor :start_date
2981
+
2982
+ def initialize(
2983
+ amount: nil,
2984
+ amount_includes_iof: nil,
2985
+ amount_type: nil,
2986
+ currency: nil,
2987
+ end_date: nil,
2988
+ payment_schedule: nil,
2989
+ reference: nil,
2990
+ start_date: nil
2991
+ )
2992
+ @amount = amount
2993
+ @amount_includes_iof = amount_includes_iof
2994
+ @amount_type = amount_type
2995
+ @currency = currency
2996
+ @end_date = end_date
2997
+ @payment_schedule = payment_schedule
2998
+ @reference = reference
2999
+ @start_date = start_date
3000
+ end
3001
+ end
3002
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
3003
+ attr_accessor :amount_includes_iof
2964
3004
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
2965
3005
  attr_accessor :expires_after_seconds
2966
3006
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
2967
3007
  attr_accessor :expires_at
3008
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
3009
+ attr_accessor :mandate_options
2968
3010
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2969
3011
  #
2970
3012
  # 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.
@@ -2976,9 +3018,17 @@ module Stripe
2976
3018
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2977
3019
  attr_accessor :setup_future_usage
2978
3020
 
2979
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
3021
+ def initialize(
3022
+ amount_includes_iof: nil,
3023
+ expires_after_seconds: nil,
3024
+ expires_at: nil,
3025
+ mandate_options: nil,
3026
+ setup_future_usage: nil
3027
+ )
3028
+ @amount_includes_iof = amount_includes_iof
2980
3029
  @expires_after_seconds = expires_after_seconds
2981
3030
  @expires_at = expires_at
3031
+ @mandate_options = mandate_options
2982
3032
  @setup_future_usage = setup_future_usage
2983
3033
  end
2984
3034
  end
@@ -3689,6 +3739,8 @@ module Stripe
3689
3739
  attr_accessor :description
3690
3740
  # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
3691
3741
  attr_accessor :error_on_requires_action
3742
+ # The list of payment method types to exclude from use with this payment.
3743
+ attr_accessor :excluded_payment_method_types
3692
3744
  # Specifies which fields in the response should be expanded.
3693
3745
  attr_accessor :expand
3694
3746
  # The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
@@ -3769,6 +3821,7 @@ module Stripe
3769
3821
  customer_account: nil,
3770
3822
  description: nil,
3771
3823
  error_on_requires_action: nil,
3824
+ excluded_payment_method_types: nil,
3772
3825
  expand: nil,
3773
3826
  fx_quote: nil,
3774
3827
  hooks: nil,
@@ -3808,6 +3861,7 @@ module Stripe
3808
3861
  @customer_account = customer_account
3809
3862
  @description = description
3810
3863
  @error_on_requires_action = error_on_requires_action
3864
+ @excluded_payment_method_types = excluded_payment_method_types
3811
3865
  @expand = expand
3812
3866
  @fx_quote = fx_quote
3813
3867
  @hooks = hooks
@@ -6725,10 +6779,52 @@ module Stripe
6725
6779
  end
6726
6780
 
6727
6781
  class Pix < Stripe::RequestParams
6782
+ class MandateOptions < Stripe::RequestParams
6783
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
6784
+ attr_accessor :amount
6785
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
6786
+ attr_accessor :amount_includes_iof
6787
+ # Type of amount. Defaults to `maximum`.
6788
+ attr_accessor :amount_type
6789
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
6790
+ attr_accessor :currency
6791
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
6792
+ attr_accessor :end_date
6793
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
6794
+ attr_accessor :payment_schedule
6795
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
6796
+ attr_accessor :reference
6797
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
6798
+ attr_accessor :start_date
6799
+
6800
+ def initialize(
6801
+ amount: nil,
6802
+ amount_includes_iof: nil,
6803
+ amount_type: nil,
6804
+ currency: nil,
6805
+ end_date: nil,
6806
+ payment_schedule: nil,
6807
+ reference: nil,
6808
+ start_date: nil
6809
+ )
6810
+ @amount = amount
6811
+ @amount_includes_iof = amount_includes_iof
6812
+ @amount_type = amount_type
6813
+ @currency = currency
6814
+ @end_date = end_date
6815
+ @payment_schedule = payment_schedule
6816
+ @reference = reference
6817
+ @start_date = start_date
6818
+ end
6819
+ end
6820
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
6821
+ attr_accessor :amount_includes_iof
6728
6822
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
6729
6823
  attr_accessor :expires_after_seconds
6730
6824
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
6731
6825
  attr_accessor :expires_at
6826
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
6827
+ attr_accessor :mandate_options
6732
6828
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
6733
6829
  #
6734
6830
  # 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.
@@ -6740,9 +6836,17 @@ module Stripe
6740
6836
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
6741
6837
  attr_accessor :setup_future_usage
6742
6838
 
6743
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
6839
+ def initialize(
6840
+ amount_includes_iof: nil,
6841
+ expires_after_seconds: nil,
6842
+ expires_at: nil,
6843
+ mandate_options: nil,
6844
+ setup_future_usage: nil
6845
+ )
6846
+ @amount_includes_iof = amount_includes_iof
6744
6847
  @expires_after_seconds = expires_after_seconds
6745
6848
  @expires_at = expires_at
6849
+ @mandate_options = mandate_options
6746
6850
  @setup_future_usage = setup_future_usage
6747
6851
  end
6748
6852
  end
@@ -11405,10 +11509,52 @@ module Stripe
11405
11509
  end
11406
11510
 
11407
11511
  class Pix < Stripe::RequestParams
11512
+ class MandateOptions < Stripe::RequestParams
11513
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
11514
+ attr_accessor :amount
11515
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
11516
+ attr_accessor :amount_includes_iof
11517
+ # Type of amount. Defaults to `maximum`.
11518
+ attr_accessor :amount_type
11519
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
11520
+ attr_accessor :currency
11521
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
11522
+ attr_accessor :end_date
11523
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
11524
+ attr_accessor :payment_schedule
11525
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
11526
+ attr_accessor :reference
11527
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
11528
+ attr_accessor :start_date
11529
+
11530
+ def initialize(
11531
+ amount: nil,
11532
+ amount_includes_iof: nil,
11533
+ amount_type: nil,
11534
+ currency: nil,
11535
+ end_date: nil,
11536
+ payment_schedule: nil,
11537
+ reference: nil,
11538
+ start_date: nil
11539
+ )
11540
+ @amount = amount
11541
+ @amount_includes_iof = amount_includes_iof
11542
+ @amount_type = amount_type
11543
+ @currency = currency
11544
+ @end_date = end_date
11545
+ @payment_schedule = payment_schedule
11546
+ @reference = reference
11547
+ @start_date = start_date
11548
+ end
11549
+ end
11550
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
11551
+ attr_accessor :amount_includes_iof
11408
11552
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
11409
11553
  attr_accessor :expires_after_seconds
11410
11554
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
11411
11555
  attr_accessor :expires_at
11556
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
11557
+ attr_accessor :mandate_options
11412
11558
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
11413
11559
  #
11414
11560
  # 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.
@@ -11420,9 +11566,17 @@ module Stripe
11420
11566
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
11421
11567
  attr_accessor :setup_future_usage
11422
11568
 
11423
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
11569
+ def initialize(
11570
+ amount_includes_iof: nil,
11571
+ expires_after_seconds: nil,
11572
+ expires_at: nil,
11573
+ mandate_options: nil,
11574
+ setup_future_usage: nil
11575
+ )
11576
+ @amount_includes_iof = amount_includes_iof
11424
11577
  @expires_after_seconds = expires_after_seconds
11425
11578
  @expires_at = expires_at
11579
+ @mandate_options = mandate_options
11426
11580
  @setup_future_usage = setup_future_usage
11427
11581
  end
11428
11582
  end
@@ -438,7 +438,7 @@ module Stripe
438
438
  end
439
439
  # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
440
440
  attr_accessor :adjustable_quantity
441
- # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
441
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
442
442
  attr_accessor :price
443
443
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
444
444
  attr_accessor :price_data
@@ -243,7 +243,7 @@ module Stripe
243
243
  class AmountRequested < Stripe::RequestParams
244
244
  # 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).
245
245
  attr_accessor :currency
246
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
246
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
247
247
  attr_accessor :value
248
248
 
249
249
  def initialize(currency: nil, value: nil)
@@ -365,6 +365,26 @@ module Stripe
365
365
  end
366
366
  end
367
367
 
368
+ class ProcessorDetails < Stripe::RequestParams
369
+ class Custom < Stripe::RequestParams
370
+ # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
371
+ attr_accessor :payment_reference
372
+
373
+ def initialize(payment_reference: nil)
374
+ @payment_reference = payment_reference
375
+ end
376
+ end
377
+ # Information about the custom processor used to make this payment.
378
+ attr_accessor :custom
379
+ # The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor.
380
+ attr_accessor :type
381
+
382
+ def initialize(custom: nil, type: nil)
383
+ @custom = custom
384
+ @type = type
385
+ end
386
+ end
387
+
368
388
  class ShippingDetails < Stripe::RequestParams
369
389
  class Address < Stripe::RequestParams
370
390
  # City, district, suburb, town, or village.
@@ -431,8 +451,8 @@ module Stripe
431
451
  attr_accessor :outcome
432
452
  # Information about the Payment Method debited for this payment.
433
453
  attr_accessor :payment_method_details
434
- # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
435
- attr_accessor :payment_reference
454
+ # Processor information for this payment.
455
+ attr_accessor :processor_details
436
456
  # Shipping information for this payment.
437
457
  attr_accessor :shipping_details
438
458
 
@@ -448,7 +468,7 @@ module Stripe
448
468
  metadata: nil,
449
469
  outcome: nil,
450
470
  payment_method_details: nil,
451
- payment_reference: nil,
471
+ processor_details: nil,
452
472
  shipping_details: nil
453
473
  )
454
474
  @amount_requested = amount_requested
@@ -462,7 +482,7 @@ module Stripe
462
482
  @metadata = metadata
463
483
  @outcome = outcome
464
484
  @payment_method_details = payment_method_details
465
- @payment_reference = payment_reference
485
+ @processor_details = processor_details
466
486
  @shipping_details = shipping_details
467
487
  end
468
488
  end
@@ -3,16 +3,16 @@
3
3
 
4
4
  module Stripe
5
5
  class QuoteService < StripeService
6
- attr_reader :preview_invoices, :preview_subscription_schedules, :lines, :line_items, :computed_upfront_line_items
6
+ attr_reader :computed_upfront_line_items, :lines, :line_items, :preview_invoices, :preview_subscription_schedules
7
7
 
8
8
  def initialize(requestor)
9
9
  super
10
+ @computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
11
+ @lines = Stripe::QuoteLineService.new(@requestor)
12
+ @line_items = Stripe::QuoteLineItemService.new(@requestor)
10
13
  @preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
11
14
  @preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
12
15
  .new(@requestor)
13
- @lines = Stripe::QuoteLineService.new(@requestor)
14
- @line_items = Stripe::QuoteLineItemService.new(@requestor)
15
- @computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
16
16
  end
17
17
 
18
18
  class ListParams < Stripe::RequestParams