Class: MetronomeSDK::Models::V1::UsageListWithGroupsParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb

Overview

Defined Under Namespace

Modules: WindowSize Classes: GroupBy

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(billable_metric_id: , customer_id: , window_size: , limit: nil, next_page: nil, current_period: nil, ending_before: nil, group_by: nil, starting_on: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::UsageListWithGroupsParams for more details.

Parameters:

  • billable_metric_id (String) (defaults to: )
  • customer_id (String) (defaults to: )
  • window_size (Symbol, MetronomeSDK::Models::V1::UsageListWithGroupsParams::WindowSize) (defaults to: )

    A window_size of “day” or “hour” will return the usage for the specified period

  • limit (Integer) (defaults to: nil)

    Max number of results that should be returned

  • next_page (String) (defaults to: nil)

    Cursor that indicates where the next page of results should start.

  • current_period (Boolean) (defaults to: nil)

    If true, will return the usage for the current billing period. Will return an er

  • ending_before (Time) (defaults to: nil)
  • group_by (MetronomeSDK::Models::V1::UsageListWithGroupsParams::GroupBy) (defaults to: nil)
  • starting_on (Time) (defaults to: nil)
  • request_options (MetronomeSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 64


Instance Attribute Details

#billable_metric_idString

Returns:

  • (String)


14
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 14

required :billable_metric_id, String

#current_periodBoolean?

If true, will return the usage for the current billing period. Will return an error if the customer is currently uncontracted or starting_on and ending_before are specified when this is true.

Returns:

  • (Boolean, nil)


47
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 47

optional :current_period, MetronomeSDK::Internal::Type::Boolean

#customer_idString

Returns:

  • (String)


19
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 19

required :customer_id, String

#ending_beforeTime?

Returns:

  • (Time, nil)


52
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 52

optional :ending_before, Time

#group_byMetronomeSDK::Models::V1::UsageListWithGroupsParams::GroupBy?



57
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 57

optional :group_by, -> { MetronomeSDK::V1::UsageListWithGroupsParams::GroupBy }

#limitInteger?

Max number of results that should be returned

Returns:

  • (Integer, nil)


33
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 33

optional :limit, Integer

#next_pageString?

Cursor that indicates where the next page of results should start.

Returns:

  • (String, nil)


39
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 39

optional :next_page, String

#starting_onTime?

Returns:

  • (Time, nil)


62
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 62

optional :starting_on, Time

#window_sizeSymbol, MetronomeSDK::Models::V1::UsageListWithGroupsParams::WindowSize

A window_size of “day” or “hour” will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of “none” will return a single usage aggregate for the entirety of the specified period.



27
# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 27

required :window_size, enum: -> { MetronomeSDK::V1::UsageListWithGroupsParams::WindowSize }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb', line 98