Class: Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series::Point

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/events/credit_get_usage_response.rb

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(timestamp:, value:) ⇒ Object

A single data point in the credit usage time series

Parameters:

  • timestamp (Time)

    The timestamp of the data point

  • value (Float)

    The credit usage value at this point



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/stigg/models/v1/events/credit_get_usage_response.rb', line 125

class Point < Stigg::Internal::Type::BaseModel
  # @!attribute timestamp
  #   The timestamp of the data point
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute value
  #   The credit usage value at this point
  #
  #   @return [Float]
  required :value, Float

  # @!method initialize(timestamp:, value:)
  #   A single data point in the credit usage time series
  #
  #   @param timestamp [Time] The timestamp of the data point
  #
  #   @param value [Float] The credit usage value at this point
end

Instance Attribute Details

#timestampTime

The timestamp of the data point

Returns:

  • (Time)


130
# File 'lib/stigg/models/v1/events/credit_get_usage_response.rb', line 130

required :timestamp, Time

#valueFloat

The credit usage value at this point

Returns:

  • (Float)


136
# File 'lib/stigg/models/v1/events/credit_get_usage_response.rb', line 136

required :value, Float