Skip to content

Commit f126a05

Browse files
authored
Add entity get credit score (#15)
1 parent 46714d2 commit f126a05

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

method/resources/Entity.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ class EntityQuestion(TypedDict):
122122
class EntityQuestionResponse(TypedDict):
123123
questions: List[EntityQuestion]
124124

125+
class EntityGetCreditScoreResponse(TypedDict):
126+
score: int
127+
updated_at: str
128+
125129
class AnswerOpts(TypedDict):
126130
question_id: str
127131
answer_id: str
@@ -149,10 +153,13 @@ def get(self, _id: str) -> Entity:
149153

150154
def list(self, params: EntityListOpts = None) -> List[Entity]:
151155
return super(EntityResource, self)._list(params)
152-
156+
153157
def create_auth_session(self, _id: str) -> EntityQuestionResponse:
154158
return super(EntityResource, self)._create_with_sub_path('{_id}/auth_session'.format(_id=_id), {})
155159

160+
def get_credit_score(self, _id: str) -> EntityQuestionResponse:
161+
return super(EntityResource, self)._get_with_sub_path('{_id}/credit_score'.format(_id=_id))
162+
156163
def update_auth_session(self, _id: str, opts: EntityUpdateAuthOpts) -> EntityUpdateAuthResponse:
157164
return super(EntityResource, self)._update_with_sub_path('{_id}/auth_session'.format(_id=_id), opts)
158165

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='method-python',
5-
version='0.0.23',
5+
version='0.0.24',
66
description='Python library for the Method API',
77
author='Marco del Carmen',
88
author_email='marco@mdelcarmen.me',

0 commit comments

Comments
 (0)