Class: WhopSDK::Models::StatRetrieveResponse::Data::Point::Breakdown

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/stat_retrieve_response.rb,
sig/whop_sdk/models/stat_retrieve_response.rbs

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(name:, value:) ⇒ Breakdown

Returns a new instance of Breakdown.

Parameters:

  • name (String)

    The property value, for example usd or visa.

  • value (Float, nil)

    The metric's value for this entry.

  • name: (String)
  • value: (Float, nil)


66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 66

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

Instance Attribute Details

#nameString

The property value, for example usd or visa.

Parameters:

  • value (String)

Returns:

  • (String)


71
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 71

required :name, String

#valueFloat?

The metric's value for this entry.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


77
# File 'lib/whop_sdk/models/stat_retrieve_response.rb', line 77

required :value, Float, nil?: true

Instance Method Details

#to_hash{ name: String, value: Float? }

Returns:

  • ({ name: String, value: Float? })


75
# File 'sig/whop_sdk/models/stat_retrieve_response.rbs', line 75

def to_hash: -> { name: String, value: Float? }