stripe 15.6.0.pre.alpha.1 → 15.6.0.pre.beta.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 (156) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +1 -65
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +4 -6
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -2
  8. data/lib/stripe/errors.rb +0 -3
  9. data/lib/stripe/event_types.rb +0 -83
  10. data/lib/stripe/object_types.rb +0 -27
  11. data/lib/stripe/resources/billing/alert.rb +1 -128
  12. data/lib/stripe/resources/billing/alert_triggered.rb +0 -6
  13. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -50
  14. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -50
  15. data/lib/stripe/resources/billing/credit_grant.rb +2 -61
  16. data/lib/stripe/resources/charge.rb +4 -0
  17. data/lib/stripe/resources/checkout/session.rb +1 -128
  18. data/lib/stripe/resources/invoice.rb +0 -11
  19. data/lib/stripe/resources/invoice_item.rb +0 -48
  20. data/lib/stripe/resources/invoice_line_item.rb +0 -52
  21. data/lib/stripe/resources/issuing/card.rb +8 -0
  22. data/lib/stripe/resources/payment_attempt_record.rb +4 -0
  23. data/lib/stripe/resources/payment_record.rb +4 -0
  24. data/lib/stripe/resources/quote_preview_invoice.rb +0 -7
  25. data/lib/stripe/resources/subscription.rb +0 -38
  26. data/lib/stripe/resources/v2/event.rb +0 -2
  27. data/lib/stripe/resources/v2/money_management/financial_account.rb +2 -2
  28. data/lib/stripe/resources.rb +0 -85
  29. data/lib/stripe/services/billing/alert_service.rb +1 -75
  30. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -13
  31. data/lib/stripe/services/billing/credit_grant_service.rb +2 -29
  32. data/lib/stripe/services/checkout/session_service.rb +1 -80
  33. data/lib/stripe/services/invoice_service.rb +0 -4
  34. data/lib/stripe/services/issuing/card_service.rb +8 -0
  35. data/lib/stripe/services/subscription_service.rb +0 -27
  36. data/lib/stripe/services/v2/billing_service.rb +1 -18
  37. data/lib/stripe/services/v2/core_service.rb +1 -2
  38. data/lib/stripe/services/v2_services.rb +1 -3
  39. data/lib/stripe/services.rb +0 -29
  40. data/lib/stripe/version.rb +1 -1
  41. data/rbi/stripe.rbi +201354 -0
  42. metadata +2 -115
  43. data/lib/stripe/events/v2_billing_cadence_billed_event.rb +0 -21
  44. data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +0 -21
  45. data/lib/stripe/events/v2_billing_cadence_created_event.rb +0 -23
  46. data/lib/stripe/events/v2_billing_cadence_errored_event.rb +0 -21
  47. data/lib/stripe/events/v2_billing_license_fee_created_event.rb +0 -21
  48. data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +0 -21
  49. data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +0 -23
  50. data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +0 -21
  51. data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +0 -21
  52. data/lib/stripe/events/v2_billing_metered_item_created_event.rb +0 -21
  53. data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +0 -21
  54. data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +0 -23
  55. data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +0 -23
  56. data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +0 -21
  57. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +0 -21
  58. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +0 -21
  59. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +0 -21
  60. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +0 -21
  61. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +0 -21
  62. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +0 -21
  63. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +0 -21
  64. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +0 -21
  65. data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +0 -21
  66. data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +0 -23
  67. data/lib/stripe/events/v2_billing_rate_card_created_event.rb +0 -23
  68. data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +0 -23
  69. data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +0 -21
  70. data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +0 -21
  71. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +0 -21
  72. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +0 -21
  73. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +0 -21
  74. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +0 -21
  75. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +0 -21
  76. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +0 -21
  77. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +0 -21
  78. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +0 -21
  79. data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +0 -21
  80. data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +0 -23
  81. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +0 -13
  82. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +0 -13
  83. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +0 -13
  84. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +0 -13
  85. data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +0 -13
  86. data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +0 -13
  87. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +0 -13
  88. data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +0 -13
  89. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +0 -13
  90. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +0 -13
  91. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +0 -13
  92. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +0 -13
  93. data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +0 -13
  94. data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +0 -13
  95. data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +0 -13
  96. data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +0 -13
  97. data/lib/stripe/events/v2_reporting_report_run_created_event.rb +0 -21
  98. data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +0 -21
  99. data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +0 -21
  100. data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +0 -21
  101. data/lib/stripe/resources/v2/billing/bill_setting.rb +0 -62
  102. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +0 -50
  103. data/lib/stripe/resources/v2/billing/cadence.rb +0 -182
  104. data/lib/stripe/resources/v2/billing/collection_setting.rb +0 -148
  105. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +0 -136
  106. data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +0 -35
  107. data/lib/stripe/resources/v2/billing/intent.rb +0 -59
  108. data/lib/stripe/resources/v2/billing/intent_action.rb +0 -200
  109. data/lib/stripe/resources/v2/billing/license_fee.rb +0 -79
  110. data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +0 -36
  111. data/lib/stripe/resources/v2/billing/license_fee_version.rb +0 -56
  112. data/lib/stripe/resources/v2/billing/licensed_item.rb +0 -44
  113. data/lib/stripe/resources/v2/billing/metered_item.rb +0 -58
  114. data/lib/stripe/resources/v2/billing/pricing_plan.rb +0 -43
  115. data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +0 -58
  116. data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +0 -63
  117. data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +0 -30
  118. data/lib/stripe/resources/v2/billing/profile.rb +0 -38
  119. data/lib/stripe/resources/v2/billing/rate_card.rb +0 -53
  120. data/lib/stripe/resources/v2/billing/rate_card_rate.rb +0 -71
  121. data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +0 -63
  122. data/lib/stripe/resources/v2/billing/rate_card_version.rb +0 -26
  123. data/lib/stripe/resources/v2/billing/service_action.rb +0 -117
  124. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +0 -57
  125. data/lib/stripe/resources/v2/reporting/report.rb +0 -64
  126. data/lib/stripe/resources/v2/reporting/report_run.rb +0 -89
  127. data/lib/stripe/resources/v2/tax/automatic_rule.rb +0 -31
  128. data/lib/stripe/services/v2/billing/bill_setting_service.rb +0 -214
  129. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +0 -45
  130. data/lib/stripe/services/v2/billing/cadence_service.rb +0 -428
  131. data/lib/stripe/services/v2/billing/collection_setting_service.rb +0 -518
  132. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +0 -45
  133. data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +0 -108
  134. data/lib/stripe/services/v2/billing/intent_service.rb +0 -465
  135. data/lib/stripe/services/v2/billing/intents/action_service.rb +0 -45
  136. data/lib/stripe/services/v2/billing/license_fee_service.rb +0 -250
  137. data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +0 -23
  138. data/lib/stripe/services/v2/billing/license_fees/version_service.rb +0 -45
  139. data/lib/stripe/services/v2/billing/licensed_item_service.rb +0 -149
  140. data/lib/stripe/services/v2/billing/metered_item_service.rb +0 -176
  141. data/lib/stripe/services/v2/billing/pricing_plan_service.rb +0 -142
  142. data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +0 -76
  143. data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +0 -162
  144. data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +0 -45
  145. data/lib/stripe/services/v2/billing/profile_service.rb +0 -144
  146. data/lib/stripe/services/v2/billing/rate_card_service.rb +0 -151
  147. data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +0 -144
  148. data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +0 -161
  149. data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +0 -45
  150. data/lib/stripe/services/v2/billing/service_action_service.rb +0 -259
  151. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +0 -50
  152. data/lib/stripe/services/v2/reporting/report_run_service.rb +0 -88
  153. data/lib/stripe/services/v2/reporting/report_service.rb +0 -25
  154. data/lib/stripe/services/v2/reporting_service.rb +0 -16
  155. data/lib/stripe/services/v2/tax/automatic_rule_service.rb +0 -99
  156. data/lib/stripe/services/v2/tax_service.rb +0 -15
@@ -1,428 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module V2
6
- module Billing
7
- class CadenceService < StripeService
8
- class ListParams < Stripe::RequestParams
9
- class Payer < Stripe::RequestParams
10
- # The ID of the Customer object. If provided, only cadences that specifically reference the provided customer ID will be returned.
11
- attr_accessor :customer
12
- # A string identifying the type of the payer. Currently the only supported value is `customer`.
13
- attr_accessor :type
14
-
15
- def initialize(customer: nil, type: nil)
16
- @customer = customer
17
- @type = type
18
- end
19
- end
20
- # Additional resource to include in the response.
21
- attr_accessor :include
22
- # Optionally set the maximum number of results per page. Defaults to 20.
23
- attr_accessor :limit
24
- # If provided, only cadences that specifically reference the payer will be returned. Mutually exclusive with `test_clock`.
25
- attr_accessor :payer
26
- # If provided, only cadences that specifically reference the provided test clock ID (via the
27
- # customer's test clock) will be returned.
28
- # Mutually exclusive with `payer`.
29
- attr_accessor :test_clock
30
-
31
- def initialize(include: nil, limit: nil, payer: nil, test_clock: nil)
32
- @include = include
33
- @limit = limit
34
- @payer = payer
35
- @test_clock = test_clock
36
- end
37
- end
38
-
39
- class CreateParams < Stripe::RequestParams
40
- class BillingCycle < Stripe::RequestParams
41
- class Day < Stripe::RequestParams
42
- class Time < Stripe::RequestParams
43
- # The hour at which the billing cycle ends.
44
- # This must be an integer between 0 and 23, inclusive.
45
- # 0 represents midnight, and 23 represents 11 PM.
46
- attr_accessor :hour
47
- # The minute at which the billing cycle ends.
48
- # Must be an integer between 0 and 59, inclusive.
49
- attr_accessor :minute
50
- # The second at which the billing cycle ends.
51
- # Must be an integer between 0 and 59, inclusive.
52
- attr_accessor :second
53
-
54
- def initialize(hour: nil, minute: nil, second: nil)
55
- @hour = hour
56
- @minute = minute
57
- @second = second
58
- end
59
- end
60
- # The time at which the billing cycle ends.
61
- # This field is optional, and if not provided, it will default to
62
- # the time at which the cadence was created in UTC timezone.
63
- attr_accessor :time
64
-
65
- def initialize(time: nil)
66
- @time = time
67
- end
68
- end
69
-
70
- class Month < Stripe::RequestParams
71
- class Time < Stripe::RequestParams
72
- # The hour at which the billing cycle ends.
73
- # This must be an integer between 0 and 23, inclusive.
74
- # 0 represents midnight, and 23 represents 11 PM.
75
- attr_accessor :hour
76
- # The minute at which the billing cycle ends.
77
- # Must be an integer between 0 and 59, inclusive.
78
- attr_accessor :minute
79
- # The second at which the billing cycle ends.
80
- # Must be an integer between 0 and 59, inclusive.
81
- attr_accessor :second
82
-
83
- def initialize(hour: nil, minute: nil, second: nil)
84
- @hour = hour
85
- @minute = minute
86
- @second = second
87
- end
88
- end
89
- # The day to anchor the billing on for a type="month" billing cycle from
90
- # 1-31. If this number is greater than the number of days in the month being
91
- # billed, this will anchor to the last day of the month. If not provided,
92
- # this will default to the day the cadence was created.
93
- attr_accessor :day_of_month
94
- # The time at which the billing cycle ends.
95
- # This field is optional, and if not provided, it will default to
96
- # the time at which the cadence was created in UTC timezone.
97
- attr_accessor :time
98
-
99
- def initialize(day_of_month: nil, time: nil)
100
- @day_of_month = day_of_month
101
- @time = time
102
- end
103
- end
104
-
105
- class Week < Stripe::RequestParams
106
- class Time < Stripe::RequestParams
107
- # The hour at which the billing cycle ends.
108
- # This must be an integer between 0 and 23, inclusive.
109
- # 0 represents midnight, and 23 represents 11 PM.
110
- attr_accessor :hour
111
- # The minute at which the billing cycle ends.
112
- # Must be an integer between 0 and 59, inclusive.
113
- attr_accessor :minute
114
- # The second at which the billing cycle ends.
115
- # Must be an integer between 0 and 59, inclusive.
116
- attr_accessor :second
117
-
118
- def initialize(hour: nil, minute: nil, second: nil)
119
- @hour = hour
120
- @minute = minute
121
- @second = second
122
- end
123
- end
124
- # The day of the week to bill the type=week billing cycle on.
125
- # Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601
126
- # week day numbering. If not provided, this will default to the day the
127
- # cadence was created.
128
- attr_accessor :day_of_week
129
- # The time at which the billing cycle ends.
130
- # This field is optional, and if not provided, it will default to
131
- # the time at which the cadence was created in UTC timezone.
132
- attr_accessor :time
133
-
134
- def initialize(day_of_week: nil, time: nil)
135
- @day_of_week = day_of_week
136
- @time = time
137
- end
138
- end
139
-
140
- class Year < Stripe::RequestParams
141
- class Time < Stripe::RequestParams
142
- # The hour at which the billing cycle ends.
143
- # This must be an integer between 0 and 23, inclusive.
144
- # 0 represents midnight, and 23 represents 11 PM.
145
- attr_accessor :hour
146
- # The minute at which the billing cycle ends.
147
- # Must be an integer between 0 and 59, inclusive.
148
- attr_accessor :minute
149
- # The second at which the billing cycle ends.
150
- # Must be an integer between 0 and 59, inclusive.
151
- attr_accessor :second
152
-
153
- def initialize(hour: nil, minute: nil, second: nil)
154
- @hour = hour
155
- @minute = minute
156
- @second = second
157
- end
158
- end
159
- # The day to anchor the billing on for a type="month" billing cycle from
160
- # 1-31. If this number is greater than the number of days in the month being
161
- # billed, this will anchor to the last day of the month. If not provided,
162
- # this will default to the day the cadence was created.
163
- attr_accessor :day_of_month
164
- # The month to bill on from 1-12. If not provided, this will default to the
165
- # month the cadence was created.
166
- attr_accessor :month_of_year
167
- # The time at which the billing cycle ends.
168
- # This field is optional, and if not provided, it will default to
169
- # the time at which the cadence was created in UTC timezone.
170
- attr_accessor :time
171
-
172
- def initialize(day_of_month: nil, month_of_year: nil, time: nil)
173
- @day_of_month = day_of_month
174
- @month_of_year = month_of_year
175
- @time = time
176
- end
177
- end
178
- # The number of intervals (specified in the interval attribute) between
179
- # cadence billings. For example, type=month and interval_count=3 bills every
180
- # 3 months. If this is not provided, it will default to 1.
181
- attr_accessor :interval_count
182
- # The frequency at which a cadence bills.
183
- attr_accessor :type
184
- # Specific configuration for determining billing dates when type=day.
185
- attr_accessor :day
186
- # Specific configuration for determining billing dates when type=month.
187
- attr_accessor :month
188
- # Specific configuration for determining billing dates when type=week.
189
- attr_accessor :week
190
- # Specific configuration for determining billing dates when type=year.
191
- attr_accessor :year
192
-
193
- def initialize(
194
- interval_count: nil,
195
- type: nil,
196
- day: nil,
197
- month: nil,
198
- week: nil,
199
- year: nil
200
- )
201
- @interval_count = interval_count
202
- @type = type
203
- @day = day
204
- @month = month
205
- @week = week
206
- @year = year
207
- end
208
- end
209
-
210
- class Payer < Stripe::RequestParams
211
- # The ID of the Billing Profile object which determines how a bill will be paid. If provided, the created cadence will be
212
- # associated with the provided Billing Profile. If not provided, a new Billing Profile will be created and associated with the cadence.
213
- attr_accessor :billing_profile
214
- # The ID of the Customer object.
215
- attr_accessor :customer
216
- # A string identifying the type of the payer. Currently the only supported value is `customer`.
217
- attr_accessor :type
218
-
219
- def initialize(billing_profile: nil, customer: nil, type: nil)
220
- @billing_profile = billing_profile
221
- @customer = customer
222
- @type = type
223
- end
224
- end
225
-
226
- class Settings < Stripe::RequestParams
227
- class Bill < Stripe::RequestParams
228
- # The ID of the referenced settings object.
229
- attr_accessor :id
230
- # An optional field to specify the version of the Settings to use.
231
- # If not provided, this will always default to the live version any time the settings are used.
232
- attr_accessor :version
233
-
234
- def initialize(id: nil, version: nil)
235
- @id = id
236
- @version = version
237
- end
238
- end
239
-
240
- class Collection < Stripe::RequestParams
241
- # The ID of the referenced settings object.
242
- attr_accessor :id
243
- # An optional field to specify the version of the Settings to use.
244
- # If not provided, this will always default to the live version any time the settings are used.
245
- attr_accessor :version
246
-
247
- def initialize(id: nil, version: nil)
248
- @id = id
249
- @version = version
250
- end
251
- end
252
- # Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices.
253
- # If no setting is provided here, the settings from the customer referenced on the payer will be used.
254
- # If no customer settings are present, the merchant default settings will be used.
255
- attr_accessor :bill
256
- # Settings that configure and manage the behavior of collecting payments.
257
- # If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist.
258
- # If no customer settings are present, the merchant default settings will be used.
259
- attr_accessor :collection
260
-
261
- def initialize(bill: nil, collection: nil)
262
- @bill = bill
263
- @collection = collection
264
- end
265
- end
266
- # The billing cycle is the object that defines future billing cycle dates.
267
- attr_accessor :billing_cycle
268
- # Additional resource to include in the response.
269
- attr_accessor :include
270
- # 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.
271
- attr_accessor :metadata
272
- # The payer determines the entity financially responsible for the bill.
273
- attr_accessor :payer
274
- # The settings associated with the cadence.
275
- attr_accessor :settings
276
-
277
- def initialize(billing_cycle: nil, include: nil, metadata: nil, payer: nil, settings: nil)
278
- @billing_cycle = billing_cycle
279
- @include = include
280
- @metadata = metadata
281
- @payer = payer
282
- @settings = settings
283
- end
284
- end
285
-
286
- class RetrieveParams < Stripe::RequestParams
287
- # Additional resource to include in the response.
288
- attr_accessor :include
289
-
290
- def initialize(include: nil)
291
- @include = include
292
- end
293
- end
294
-
295
- class UpdateParams < Stripe::RequestParams
296
- class Payer < Stripe::RequestParams
297
- # The ID of the Billing Profile object which determines how a bill will be paid.
298
- attr_accessor :billing_profile
299
-
300
- def initialize(billing_profile: nil)
301
- @billing_profile = billing_profile
302
- end
303
- end
304
-
305
- class Settings < Stripe::RequestParams
306
- class Bill < Stripe::RequestParams
307
- # The ID of the referenced settings object.
308
- attr_accessor :id
309
- # An optional field to specify the version of Settings to use.
310
- # If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used.
311
- # Using a specific version here will prevent the settings from updating, and is discouraged for cadences.
312
- # To clear a pinned version, set the version to null.
313
- attr_accessor :version
314
-
315
- def initialize(id: nil, version: nil)
316
- @id = id
317
- @version = version
318
- end
319
- end
320
-
321
- class Collection < Stripe::RequestParams
322
- # The ID of the referenced settings object.
323
- attr_accessor :id
324
- # An optional field to specify the version of Settings to use.
325
- # If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used.
326
- # Using a specific version here will prevent the settings from updating, and is discouraged for cadences.
327
- # To clear a pinned version, set the version to null.
328
- attr_accessor :version
329
-
330
- def initialize(id: nil, version: nil)
331
- @id = id
332
- @version = version
333
- end
334
- end
335
- # Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. If null is provided, the current bill settings will be removed from the billing cadence.
336
- attr_accessor :bill
337
- # Settings that configure and manage the behavior of collecting payments. If null is provided, the current collection settings will be removed from the billing cadence.
338
- attr_accessor :collection
339
-
340
- def initialize(bill: nil, collection: nil)
341
- @bill = bill
342
- @collection = collection
343
- end
344
- end
345
- # Additional resource to include in the response.
346
- attr_accessor :include
347
- # 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.
348
- attr_accessor :metadata
349
- # The payer determines the entity financially responsible for the bill.
350
- attr_accessor :payer
351
- # The settings associated with the cadence.
352
- attr_accessor :settings
353
-
354
- def initialize(include: nil, metadata: nil, payer: nil, settings: nil)
355
- @include = include
356
- @metadata = metadata
357
- @payer = payer
358
- @settings = settings
359
- end
360
- end
361
-
362
- class CancelParams < Stripe::RequestParams
363
- # Additional resource to include in the response.
364
- attr_accessor :include
365
-
366
- def initialize(include: nil)
367
- @include = include
368
- end
369
- end
370
-
371
- # Cancel the Billing Cadence.
372
- def cancel(id, params = {}, opts = {})
373
- request(
374
- method: :post,
375
- path: format("/v2/billing/cadences/%<id>s/cancel", { id: CGI.escape(id) }),
376
- params: params,
377
- opts: opts,
378
- base_address: :api
379
- )
380
- end
381
-
382
- # Create a Billing Cadence object.
383
- def create(params = {}, opts = {})
384
- request(
385
- method: :post,
386
- path: "/v2/billing/cadences",
387
- params: params,
388
- opts: opts,
389
- base_address: :api
390
- )
391
- end
392
-
393
- # List Billing Cadences.
394
- def list(params = {}, opts = {})
395
- request(
396
- method: :get,
397
- path: "/v2/billing/cadences",
398
- params: params,
399
- opts: opts,
400
- base_address: :api
401
- )
402
- end
403
-
404
- # Retrieve a Billing Cadence object.
405
- def retrieve(id, params = {}, opts = {})
406
- request(
407
- method: :get,
408
- path: format("/v2/billing/cadences/%<id>s", { id: CGI.escape(id) }),
409
- params: params,
410
- opts: opts,
411
- base_address: :api
412
- )
413
- end
414
-
415
- # Update a Billing Cadence object.
416
- def update(id, params = {}, opts = {})
417
- request(
418
- method: :post,
419
- path: format("/v2/billing/cadences/%<id>s", { id: CGI.escape(id) }),
420
- params: params,
421
- opts: opts,
422
- base_address: :api
423
- )
424
- end
425
- end
426
- end
427
- end
428
- end