Sha256: 90532b427e30cd2c357b427546fc345ff3882af25952ed07971a71521139be3b
Contents?: true
Size: 746 Bytes
Versions: 11
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
11 entries across 11 versions & 1 rubygems