Class: MetronomeSDK::Models::V1::BillableMetricListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/billable_metric_list_response.rb

Overview

Defined Under Namespace

Modules: AggregationType

Instance Attribute Summary collapse

Instance Method Summary collapse

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(id: , name: , aggregation_key: nil, aggregation_type: nil, archived_at: nil, custom_fields: nil, event_type_filter: nil, group_keys: nil, property_filters: nil, sql: nil) ⇒ Object

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

Parameters:

  • id (String) (defaults to: )

    ID of the billable metric

  • name (String) (defaults to: )

    The display name of the billable metric.

  • aggregation_key (String) (defaults to: nil)

    A key that specifies which property of the event is used to aggregate data. This

  • aggregation_type (Symbol, MetronomeSDK::Models::V1::BillableMetricListResponse::AggregationType) (defaults to: nil)

    Specifies the type of aggregation performed on matching events.

  • archived_at (Time) (defaults to: nil)

    RFC 3339 timestamp indicating when the billable metric was archived. If not prov

  • custom_fields (Hash{Symbol=>String}) (defaults to: nil)

    Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

  • event_type_filter (MetronomeSDK::Models::EventTypeFilter) (defaults to: nil)

    An optional filtering rule to match the ‘event_type’ property of an event.

  • group_keys (Array<Array<String>>) (defaults to: nil)

    Property names that are used to group usage costs on an invoice. Each entry repr

  • property_filters (Array<MetronomeSDK::Models::PropertyFilter>) (defaults to: nil)

    A list of filters to match events to this billable metric. Each filter defines a

  • sql (String) (defaults to: nil)

    The SQL query associated with the billable metric



# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 75


Instance Attribute Details

#aggregation_keyString?

A key that specifies which property of the event is used to aggregate data. This key must be one of the property filter names and is not applicable when the aggregation type is ‘count’.

Returns:

  • (String, nil)


26
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 26

optional :aggregation_key, String

#aggregation_typeSymbol, ...

Specifies the type of aggregation performed on matching events.



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

optional :aggregation_type,
enum: -> { MetronomeSDK::Models::V1::BillableMetricListResponse::AggregationType }

#archived_atTime?

RFC 3339 timestamp indicating when the billable metric was archived. If not provided, the billable metric is not archived.

Returns:

  • (Time, nil)


40
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 40

optional :archived_at, Time

#custom_fieldsHash{Symbol=>String}?

Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

Returns:

  • (Hash{Symbol=>String}, nil)


46
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 46

optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

#event_type_filterMetronomeSDK::Models::EventTypeFilter?

An optional filtering rule to match the ‘event_type’ property of an event.



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

optional :event_type_filter, -> { MetronomeSDK::EventTypeFilter }

#group_keysArray<Array<String>>?

Property names that are used to group usage costs on an invoice. Each entry represents a set of properties used to slice events into distinct buckets.

Returns:

  • (Array<Array<String>>, nil)


59
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 59

optional :group_keys, MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Internal::Type::ArrayOf[String]]

#idString

ID of the billable metric

Returns:

  • (String)


12
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 12

required :id, String

#nameString

The display name of the billable metric.

Returns:

  • (String)


18
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 18

required :name, String

#property_filtersArray<MetronomeSDK::Models::PropertyFilter>?

A list of filters to match events to this billable metric. Each filter defines a rule on an event property. All rules must pass for the event to match the billable metric.

Returns:



67
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 67

optional :property_filters, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::PropertyFilter] }

#sqlString?

The SQL query associated with the billable metric

Returns:

  • (String, nil)


73
# File 'lib/metronome_sdk/models/v1/billable_metric_list_response.rb', line 73

optional :sql, String