Class: Stripe::Billing::MeterEventSummaryService::ListParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/billing/meter_event_summary_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(customer: nil, end_time: nil, ending_before: nil, expand: nil, limit: nil, start_time: nil, starting_after: nil, value_grouping_window: nil) ⇒ ListParams

Returns a new instance of ListParams.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 25

def initialize(
  customer: nil,
  end_time: nil,
  ending_before: nil,
  expand: nil,
  limit: nil,
  start_time: nil,
  starting_after: nil,
  value_grouping_window: nil
)
  @customer = customer
  @end_time = end_time
  @ending_before = ending_before
  @expand = expand
  @limit = limit
  @start_time = start_time
  @starting_after = starting_after
  @value_grouping_window = value_grouping_window
end

Instance Attribute Details

#customerObject

The customer for which to fetch event summaries.



9
10
11
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 9

def customer
  @customer
end

#end_timeObject

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



11
12
13
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 11

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.



13
14
15
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 13

def ending_before
  @ending_before
end

#expandObject

Specifies which fields in the response should be expanded.



15
16
17
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 15

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.



17
18
19
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 17

def limit
  @limit
end

#start_timeObject

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



19
20
21
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 19

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.



21
22
23
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 21

def starting_after
  @starting_after
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).



23
24
25
# File 'lib/stripe/services/billing/meter_event_summary_service.rb', line 23

def value_grouping_window
  @value_grouping_window
end