Class: MetronomeSDK::Models::V1::BillableMetricCreateParams

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

Overview

Defined Under Namespace

Modules: AggregationType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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

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

Parameters:

  • name (String) (defaults to: )

    The display name of the billable metric.

  • aggregation_key (String) (defaults to: nil)

    Specifies the type of aggregation performed on matching events. Required if ‘sql

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

    Specifies the type of aggregation performed on matching events.

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

    Custom fields to attach to the billable metric.

  • 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. This field is mutually exclus

  • request_options (MetronomeSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 66


Instance Attribute Details

#aggregation_keyString?

Specifies the type of aggregation performed on matching events. Required if ‘sql` is not provided.

Returns:

  • (String, nil)


22
# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 22

optional :aggregation_key, String

#aggregation_typeSymbol, ...

Specifies the type of aggregation performed on matching events.



28
# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 28

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

#custom_fieldsHash{Symbol=>String}?

Custom fields to attach to the billable metric.

Returns:

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


34
# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 34

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.



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

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)


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

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

#nameString

The display name of the billable metric.

Returns:

  • (String)


15
# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 15

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:



55
# File 'lib/metronome_sdk/models/v1/billable_metric_create_params.rb', line 55

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

#sqlString?

The SQL query associated with the billable metric. This field is mutually exclusive with aggregation_type, event_type_filter, property_filters, aggregation_key, and group_keys. If provided, these other fields must be omitted.

Returns:

  • (String, nil)


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

optional :sql, String