UNPKG

2.68 kBPlain TextView Raw
1/**
2 * @author Tümay Çeber <tumayceber@gmail.com>
3 * @link https://github.com/brendtumi/bkmexpress
4 * @license http://opensource.org/licenses/MIT
5 */
6
7/* tslint:disable:max-classes-per-file */
8import {BexException} from "./exceptions";
9export class Environment {
10 public static DEV = "DEV";
11 public static LOCAL = "LOCAL";
12 public static SANDBOX = "SANDBOX";
13 public static PRODUCTION = "PRODUCTION";
14}
15
16export class Banks {
17 public static ALBARAKA: string = "0203";
18 public static AKBANK: string = "0046";
19 public static BANKASYA: string = "0208";
20 public static DENIZBANK: string = "0134";
21 public static FINANSBANK: string = "0111";
22 public static GARANTI: string = "0062";
23 public static HALKBANK: string = "0012";
24 public static HSBC: string = "0123";
25 public static ISBANK: string = "0064";
26 public static ING: string = "0099";
27 public static KUVEYTTURK: string = "0205";
28 public static ODEABANK: string = "0146";
29 public static SEKERBANK: string = "0059";
30 public static TEBBANK: string = "0032";
31 public static TFKB: string = "0206";
32 public static VAKIFBANK: string = "0015";
33 public static YKB: string = "0067";
34 public static ZIRAATBANK: string = "0010";
35
36 public static validate(bankCode: string): string {
37 switch (bankCode) {
38 case this.ALBARAKA :
39 return this.ALBARAKA;
40 case this.AKBANK :
41 return this.AKBANK;
42 case this.BANKASYA :
43 return this.BANKASYA;
44 case this.DENIZBANK :
45 return this.DENIZBANK;
46 case this.FINANSBANK :
47 return this.FINANSBANK;
48 case this.GARANTI :
49 return this.GARANTI;
50 case this.HALKBANK :
51 return this.HALKBANK;
52 case this.HSBC :
53 return this.HSBC;
54 case this.ISBANK :
55 return this.ISBANK;
56 case this.ING :
57 return this.ING;
58 case this.KUVEYTTURK :
59 return this.KUVEYTTURK;
60 case this.ODEABANK :
61 return this.ODEABANK;
62 case this.SEKERBANK :
63 return this.SEKERBANK;
64 case this.TEBBANK :
65 return this.TEBBANK;
66 case this.TFKB :
67 return this.TFKB;
68 case this.VAKIFBANK :
69 return this.VAKIFBANK;
70 case this.YKB :
71 return this.YKB;
72 case this.ZIRAATBANK :
73 return this.ZIRAATBANK;
74 default:
75 throw new BexException("Please check your bank code!");
76 }
77 }
78}