generateBankCode static method

String generateBankCode(
  1. Country country
)

Ülkeye göre banka listesinden, banka kodu döndürür.

Implementation

static String generateBankCode(Country country) {
  switch (country) {
    case Country.turkish:
      {
        List<Bank> bankListTR = getBankObjectList(country);

        final Random random = Random.secure();
        var bank = bankListTR[random.nextInt(bankListTR.length)];

        return bank.bankCode;
      }

    default:
      {
        return "00061";
      }
  }
}