Class: WhopSDK::Models::Audience::MatchRate

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

Defined Under Namespace

Modules: Platform, Status

Instance Attribute Summary collapse

Class Method 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(lower_bound:, platform:, status:, upper_bound:) ⇒ Object

Estimated match rates by ad platform. Empty when the audience was not sent to a supported platform.

Parameters:



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/whop_sdk/models/audience.rb', line 107

class MatchRate < WhopSDK::Internal::Type::BaseModel
  # @!attribute lower_bound
  #   Lower bound of the estimated match rate percentage. `null` until available.
  #
  #   @return [Float, nil]
  required :lower_bound, Float, nil?: true

  # @!attribute platform
  #   The ad platform that provided the match-rate estimate.
  #
  #   @return [Symbol, WhopSDK::Models::Audience::MatchRate::Platform]
  required :platform, enum: -> { WhopSDK::Audience::MatchRate::Platform }

  # @!attribute status
  #   Availability of the estimated match rate.
  #
  #   @return [Symbol, WhopSDK::Models::Audience::MatchRate::Status, nil]
  required :status, enum: -> { WhopSDK::Audience::MatchRate::Status }, nil?: true

  # @!attribute upper_bound
  #   Upper bound of the estimated match rate percentage. `null` until available.
  #
  #   @return [Float, nil]
  required :upper_bound, Float, nil?: true

  # @!method initialize(lower_bound:, platform:, status:, upper_bound:)
  #   Estimated match rates by ad platform. Empty when the audience was not sent to a
  #   supported platform.
  #
  #   @param lower_bound [Float, nil] Lower bound of the estimated match rate percentage. `null` until available.
  #
  #   @param platform [Symbol, WhopSDK::Models::Audience::MatchRate::Platform] The ad platform that provided the match-rate estimate.
  #
  #   @param status [Symbol, WhopSDK::Models::Audience::MatchRate::Status, nil] Availability of the estimated match rate.
  #
  #   @param upper_bound [Float, nil] Upper bound of the estimated match rate percentage. `null` until available.

  # The ad platform that provided the match-rate estimate.
  #
  # @see WhopSDK::Models::Audience::MatchRate#platform
  module Platform
    extend WhopSDK::Internal::Type::Enum

    META = :meta

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

  # Availability of the estimated match rate.
  #
  # @see WhopSDK::Models::Audience::MatchRate#status
  module Status
    extend WhopSDK::Internal::Type::Enum

    CALCULATING = :calculating
    AVAILABLE = :available
    UNAVAILABLE = :unavailable

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

Instance Attribute Details

#lower_boundFloat?

Lower bound of the estimated match rate percentage. null until available.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


112
# File 'lib/whop_sdk/models/audience.rb', line 112

required :lower_bound, Float, nil?: true

#platformSymbol, WhopSDK::Models::Audience::MatchRate::Platform

The ad platform that provided the match-rate estimate.

Parameters:

  • value (WhopSDK::Models::Audience::MatchRate::platform)

Returns:



118
# File 'lib/whop_sdk/models/audience.rb', line 118

required :platform, enum: -> { WhopSDK::Audience::MatchRate::Platform }

#statusSymbol, ...

Availability of the estimated match rate.

Parameters:

  • value (WhopSDK::Models::Audience::MatchRate::status, nil)

Returns:



124
# File 'lib/whop_sdk/models/audience.rb', line 124

required :status, enum: -> { WhopSDK::Audience::MatchRate::Status }, nil?: true

#upper_boundFloat?

Upper bound of the estimated match rate percentage. null until available.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


130
# File 'lib/whop_sdk/models/audience.rb', line 130

required :upper_bound, Float, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/audience.rb', line 152

Instance Method Details

#to_hash{

Returns:

  • ({)


98
# File 'sig/whop_sdk/models/audience.rbs', line 98

def to_hash: -> {