Sha256: 8f6f53c4e552a405cba19f734d17e9dfa9f8b154f6db68e0eb6e68200c257b75

Contents?: true

Size: 460 Bytes

Versions: 12

Compression:

Stored size: 460 Bytes

Contents

module ShopifyAPI
  class SmartCollection < Base
    include Events
    include Metafields

    def products(options = {})
      if options.present?
        Product.find(:all, from: "#{self.class.prefix}smart_collections/#{id}/products.json", params: options)
      else
        Product.find(:all, params: { collection_id: id })
      end
    end

    def order(options={})
      load_attributes_from_response(put(:order, options, only_id))
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shopify_api-9.1.0 lib/shopify_api/resources/smart_collection.rb
shopify_api-9.0.4 lib/shopify_api/resources/smart_collection.rb
shopify_api-9.0.3 lib/shopify_api/resources/smart_collection.rb
shopify_api-9.0.2 lib/shopify_api/resources/smart_collection.rb
shopify_api-9.0.1 lib/shopify_api/resources/smart_collection.rb
shopify_api-9.0.0 lib/shopify_api/resources/smart_collection.rb
shopify_api-8.1.0 lib/shopify_api/resources/smart_collection.rb
shopify_api-8.0.0 lib/shopify_api/resources/smart_collection.rb
shopify_api-7.1.0 lib/shopify_api/resources/smart_collection.rb
shopify_api-7.0.2 lib/shopify_api/resources/smart_collection.rb
shopify_api-7.0.1 lib/shopify_api/resources/smart_collection.rb
shopify_api-7.0.0 lib/shopify_api/resources/smart_collection.rb