@@ -57,7 +57,7 @@ def send(self, request, **kwargs):
57
57
data = response .json ()
58
58
if isinstance (data , dict ) and 'actionCode' in data :
59
59
del data ['actionCode' ]
60
- response ._content = json .dumps (data ).encode ('utf-8' )
60
+ response ._content = json .dumps (humps . decamelize ( data ) ).encode ('utf-8' )
61
61
except json .JSONDecodeError :
62
62
pass
63
63
return response
@@ -121,7 +121,7 @@ def track(self, user_id, action, payload=None, path=None):
121
121
params = params )
122
122
response .raise_for_status ()
123
123
124
- return humps . decamelize ( response .json () )
124
+ return response .json ()
125
125
except requests .exceptions .RequestException as e :
126
126
raise ApiException (str (e ), path ) from e
127
127
@@ -151,7 +151,7 @@ def get_action(self, user_id, action, idempotency_key, path=None):
151
151
params = params )
152
152
response .raise_for_status ()
153
153
154
- return humps . decamelize ( response .json () )
154
+ return response .json ()
155
155
except requests .exceptions .RequestException as e :
156
156
raise ApiException (str (e ), path ) from e
157
157
@@ -183,7 +183,7 @@ def get_user(self, user_id, redirect_url=None, path=None):
183
183
params = params )
184
184
response .raise_for_status ()
185
185
186
- return humps . decamelize ( response .json () )
186
+ return response .json ()
187
187
except requests .exceptions .RequestException as e :
188
188
raise ApiException (str (e ), path ) from e
189
189
@@ -201,7 +201,7 @@ def delete_user(self, user_id):
201
201
timeout = self .timeout
202
202
)
203
203
response .raise_for_status ()
204
- return humps . decamelize ( response .json () )
204
+ return response .json ()
205
205
except requests .exceptions .RequestException as e :
206
206
raise ApiException (str (e ), path ) from e
207
207
@@ -222,7 +222,7 @@ def delete_authenticator(self, user_id: str, user_authenticator_id: str) -> Dict
222
222
timeout = self .timeout
223
223
)
224
224
response .raise_for_status ()
225
- return humps . decamelize ( response .json () )
225
+ return response .json ()
226
226
except requests .exceptions .RequestException as e :
227
227
raise ApiException (str (e ), path ) from e
228
228
@@ -241,7 +241,7 @@ def update_user(self, user_id, data):
241
241
242
242
response .raise_for_status ()
243
243
244
- return humps . decamelize ( response .json () )
244
+ return response .json ()
245
245
246
246
def enroll_verified_authenticator (self , user_id , authenticator_payload , path = None ):
247
247
"""Enrols an authenticator like a phone number for SMS on behalf of the user
@@ -268,7 +268,7 @@ def enroll_verified_authenticator(self, user_id, authenticator_payload, path=No
268
268
timeout = timeout ,
269
269
params = params )
270
270
response .raise_for_status ()
271
- return humps . decamelize ( response .json () )
271
+ return response .json ()
272
272
except requests .exceptions .RequestException as e :
273
273
raise ApiException (str (e ), path ) from e
274
274
@@ -289,7 +289,7 @@ def validate_challenge(self, token: str, user_id: Optional[str] = None, action:
289
289
timeout = self .timeout
290
290
)
291
291
292
- response_data = humps . decamelize ( response .json () )
292
+ response_data = response .json ()
293
293
294
294
return response_data
295
295
except requests .exceptions .RequestException as e :
0 commit comments