Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateDigitalCmd = &cobra.Command{ Use: "create-digital <store_id>", Short: "Create digital product", Long: "Create a published digital product with a single variant and an optional external download link.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(createDigitalBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().EcommerceCreateDigitalProductV1WithBodyWithResponse(context.TODO(), args[0], "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var CreatePhysicalCmd = &cobra.Command{ Use: "create-physical <store_id>", Short: "Create physical product", Long: "Create a published physical product with a single variant priced in the store currency.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(createPhysicalBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().EcommerceCreatePhysicalProductV1WithBodyWithResponse(context.TODO(), args[0], "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GroupCmd = &cobra.Command{
Use: "products",
Short: "Products commands",
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.