Sha256: a77207ceb339d0c8910f5452b5a568918facc2334c32bb618d5af285b7638a61
Contents?: true
Size: 721 Bytes
Versions: 9
Compression:
Stored size: 721 Bytes
Contents
require "shopify_cli" module ShopifyCli 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("core.populate.draft_order.added", @shop, admin_url, id) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems