class EcwidApi::ProductCombination
Attributes
product[R]
Public Class Methods
new(data, opts={})
click to toggle source
Calls superclass method
EcwidApi::Entity::new
# File lib/ecwid_api/product_combination.rb, line 14 def initialize(data, opts={}) super(data, opts) @product = opts[:product] end
Public Instance Methods
upload_image!(filename)
click to toggle source
Public: Uploads a primary image for a ProductCombination
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_combination.rb, line 26 def upload_image!(filename) client.post_image("#{url}/image", filename) end