Class: OursprivacyIngest::Models::ExperimentPersonalizationResponse

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

Overview

See Also:

  • OursprivacyIngest::Resources::Experiments#personalization

Defined Under Namespace

Modules: Property, Success Classes: Personalization

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 ⇒ Object



21
# File 'sig/oursprivacy_ingest/models/experiment_personalization_response.rbs', line 21

def initialize: (

Instance Attribute Details

#personalizations ⇒ Array<OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization>?

Deprecated.

Deprecated legacy personalization assignments. Current API responses omit this field; use properties for accumulated personalization traits. Retained in the SDK for callers using older responses.



32
33
# File 'lib/oursprivacy_ingest/models/experiment_personalization_response.rb', line 32

optional :personalizations,
-> { OursprivacyIngest::Internal::Type::ArrayOf[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization] }

#properties ⇒ Hash{Symbol=>String, Float, Boolean}

The visitor traits accumulated by your personalization property rules, keyed by property key. Values are always scalars — a string, number, or boolean, or null when the captured field was itself empty. Empty for a visitor who has not matched any rule yet. These same values are delivered to the visitor's browser and are readable by anyone who knows the visitor_id, so never accumulate secrets, credentials, PHI, or confidential data into a property.

Parameters:

  • value (::Hash[Symbol, OursprivacyIngest::Models::ExperimentPersonalizationResponse::property])

Returns:

  • (Hash{Symbol=>String, Float, Boolean})


16
17
# File 'lib/oursprivacy_ingest/models/experiment_personalization_response.rb', line 16

required :properties,
-> { OursprivacyIngest::Internal::Type::HashOf[union: OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property] }

#success ⇒ Boolean, OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success

Parameters:

  • value (OursprivacyIngest::Models::ExperimentPersonalizationResponse::success)

Returns:



22
# File 'lib/oursprivacy_ingest/models/experiment_personalization_response.rb', line 22

required :success, enum: -> { OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success }

Class Method Details

.values ⇒ Array<Boolean>

Returns:

  • (Array<Boolean>)


# File 'lib/oursprivacy_ingest/models/experiment_personalization_response.rb', line 64

.variants ⇒ Array(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


# File 'lib/oursprivacy_ingest/models/experiment_personalization_response.rb', line 54

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


27
# File 'sig/oursprivacy_ingest/models/experiment_personalization_response.rbs', line 27

def to_hash: -> {