Class: Inttegro::Search::Request

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/search/request.rb

Overview

A resource-local search request. Send text, at least one filter, or both. Field names are unqualified and depend on the endpoint. The application and resource type are derived by Inttegro and cannot be supplied by the caller. To continue a search, repeat the same request and add the returned next_cursor.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#cursor ⇒ String? (readonly)

Opaque continuation value returned as next_cursor by the preceding page.

Optional in the API payload; omitted values default to nil. Wire name: cursor.

Returns:

  • (String, nil)


59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end

#facets ⇒ Array<Inttegro::Search::Facet>? (readonly)

Value of the facets field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: facets.

Returns:



59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end

#filters ⇒ Array<Inttegro::Search::Filter>? (readonly)

Value of the filters field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: filters.

Returns:



59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end

#page_size ⇒ Integer? (readonly)

Value of the page_size field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: page_size.

Returns:

  • (Integer, nil)


59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end

#sort ⇒ Inttegro::Search::Sort? (readonly)

Value of the sort field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: sort.

Returns:



59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end

#text ⇒ String? (readonly)

Words, identifiers, or names to search for.

Optional in the API payload; omitted values default to nil. Wire name: text.

Returns:

  • (String, nil)


59
60
61
62
63
64
65
66
# File 'lib/inttegro/search/request.rb', line 59

class Request < T::Struct
  const :text, T.nilable(String), default: nil
  const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
  const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
  const :sort, T.nilable(Inttegro::Search::Sort), default: nil
  const :page_size, T.nilable(Integer), default: nil
  const :cursor, T.nilable(String), default: nil
end