Class: Showroom::Search::CollectionSuggestion

Inherits:
Suggestion show all
Defined in:
lib/showroom/models/search/collection_suggestion.rb

Overview

A lean collection shape returned by the Shopify search suggest endpoint.

Examples:

suggestion = Showroom::Search::CollectionSuggestion.new('title' => 'Lorem Helmets', 'handle' => 'lorem-helmets')
suggestion.title  # => "Lorem Helmets"

Instance Attribute Summary

Attributes inherited from Resource

#attrs, #client

Class Method Summary collapse

Methods inherited from Suggestion

#load, #loadable_identifier

Methods inherited from Resource

#==, #[], has_many, has_one, #initialize, #inspect, main_attr_keys, main_attrs, #method_missing, #respond_to_missing?, #to_h

Constructor Details

This class inherits a constructor from Showroom::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Showroom::Resource

Class Method Details

.complete_model_classClass

Returns the full model class for this suggestion type.

Returns:

  • (Class)

    the full model class for this suggestion type



14
15
16
# File 'lib/showroom/models/search/collection_suggestion.rb', line 14

def self.complete_model_class
  Collection
end