Class: Stripe::V2::Billing::LicenseFeeUpdateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::LicenseFeeUpdateParams
- Defined in:
- lib/stripe/params/v2/billing/license_fee_update_params.rb
Defined Under Namespace
Classes: Tier, TransformQuantity
Instance Attribute Summary collapse
-
#display_name ⇒ Object
A customer-facing name for the License Fee.
-
#live_version ⇒ Object
Changes the version that new license fee activations use.
-
#lookup_key ⇒ Object
An internal key you can use to search for a particular license fee.
-
#metadata ⇒ Object
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#tiering_mode ⇒ Object
Defines whether the tiered price is graduated or volume-based.
-
#tiers ⇒ Object
Each element represents a pricing tier.
-
#transform_quantity ⇒ Object
Apply a transformation to the reported usage or set quantity before computing the amount billed.
-
#unit_amount ⇒ Object
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(display_name: nil, live_version: nil, lookup_key: nil, metadata: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil) ⇒ LicenseFeeUpdateParams
constructor
A new instance of LicenseFeeUpdateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(display_name: nil, live_version: nil, lookup_key: nil, metadata: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil) ⇒ LicenseFeeUpdateParams
Returns a new instance of LicenseFeeUpdateParams.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 70 def initialize( display_name: nil, live_version: nil, lookup_key: nil, metadata: nil, tiering_mode: nil, tiers: nil, transform_quantity: nil, unit_amount: nil ) @display_name = display_name @live_version = live_version @lookup_key = lookup_key @metadata = @tiering_mode = tiering_mode @tiers = tiers @transform_quantity = transform_quantity @unit_amount = unit_amount end |
Instance Attribute Details
#display_name ⇒ Object
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.
50 51 52 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 50 def display_name @display_name end |
#live_version ⇒ Object
Changes the version that new license fee activations use. Providing ‘live_version = “latest”` sets the license fee’s ‘live_version` to its latest version.
53 54 55 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 53 def live_version @live_version end |
#lookup_key ⇒ Object
An internal key you can use to search for a particular license fee. Maximum length of 200 characters.
55 56 57 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 55 def lookup_key @lookup_key end |
#metadata ⇒ Object
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.
57 58 59 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 57 def @metadata end |
#tiering_mode ⇒ Object
Defines whether the tiered 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.
61 62 63 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 61 def tiering_mode @tiering_mode end |
#tiers ⇒ Object
Each element represents a pricing tier. Cannot be set if ‘unit_amount` is provided.
63 64 65 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 63 def tiers @tiers end |
#transform_quantity ⇒ Object
Apply a transformation to the reported usage or set quantity before computing the amount billed.
65 66 67 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 65 def transform_quantity @transform_quantity end |
#unit_amount ⇒ Object
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.
68 69 70 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 68 def unit_amount @unit_amount end |
Class Method Details
.field_encodings ⇒ Object
90 91 92 93 94 95 96 97 98 |
# File 'lib/stripe/params/v2/billing/license_fee_update_params.rb', line 90 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 |