copyWithWrapped method

ShopifySharpDiscountAllocation copyWithWrapped({
  1. Wrapped<String?>? amount,
  2. Wrapped<int?>? discountApplicationIndex,
  3. Wrapped<ShopifySharpPriceSet?>? amountSet,
})

Implementation

ShopifySharpDiscountAllocation copyWithWrapped({
  Wrapped<String?>? amount,
  Wrapped<int?>? discountApplicationIndex,
  Wrapped<ShopifySharpPriceSet?>? amountSet,
}) {
  return ShopifySharpDiscountAllocation(
    amount: (amount != null ? amount.value : this.amount),
    discountApplicationIndex: (discountApplicationIndex != null
        ? discountApplicationIndex.value
        : this.discountApplicationIndex),
    amountSet: (amountSet != null ? amountSet.value : this.amountSet),
  );
}