Sha256: 06786e611e740bfa4d7a89b299345c27d9e305a0770e88b79397a2cc8c7a6623
Contents?: true
Size: 748 Bytes
Versions: 11
Compression:
Stored size: 748 Bytes
Contents
require "shopify_cli" module Rails 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("rails.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