Skip to content

Commit abfc35b

Browse files
author
gabino
committed
Add masked logging configuration for card number
1 parent e01cab2 commit abfc35b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cuenca/resources/cards.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import datetime as dt
2-
from typing import ClassVar, Optional
2+
from typing import Annotated, ClassVar, Optional
33

44
from cuenca_validations.types import (
55
CardFundingType,
66
CardIssuer,
77
CardStatus,
88
CardType,
99
)
10+
from cuenca_validations.types.general import LogConfig
1011
from cuenca_validations.types.queries import CardQuery
1112
from cuenca_validations.types.requests import CardRequest, CardUpdateRequest
1213

@@ -22,7 +23,7 @@ class Card(Retrievable, Queryable, Creatable, Updateable):
2223
_query_params: ClassVar = CardQuery
2324

2425
user_id: Optional[str] = None
25-
number: str
26+
number: Annotated[str, LogConfig(masked=True, unmasked_chars_length=4)]
2627
exp_month: int
2728
exp_year: int
2829
cvv2: str

0 commit comments

Comments
 (0)