Class: Stripe::V2::Billing::LicenseFee
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::LicenseFee
- Defined in:
- lib/stripe/resources/v2/billing/license_fee.rb
Overview
A License Fee represents a versioned recurring charge for a Licensed Item, typically used for seat-based or quantity-based pricing. Each License Fee defines the pricing structure (flat unit amount or tiered pricing) and service interval. After creating a License Fee, you can subscribe customers to it by creating a License Fee Subscription.
Defined Under Namespace
Classes: ServiceCycle, Tier, TransformQuantity
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.license_fee"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Whether this License Fee is active.
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#display_name ⇒ Object
readonly
A customer-facing name for the license fee.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#licensed_item ⇒ Object
readonly
A Licensed Item represents a billable item whose pricing is based on license fees.
-
#live_version ⇒ Object
readonly
The ID of the License Fee Version used by all subscriptions when no specific version is specified.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#lookup_key ⇒ Object
readonly
An internal key you can use to search for a particular License Fee.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#service_cycle ⇒ Object
readonly
The service cycle configuration for this License Fee.
-
#tax_behavior ⇒ Object
readonly
The tax behavior for Stripe Tax — whether the license fee price includes or excludes tax.
-
#tiering_mode ⇒ Object
readonly
Defines whether the tiering price is graduated or volume-based.
-
#tiers ⇒ Object
readonly
Each element represents a pricing tier.
-
#transform_quantity ⇒ Object
readonly
Apply a transformation to the reported usage or set quantity before computing the amount billed.
-
#unit_amount ⇒ Object
readonly
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_encodings ⇒ Object
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .object_name ⇒ Object
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#active ⇒ Object (readonly)
Whether this License Fee is active. Inactive License Fees cannot be used in new activations or be modified.
76 77 78 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 76 def active @active end |
#created ⇒ Object (readonly)
Timestamp of when the object was created.
78 79 80 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 78 def created @created end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
80 81 82 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 80 def currency @currency end |
#display_name ⇒ Object (readonly)
A customer-facing name for the license fee. This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. Maximum length of 250 characters.
84 85 86 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 84 def display_name @display_name end |
#id ⇒ Object (readonly)
Unique identifier for the object.
86 87 88 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 86 def id @id end |
#licensed_item ⇒ Object (readonly)
A Licensed Item represents a billable item whose pricing is based on license fees. You can use license fees to specify the pricing and create subscriptions to these items.
89 90 91 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 89 def licensed_item @licensed_item end |
#live_version ⇒ Object (readonly)
The ID of the License Fee Version used by all subscriptions when no specific version is specified.
91 92 93 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 91 def live_version @live_version end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
93 94 95 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 93 def livemode @livemode end |
#lookup_key ⇒ Object (readonly)
An internal key you can use to search for a particular License Fee. Maximum length of 200 characters.
95 96 97 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 95 def lookup_key @lookup_key end |
#metadata ⇒ Object (readonly)
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.
97 98 99 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 97 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
99 100 101 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 99 def object @object end |
#service_cycle ⇒ Object (readonly)
The service cycle configuration for this License Fee.
101 102 103 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 101 def service_cycle @service_cycle end |
#tax_behavior ⇒ Object (readonly)
The tax behavior for Stripe Tax — whether the license fee price includes or excludes tax.
103 104 105 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 103 def tax_behavior @tax_behavior end |
#tiering_mode ⇒ Object (readonly)
Defines whether the tiering price is graduated or volume-based. In volume-based tiering, the maximum quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity grows into new tiers. Can only be set if ‘tiers` is set.
107 108 109 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 107 def tiering_mode @tiering_mode end |
#tiers ⇒ Object (readonly)
Each element represents a pricing tier. Cannot be set if ‘unit_amount` is provided.
109 110 111 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 109 def tiers @tiers end |
#transform_quantity ⇒ Object (readonly)
Apply a transformation to the reported usage or set quantity before computing the amount billed.
111 112 113 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 111 def transform_quantity @transform_quantity end |
#unit_amount ⇒ Object (readonly)
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. Cannot be set if ‘tiers` is provided.
114 115 116 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 114 def unit_amount @unit_amount end |
Class Method Details
.field_encodings ⇒ Object
128 129 130 131 132 133 134 135 136 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 128 def self.field_encodings @field_encodings = { tiers: { kind: :array, element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, }, transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, } end |
.field_remappings ⇒ Object
124 125 126 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 124 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 116 def self.inner_class_types @inner_class_types = { service_cycle: ServiceCycle, tiers: Tier, transform_quantity: TransformQuantity, } end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/v2/billing/license_fee.rb', line 12 def self.object_name "v2.billing.license_fee" end |