getCheckoutStep function

String getCheckoutStep(
  1. CheckoutSteps step
)

Implementation

String getCheckoutStep(CheckoutSteps step) {
  switch (step) {
    case CheckoutSteps.CUSTOMER_INFO:
      return 'customer-info';
    case CheckoutSteps.VIEW_BASKET:
      return 'view-basket';
    case CheckoutSteps.PAYMENT_INFO:
      return 'payment-info';
    case CheckoutSteps.PURCHASE:
      return 'purchase';
    default:
      throw Exception('Checkout step is not defined.');
  }
}