Class: ContextDev::Models::BrandSearchParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/context_dev/models/brand_search_params.rb,
sig/context_dev/models/brand_search_params.rbs

Overview

See Also:

  • ContextDev::Resources::Brand#search

Defined Under Namespace

Modules: QueryBy

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ContextDev

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initializeObject



37
# File 'sig/context_dev/models/brand_search_params.rbs', line 37

def initialize: (

Instance Attribute Details

#autocompleteBoolean?

Whether the search term matches by prefix, so partial words match as they are typed (e.g. 'nik' matches Nike). Set to false to match whole words only.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


22
# File 'lib/context_dev/models/brand_search_params.rb', line 22

optional :autocomplete, ContextDev::Internal::Type::Boolean

#queryString

Search term, matched against the fields selected by queryBy (e.g. 'nike', 'nike.com', 'nik').

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/context_dev/models/brand_search_params.rb', line 15

required :query, String

#query_byArray<Symbol, ContextDev::Models::BrandSearchParams::QueryBy>?

Fields to match the search term against, as a comma-separated list or repeated parameter: 'name', 'domain', or both. Defaults to both.

Returns:



29
30
# File 'lib/context_dev/models/brand_search_params.rb', line 29

optional :query_by,
-> { ContextDev::Internal::Type::ArrayOf[enum: ContextDev::BrandSearchParams::QueryBy] }

#tagsArray<String>?

Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


38
# File 'lib/context_dev/models/brand_search_params.rb', line 38

optional :tags, ContextDev::Internal::Type::ArrayOf[String]

#typo_toleranceInteger?

Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no typo tolerance).

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


45
# File 'lib/context_dev/models/brand_search_params.rb', line 45

optional :typo_tolerance, Integer

Instance Method Details

#to_hash{

Returns:

  • ({)


46
# File 'sig/context_dev/models/brand_search_params.rbs', line 46

def to_hash: -> {