class BigcommerceAPI::Image
Attributes
date_created[RW]
description[RW]
id[RW]
image_file[RW]
is_thumbnail[RW]
product_id[RW]
sort_order[RW]
standard_url[RW]
thumbnail_url[RW]
tiny_url[RW]
zoom_url[RW]
Public Class Methods
all(product_id, params={})
click to toggle source
# File lib/bigcommerce_api/image.rb, line 30 def all(product_id, params={}) resources = BigcommerceAPI::Base.get("/products/#{product_id}/images", query: date_adjust(params)) (resources.success? and !resources.nil?) ? resources.collect{|r| self.new(r)} : [] end
find(product_id, id)
click to toggle source
# File lib/bigcommerce_api/image.rb, line 35 def find(product_id, id) r = BigcommerceAPI::Base.get("/products/#{product_id}/images/#{id}") (r.success? and !r.nil?) ? self.new(r) : nil end
Public Instance Methods
find_for_reload()
click to toggle source
# File lib/bigcommerce_api/image.rb, line 25 def find_for_reload self.class.find(self.product_id, self.id) end
parent()
click to toggle source
# File lib/bigcommerce_api/image.rb, line 21 def parent 'product' end
resource_url()
click to toggle source
# File lib/bigcommerce_api/image.rb, line 17 def resource_url "products/#{self.product_id}/images" end