示例#1
0
 def create(self, card: Card) -> NewCardResponse:
     response = self._post(self._format_url(), json=card.as_dict())
     return NewCardResponse(**response)
示例#2
0
 def testAsDict(self):
     card = Card(**sample)
     self.assertDictEqual(card.as_dict(), sample)
示例#3
0
 def verify(self, card: Card) -> bool:
     response = self._post(self._format_url(card_id="verification"),
                           json=card.as_dict())
     return response.get("status") == "VERIFIED"