checkoutUrl(quantity = 1) {
    const config = this.config;
    const baseUrl = `https://${config.domain}/cart`;

    const variantPath = `${this.id}:${parseInt(quantity, 10)}`;

    const query = `api_key=${config.apiKey}`;

    return `${baseUrl}/${variantPath}?${query}`;
  }
/**
    * Get a checkout url for a specific product variant. You can
    * optionally pass a quantity. If no quantity is passed then quantity
    * will default to 1. The example below will grab a checkout url for
    * 3 copies of the first variant:
    * ```
    * const checkoutURL = product.variants[ 0 ].checkoutUrl(3);
    * ```
    *
    * @method checkoutUrl
    * @param {Number} [quantity = 1] quantity of variants
    * @public
    * @return {String} Checkout URL
  */
Get a checkout url for a specific product variant. You can
optionally pass a quantity. If no quantity is passed then quantity
will default to 1.

@method checkoutUrl
@param {Number} [quantity = 1] quantity of variants
@public
@return {String} Checkout URL
Get a checkout url for a specific product variant . You can optionally pass a quantity . If no quantity is passed then quantity will default to 1 . @method checkoutUrl @param { Number } [ quantity = 1 ] quantity of variants @public @return { String } Checkout URL
checkoutUrl(quantity = 1) {
    const config = this.config;
    const baseUrl = `https://${config.domain}/cart`;
    const variantPath = `${this.id}:${parseInt(quantity, 10)}`;
    const query = `api_key=${config.apiKey}`;
    return `${baseUrl}/${variantPath}?${query}`;
  }
checkoutUrl ( quantity = 1 ) { const config = this . config ; const baseUrl = ` ${ config . domain } ` ; const variantPath = ` ${ this . id } ${ parseInt ( quantity , 10 ) } ` ; const query = ` ${ config . apiKey } ` ; return ` ${ baseUrl } ${ variantPath } ${ query } ` ; }
Get a checkout url for a specific product variant.
Get a checkout url for a specific product variant .