From 18a1f9b1a6fdb627287131a0d3c222fc83797254 Mon Sep 17 00:00:00 2001 From: Marco del Carmen Date: Tue, 15 Nov 2022 21:50:59 -0600 Subject: [PATCH] Add entity get credit score --- method/resources/Entity.py | 9 ++++++++- setup.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/method/resources/Entity.py b/method/resources/Entity.py index f88a639..10797c6 100644 --- a/method/resources/Entity.py +++ b/method/resources/Entity.py @@ -122,6 +122,10 @@ class EntityQuestion(TypedDict): class EntityQuestionResponse(TypedDict): questions: List[EntityQuestion] +class EntityGetCreditScoreResponse(TypedDict): + score: int + updated_at: str + class AnswerOpts(TypedDict): question_id: str answer_id: str @@ -149,10 +153,13 @@ def get(self, _id: str) -> Entity: def list(self, params: EntityListOpts = None) -> List[Entity]: return super(EntityResource, self)._list(params) - + def create_auth_session(self, _id: str) -> EntityQuestionResponse: return super(EntityResource, self)._create_with_sub_path('{_id}/auth_session'.format(_id=_id), {}) + def get_credit_score(self, _id: str) -> EntityQuestionResponse: + return super(EntityResource, self)._get_with_sub_path('{_id}/credit_score'.format(_id=_id)) + def update_auth_session(self, _id: str, opts: EntityUpdateAuthOpts) -> EntityUpdateAuthResponse: return super(EntityResource, self)._update_with_sub_path('{_id}/auth_session'.format(_id=_id), opts) diff --git a/setup.py b/setup.py index dfdcf5c..d43fb41 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='method-python', - version='0.0.23', + version='0.0.24', description='Python library for the Method API', author='Marco del Carmen', author_email='marco@mdelcarmen.me',