File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,10 @@ class ThinEvent:
111
111
"""
112
112
created : str
113
113
"""
114
+ Livemode indicates if the event is from a production(true) or test(false) account.
115
+ """
116
+ livemode : bool
117
+ """
114
118
Time at which the object was created.
115
119
"""
116
120
context : Optional [str ] = None
@@ -132,6 +136,7 @@ def __init__(self, payload: str) -> None:
132
136
self .id = parsed ["id" ]
133
137
self .type = parsed ["type" ]
134
138
self .created = parsed ["created" ]
139
+ self .livemode = parsed .get ("livemode" )
135
140
self .context = parsed .get ("context" )
136
141
if parsed .get ("related_object" ):
137
142
self .related_object = RelatedObject (parsed ["related_object" ])
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ def v2_payload_no_data(self):
18
18
"id" : "evt_234" ,
19
19
"object" : "v2.core.event" ,
20
20
"type" : "financial_account.balance.opened" ,
21
+ "livemode" : True ,
21
22
"created" : "2022-02-15T00:27:45.330Z" ,
22
23
"related_object" : {
23
24
"id" : "fa_123" ,
@@ -39,6 +40,7 @@ def v2_payload_with_data(self):
39
40
"id" : "evt_234" ,
40
41
"object" : "v2.core.event" ,
41
42
"type" : "financial_account.balance.opened" ,
43
+ "livemode" : False ,
42
44
"created" : "2022-02-15T00:27:45.330Z" ,
43
45
"related_object" : {
44
46
"id" : "fa_123" ,
You can’t perform that action at this time.
0 commit comments