class EcwidApi::Product

Public Instance Methods

combinations() click to toggle source
# File lib/ecwid_api/product.rb, line 53
def combinations
  @combinations ||= Api::ProductCombinations.new(self, client)
end
created() click to toggle source
Calls superclass method
# File lib/ecwid_api/product.rb, line 57
def created
  @created ||= Time.parse(super)
end
updated() click to toggle source
Calls superclass method
# File lib/ecwid_api/product.rb, line 61
def updated
  @updated ||= Time.parse(super)
end
upload_image!(filename) click to toggle source

Public: Uploads a primary image for a Product

filename - a String that is either a local file name or URL

Raises ResponseError if the API returns an error

Returns a Faraday::Response object

# File lib/ecwid_api/product.rb, line 27
def upload_image!(filename)
  client.post_image("#{url}/image", filename)
end