AddToCartParameters

public struct AddToCartParameters: ParameterConvertible

Data transfer object to add an item to cart for add to cart HTTP request.

  • The product id to add to cart.

    Declaration

    Swift

    let productId: String
  • The quantity to add to cart.

    Declaration

    Swift

    let quantity: Int
  • The SKU id to add to cart.

    Declaration

    Swift

    let skuId: String
  • The personalization options to add to cart.

    Declaration

    Swift

    let personalizations: [AddToCartPersonalizationsParameters]
  • Default initializer for an add to cart data transfer object.

    • Parameters:
      • productId: The product id to use.
      • quantity: The quantity to add.
      • skuId: The SKU id to use.
      • personalizations: The personalization options to add.

    Declaration

    Swift

    public init(productId: String,
                    quantity: Int,
                    skuId: String,
                    personalizations: [AddToCartPersonalizationsParameters])

    Parameters

    productId

    The product id to use.

    quantity

    The quantity to add.

    skuId

    The SKU id to use.

    personalizations

    The personalization options to add.

  • Default initializer for an add to cart data transfer object.

    • Parameters:
      • productId: The product id to use.
      • quantity: The quantity to add.
      • skuId: The SKU id to use.
      • personalizations: The personalization options to add.

    Declaration

    Swift

    public func toParameters() -> Parameters

    Return Value

    The parameters to use.