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,250 +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 LicenseFeeService < StripeService
8
- attr_reader :versions
9
-
10
- def initialize(requestor)
11
- super
12
- @versions = Stripe::V2::Billing::LicenseFees::VersionService.new(@requestor)
13
- end
14
-
15
- class ListParams < Stripe::RequestParams
16
- # Filter by licensed item.
17
- attr_accessor :licensed_item
18
- # Optionally set the maximum number of results per page. Defaults to 20.
19
- attr_accessor :limit
20
- # Filter by lookup keys.
21
- # You can specify up to 10 lookup keys.
22
- attr_accessor :lookup_keys
23
-
24
- def initialize(licensed_item: nil, limit: nil, lookup_keys: nil)
25
- @licensed_item = licensed_item
26
- @limit = limit
27
- @lookup_keys = lookup_keys
28
- end
29
- end
30
-
31
- class CreateParams < Stripe::RequestParams
32
- class Tier < Stripe::RequestParams
33
- # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places.
34
- attr_accessor :flat_amount
35
- # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at
36
- # most 12 decimal places.
37
- attr_accessor :unit_amount
38
- # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may
39
- # be set.
40
- attr_accessor :up_to_decimal
41
- # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set.
42
- attr_accessor :up_to_inf
43
-
44
- def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf: nil)
45
- @flat_amount = flat_amount
46
- @unit_amount = unit_amount
47
- @up_to_decimal = up_to_decimal
48
- @up_to_inf = up_to_inf
49
- end
50
- end
51
-
52
- class TransformQuantity < Stripe::RequestParams
53
- # Divide usage by this number.
54
- attr_accessor :divide_by
55
- # After division, round the result up or down.
56
- attr_accessor :round
57
-
58
- def initialize(divide_by: nil, round: nil)
59
- @divide_by = divide_by
60
- @round = round
61
- end
62
- end
63
- # Three-letter ISO currency code, in lowercase. Must be a supported currency.
64
- attr_accessor :currency
65
- # A customer-facing name for the License Fee.
66
- # This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices.
67
- # Maximum length of 250 characters.
68
- attr_accessor :display_name
69
- # The Licensed Item that this License Fee binds to.
70
- attr_accessor :licensed_item
71
- # An internal key you can use to search for a particular license fee. Maximum length of 200 characters.
72
- attr_accessor :lookup_key
73
- # 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.
74
- attr_accessor :metadata
75
- # The interval for assessing service. For example, a monthly license fee with a rate of $1 for the first 10 "workloads"
76
- # and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but
77
- # distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees,
78
- # while the billing interval in Cadence deals with the rate the customer is billed.
79
- attr_accessor :service_interval
80
- # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in
81
- # order to specify quarterly service.
82
- attr_accessor :service_interval_count
83
- # The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax.
84
- attr_accessor :tax_behavior
85
- # Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum
86
- # quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity
87
- # grows into new tiers. Can only be set if `tiers` is set.
88
- attr_accessor :tiering_mode
89
- # Each element represents a pricing tier. Cannot be set if `unit_amount` is provided.
90
- attr_accessor :tiers
91
- # Apply a transformation to the reported usage or set quantity before computing the amount billed.
92
- attr_accessor :transform_quantity
93
- # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal
94
- # places. Cannot be set if `tiers` is provided.
95
- attr_accessor :unit_amount
96
-
97
- def initialize(
98
- currency: nil,
99
- display_name: nil,
100
- licensed_item: nil,
101
- lookup_key: nil,
102
- metadata: nil,
103
- service_interval: nil,
104
- service_interval_count: nil,
105
- tax_behavior: nil,
106
- tiering_mode: nil,
107
- tiers: nil,
108
- transform_quantity: nil,
109
- unit_amount: nil
110
- )
111
- @currency = currency
112
- @display_name = display_name
113
- @licensed_item = licensed_item
114
- @lookup_key = lookup_key
115
- @metadata = metadata
116
- @service_interval = service_interval
117
- @service_interval_count = service_interval_count
118
- @tax_behavior = tax_behavior
119
- @tiering_mode = tiering_mode
120
- @tiers = tiers
121
- @transform_quantity = transform_quantity
122
- @unit_amount = unit_amount
123
- end
124
- end
125
-
126
- class RetrieveParams < Stripe::RequestParams; end
127
-
128
- class UpdateParams < Stripe::RequestParams
129
- class Tier < Stripe::RequestParams
130
- # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places.
131
- attr_accessor :flat_amount
132
- # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at
133
- # most 12 decimal places.
134
- attr_accessor :unit_amount
135
- # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may
136
- # be set.
137
- attr_accessor :up_to_decimal
138
- # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set.
139
- attr_accessor :up_to_inf
140
-
141
- def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf: nil)
142
- @flat_amount = flat_amount
143
- @unit_amount = unit_amount
144
- @up_to_decimal = up_to_decimal
145
- @up_to_inf = up_to_inf
146
- end
147
- end
148
-
149
- class TransformQuantity < Stripe::RequestParams
150
- # Divide usage by this number.
151
- attr_accessor :divide_by
152
- # After division, round the result up or down.
153
- attr_accessor :round
154
-
155
- def initialize(divide_by: nil, round: nil)
156
- @divide_by = divide_by
157
- @round = round
158
- end
159
- end
160
- # A customer-facing name for the License Fee.
161
- # This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices.
162
- # Maximum length of 250 characters.
163
- attr_accessor :display_name
164
- # Changes the version that new license fee will use. Providing `live_version = "latest"` will set the
165
- # license fee's `live_version` to its latest version.
166
- attr_accessor :live_version
167
- # An internal key you can use to search for a particular license fee. Maximum length of 200 characters.
168
- attr_accessor :lookup_key
169
- # 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.
170
- attr_accessor :metadata
171
- # Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum
172
- # quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity
173
- # grows into new tiers. Can only be set if `tiers` is set.
174
- attr_accessor :tiering_mode
175
- # Each element represents a pricing tier. Cannot be set if `unit_amount` is provided.
176
- attr_accessor :tiers
177
- # Apply a transformation to the reported usage or set quantity before computing the amount billed.
178
- attr_accessor :transform_quantity
179
- # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal
180
- # places. Cannot be set if `tiers` is provided.
181
- attr_accessor :unit_amount
182
-
183
- def initialize(
184
- display_name: nil,
185
- live_version: nil,
186
- lookup_key: nil,
187
- metadata: nil,
188
- tiering_mode: nil,
189
- tiers: nil,
190
- transform_quantity: nil,
191
- unit_amount: nil
192
- )
193
- @display_name = display_name
194
- @live_version = live_version
195
- @lookup_key = lookup_key
196
- @metadata = metadata
197
- @tiering_mode = tiering_mode
198
- @tiers = tiers
199
- @transform_quantity = transform_quantity
200
- @unit_amount = unit_amount
201
- end
202
- end
203
-
204
- # Create a License Fee object.
205
- def create(params = {}, opts = {})
206
- request(
207
- method: :post,
208
- path: "/v2/billing/license_fees",
209
- params: params,
210
- opts: opts,
211
- base_address: :api
212
- )
213
- end
214
-
215
- # List all License Fee objects.
216
- def list(params = {}, opts = {})
217
- request(
218
- method: :get,
219
- path: "/v2/billing/license_fees",
220
- params: params,
221
- opts: opts,
222
- base_address: :api
223
- )
224
- end
225
-
226
- # Retrieve a License Fee object.
227
- def retrieve(id, params = {}, opts = {})
228
- request(
229
- method: :get,
230
- path: format("/v2/billing/license_fees/%<id>s", { id: CGI.escape(id) }),
231
- params: params,
232
- opts: opts,
233
- base_address: :api
234
- )
235
- end
236
-
237
- # Update a License Fee object.
238
- def update(id, params = {}, opts = {})
239
- request(
240
- method: :post,
241
- path: format("/v2/billing/license_fees/%<id>s", { id: CGI.escape(id) }),
242
- params: params,
243
- opts: opts,
244
- base_address: :api
245
- )
246
- end
247
- end
248
- end
249
- end
250
- end
@@ -1,23 +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 LicenseFeeSubscriptionService < StripeService
8
- class RetrieveParams < Stripe::RequestParams; end
9
-
10
- # Retrieve a License Fee Subscription object.
11
- def retrieve(id, params = {}, opts = {})
12
- request(
13
- method: :get,
14
- path: format("/v2/billing/license_fee_subscriptions/%<id>s", { id: CGI.escape(id) }),
15
- params: params,
16
- opts: opts,
17
- base_address: :api
18
- )
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,45 +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
- module LicenseFees
8
- class VersionService < StripeService
9
- class ListParams < Stripe::RequestParams
10
- # Optionally set the maximum number of results per page. Defaults to 20.
11
- attr_accessor :limit
12
-
13
- def initialize(limit: nil)
14
- @limit = limit
15
- end
16
- end
17
-
18
- class RetrieveParams < Stripe::RequestParams; end
19
-
20
- # List all versions of a License Fee object.
21
- def list(license_fee_id, params = {}, opts = {})
22
- request(
23
- method: :get,
24
- path: format("/v2/billing/license_fees/%<license_fee_id>s/versions", { license_fee_id: CGI.escape(license_fee_id) }),
25
- params: params,
26
- opts: opts,
27
- base_address: :api
28
- )
29
- end
30
-
31
- # Retrieve a License Fee Version object.
32
- def retrieve(license_fee_id, id, params = {}, opts = {})
33
- request(
34
- method: :get,
35
- path: format("/v2/billing/license_fees/%<license_fee_id>s/versions/%<id>s", { license_fee_id: CGI.escape(license_fee_id), id: CGI.escape(id) }),
36
- params: params,
37
- opts: opts,
38
- base_address: :api
39
- )
40
- end
41
- end
42
- end
43
- end
44
- end
45
- end
@@ -1,149 +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 LicensedItemService < StripeService
8
- class ListParams < Stripe::RequestParams
9
- # Optionally set the maximum number of results per page. Defaults to 20.
10
- attr_accessor :limit
11
- # Filter by lookup keys.
12
- # You can specify up to 10 lookup keys.
13
- attr_accessor :lookup_keys
14
-
15
- def initialize(limit: nil, lookup_keys: nil)
16
- @limit = limit
17
- @lookup_keys = lookup_keys
18
- end
19
- end
20
-
21
- class CreateParams < Stripe::RequestParams
22
- class TaxDetails < Stripe::RequestParams
23
- # Product tax code (PTC).
24
- attr_accessor :tax_code
25
-
26
- def initialize(tax_code: nil)
27
- @tax_code = tax_code
28
- end
29
- end
30
- # Description that customers will see in the invoice line item.
31
- # Maximum length of 250 characters.
32
- attr_accessor :display_name
33
- # An internal key you can use to search for a particular billable item.
34
- # Must be unique among billable items.
35
- # Maximum length of 200 characters.
36
- attr_accessor :lookup_key
37
- # 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.
38
- attr_accessor :metadata
39
- # Stripe Tax details.
40
- attr_accessor :tax_details
41
- # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field
42
- # to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment".
43
- # Maximum length of 100 characters.
44
- attr_accessor :unit_label
45
-
46
- def initialize(
47
- display_name: nil,
48
- lookup_key: nil,
49
- metadata: nil,
50
- tax_details: nil,
51
- unit_label: nil
52
- )
53
- @display_name = display_name
54
- @lookup_key = lookup_key
55
- @metadata = metadata
56
- @tax_details = tax_details
57
- @unit_label = unit_label
58
- end
59
- end
60
-
61
- class RetrieveParams < Stripe::RequestParams; end
62
-
63
- class UpdateParams < Stripe::RequestParams
64
- class TaxDetails < Stripe::RequestParams
65
- # Product tax code (PTC).
66
- attr_accessor :tax_code
67
-
68
- def initialize(tax_code: nil)
69
- @tax_code = tax_code
70
- end
71
- end
72
- # Description that customers will see in the invoice line item.
73
- # Maximum length of 250 characters.
74
- attr_accessor :display_name
75
- # An internal key you can use to search for a particular billable item.
76
- # Maximum length of 200 characters.
77
- # To remove the lookup_key from the object, set it to null in the request.
78
- attr_accessor :lookup_key
79
- # 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.
80
- attr_accessor :metadata
81
- # Stripe Tax details.
82
- attr_accessor :tax_details
83
- # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field
84
- # to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment".
85
- # Maximum length of 100 characters.
86
- attr_accessor :unit_label
87
-
88
- def initialize(
89
- display_name: nil,
90
- lookup_key: nil,
91
- metadata: nil,
92
- tax_details: nil,
93
- unit_label: nil
94
- )
95
- @display_name = display_name
96
- @lookup_key = lookup_key
97
- @metadata = metadata
98
- @tax_details = tax_details
99
- @unit_label = unit_label
100
- end
101
- end
102
-
103
- # Create a Licensed Item object.
104
- def create(params = {}, opts = {})
105
- request(
106
- method: :post,
107
- path: "/v2/billing/licensed_items",
108
- params: params,
109
- opts: opts,
110
- base_address: :api
111
- )
112
- end
113
-
114
- # List all Licensed Item objects in reverse chronological order of creation.
115
- def list(params = {}, opts = {})
116
- request(
117
- method: :get,
118
- path: "/v2/billing/licensed_items",
119
- params: params,
120
- opts: opts,
121
- base_address: :api
122
- )
123
- end
124
-
125
- # Retrieve a Licensed Item object.
126
- def retrieve(id, params = {}, opts = {})
127
- request(
128
- method: :get,
129
- path: format("/v2/billing/licensed_items/%<id>s", { id: CGI.escape(id) }),
130
- params: params,
131
- opts: opts,
132
- base_address: :api
133
- )
134
- end
135
-
136
- # Update a Licensed Item object. At least one of the fields is required.
137
- def update(id, params = {}, opts = {})
138
- request(
139
- method: :post,
140
- path: format("/v2/billing/licensed_items/%<id>s", { id: CGI.escape(id) }),
141
- params: params,
142
- opts: opts,
143
- base_address: :api
144
- )
145
- end
146
- end
147
- end
148
- end
149
- end
@@ -1,176 +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 MeteredItemService < StripeService
8
- class ListParams < Stripe::RequestParams
9
- # Optionally set the maximum number of results per page. Defaults to 20.
10
- attr_accessor :limit
11
- # Filter by lookup keys.
12
- # You can specify up to 10 lookup keys.
13
- attr_accessor :lookup_keys
14
-
15
- def initialize(limit: nil, lookup_keys: nil)
16
- @limit = limit
17
- @lookup_keys = lookup_keys
18
- end
19
- end
20
-
21
- class CreateParams < Stripe::RequestParams
22
- class MeterSegmentCondition < Stripe::RequestParams
23
- # A Meter dimension.
24
- attr_accessor :dimension
25
- # To count usage towards this metered item, the dimension must have this value.
26
- attr_accessor :value
27
-
28
- def initialize(dimension: nil, value: nil)
29
- @dimension = dimension
30
- @value = value
31
- end
32
- end
33
-
34
- class TaxDetails < Stripe::RequestParams
35
- # Product tax code (PTC).
36
- attr_accessor :tax_code
37
-
38
- def initialize(tax_code: nil)
39
- @tax_code = tax_code
40
- end
41
- end
42
- # Description that customers will see in the invoice line item.
43
- # Maximum length of 250 characters.
44
- attr_accessor :display_name
45
- # Optional array of Meter dimensions to group event dimension keys for invoice line items.
46
- attr_accessor :invoice_presentation_dimensions
47
- # An internal key you can use to search for a particular billable item.
48
- # Must be unique among billable items.
49
- # Maximum length of 200 characters.
50
- attr_accessor :lookup_key
51
- # 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.
52
- attr_accessor :metadata
53
- # ID of the Meter that measures usage for this Metered Item.
54
- attr_accessor :meter
55
- # Optional array of Meter segments to filter event dimension keys for billing.
56
- attr_accessor :meter_segment_conditions
57
- # Stripe Tax details.
58
- attr_accessor :tax_details
59
- # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field
60
- # to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1
61
- # million events".
62
- # Maximum length of 100 characters.
63
- attr_accessor :unit_label
64
-
65
- def initialize(
66
- display_name: nil,
67
- invoice_presentation_dimensions: nil,
68
- lookup_key: nil,
69
- metadata: nil,
70
- meter: nil,
71
- meter_segment_conditions: nil,
72
- tax_details: nil,
73
- unit_label: nil
74
- )
75
- @display_name = display_name
76
- @invoice_presentation_dimensions = invoice_presentation_dimensions
77
- @lookup_key = lookup_key
78
- @metadata = metadata
79
- @meter = meter
80
- @meter_segment_conditions = meter_segment_conditions
81
- @tax_details = tax_details
82
- @unit_label = unit_label
83
- end
84
- end
85
-
86
- class RetrieveParams < Stripe::RequestParams; end
87
-
88
- class UpdateParams < Stripe::RequestParams
89
- class TaxDetails < Stripe::RequestParams
90
- # Product tax code (PTC).
91
- attr_accessor :tax_code
92
-
93
- def initialize(tax_code: nil)
94
- @tax_code = tax_code
95
- end
96
- end
97
- # Description that customers will see in the invoice line item.
98
- # Maximum length of 250 characters.
99
- attr_accessor :display_name
100
- # An internal key you can use to search for a particular billable item.
101
- # Maximum length of 200 characters.
102
- # To remove the lookup_key from the object, set it to null in the request.
103
- attr_accessor :lookup_key
104
- # 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.
105
- attr_accessor :metadata
106
- # Stripe Tax details.
107
- attr_accessor :tax_details
108
- # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field
109
- # to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1
110
- # million events".
111
- # Maximum length of 100 characters.
112
- # To remove the unit_label from the object, set it to null in the request.
113
- attr_accessor :unit_label
114
-
115
- def initialize(
116
- display_name: nil,
117
- lookup_key: nil,
118
- metadata: nil,
119
- tax_details: nil,
120
- unit_label: nil
121
- )
122
- @display_name = display_name
123
- @lookup_key = lookup_key
124
- @metadata = metadata
125
- @tax_details = tax_details
126
- @unit_label = unit_label
127
- end
128
- end
129
-
130
- # Create a Metered Item object.
131
- def create(params = {}, opts = {})
132
- request(
133
- method: :post,
134
- path: "/v2/billing/metered_items",
135
- params: params,
136
- opts: opts,
137
- base_address: :api
138
- )
139
- end
140
-
141
- # List all Metered Item objects in reverse chronological order of creation.
142
- def list(params = {}, opts = {})
143
- request(
144
- method: :get,
145
- path: "/v2/billing/metered_items",
146
- params: params,
147
- opts: opts,
148
- base_address: :api
149
- )
150
- end
151
-
152
- # Retrieve a Metered Item object.
153
- def retrieve(id, params = {}, opts = {})
154
- request(
155
- method: :get,
156
- path: format("/v2/billing/metered_items/%<id>s", { id: CGI.escape(id) }),
157
- params: params,
158
- opts: opts,
159
- base_address: :api
160
- )
161
- end
162
-
163
- # Update a Metered Item object. At least one of the fields is required.
164
- def update(id, params = {}, opts = {})
165
- request(
166
- method: :post,
167
- path: format("/v2/billing/metered_items/%<id>s", { id: CGI.escape(id) }),
168
- params: params,
169
- opts: opts,
170
- base_address: :api
171
- )
172
- end
173
- end
174
- end
175
- end
176
- end