Class: WhopSDK::Models::StatListResponse::Data
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::StatListResponse::Data
- Defined in:
- lib/whop_sdk/models/stat_list_response.rb,
sig/whop_sdk/models/stat_list_response.rbs
Defined Under Namespace
Modules: Unit
Instance Attribute Summary collapse
-
#description ⇒ String
A short description of what the metric measures.
-
#key ⇒ String
The metric's key.
-
#name ⇒ String
Human-readable display name for the metric.
-
#properties ⇒ Array<String>
The properties you can use with this metric — pass one as a filter (property=value) to narrow the series, or as breakdown_by=property to split it.
-
#unit ⇒ Symbol, WhopSDK::Models::StatListResponse::Data::Unit
How to read the metric's values: count is an integer, currency is a decimal amount, and percent is a number where 1.6 means 1.6%.
-
#windows ⇒ Array<String>?
Snapshot metrics only: the trailing windows you can pass as snapshot_window, for example 30d.
Instance Method Summary collapse
-
#initialize(description:, key:, name:, properties:, unit:, windows: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Data for more details.
- #to_hash ⇒ {
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(description:, key:, name:, properties:, unit:, windows: nil) ⇒ Object
Some parameter documentations has been truncated, see WhopSDK::Models::StatListResponse::Data for more details.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 16 class Data < WhopSDK::Internal::Type::BaseModel # @!attribute description # A short description of what the metric measures. # # @return [String] required :description, String # @!attribute key # The metric's key. Pass it to GET /stats/{metric} to query its values. # # @return [String] required :key, String # @!attribute name # Human-readable display name for the metric. # # @return [String] required :name, String # @!attribute properties # The properties you can use with this metric — pass one as a filter # (property=value) to narrow the series, or as breakdown_by=property to split it. # # @return [Array<String>] required :properties, WhopSDK::Internal::Type::ArrayOf[String] # @!attribute unit # How to read the metric's values: count is an integer, currency is a decimal # amount, and percent is a number where 1.6 means 1.6%. # # @return [Symbol, WhopSDK::Models::StatListResponse::Data::Unit] required :unit, enum: -> { WhopSDK::Models::StatListResponse::Data::Unit } # @!attribute windows # Snapshot metrics only: the trailing windows you can pass as snapshot_window, for # example 30d. Absent on live metrics, which use from/to instead. # # @return [Array<String>, nil] optional :windows, WhopSDK::Internal::Type::ArrayOf[String] # @!method initialize(description:, key:, name:, properties:, unit:, windows: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::StatListResponse::Data} for more details. # # @param description [String] A short description of what the metric measures. # # @param key [String] The metric's key. Pass it to GET /stats/{metric} to query its values. # # @param name [String] Human-readable display name for the metric. # # @param properties [Array<String>] The properties you can use with this metric — pass one as a filter (property=val # # @param unit [Symbol, WhopSDK::Models::StatListResponse::Data::Unit] How to read the metric's values: count is an integer, currency is a decimal amou # # @param windows [Array<String>] Snapshot metrics only: the trailing windows you can pass as snapshot_window, for # How to read the metric's values: count is an integer, currency is a decimal # amount, and percent is a number where 1.6 means 1.6%. # # @see WhopSDK::Models::StatListResponse::Data#unit module Unit extend WhopSDK::Internal::Type::Enum COUNT = :count CURRENCY = :currency PERCENT = :percent # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#description ⇒ String
A short description of what the metric measures.
21 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 21 required :description, String |
#key ⇒ String
The metric's key. Pass it to GET /stats/metric to query its values.
27 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 27 required :key, String |
#name ⇒ String
Human-readable display name for the metric.
33 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 33 required :name, String |
#properties ⇒ Array<String>
The properties you can use with this metric — pass one as a filter (property=value) to narrow the series, or as breakdown_by=property to split it.
40 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 40 required :properties, WhopSDK::Internal::Type::ArrayOf[String] |
#unit ⇒ Symbol, WhopSDK::Models::StatListResponse::Data::Unit
How to read the metric's values: count is an integer, currency is a decimal amount, and percent is a number where 1.6 means 1.6%.
47 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 47 required :unit, enum: -> { WhopSDK::Models::StatListResponse::Data::Unit } |
#windows ⇒ Array<String>?
Snapshot metrics only: the trailing windows you can pass as snapshot_window, for example 30d. Absent on live metrics, which use from/to instead.
54 |
# File 'lib/whop_sdk/models/stat_list_response.rb', line 54 optional :windows, WhopSDK::Internal::Type::ArrayOf[String] |
Instance Method Details
#to_hash ⇒ {
49 |
# File 'sig/whop_sdk/models/stat_list_response.rbs', line 49
def to_hash: -> {
|