toMoneyTransactionMethod method

MoneyTransactionMethod toMoneyTransactionMethod()

Converts this string into the corresponding MoneyTransactionMethod value.

Implementation

MoneyTransactionMethod toMoneyTransactionMethod() {
  for (final MoneyTransactionMethod moneyTransactionMethod
      in MoneyTransactionMethod.values)
    if (this == moneyTransactionMethod.string())
      return moneyTransactionMethod;

  throw const FormatException(
      'The string does not contains a valid MoneyTransactionMethod '
      'representation.');
}