Class: Stripe::V2::Billing::MeteredItemCreateParams

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

Defined Under Namespace

Classes: MeterSegmentCondition, TaxDetails

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(display_name: nil, invoice_presentation_dimensions: nil, lookup_key: nil, metadata: nil, meter: nil, meter_segment_conditions: nil, tax_details: nil, unit_label: nil) ⇒ MeteredItemCreateParams

Returns a new instance of MeteredItemCreateParams.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 51

def initialize(
  display_name: nil,
  invoice_presentation_dimensions: nil,
  lookup_key: nil,
  metadata: nil,
  meter: nil,
  meter_segment_conditions: nil,
  tax_details: nil,
  unit_label: nil
)
  @display_name = display_name
  @invoice_presentation_dimensions = invoice_presentation_dimensions
  @lookup_key = lookup_key
  @metadata = 
  @meter = meter
  @meter_segment_conditions = meter_segment_conditions
  @tax_details = tax_details
  @unit_label = unit_label
end

Instance Attribute Details

#display_nameObject

Description that customers will see in the invoice line item. Maximum length of 250 characters.



30
31
32
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 30

def display_name
  @display_name
end

#invoice_presentation_dimensionsObject

Optional array of Meter dimensions to group event dimension keys for invoice line items.



32
33
34
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 32

def invoice_presentation_dimensions
  @invoice_presentation_dimensions
end

#lookup_keyObject

An internal key you can use to search for a particular billable item. Must be unique among billable items. Maximum length of 200 characters.



36
37
38
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 36

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.



38
39
40
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 38

def 
  @metadata
end

#meterObject

ID of the Meter that measures usage for this Metered Item.



40
41
42
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 40

def meter
  @meter
end

#meter_segment_conditionsObject

Optional array of Meter segments to filter event dimension keys for billing.



42
43
44
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 42

def meter_segment_conditions
  @meter_segment_conditions
end

#tax_detailsObject

Stripe Tax details.



44
45
46
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 44

def tax_details
  @tax_details
end

#unit_labelObject

The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field to “CPU-hour” for Checkout to display “(price) per CPU-hour”, or “1 million events” to display “(price) per 1 million events”. Maximum length of 100 characters.



49
50
51
# File 'lib/stripe/params/v2/billing/metered_item_create_params.rb', line 49

def unit_label
  @unit_label
end