@@ -229,11 +229,11 @@ def log(self: RunClient) -> LogClient:
229
229
)
230
230
231
231
def charge (
232
- self : RunClient ,
233
- event_name : str ,
234
- count : int | None = None ,
235
- idempotency_key : str | None = None ,
236
- ) -> dict :
232
+ self : RunClient ,
233
+ event_name : str ,
234
+ count : int | None = None ,
235
+ idempotency_key : str | None = None ,
236
+ ) -> dict :
237
237
"""Charge for an event of a Pay-Per-Event Actor run.
238
238
239
239
TODO: docs url
@@ -251,10 +251,12 @@ def charge(
251
251
'idempotency-key' : idempotency_key or f'{ self .resource_id } -{ event_name } -{ int (time .time () * 1000 )} ' ,
252
252
'content-type' : 'application/json' ,
253
253
},
254
- data = json .dumps ({
255
- 'eventName' : event_name ,
256
- 'count' : count or 1 ,
257
- })
254
+ data = json .dumps (
255
+ {
256
+ 'eventName' : event_name ,
257
+ 'count' : count or 1 ,
258
+ }
259
+ ),
258
260
)
259
261
return response .json ()
260
262
@@ -474,11 +476,11 @@ def log(self: RunClientAsync) -> LogClientAsync:
474
476
)
475
477
476
478
async def charge (
477
- self : RunClient ,
478
- event_name : str ,
479
- count : int | None = None ,
480
- idempotency_key : str | None = None ,
481
- ) -> dict :
479
+ self : RunClient ,
480
+ event_name : str ,
481
+ count : int | None = None ,
482
+ idempotency_key : str | None = None ,
483
+ ) -> dict :
482
484
"""Charge for an event of a Pay-Per-Event Actor run.
483
485
484
486
TODO: docs url
@@ -496,9 +498,11 @@ async def charge(
496
498
'idempotency-key' : idempotency_key or f'{ self .resource_id } -{ event_name } -{ int (time .time () * 1000 )} ' ,
497
499
'content-type' : 'application/json' ,
498
500
},
499
- data = json .dumps ({
500
- 'eventName' : event_name ,
501
- 'count' : count or 1 ,
502
- })
501
+ data = json .dumps (
502
+ {
503
+ 'eventName' : event_name ,
504
+ 'count' : count or 1 ,
505
+ }
506
+ ),
503
507
)
504
508
return response .json ()
0 commit comments