Module: Stigg::Models::V1::UsageReportParams::Usage::Dimension

Extended by:
Internal::Type::Union
Defined in:
lib/stigg/models/v1/usage_report_params.rb

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Instance Method Details

#initialize(customer_id:, feature_id:, value:, created_at: nil, dimensions: nil, resource_id: nil, update_behavior: nil) ⇒ Object

Single usage measurement

Parameters:

  • customer_id (String)

    Customer id

  • feature_id (String)

    Feature id

  • value (Integer)

    The value to report for usage

  • created_at (Time) (defaults to: nil)

    Timestamp of when the record was created

  • dimensions (Hash{Symbol=>String, Float, Boolean}) (defaults to: nil)

    Additional dimensions for the usage report

  • resource_id (String, nil) (defaults to: nil)

    Resource id

  • update_behavior (Symbol, Stigg::Models::V1::UsageReportParams::Usage::UpdateBehavior) (defaults to: nil)

    The method by which the usage value should be updated



85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/stigg/models/v1/usage_report_params.rb', line 85

module Dimension
  extend Stigg::Internal::Type::Union

  variant String

  variant Float

  variant Stigg::Internal::Type::Boolean

  # @!method self.variants
  #   @return [Array(String, Float, Boolean)]
end