Sha256: 8a907c26bdf19810981edf97aef9f27a8f646ac41a58ade16ab547b464ec0285
Contents?: true
Size: 746 Bytes
Versions: 20
Compression:
Stored size: 746 Bytes
Contents
require 'shopify_cli' module Node module Commands class Populate class DraftOrder < ShopifyCli::AdminAPI::PopulateResourceCommand @input_type = :DraftOrderInput def defaults { lineItems: [{ originalUnitPrice: price, quantity: 1, weight: { value: 10, unit: 'GRAMS' }, title: ShopifyCli::Helpers::Haikunator.title, }], } end def message(data) ret = data['draftOrderCreate']['draftOrder'] id = ShopifyCli::API.gid_to_id(ret['id']) @ctx.message('node.populate.draft_order.added', ShopifyCli::Project.current.env.shop, admin_url, id) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems