Skip to content

Commit 553325e

Browse files
committed
update pin interface
1 parent e853a45 commit 553325e

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

cuenca/resources/cards.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def update(
6868
cls,
6969
card_id: str,
7070
status: Optional[CardStatus] = None,
71+
pin_block: Optional[str] = None,
7172
*,
7273
session: Session = global_session,
7374
) -> 'Card':
@@ -77,9 +78,11 @@ def update(
7778
7879
:param card_id: existing card_id
7980
:param status:
81+
:param pin_block
82+
:param session:
8083
:return: Updated card object
8184
"""
82-
req = CardUpdateRequest(status=status)
85+
req = CardUpdateRequest(status=status, pin_block=pin_block)
8386
resp = cls._update(card_id, session=session, **req.dict())
8487
return cast('Card', resp)
8588

cuenca/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '0.7.3.dev5'
1+
__version__ = '0.7.3.dev6'
22
CLIENT_VERSION = __version__
33
API_VERSION = '2020-03-19'

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests==2.25.1
2-
cuenca-validations==0.9.1.dev5
2+
cuenca-validations==0.9.1.dev6
33
dataclasses>=0.7;python_version<"3.7"

tests/resources/test_cards.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ def test_card_update():
7575
assert card.status == CardStatus.active
7676

7777

78+
@pytest.mark.skip(reason="Not ready")
79+
def test_card_update_pin():
80+
new_pin = '7AC814A636D901BE'
81+
card = Card.update(card_id, pin_block=new_pin)
82+
assert card.pin == new_pin
83+
84+
7885
@pytest.mark.vcr
7986
def test_deactivate_card():
8087
card = Card.deactivate(card_id)

0 commit comments

Comments
 (0)