Skip to content

Commit 8a70cfc

Browse files
committed
Clabe.bank_code as alias to bank_code_banxico
1 parent b1bd988 commit 8a70cfc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

clabe/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@ def validate_control_digit(cls, clabe: str) -> str:
5555
if clabe[-1] != compute_control_digit(clabe):
5656
raise exc.ClabeControlDigitValidationError
5757
return clabe
58+
59+
@property
60+
def bank_code(self):
61+
return self.bank_code_banxico

clabe/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.1.0'
1+
__version__ = '1.1.1'

tests/test_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_valid_clabe():
1818
assert cuenta.clabe.bank_code_abm == '646'
1919
assert cuenta.clabe.bank_code_banxico == BANKS['646']
2020
assert cuenta.clabe.bank_name == BANK_NAMES[BANKS['646']]
21+
assert cuenta.clabe.bank_code == cuenta.clabe.bank_code_banxico
2122

2223

2324
def test_clabe_digits():

0 commit comments

Comments
 (0)