File tree Expand file tree Collapse file tree 6 files changed +18
-3
lines changed
Expand file tree Collapse file tree 6 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,10 @@ class MethodInvalidRequestError(MethodError):
6060
6161class MethodAuthorizationError (MethodError ):
6262 pass
63+
64+
65+ class ResourceError (TypedDict ):
66+ type : str
67+ sub_type : str
68+ message : str
69+ code : str
Original file line number Diff line number Diff line change 22
33from method .resource import Resource , RequestOpts
44from method .configuration import Configuration
5+ from method .errors import ResourceError
56from method .resources .Verification import VerificationResource
67
78
@@ -60,6 +61,7 @@ class Account(TypedDict):
6061 liability : Optional [AccountLiability ]
6162 clearing : Optional [AccountClearing ]
6263 capabilities : List [AccountCapabilitiesLiterals ]
64+ error : Optional [ResourceError ]
6365 created_at : str
6466 updated_at : str
6567 metadata : Optional [Dict [str , Any ]]
Original file line number Diff line number Diff line change 22
33from method .resource import Resource , RequestOpts
44from method .configuration import Configuration
5+ from method .errors import ResourceError
56
67
78EntityTypesLiterals = Literal [
@@ -76,6 +77,7 @@ class Entity(TypedDict):
7677 capabilities : List [EntityCapabilitiesLiterals ]
7778 address : EntityAddress
7879 status : EntityStatusesLiterals
80+ error : Optional [ResourceError ]
7981 metadata : Optional [Dict [str , Any ]]
8082 created_at : str
8183 updated_at : str
Original file line number Diff line number Diff line change 22
33from method .resource import Resource , RequestOpts
44from method .configuration import Configuration
5+ from method .errors import ResourceError
56
67
78PaymentStatusesLiterals = Literal [
1819 'hold' ,
1920 'pending' ,
2021 'requested' ,
21- 'received' ,
22+ 'clearing' ,
23+ 'failed' ,
2224 'sent' ,
2325 'unknown'
2426]
@@ -37,7 +39,7 @@ class Payment(TypedDict):
3739 description : str
3840 status : PaymentStatusesLiterals
3941 fund_status : PaymentFundStatusesLiterals
40- error : Optional [str ]
42+ error : Optional [ResourceError ]
4143 metadata : Optional [Dict [str , Any ]]
4244 estimated_completion_date : Optional [str ]
4345 type : PaymentTypesLiterals
Original file line number Diff line number Diff line change 22
33from method .resource import Resource
44from method .configuration import Configuration
5+ from method .errors import ResourceError
56
67
78VerificationStatusesLiterals = Literal [
@@ -25,6 +26,7 @@ class Verification(TypedDict):
2526 id : str
2627 status : VerificationStatusesLiterals
2728 type : VerificationTypesLiterals
29+ error : Optional [ResourceError ]
2830 initiated_at : str
2931 pending_at : str
3032 verified_at : str
Original file line number Diff line number Diff line change 22
33setup (
44 name = 'method-python' ,
5- version = '0.0.13 ' ,
5+ version = '0.0.14 ' ,
66 description = 'Python library for the Method API' ,
77 author = 'Marco del Carmen' ,
88 author_email = 'marco@mdelcarmen.me' ,
You can’t perform that action at this time.
0 commit comments