Class: Stripe::Billing::MeterCreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/billing/meter_create_params.rb

Defined Under Namespace

Classes: CustomerMapping, DefaultAggregation, ValueSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(customer_mapping: nil, default_aggregation: nil, display_name: nil, event_name: nil, event_time_window: nil, expand: nil, value_settings: nil) ⇒ MeterCreateParams

Returns a new instance of MeterCreateParams.



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

def initialize(
  customer_mapping: nil,
  default_aggregation: nil,
  display_name: nil,
  event_name: nil,
  event_time_window: nil,
  expand: nil,
  value_settings: nil
)
  @customer_mapping = customer_mapping
  @default_aggregation = default_aggregation
  @display_name = display_name
  @event_name = event_name
  @event_time_window = event_time_window
  @expand = expand
  @value_settings = value_settings
end

Instance Attribute Details

#customer_mappingObject

Fields that specify how to map a meter event to a customer.



37
38
39
# File 'lib/stripe/params/billing/meter_create_params.rb', line 37

def customer_mapping
  @customer_mapping
end

#default_aggregationObject

The default settings to aggregate a meter’s events with.



39
40
41
# File 'lib/stripe/params/billing/meter_create_params.rb', line 39

def default_aggregation
  @default_aggregation
end

#display_nameObject

The meter’s name. Not visible to the customer.



41
42
43
# File 'lib/stripe/params/billing/meter_create_params.rb', line 41

def display_name
  @display_name
end

#event_nameObject

The name of the meter event to record usage for. Corresponds with the ‘event_name` field on meter events.



43
44
45
# File 'lib/stripe/params/billing/meter_create_params.rb', line 43

def event_name
  @event_name
end

#event_time_windowObject

The time window which meter events have been pre-aggregated for, if any.



45
46
47
# File 'lib/stripe/params/billing/meter_create_params.rb', line 45

def event_time_window
  @event_time_window
end

#expandObject

Specifies which fields in the response should be expanded.



47
48
49
# File 'lib/stripe/params/billing/meter_create_params.rb', line 47

def expand
  @expand
end

#value_settingsObject

Fields that specify how to calculate a meter event’s value.



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

def value_settings
  @value_settings
end