Class: Stripe::Billing::MeterEventSummaryListParams

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(customer: nil, dimension_filters: nil, dimension_group_by_keys: nil, end_time: nil, ending_before: nil, expand: nil, limit: nil, start_time: nil, starting_after: nil, tenant_keys: nil, tenant_operator: nil, tenant_values: nil, value_grouping_window: nil) ⇒ MeterEventSummaryListParams

Returns a new instance of MeterEventSummaryListParams.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 34

def initialize(
  customer: nil,
  dimension_filters: nil,
  dimension_group_by_keys: nil,
  end_time: nil,
  ending_before: nil,
  expand: nil,
  limit: nil,
  start_time: nil,
  starting_after: nil,
  tenant_keys: nil,
  tenant_operator: nil,
  tenant_values: nil,
  value_grouping_window: nil
)
  @customer = customer
  @dimension_filters = dimension_filters
  @dimension_group_by_keys = dimension_group_by_keys
  @end_time = end_time
  @ending_before = ending_before
  @expand = expand
  @limit = limit
  @start_time = start_time
  @starting_after = starting_after
  @tenant_keys = tenant_keys
  @tenant_operator = tenant_operator
  @tenant_values = tenant_values
  @value_grouping_window = value_grouping_window
end

Instance Attribute Details

#customerObject

The customer for which to fetch event summaries.



8
9
10
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 8

def customer
  @customer
end

#dimension_filtersObject

Key-value pairs used to filter meter events by dimension values. If specified, event summaries will be generated with only matching meter events.



10
11
12
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 10

def dimension_filters
  @dimension_filters
end

#dimension_group_by_keysObject

List of dimension payload keys to group by. If specified, event summaries will be grouped by the given dimension payload key values.



12
13
14
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 12

def dimension_group_by_keys
  @dimension_group_by_keys
end

#end_timeObject

The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.



14
15
16
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 14

def end_time
  @end_time
end

#ending_beforeObject

A cursor for use in pagination. ‘ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.



16
17
18
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 16

def ending_before
  @ending_before
end

#expandObject

Specifies which fields in the response should be expanded.



18
19
20
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 18

def expand
  @expand
end

#limitObject

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.



20
21
22
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 20

def limit
  @limit
end

#start_timeObject

The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.



22
23
24
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 22

def start_time
  @start_time
end

#starting_afterObject

A cursor for use in pagination. ‘starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.



24
25
26
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 24

def starting_after
  @starting_after
end

#tenant_keysObject

List of tenant payload keys to filter on. Must be used together with tenant_operator and tenant_values. Cannot be used with tenant_filters.



26
27
28
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 26

def tenant_keys
  @tenant_keys
end

#tenant_operatorObject

The operator to apply when filtering by tenant values. Must be used together with tenant_keys and tenant_values. Cannot be used with tenant_filters.



28
29
30
# File 'lib/stripe/params/billing/meter_event_summary_list_params.rb', line 28

def tenant_operator
  @tenant_operator
end

#tenant_valuesObject

List of value lists corresponding to each key in tenant_keys. Each element contains the values to filter on for the corresponding tenant key. Must be used together with tenant_operator and tenant_keys. Cannot be used with tenant_filters.



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

def tenant_values
  @tenant_values
end

#value_grouping_windowObject

Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, …, 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).



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

def value_grouping_window
  @value_grouping_window
end