Class: OursprivacyIngest::Models::ExperimentAssignmentParams::Context

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/oursprivacy_ingest/models/experiment_assignment_params.rb,
sig/oursprivacy_ingest/models/experiment_assignment_params.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(search: nil, url: nil) ⇒ Context

Some parameter documentations has been truncated, see OursprivacyIngest::Models::ExperimentAssignmentParams::Context for more details.

Optional page context for URL + query-param eligibility. Variant bucketing is deterministic on visitor_id regardless of context.

Parameters:

  • search (String, nil) (defaults to: nil)

    The current query string (e.g. ?utm_source=meta). When provided, the experimen

  • url (String, nil) (defaults to: nil)

    The current page URL. When provided, the experiment's URL patterns are evaluated

  • search: (String, nil) (defaults to: nil)
  • url: (String, nil) (defaults to: nil)


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 63

class Context < OursprivacyIngest::Internal::Type::BaseModel
  # @!attribute search
  #   The current query string (e.g. `?utm_source=meta`). When provided, the
  #   experiment's query-param conditions are evaluated for eligibility. If omitted,
  #   the query string is parsed from `url`.
  #
  #   @return [String, nil]
  optional :search, String, nil?: true

  # @!attribute url
  #   The current page URL. When provided, the experiment's URL patterns are evaluated
  #   for eligibility — visitors on non-matching URLs are returned
  #   `in_experiment: false`. Omit when the caller is pre-gating the request.
  #
  #   @return [String, nil]
  optional :url, String, nil?: true

  # @!method initialize(search: nil, url: nil)
  #   Some parameter documentations has been truncated, see
  #   {OursprivacyIngest::Models::ExperimentAssignmentParams::Context} for more
  #   details.
  #
  #   Optional page context for URL + query-param eligibility. Variant bucketing is
  #   deterministic on `visitor_id` regardless of context.
  #
  #   @param search [String, nil] The current query string (e.g. `?utm_source=meta`). When provided, the experimen
  #
  #   @param url [String, nil] The current page URL. When provided, the experiment's URL patterns are evaluated
end

Instance Attribute Details

#searchString?

The current query string (e.g. ?utm_source=meta). When provided, the experiment's query-param conditions are evaluated for eligibility. If omitted, the query string is parsed from url.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


70
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 70

optional :search, String, nil?: true

#urlString?

The current page URL. When provided, the experiment's URL patterns are evaluated for eligibility — visitors on non-matching URLs are returned in_experiment: false. Omit when the caller is pre-gating the request.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


78
# File 'lib/oursprivacy_ingest/models/experiment_assignment_params.rb', line 78

optional :url, String, nil?: true

Instance Method Details

#to_hash{ search: String?, url: String? }

Returns:

  • ({ search: String?, url: String? })


54
# File 'sig/oursprivacy_ingest/models/experiment_assignment_params.rbs', line 54

def to_hash: -> { search: String?, url: String? }