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
@@ -0,0 +1,182 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Billing
7
+ class Cadence < APIResource
8
+ OBJECT_NAME = "v2.billing.cadence"
9
+ def self.object_name
10
+ "v2.billing.cadence"
11
+ end
12
+
13
+ class BillingCycle < Stripe::StripeObject
14
+ class Day < Stripe::StripeObject
15
+ class Time < Stripe::StripeObject
16
+ # The hour at which the billing cycle ends.
17
+ # This must be an integer between 0 and 23, inclusive.
18
+ # 0 represents midnight, and 23 represents 11 PM.
19
+ attr_reader :hour
20
+ # The minute at which the billing cycle ends.
21
+ # Must be an integer between 0 and 59, inclusive.
22
+ attr_reader :minute
23
+ # The second at which the billing cycle ends.
24
+ # Must be an integer between 0 and 59, inclusive.
25
+ attr_reader :second
26
+ end
27
+ # The time at which the billing cycle ends.
28
+ attr_reader :time
29
+ end
30
+
31
+ class Month < Stripe::StripeObject
32
+ class Time < Stripe::StripeObject
33
+ # The hour at which the billing cycle ends.
34
+ # This must be an integer between 0 and 23, inclusive.
35
+ # 0 represents midnight, and 23 represents 11 PM.
36
+ attr_reader :hour
37
+ # The minute at which the billing cycle ends.
38
+ # Must be an integer between 0 and 59, inclusive.
39
+ attr_reader :minute
40
+ # The second at which the billing cycle ends.
41
+ # Must be an integer between 0 and 59, inclusive.
42
+ attr_reader :second
43
+ end
44
+ # The day to anchor the billing on for a type="month" billing cycle from 1-31.
45
+ # If this number is greater than the number of days in the month being billed,
46
+ # this will anchor to the last day of the month.
47
+ attr_reader :day_of_month
48
+ # The time at which the billing cycle ends.
49
+ attr_reader :time
50
+ end
51
+
52
+ class Week < Stripe::StripeObject
53
+ class Time < Stripe::StripeObject
54
+ # The hour at which the billing cycle ends.
55
+ # This must be an integer between 0 and 23, inclusive.
56
+ # 0 represents midnight, and 23 represents 11 PM.
57
+ attr_reader :hour
58
+ # The minute at which the billing cycle ends.
59
+ # Must be an integer between 0 and 59, inclusive.
60
+ attr_reader :minute
61
+ # The second at which the billing cycle ends.
62
+ # Must be an integer between 0 and 59, inclusive.
63
+ attr_reader :second
64
+ end
65
+ # The day of the week to bill the type=week billing cycle on.
66
+ # Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day numbering.
67
+ attr_reader :day_of_week
68
+ # The time at which the billing cycle ends.
69
+ attr_reader :time
70
+ end
71
+
72
+ class Year < Stripe::StripeObject
73
+ class Time < Stripe::StripeObject
74
+ # The hour at which the billing cycle ends.
75
+ # This must be an integer between 0 and 23, inclusive.
76
+ # 0 represents midnight, and 23 represents 11 PM.
77
+ attr_reader :hour
78
+ # The minute at which the billing cycle ends.
79
+ # Must be an integer between 0 and 59, inclusive.
80
+ attr_reader :minute
81
+ # The second at which the billing cycle ends.
82
+ # Must be an integer between 0 and 59, inclusive.
83
+ attr_reader :second
84
+ end
85
+ # The day to anchor the billing on for a type="month" billing cycle from 1-31.
86
+ # If this number is greater than the number of days in the month being billed,
87
+ # this will anchor to the last day of the month.
88
+ attr_reader :day_of_month
89
+ # The month to bill on from 1-12. If not provided, this will default to the month the cadence was created.
90
+ attr_reader :month_of_year
91
+ # The time at which the billing cycle ends.
92
+ attr_reader :time
93
+ end
94
+ # The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months.
95
+ attr_reader :interval_count
96
+ # The frequency at which a cadence bills.
97
+ attr_reader :type
98
+ # Specific configuration for determining billing dates when type=day.
99
+ attr_reader :day
100
+ # Specific configuration for determining billing dates when type=month.
101
+ attr_reader :month
102
+ # Specific configuration for determining billing dates when type=week.
103
+ attr_reader :week
104
+ # Specific configuration for determining billing dates when type=year.
105
+ attr_reader :year
106
+ end
107
+
108
+ class InvoiceDiscountRule < Stripe::StripeObject
109
+ class PercentOff < Stripe::StripeObject
110
+ class MaximumApplications < Stripe::StripeObject
111
+ # Max applications type of this discount, ex: indefinite.
112
+ attr_reader :type
113
+ end
114
+ # The maximum applications configuration for this discount.
115
+ attr_reader :maximum_applications
116
+ # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead.
117
+ attr_reader :percent_off
118
+ end
119
+ # Unique identifier for the object.
120
+ attr_reader :id
121
+ # The type of the discount.
122
+ attr_reader :type
123
+ # Details if the discount is a percentage off.
124
+ attr_reader :percent_off
125
+ end
126
+
127
+ class Payer < Stripe::StripeObject
128
+ # The ID of the Billing Profile object which determines how a bill will be paid.
129
+ attr_reader :billing_profile
130
+ # The ID of the Customer object.
131
+ attr_reader :customer
132
+ # A string identifying the type of the payer. Currently the only supported value is `customer`.
133
+ attr_reader :type
134
+ end
135
+
136
+ class Settings < Stripe::StripeObject
137
+ class Bill < Stripe::StripeObject
138
+ # The ID of the referenced settings object.
139
+ attr_reader :id
140
+ # Returns the Settings Version when the cadence is pinned to a specific version.
141
+ attr_reader :version
142
+ end
143
+
144
+ class Collection < Stripe::StripeObject
145
+ # The ID of the referenced settings object.
146
+ attr_reader :id
147
+ # Returns the Settings Version when the cadence is pinned to a specific version.
148
+ attr_reader :version
149
+ end
150
+ # Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices.
151
+ attr_reader :bill
152
+ # Settings that configure and manage the behavior of collecting payments.
153
+ attr_reader :collection
154
+ end
155
+ # The billing cycle is the object that defines future billing cycle dates.
156
+ attr_reader :billing_cycle
157
+ # Timestamp of when the object was created.
158
+ attr_reader :created
159
+ # Unique identifier for the object.
160
+ attr_reader :id
161
+ # The discount rules applied to all invoices for the cadence.
162
+ attr_reader :invoice_discount_rules
163
+ # Set of [key-value pairs](/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.
164
+ attr_reader :metadata
165
+ # The date that the billing cadence will next bill. Null if the cadence is not active.
166
+ attr_reader :next_billing_date
167
+ # String representing the object's type. Objects of the same type share the same value of the object field.
168
+ attr_reader :object
169
+ # The payer determines the entity financially responsible for the bill.
170
+ attr_reader :payer
171
+ # The settings associated with the cadence.
172
+ attr_reader :settings
173
+ # The current status of the cadence.
174
+ attr_reader :status
175
+ # The ID of the Test Clock.
176
+ attr_reader :test_clock
177
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
178
+ attr_reader :livemode
179
+ end
180
+ end
181
+ end
182
+ end
@@ -0,0 +1,148 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Billing
7
+ # Settings that configure and manage the behavior of collecting payments.
8
+ class CollectionSetting < APIResource
9
+ OBJECT_NAME = "v2.billing.collection_setting"
10
+ def self.object_name
11
+ "v2.billing.collection_setting"
12
+ end
13
+
14
+ class EmailDelivery < Stripe::StripeObject
15
+ class PaymentDue < Stripe::StripeObject
16
+ # If true an email for the invoice would be generated and sent out.
17
+ attr_reader :enabled
18
+ # If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
19
+ attr_reader :include_payment_link
20
+ end
21
+ # Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
22
+ attr_reader :payment_due
23
+ end
24
+
25
+ class PaymentMethodOptions < Stripe::StripeObject
26
+ class AcssDebit < Stripe::StripeObject
27
+ class MandateOptions < Stripe::StripeObject
28
+ # Transaction type of the mandate.
29
+ attr_reader :transaction_type
30
+ end
31
+ # Additional fields for Mandate creation.
32
+ attr_reader :mandate_options
33
+ # Verification method.
34
+ attr_reader :verification_method
35
+ end
36
+
37
+ class Bancontact < Stripe::StripeObject
38
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
39
+ attr_reader :preferred_language
40
+ end
41
+
42
+ class Card < Stripe::StripeObject
43
+ class MandateOptions < Stripe::StripeObject
44
+ # Amount to be charged for future payments.
45
+ attr_reader :amount
46
+ # The AmountType for the mandate. One of `fixed` or `maximum`.
47
+ attr_reader :amount_type
48
+ # A description of the mandate that is meant to be displayed to the customer.
49
+ attr_reader :description
50
+ end
51
+ # Configuration options for setting up an eMandate for cards issued in India.
52
+ attr_reader :mandate_options
53
+ # Selected network to process the payment on. Depends on the available networks of the card.
54
+ attr_reader :network
55
+ # An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers
56
+ # for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication).
57
+ # However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
58
+ # Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
59
+ attr_reader :request_three_d_secure
60
+ end
61
+
62
+ class CustomerBalance < Stripe::StripeObject
63
+ class BankTransfer < Stripe::StripeObject
64
+ class EuBankTransfer < Stripe::StripeObject
65
+ # The desired country code of the bank account information.
66
+ attr_reader :country
67
+ end
68
+ # Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`.
69
+ attr_reader :eu_bank_transfer
70
+ # The bank transfer type that can be used for funding.
71
+ attr_reader :type
72
+ end
73
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
74
+ attr_reader :bank_transfer
75
+ # The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`.
76
+ attr_reader :funding_type
77
+ end
78
+
79
+ class Konbini < Stripe::StripeObject; end
80
+ class SepaDebit < Stripe::StripeObject; end
81
+
82
+ class UsBankAccount < Stripe::StripeObject
83
+ class FinancialConnections < Stripe::StripeObject
84
+ class Filters < Stripe::StripeObject
85
+ # The account subcategories to use to filter for selectable accounts.
86
+ attr_reader :account_subcategories
87
+ end
88
+ # Provide filters for the linked accounts that the customer can select for the payment method.
89
+ attr_reader :filters
90
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included.
91
+ attr_reader :permissions
92
+ # List of data features that you would like to retrieve upon account creation.
93
+ attr_reader :prefetch
94
+ end
95
+ # Additional fields for Financial Connections Session creation.
96
+ attr_reader :financial_connections
97
+ # Verification method.
98
+ attr_reader :verification_method
99
+ end
100
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options.
101
+ attr_reader :acss_debit
102
+ # This sub-hash contains details about the Bancontact payment method.
103
+ attr_reader :bancontact
104
+ # This sub-hash contains details about the Card payment method options.
105
+ attr_reader :card
106
+ # This sub-hash contains details about the Bank transfer payment method options.
107
+ attr_reader :customer_balance
108
+ # This sub-hash contains details about the Konbini payment method options.
109
+ attr_reader :konbini
110
+ # This sub-hash contains details about the SEPA Direct Debit payment method options.
111
+ attr_reader :sepa_debit
112
+ # This sub-hash contains details about the ACH direct debit payment method options.
113
+ attr_reader :us_bank_account
114
+ end
115
+ # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this
116
+ # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice,
117
+ # Stripe will email your payer profile an invoice with payment instructions.
118
+ # Defaults to automatic.
119
+ attr_reader :collection_method
120
+ # Timestamp of when the object was created.
121
+ attr_reader :created
122
+ # An optional field for adding a display name for the CollectionSetting object.
123
+ attr_reader :display_name
124
+ # Email delivery settings.
125
+ attr_reader :email_delivery
126
+ # The ID of the CollectionSetting.
127
+ attr_reader :id
128
+ # The latest version of the current settings object. This will be
129
+ # Updated every time an attribute of the settings is updated.
130
+ attr_reader :latest_version
131
+ # The current live version of the settings object. This can be different from
132
+ # latest_version if settings are updated without setting live_version='latest'.
133
+ attr_reader :live_version
134
+ # A lookup key used to retrieve settings dynamically from a static string.
135
+ # This may be up to 200 characters.
136
+ attr_reader :lookup_key
137
+ # String representing the object's type. Objects of the same type share the same value of the object field.
138
+ attr_reader :object
139
+ # The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers.
140
+ attr_reader :payment_method_configuration
141
+ # Payment Method specific configuration stored on the object.
142
+ attr_reader :payment_method_options
143
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
144
+ attr_reader :livemode
145
+ end
146
+ end
147
+ end
148
+ end
@@ -0,0 +1,136 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Billing
7
+ class CollectionSettingVersion < APIResource
8
+ OBJECT_NAME = "v2.billing.collection_setting_version"
9
+ def self.object_name
10
+ "v2.billing.collection_setting_version"
11
+ end
12
+
13
+ class EmailDelivery < Stripe::StripeObject
14
+ class PaymentDue < Stripe::StripeObject
15
+ # If true an email for the invoice would be generated and sent out.
16
+ attr_reader :enabled
17
+ # If true the payment link to hosted invocie page would be included in email and PDF of the invoice.
18
+ attr_reader :include_payment_link
19
+ end
20
+ # Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state.
21
+ attr_reader :payment_due
22
+ end
23
+
24
+ class PaymentMethodOptions < Stripe::StripeObject
25
+ class AcssDebit < Stripe::StripeObject
26
+ class MandateOptions < Stripe::StripeObject
27
+ # Transaction type of the mandate.
28
+ attr_reader :transaction_type
29
+ end
30
+ # Additional fields for Mandate creation.
31
+ attr_reader :mandate_options
32
+ # Verification method.
33
+ attr_reader :verification_method
34
+ end
35
+
36
+ class Bancontact < Stripe::StripeObject
37
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
38
+ attr_reader :preferred_language
39
+ end
40
+
41
+ class Card < Stripe::StripeObject
42
+ class MandateOptions < Stripe::StripeObject
43
+ # Amount to be charged for future payments.
44
+ attr_reader :amount
45
+ # The AmountType for the mandate. One of `fixed` or `maximum`.
46
+ attr_reader :amount_type
47
+ # A description of the mandate that is meant to be displayed to the customer.
48
+ attr_reader :description
49
+ end
50
+ # Configuration options for setting up an eMandate for cards issued in India.
51
+ attr_reader :mandate_options
52
+ # Selected network to process the payment on. Depends on the available networks of the card.
53
+ attr_reader :network
54
+ # An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers
55
+ # for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication).
56
+ # However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
57
+ # Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
58
+ attr_reader :request_three_d_secure
59
+ end
60
+
61
+ class CustomerBalance < Stripe::StripeObject
62
+ class BankTransfer < Stripe::StripeObject
63
+ class EuBankTransfer < Stripe::StripeObject
64
+ # The desired country code of the bank account information.
65
+ attr_reader :country
66
+ end
67
+ # Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`.
68
+ attr_reader :eu_bank_transfer
69
+ # The bank transfer type that can be used for funding.
70
+ attr_reader :type
71
+ end
72
+ # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
73
+ attr_reader :bank_transfer
74
+ # The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`.
75
+ attr_reader :funding_type
76
+ end
77
+
78
+ class Konbini < Stripe::StripeObject; end
79
+ class SepaDebit < Stripe::StripeObject; end
80
+
81
+ class UsBankAccount < Stripe::StripeObject
82
+ class FinancialConnections < Stripe::StripeObject
83
+ class Filters < Stripe::StripeObject
84
+ # The account subcategories to use to filter for selectable accounts.
85
+ attr_reader :account_subcategories
86
+ end
87
+ # Provide filters for the linked accounts that the customer can select for the payment method.
88
+ attr_reader :filters
89
+ # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included.
90
+ attr_reader :permissions
91
+ # List of data features that you would like to retrieve upon account creation.
92
+ attr_reader :prefetch
93
+ end
94
+ # Additional fields for Financial Connections Session creation.
95
+ attr_reader :financial_connections
96
+ # Verification method.
97
+ attr_reader :verification_method
98
+ end
99
+ # This sub-hash contains details about the Canadian pre-authorized debit payment method options.
100
+ attr_reader :acss_debit
101
+ # This sub-hash contains details about the Bancontact payment method.
102
+ attr_reader :bancontact
103
+ # This sub-hash contains details about the Card payment method options.
104
+ attr_reader :card
105
+ # This sub-hash contains details about the Bank transfer payment method options.
106
+ attr_reader :customer_balance
107
+ # This sub-hash contains details about the Konbini payment method options.
108
+ attr_reader :konbini
109
+ # This sub-hash contains details about the SEPA Direct Debit payment method options.
110
+ attr_reader :sepa_debit
111
+ # This sub-hash contains details about the ACH direct debit payment method options.
112
+ attr_reader :us_bank_account
113
+ end
114
+ # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this
115
+ # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice,
116
+ # Stripe will email your payer profile an invoice with payment instructions.
117
+ # Defaults to automatic.
118
+ attr_reader :collection_method
119
+ # Timestamp of when the object was created.
120
+ attr_reader :created
121
+ # Email delivery settings.
122
+ attr_reader :email_delivery
123
+ # The ID of the CollectionSettingVersion object.
124
+ attr_reader :id
125
+ # String representing the object's type. Objects of the same type share the same value of the object field.
126
+ attr_reader :object
127
+ # The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers.
128
+ attr_reader :payment_method_configuration
129
+ # Payment Method specific configuration stored on the object.
130
+ attr_reader :payment_method_options
131
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
132
+ attr_reader :livemode
133
+ end
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Billing
7
+ # The Custom Pricing Unit object.
8
+ class CustomPricingUnit < APIResource
9
+ OBJECT_NAME = "v2.billing.custom_pricing_unit"
10
+ def self.object_name
11
+ "v2.billing.custom_pricing_unit"
12
+ end
13
+
14
+ # Whether the custom pricing unit is active.
15
+ attr_reader :active
16
+ # Timestamp of when the object was created.
17
+ attr_reader :created
18
+ # Description that customers will see in the invoice line item.
19
+ # Maximum length of 10 characters.
20
+ attr_reader :display_name
21
+ # Unique identifier for the object.
22
+ attr_reader :id
23
+ # An internal key you can use to search for a particular Custom Pricing Unit.
24
+ # Maximum length of 200 characters.
25
+ attr_reader :lookup_key
26
+ # Set of [key-value pairs](/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.
27
+ attr_reader :metadata
28
+ # String representing the object's type. Objects of the same type share the same value of the object field.
29
+ attr_reader :object
30
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
31
+ attr_reader :livemode
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,59 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Billing
7
+ class Intent < APIResource
8
+ OBJECT_NAME = "v2.billing.intent"
9
+ def self.object_name
10
+ "v2.billing.intent"
11
+ end
12
+
13
+ class AmountDetails < Stripe::StripeObject
14
+ # Three-letter ISO currency code, in lowercase. Must be a supported currency.
15
+ attr_reader :currency
16
+ # Amount of discount applied.
17
+ attr_reader :discount
18
+ # Amount of shipping charges.
19
+ attr_reader :shipping
20
+ # Subtotal amount before tax and discounts.
21
+ attr_reader :subtotal
22
+ # Amount of tax.
23
+ attr_reader :tax
24
+ # Total amount for the Billing Intent.
25
+ attr_reader :total
26
+ end
27
+
28
+ class StatusTransitions < Stripe::StripeObject
29
+ # Time at which the Billing Intent was canceled.
30
+ attr_reader :canceled_at
31
+ # Time at which the Billing Intent was committed.
32
+ attr_reader :committed_at
33
+ # Time at which the Billing Intent was drafted.
34
+ attr_reader :drafted_at
35
+ # Time at which the Billing Intent was reserved.
36
+ attr_reader :reserved_at
37
+ end
38
+ # Breakdown of the amount for this Billing Intent.
39
+ attr_reader :amount_details
40
+ # Time at which the object was created.
41
+ attr_reader :created
42
+ # Three-letter ISO currency code, in lowercase. Must be a supported currency.
43
+ attr_reader :currency
44
+ # Unique identifier for the object.
45
+ attr_reader :id
46
+ # String representing the object's type. Objects of the same type share the same value of the object field.
47
+ attr_reader :object
48
+ # Current status of the Billing Intent.
49
+ attr_reader :status
50
+ # Timestamps for status transitions of the Billing Intent.
51
+ attr_reader :status_transitions
52
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
53
+ attr_reader :livemode
54
+ # ID of an existing Cadence to use.
55
+ attr_reader :cadence
56
+ end
57
+ end
58
+ end
59
+ end