parse static method

PaymentOptions parse(
  1. int id
)

Implementation

static PaymentOptions parse(int id) {
  switch (id) {
    case 1:
      return PaymentOptions.creditCard;
    case 2:
      return PaymentOptions.fawryPay;
    case 3:
      return PaymentOptions.fawryB2B;
    case 4:
      return PaymentOptions.meezaCard;
    case 5:
      return PaymentOptions.meezaPay;
    case 6:
      return PaymentOptions.bosta;
    case 7:
      return PaymentOptions.valu;
    default:
      return PaymentOptions.unhandledMethod;
  }
}