Class: Stripe::Billing::Analytics::MeterUsageRetrieveParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Billing::Analytics::MeterUsageRetrieveParams
- Defined in:
- lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb
Defined Under Namespace
Classes: Meter
Instance Attribute Summary collapse
-
#customer ⇒ Object
The customer id to fetch meter usage data for.
-
#ends_at ⇒ Object
The timestamp from when to stop aggregating meter events (exclusive).
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#meters ⇒ Object
An array of meter parameters to specify which meters to include in the usage data.
-
#starts_at ⇒ Object
The timestamp from when to start aggregating meter events (inclusive).
-
#timezone ⇒ Object
The timezone to use for the start and end times.
-
#value_grouping_window ⇒ Object
Specifies what granularity to use when aggregating meter usage events.
Instance Method Summary collapse
-
#initialize(customer: nil, ends_at: nil, expand: nil, meters: nil, starts_at: nil, timezone: nil, value_grouping_window: nil) ⇒ MeterUsageRetrieveParams
constructor
A new instance of MeterUsageRetrieveParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(customer: nil, ends_at: nil, expand: nil, meters: nil, starts_at: nil, timezone: nil, value_grouping_window: nil) ⇒ MeterUsageRetrieveParams
Returns a new instance of MeterUsageRetrieveParams.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 45 def initialize( customer: nil, ends_at: nil, expand: nil, meters: nil, starts_at: nil, timezone: nil, value_grouping_window: nil ) @customer = customer @ends_at = ends_at @expand = @meters = meters @starts_at = starts_at @timezone = timezone @value_grouping_window = value_grouping_window end |
Instance Attribute Details
#customer ⇒ Object
The customer id to fetch meter usage data for.
31 32 33 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 31 def customer @customer end |
#ends_at ⇒ Object
The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
33 34 35 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 33 def ends_at @ends_at end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
35 36 37 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 35 def @expand end |
#meters ⇒ Object
An array of meter parameters to specify which meters to include in the usage data. If not specified, usage across all meters for the customer is included.
37 38 39 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 37 def meters @meters end |
#starts_at ⇒ Object
The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
39 40 41 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 39 def starts_at @starts_at end |
#timezone ⇒ Object
The timezone to use for the start and end times. Defaults to UTC if not specified.
41 42 43 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 41 def timezone @timezone end |
#value_grouping_window ⇒ Object
Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range.
43 44 45 |
# File 'lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb', line 43 def value_grouping_window @value_grouping_window end |