from static method

PaymentMethod from(
  1. String name
)

Implementation

static PaymentMethod from(String name) {
  if (name == "TAMARA_POS") {
    return PaymentMethod.tamara;
  } else if (name == "PAYMENT_GATEWAY") {
    return PaymentMethod.checkout;
  } else if (name == "SOFT_POS") {
    return PaymentMethod.contactless;
  } else if (name == "TABBY_POS") {
    return PaymentMethod.tabby;
  } else {
    return PaymentMethod.unknown;
  }
}