class Binda::Shopify::Product

Attributes

product[RW]
shop[RW]

Public Class Methods

new(product, shop) click to toggle source
# File lib/binda/shopify/product.rb, line 5
def initialize product, shop
  @product = product
  @shop = shop
end

Public Instance Methods

edit_url() click to toggle source
# File lib/binda/shopify/product.rb, line 23
def edit_url
  "https://#{shop.domain}/admin/products/#{product.id}"
end
id() click to toggle source
# File lib/binda/shopify/product.rb, line 10
def id
  product.id
end
inventory_item_id() click to toggle source
# File lib/binda/shopify/product.rb, line 14
def inventory_item_id
  variant = variants.first
  if variant.respond_to? :inventory_item_id
    variant.inventory_item_id if !variant.nil?
  else
    nil
  end
end
method_missing(name, params = nil, &block) click to toggle source
Calls superclass method
# File lib/binda/shopify/product.rb, line 27
def method_missing name, params = nil, &block
  if product.respond_to? name
    product.send(name, params)
  else
    super
  end
end