Class: Stigg::Models::V1::UsageHistoryResponse::Data::Marker

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

Defined Under Namespace

Modules: Type

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:, type:) ⇒ Object

Usage reset or change marker

Parameters:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/stigg/models/v1/usage_history_response.rb', line 42

class Marker < Stigg::Internal::Type::BaseModel
  # @!attribute timestamp
  #   Timestamp of the marker
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute type
  #   Type of marker for a usage history point
  #
  #   @return [Symbol, Stigg::Models::V1::UsageHistoryResponse::Data::Marker::Type]
  required :type, enum: -> { Stigg::Models::V1::UsageHistoryResponse::Data::Marker::Type }

  # @!method initialize(timestamp:, type:)
  #   Usage reset or change marker
  #
  #   @param timestamp [Time] Timestamp of the marker
  #
  #   @param type [Symbol, Stigg::Models::V1::UsageHistoryResponse::Data::Marker::Type] Type of marker for a usage history point

  # Type of marker for a usage history point
  #
  # @see Stigg::Models::V1::UsageHistoryResponse::Data::Marker#type
  module Type
    extend Stigg::Internal::Type::Enum

    PERIODIC_RESET = :PERIODIC_RESET
    SUBSCRIPTION_CHANGE_RESET = :SUBSCRIPTION_CHANGE_RESET

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#timestampTime

Timestamp of the marker

Returns:

  • (Time)


47
# File 'lib/stigg/models/v1/usage_history_response.rb', line 47

required :timestamp, Time

#typeSymbol, Stigg::Models::V1::UsageHistoryResponse::Data::Marker::Type

Type of marker for a usage history point



53
# File 'lib/stigg/models/v1/usage_history_response.rb', line 53

required :type, enum: -> { Stigg::Models::V1::UsageHistoryResponse::Data::Marker::Type }