Class: Privy::Models::AggregationMetric

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/aggregation_metric.rb

Defined Under Namespace

Modules: Function

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(field:, field_source:, function:, abi: nil) ⇒ Object

The metric configuration for an aggregation, defining what field/field_source to measure and the aggregation function to apply.

Parameters:



# File 'lib/privy/models/aggregation_metric.rb', line 28

Instance Attribute Details

#abiArray<Privy::Models::AbiSchemaItem>?

A Solidity ABI definition for decoding smart contract calldata.

Returns:



26
# File 'lib/privy/models/aggregation_metric.rb', line 26

optional :abi, -> { Privy::Internal::Type::ArrayOf[Privy::AbiSchemaItem] }

#fieldString

Returns:

  • (String)


9
# File 'lib/privy/models/aggregation_metric.rb', line 9

required :field, String

#field_sourceString

Returns:

  • (String)


14
# File 'lib/privy/models/aggregation_metric.rb', line 14

required :field_source, String

#functionSymbol, Privy::Models::AggregationMetric::Function

The aggregation function to apply.



20
# File 'lib/privy/models/aggregation_metric.rb', line 20

required :function, enum: -> { Privy::AggregationMetric::Function }