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.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +117 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -4
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +20 -18
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +26 -23
- data/lib/stripe/event_types.rb +83 -0
- data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
- data/lib/stripe/object_types.rb +27 -0
- data/lib/stripe/resources/account.rb +2 -2
- data/lib/stripe/resources/account_session.rb +94 -13
- data/lib/stripe/resources/balance.rb +2 -7
- data/lib/stripe/resources/balance_settings.rb +72 -65
- data/lib/stripe/resources/billing/alert.rb +128 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +50 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +50 -0
- data/lib/stripe/resources/billing/credit_grant.rb +61 -2
- data/lib/stripe/resources/billing/meter.rb +2 -2
- data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/charge.rb +36 -5
- data/lib/stripe/resources/checkout/session.rb +237 -6
- data/lib/stripe/resources/credit_note.rb +3 -3
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/invoice.rb +55 -1
- data/lib/stripe/resources/invoice_item.rb +48 -0
- data/lib/stripe/resources/invoice_line_item.rb +52 -0
- data/lib/stripe/resources/invoice_payment.rb +1 -1
- data/lib/stripe/resources/mandate.rb +65 -1
- data/lib/stripe/resources/payment_attempt_record.rb +86 -10
- data/lib/stripe/resources/payment_intent.rb +182 -4
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +2 -0
- data/lib/stripe/resources/payment_record.rb +107 -14
- data/lib/stripe/resources/promotion_code.rb +5 -2
- data/lib/stripe/resources/quote_preview_invoice.rb +8 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +4 -1
- data/lib/stripe/resources/setup_intent.rb +194 -1
- data/lib/stripe/resources/subscription.rb +145 -9
- data/lib/stripe/resources/subscription_schedule.rb +124 -2
- data/lib/stripe/resources/terminal/configuration.rb +82 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +62 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +50 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +182 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +148 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +136 -0
- data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +35 -0
- data/lib/stripe/resources/v2/billing/intent.rb +59 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +200 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +79 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +36 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +56 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +44 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +43 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +30 -0
- data/lib/stripe/resources/v2/billing/profile.rb +38 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +53 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +71 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +26 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +117 -0
- data/lib/stripe/resources/v2/core/account.rb +8 -0
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +57 -0
- data/lib/stripe/resources/v2/event.rb +2 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +4 -2
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
- data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
- data/lib/stripe/resources/v2/reporting/report.rb +64 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +89 -0
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +31 -0
- data/lib/stripe/resources.rb +85 -0
- data/lib/stripe/services/account_session_service.rb +64 -13
- data/lib/stripe/services/balance_settings_service.rb +44 -41
- data/lib/stripe/services/billing/alert_service.rb +75 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +13 -1
- data/lib/stripe/services/billing/credit_grant_service.rb +29 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/checkout/session_service.rb +166 -5
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -2
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/invoice_payment_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +47 -0
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
- data/lib/stripe/services/payment_intent_service.rb +157 -3
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +25 -5
- data/lib/stripe/services/quote_service.rb +4 -4
- data/lib/stripe/services/setup_intent_service.rb +153 -0
- data/lib/stripe/services/subscription_schedule_service.rb +100 -2
- data/lib/stripe/services/subscription_service.rb +134 -9
- data/lib/stripe/services/terminal/configuration_service.rb +64 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +5 -5
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
- data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
- data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
- data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
- data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
- data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
- data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
- data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
- data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
- data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
- data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
- data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
- data/lib/stripe/services/v2/billing_service.rb +19 -2
- data/lib/stripe/services/v2/core/account_service.rb +16 -2
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
- data/lib/stripe/services/v2/core_service.rb +4 -3
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
- data/lib/stripe/services/v2/money_management_service.rb +3 -3
- data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
- data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
- data/lib/stripe/services/v2/reporting_service.rb +16 -0
- data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
- data/lib/stripe/services/v2/tax_service.rb +15 -0
- data/lib/stripe/services/v2_services.rb +3 -1
- data/lib/stripe/services.rb +29 -0
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/version.rb +1 -1
- metadata +116 -3
- data/rbi/stripe.rbi +0 -199145
@@ -0,0 +1,250 @@
|
|
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
|
@@ -0,0 +1,23 @@
|
|
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
|
@@ -0,0 +1,45 @@
|
|
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
|
@@ -0,0 +1,149 @@
|
|
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
|
@@ -0,0 +1,176 @@
|
|
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
|