Sha256: 9d06aeb2e138adeecfb8a19ea3e8962b44a442b57d1db657df6ad082b199f099
Contents?: true
Size: 697 Bytes
Versions: 20
Compression:
Stored size: 697 Bytes
Contents
require 'shopify_cli' module Rails module Commands class Populate class Product < ShopifyCli::AdminAPI::PopulateResourceCommand @input_type = :ProductInput def defaults { title: ShopifyCli::Helpers::Haikunator.title, variants: [{ price: price }], } end def message(data) ret = data['productCreate']['product'] id = ShopifyCli::API.gid_to_id(ret['id']) @ctx.message( 'rails.populate.product.added', ret['title'], ShopifyCli::Project.current.env.shop, admin_url, id ) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems