Class: Stripe::V2::Billing::LicenseFeeUpdateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/license_fee_update_params.rb

Defined Under Namespace

Classes: Tier, TransformQuantity

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_nameObject

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_versionObject

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_keyObject

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

#metadataObject

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_modeObject

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

#tiersObject

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_quantityObject

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_amountObject

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_encodingsObject



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