Class: WhopSDK::Models::StatRetrieveResponse::Data::Point
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::StatRetrieveResponse::Data::Point
- Defined in:
- lib/whop_sdk/models/stat_retrieve_response.rb,
sig/whop_sdk/models/stat_retrieve_response.rbs
Defined Under Namespace
Classes: Breakdown
Instance Attribute Summary collapse
-
#breakdown ⇒ Array<WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown>?
Present only when broken down: one entry per property value in this period.
-
#timestamp ⇒ Integer
Unix timestamp (seconds) of the period start.
-
#value ⇒ Float?
The metric's value for this period, in the metric's unit.
Instance Method Summary collapse
-
#initialize(points:, currency: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see WhopSDK::Models::StatRetrieveResponse::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(points:, currency: nil) ⇒ Object
Some parameter documentations has been truncated, see WhopSDK::Models::StatRetrieveResponse::Data for more details.
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 |
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 39 class Point < WhopSDK::Internal::Type::BaseModel # @!attribute timestamp # Unix timestamp (seconds) of the period start. # # @return [Integer] required :timestamp, Integer # @!attribute value # The metric's value for this period, in the metric's unit. # # @return [Float, nil] required :value, Float, nil?: true # @!attribute breakdown # Present only when broken down: one entry per property value in this period. # # @return [Array<WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown>, nil] optional :breakdown, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown] } # @!method initialize(timestamp:, value:, breakdown: nil) # @param timestamp [Integer] Unix timestamp (seconds) of the period start. # # @param value [Float, nil] The metric's value for this period, in the metric's unit. # # @param breakdown [Array<WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown>] Present only when broken down: one entry per property value in this period. class Breakdown < WhopSDK::Internal::Type::BaseModel # @!attribute name # The property value, for example usd or visa. # # @return [String] required :name, String # @!attribute value # The metric's value for this entry. # # @return [Float, nil] required :value, Float, nil?: true # @!method initialize(name:, value:) # @param name [String] The property value, for example usd or visa. # # @param value [Float, nil] The metric's value for this entry. end end |
Instance Attribute Details
#breakdown ⇒ Array<WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown>?
Present only when broken down: one entry per property value in this period.
56 57 |
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 56 optional :breakdown, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown] } |
#timestamp ⇒ Integer
Unix timestamp (seconds) of the period start.
44 |
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 44 required :timestamp, Integer |
#value ⇒ Float?
The metric's value for this period, in the metric's unit.
50 |
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 50 required :value, Float, nil?: true |
Instance Method Details
#to_hash ⇒ {
60 |
# File 'sig/whop_sdk/models/stat_retrieve_response.rbs', line 60
def to_hash: -> {
|