Class: ShopifyAPI::Image

Inherits:
Base show all
Defined in:
lib/shopify_api/resources/image.rb

Instance Method Summary collapse

Methods included from Countable

#count

Methods inherited from ActiveResource::Base

#encode

Instance Method Details

#attach_image(data, filename = nil) ⇒ Object



11
12
13
14
# File 'lib/shopify_api/resources/image.rb', line 11

def attach_image(data, filename = nil)
  attributes['attachment'] = Base64.encode64(data)
  attributes['filename'] = filename unless filename.nil?
end