Class: Stripe::V2::Billing::LicenseFeeVersion
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::LicenseFeeVersion
- Defined in:
- lib/stripe/resources/v2/billing/license_fee_version.rb
Overview
A License Fee Version represents a specific configuration of a License Fee at a point in time. Versions are created automatically when you update the pricing structure of a License Fee, allowing you to track changes and manage which version is active for new subscriptions. Each version maintains the pricing details including unit amounts and tiers.
Defined Under Namespace
Classes: Tier, TransformQuantity
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.license_fee_version"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#license_fee_id ⇒ Object
readonly
The ID of the parent License Fee.
-
#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.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#tiering_mode ⇒ Object
readonly
Defines whether the tiering price should be 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
#created ⇒ Object (readonly)
Timestamp of when the object was created.
60 61 62 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 60 def created @created end |
#id ⇒ Object (readonly)
Unique identifier for the object.
62 63 64 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 62 def id @id end |
#license_fee_id ⇒ Object (readonly)
The ID of the parent License Fee.
64 65 66 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 64 def license_fee_id @license_fee_id 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.
79 80 81 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 79 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
66 67 68 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 66 def object @object end |
#tiering_mode ⇒ Object (readonly)
Defines whether the tiering price should be 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.
70 71 72 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 70 def tiering_mode @tiering_mode end |
#tiers ⇒ Object (readonly)
Each element represents a pricing tier. Cannot be set if ‘unit_amount` is provided.
72 73 74 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 72 def tiers @tiers end |
#transform_quantity ⇒ Object (readonly)
Apply a transformation to the reported usage or set quantity before computing the amount billed.
74 75 76 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 74 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.
77 78 79 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 77 def unit_amount @unit_amount end |
Class Method Details
.field_encodings ⇒ Object
89 90 91 92 93 94 95 96 97 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 89 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
85 86 87 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 85 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
81 82 83 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 81 def self.inner_class_types @inner_class_types = { tiers: Tier, transform_quantity: TransformQuantity } end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/v2/billing/license_fee_version.rb', line 12 def self.object_name "v2.billing.license_fee_version" end |