openmeter 1.0.0b143__py3-none-any.whl → 1.0.0b145__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openmeter might be problematic. Click here for more details.

@@ -28,6 +28,7 @@ from ..._operations._operations import (
28
28
  build_create_grant_request,
29
29
  build_create_meter_request,
30
30
  build_create_notification_channel_request,
31
+ build_create_notification_event_request,
31
32
  build_create_notification_rule_request,
32
33
  build_create_portal_token_request,
33
34
  build_delete_entitlement_request,
@@ -62,8 +63,10 @@ from ..._operations._operations import (
62
63
  build_list_portal_tokens_request,
63
64
  build_list_subject_entitlements_request,
64
65
  build_list_subjects_request,
66
+ build_override_entitlement_request,
65
67
  build_query_meter_request,
66
68
  build_query_portal_meter_request,
69
+ build_receive_svix_operational_event_request,
67
70
  build_reset_entitlement_usage_request,
68
71
  build_update_notification_channel_request,
69
72
  build_update_notification_rule_request,
@@ -3205,6 +3208,232 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
3205
3208
  if cls:
3206
3209
  return cls(pipeline_response, None, {}) # type: ignore
3207
3210
 
3211
+ @overload
3212
+ async def override_entitlement(
3213
+ self,
3214
+ subject_id_or_key: str,
3215
+ entitlement_id_or_feature_key: str,
3216
+ body: JSON,
3217
+ *,
3218
+ content_type: str = "application/json",
3219
+ **kwargs: Any
3220
+ ) -> JSON:
3221
+ """Override an entitlement.
3222
+
3223
+ Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes
3224
+ the previous entitlement for the provided subject-feature pair. If the previous entitlement is
3225
+ already deleted or otherwise doesnt exist, the override will fail.
3226
+
3227
+ This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require
3228
+ a new entitlement to be created with zero downtime.
3229
+
3230
+ :param subject_id_or_key: A unique identifier for a subject. Required.
3231
+ :type subject_id_or_key: str
3232
+ :param entitlement_id_or_feature_key: The id of the entitlement or the key of the feature.
3233
+ Required.
3234
+ :type entitlement_id_or_feature_key: str
3235
+ :param body: The entitlement to create. Required.
3236
+ :type body: JSON
3237
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
3238
+ Default value is "application/json".
3239
+ :paramtype content_type: str
3240
+ :return: JSON object
3241
+ :rtype: JSON
3242
+ :raises ~azure.core.exceptions.HttpResponseError:
3243
+
3244
+ Example:
3245
+ .. code-block:: python
3246
+
3247
+ # JSON input template you can fill out and use as your body input.
3248
+ body = {}
3249
+
3250
+ # response body for status code(s): 409
3251
+ response == {
3252
+ "detail": "str", # A human-readable explanation specific to this occurrence
3253
+ of the problem. Required.
3254
+ "status": 0, # The HTTP status code generated by the origin server for this
3255
+ occurrence of the problem. Required.
3256
+ "title": "str", # A a short, human-readable summary of the problem type.
3257
+ Required.
3258
+ "type": "str", # Type contains a URI that identifies the problem type.
3259
+ Required.
3260
+ "extensions": {
3261
+ "conflictingEntityId": "str" # The id of the conflicting entity.
3262
+ Required.
3263
+ },
3264
+ "instance": "str" # Optional. A URI reference that identifies the specific
3265
+ occurrence of the problem.
3266
+ }
3267
+ """
3268
+
3269
+ @overload
3270
+ async def override_entitlement(
3271
+ self,
3272
+ subject_id_or_key: str,
3273
+ entitlement_id_or_feature_key: str,
3274
+ body: IO[bytes],
3275
+ *,
3276
+ content_type: str = "application/json",
3277
+ **kwargs: Any
3278
+ ) -> JSON:
3279
+ """Override an entitlement.
3280
+
3281
+ Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes
3282
+ the previous entitlement for the provided subject-feature pair. If the previous entitlement is
3283
+ already deleted or otherwise doesnt exist, the override will fail.
3284
+
3285
+ This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require
3286
+ a new entitlement to be created with zero downtime.
3287
+
3288
+ :param subject_id_or_key: A unique identifier for a subject. Required.
3289
+ :type subject_id_or_key: str
3290
+ :param entitlement_id_or_feature_key: The id of the entitlement or the key of the feature.
3291
+ Required.
3292
+ :type entitlement_id_or_feature_key: str
3293
+ :param body: The entitlement to create. Required.
3294
+ :type body: IO[bytes]
3295
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
3296
+ Default value is "application/json".
3297
+ :paramtype content_type: str
3298
+ :return: JSON object
3299
+ :rtype: JSON
3300
+ :raises ~azure.core.exceptions.HttpResponseError:
3301
+
3302
+ Example:
3303
+ .. code-block:: python
3304
+
3305
+ # response body for status code(s): 409
3306
+ response == {
3307
+ "detail": "str", # A human-readable explanation specific to this occurrence
3308
+ of the problem. Required.
3309
+ "status": 0, # The HTTP status code generated by the origin server for this
3310
+ occurrence of the problem. Required.
3311
+ "title": "str", # A a short, human-readable summary of the problem type.
3312
+ Required.
3313
+ "type": "str", # Type contains a URI that identifies the problem type.
3314
+ Required.
3315
+ "extensions": {
3316
+ "conflictingEntityId": "str" # The id of the conflicting entity.
3317
+ Required.
3318
+ },
3319
+ "instance": "str" # Optional. A URI reference that identifies the specific
3320
+ occurrence of the problem.
3321
+ }
3322
+ """
3323
+
3324
+ @distributed_trace_async
3325
+ async def override_entitlement(
3326
+ self, subject_id_or_key: str, entitlement_id_or_feature_key: str, body: Union[JSON, IO[bytes]], **kwargs: Any
3327
+ ) -> JSON:
3328
+ """Override an entitlement.
3329
+
3330
+ Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes
3331
+ the previous entitlement for the provided subject-feature pair. If the previous entitlement is
3332
+ already deleted or otherwise doesnt exist, the override will fail.
3333
+
3334
+ This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require
3335
+ a new entitlement to be created with zero downtime.
3336
+
3337
+ :param subject_id_or_key: A unique identifier for a subject. Required.
3338
+ :type subject_id_or_key: str
3339
+ :param entitlement_id_or_feature_key: The id of the entitlement or the key of the feature.
3340
+ Required.
3341
+ :type entitlement_id_or_feature_key: str
3342
+ :param body: The entitlement to create. Is either a JSON type or a IO[bytes] type. Required.
3343
+ :type body: JSON or IO[bytes]
3344
+ :return: JSON object
3345
+ :rtype: JSON
3346
+ :raises ~azure.core.exceptions.HttpResponseError:
3347
+
3348
+ Example:
3349
+ .. code-block:: python
3350
+
3351
+ # JSON input template you can fill out and use as your body input.
3352
+ body = {}
3353
+
3354
+ # response body for status code(s): 409
3355
+ response == {
3356
+ "detail": "str", # A human-readable explanation specific to this occurrence
3357
+ of the problem. Required.
3358
+ "status": 0, # The HTTP status code generated by the origin server for this
3359
+ occurrence of the problem. Required.
3360
+ "title": "str", # A a short, human-readable summary of the problem type.
3361
+ Required.
3362
+ "type": "str", # Type contains a URI that identifies the problem type.
3363
+ Required.
3364
+ "extensions": {
3365
+ "conflictingEntityId": "str" # The id of the conflicting entity.
3366
+ Required.
3367
+ },
3368
+ "instance": "str" # Optional. A URI reference that identifies the specific
3369
+ occurrence of the problem.
3370
+ }
3371
+ """
3372
+ error_map = {
3373
+ 409: ResourceExistsError,
3374
+ 304: ResourceNotModifiedError,
3375
+ 400: HttpResponseError,
3376
+ 401: lambda response: ClientAuthenticationError(response=response),
3377
+ 404: lambda response: ResourceNotFoundError(response=response),
3378
+ 501: HttpResponseError,
3379
+ }
3380
+ error_map.update(kwargs.pop("error_map", {}) or {})
3381
+
3382
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
3383
+ _params = kwargs.pop("params", {}) or {}
3384
+
3385
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
3386
+ cls: ClsType[JSON] = kwargs.pop("cls", None)
3387
+
3388
+ content_type = content_type or "application/json"
3389
+ _json = None
3390
+ _content = None
3391
+ if isinstance(body, (IOBase, bytes)):
3392
+ _content = body
3393
+ else:
3394
+ _json = body
3395
+
3396
+ _request = build_override_entitlement_request(
3397
+ subject_id_or_key=subject_id_or_key,
3398
+ entitlement_id_or_feature_key=entitlement_id_or_feature_key,
3399
+ content_type=content_type,
3400
+ json=_json,
3401
+ content=_content,
3402
+ headers=_headers,
3403
+ params=_params,
3404
+ )
3405
+ _request.url = self._client.format_url(_request.url)
3406
+
3407
+ _stream = False
3408
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
3409
+ _request, stream=_stream, **kwargs
3410
+ )
3411
+
3412
+ response = pipeline_response.http_response
3413
+
3414
+ if response.status_code not in [201, 409]:
3415
+ if _stream:
3416
+ await response.read() # Load the body in memory and close the socket
3417
+ map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
3418
+ raise HttpResponseError(response=response)
3419
+
3420
+ if response.status_code == 201:
3421
+ if response.content:
3422
+ deserialized = response.json()
3423
+ else:
3424
+ deserialized = None
3425
+
3426
+ if response.status_code == 409:
3427
+ if response.content:
3428
+ deserialized = response.json()
3429
+ else:
3430
+ deserialized = None
3431
+
3432
+ if cls:
3433
+ return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore
3434
+
3435
+ return cast(JSON, deserialized) # type: ignore
3436
+
3208
3437
  @distributed_trace_async
3209
3438
  async def list_entitlement_grants(
3210
3439
  self,
@@ -5387,15 +5616,19 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
5387
5616
  notification channel. Required. "WEBHOOK"
5388
5617
  },
5389
5618
  "state": "str", # Required. Known values
5390
- are: "SUCCESS", "FAILED", and "SENDING".
5391
- "updatedAt": "2020-02-20 00:00:00" #
5619
+ are: "SUCCESS", "FAILED", "SENDING", and "PENDING".
5620
+ "updatedAt": "2020-02-20 00:00:00", #
5392
5621
  Required.
5622
+ "reason": "str" # Optional. The delivery
5623
+ status of the notification event. Required.
5393
5624
  }
5394
5625
  ],
5395
5626
  "id": "str", # A unique identifier for the notification
5396
5627
  event. Required.
5397
5628
  "payload": {},
5398
- "rule": {}
5629
+ "rule": {},
5630
+ "type": "str" # The type of the notification event.
5631
+ Required. "entitlements.balance.threshold"
5399
5632
  }
5400
5633
  ],
5401
5634
  "page": 0, # Current page number. Required.
@@ -5454,6 +5687,197 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
5454
5687
 
5455
5688
  return cast(JSON, deserialized) # type: ignore
5456
5689
 
5690
+ @overload
5691
+ async def create_notification_event(
5692
+ self, body: JSON, *, content_type: str = "application/json", **kwargs: Any
5693
+ ) -> JSON:
5694
+ """Create a notification event.
5695
+
5696
+ Create a new notification event.
5697
+
5698
+ :param body: The notification event to create. Required.
5699
+ :type body: JSON
5700
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
5701
+ Default value is "application/json".
5702
+ :paramtype content_type: str
5703
+ :return: JSON object
5704
+ :rtype: JSON
5705
+ :raises ~azure.core.exceptions.HttpResponseError:
5706
+
5707
+ Example:
5708
+ .. code-block:: python
5709
+
5710
+ # JSON input template you can fill out and use as your body input.
5711
+ body = {
5712
+ "payload": {},
5713
+ "ruleId": "str", # Required.
5714
+ "type": "str" # The type of the notification event. Required.
5715
+ "entitlements.balance.threshold"
5716
+ }
5717
+
5718
+ # response body for status code(s): 409
5719
+ response == {
5720
+ "detail": "str", # A human-readable explanation specific to this occurrence
5721
+ of the problem. Required.
5722
+ "status": 0, # The HTTP status code generated by the origin server for this
5723
+ occurrence of the problem. Required.
5724
+ "title": "str", # A a short, human-readable summary of the problem type.
5725
+ Required.
5726
+ "type": "str", # Type contains a URI that identifies the problem type.
5727
+ Required.
5728
+ "extensions": {
5729
+ "conflictingEntityId": "str" # The id of the conflicting entity.
5730
+ Required.
5731
+ },
5732
+ "instance": "str" # Optional. A URI reference that identifies the specific
5733
+ occurrence of the problem.
5734
+ }
5735
+ """
5736
+
5737
+ @overload
5738
+ async def create_notification_event(
5739
+ self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
5740
+ ) -> JSON:
5741
+ """Create a notification event.
5742
+
5743
+ Create a new notification event.
5744
+
5745
+ :param body: The notification event to create. Required.
5746
+ :type body: IO[bytes]
5747
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
5748
+ Default value is "application/json".
5749
+ :paramtype content_type: str
5750
+ :return: JSON object
5751
+ :rtype: JSON
5752
+ :raises ~azure.core.exceptions.HttpResponseError:
5753
+
5754
+ Example:
5755
+ .. code-block:: python
5756
+
5757
+ # response body for status code(s): 409
5758
+ response == {
5759
+ "detail": "str", # A human-readable explanation specific to this occurrence
5760
+ of the problem. Required.
5761
+ "status": 0, # The HTTP status code generated by the origin server for this
5762
+ occurrence of the problem. Required.
5763
+ "title": "str", # A a short, human-readable summary of the problem type.
5764
+ Required.
5765
+ "type": "str", # Type contains a URI that identifies the problem type.
5766
+ Required.
5767
+ "extensions": {
5768
+ "conflictingEntityId": "str" # The id of the conflicting entity.
5769
+ Required.
5770
+ },
5771
+ "instance": "str" # Optional. A URI reference that identifies the specific
5772
+ occurrence of the problem.
5773
+ }
5774
+ """
5775
+
5776
+ @distributed_trace_async
5777
+ async def create_notification_event(self, body: Union[JSON, IO[bytes]], **kwargs: Any) -> JSON:
5778
+ """Create a notification event.
5779
+
5780
+ Create a new notification event.
5781
+
5782
+ :param body: The notification event to create. Is either a JSON type or a IO[bytes] type.
5783
+ Required.
5784
+ :type body: JSON or IO[bytes]
5785
+ :return: JSON object
5786
+ :rtype: JSON
5787
+ :raises ~azure.core.exceptions.HttpResponseError:
5788
+
5789
+ Example:
5790
+ .. code-block:: python
5791
+
5792
+ # JSON input template you can fill out and use as your body input.
5793
+ body = {
5794
+ "payload": {},
5795
+ "ruleId": "str", # Required.
5796
+ "type": "str" # The type of the notification event. Required.
5797
+ "entitlements.balance.threshold"
5798
+ }
5799
+
5800
+ # response body for status code(s): 409
5801
+ response == {
5802
+ "detail": "str", # A human-readable explanation specific to this occurrence
5803
+ of the problem. Required.
5804
+ "status": 0, # The HTTP status code generated by the origin server for this
5805
+ occurrence of the problem. Required.
5806
+ "title": "str", # A a short, human-readable summary of the problem type.
5807
+ Required.
5808
+ "type": "str", # Type contains a URI that identifies the problem type.
5809
+ Required.
5810
+ "extensions": {
5811
+ "conflictingEntityId": "str" # The id of the conflicting entity.
5812
+ Required.
5813
+ },
5814
+ "instance": "str" # Optional. A URI reference that identifies the specific
5815
+ occurrence of the problem.
5816
+ }
5817
+ """
5818
+ error_map = {
5819
+ 404: ResourceNotFoundError,
5820
+ 409: ResourceExistsError,
5821
+ 304: ResourceNotModifiedError,
5822
+ 400: HttpResponseError,
5823
+ 401: lambda response: ClientAuthenticationError(response=response),
5824
+ 501: HttpResponseError,
5825
+ }
5826
+ error_map.update(kwargs.pop("error_map", {}) or {})
5827
+
5828
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
5829
+ _params = kwargs.pop("params", {}) or {}
5830
+
5831
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
5832
+ cls: ClsType[JSON] = kwargs.pop("cls", None)
5833
+
5834
+ content_type = content_type or "application/json"
5835
+ _json = None
5836
+ _content = None
5837
+ if isinstance(body, (IOBase, bytes)):
5838
+ _content = body
5839
+ else:
5840
+ _json = body
5841
+
5842
+ _request = build_create_notification_event_request(
5843
+ content_type=content_type,
5844
+ json=_json,
5845
+ content=_content,
5846
+ headers=_headers,
5847
+ params=_params,
5848
+ )
5849
+ _request.url = self._client.format_url(_request.url)
5850
+
5851
+ _stream = False
5852
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
5853
+ _request, stream=_stream, **kwargs
5854
+ )
5855
+
5856
+ response = pipeline_response.http_response
5857
+
5858
+ if response.status_code not in [201, 409]:
5859
+ if _stream:
5860
+ await response.read() # Load the body in memory and close the socket
5861
+ map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
5862
+ raise HttpResponseError(response=response)
5863
+
5864
+ if response.status_code == 201:
5865
+ if response.content:
5866
+ deserialized = response.json()
5867
+ else:
5868
+ deserialized = None
5869
+
5870
+ if response.status_code == 409:
5871
+ if response.content:
5872
+ deserialized = response.json()
5873
+ else:
5874
+ deserialized = None
5875
+
5876
+ if cls:
5877
+ return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore
5878
+
5879
+ return cast(JSON, deserialized) # type: ignore
5880
+
5457
5881
  @distributed_trace_async
5458
5882
  async def get_notification_event(self, event_id: str, **kwargs: Any) -> JSON:
5459
5883
  """Get notification event.
@@ -5508,3 +5932,132 @@ class ClientOperationsMixin(ClientMixinABC): # pylint: disable=too-many-public-
5508
5932
  return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore
5509
5933
 
5510
5934
  return cast(JSON, deserialized) # type: ignore
5935
+
5936
+ @overload
5937
+ async def receive_svix_operational_event( # pylint: disable=inconsistent-return-statements
5938
+ self, body: JSON, *, content_type: str = "application/json", **kwargs: Any
5939
+ ) -> None:
5940
+ # pylint: disable=line-too-long
5941
+ """Receive Svix operational events.
5942
+
5943
+ Callback endpoint used by Svix to notify about operational events.
5944
+
5945
+ :param body: The operational event. Required.
5946
+ :type body: JSON
5947
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
5948
+ Default value is "application/json".
5949
+ :paramtype content_type: str
5950
+ :return: None
5951
+ :rtype: None
5952
+ :raises ~azure.core.exceptions.HttpResponseError:
5953
+
5954
+ Example:
5955
+ .. code-block:: python
5956
+
5957
+ # JSON input template you can fill out and use as your body input.
5958
+ body = {
5959
+ "data": {
5960
+ "str": {} # Dictionary of :code:`<any>`. Required.
5961
+ },
5962
+ "type": "str" # Required. Known values are: "endpoint.created",
5963
+ "endpoint.deleted", "endpoint.disabled", "endpoint.updated",
5964
+ "message.attempt.exhausted", "message.attempt.failing", and
5965
+ "message.attempt.recovered".
5966
+ }
5967
+ """
5968
+
5969
+ @overload
5970
+ async def receive_svix_operational_event( # pylint: disable=inconsistent-return-statements
5971
+ self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
5972
+ ) -> None:
5973
+ """Receive Svix operational events.
5974
+
5975
+ Callback endpoint used by Svix to notify about operational events.
5976
+
5977
+ :param body: The operational event. Required.
5978
+ :type body: IO[bytes]
5979
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
5980
+ Default value is "application/json".
5981
+ :paramtype content_type: str
5982
+ :return: None
5983
+ :rtype: None
5984
+ :raises ~azure.core.exceptions.HttpResponseError:
5985
+ """
5986
+
5987
+ @distributed_trace_async
5988
+ async def receive_svix_operational_event( # pylint: disable=inconsistent-return-statements
5989
+ self, body: Union[JSON, IO[bytes]], **kwargs: Any
5990
+ ) -> None:
5991
+ # pylint: disable=line-too-long
5992
+ """Receive Svix operational events.
5993
+
5994
+ Callback endpoint used by Svix to notify about operational events.
5995
+
5996
+ :param body: The operational event. Is either a JSON type or a IO[bytes] type. Required.
5997
+ :type body: JSON or IO[bytes]
5998
+ :return: None
5999
+ :rtype: None
6000
+ :raises ~azure.core.exceptions.HttpResponseError:
6001
+
6002
+ Example:
6003
+ .. code-block:: python
6004
+
6005
+ # JSON input template you can fill out and use as your body input.
6006
+ body = {
6007
+ "data": {
6008
+ "str": {} # Dictionary of :code:`<any>`. Required.
6009
+ },
6010
+ "type": "str" # Required. Known values are: "endpoint.created",
6011
+ "endpoint.deleted", "endpoint.disabled", "endpoint.updated",
6012
+ "message.attempt.exhausted", "message.attempt.failing", and
6013
+ "message.attempt.recovered".
6014
+ }
6015
+ """
6016
+ error_map = {
6017
+ 404: ResourceNotFoundError,
6018
+ 409: ResourceExistsError,
6019
+ 304: ResourceNotModifiedError,
6020
+ 400: HttpResponseError,
6021
+ 401: lambda response: ClientAuthenticationError(response=response),
6022
+ 501: HttpResponseError,
6023
+ }
6024
+ error_map.update(kwargs.pop("error_map", {}) or {})
6025
+
6026
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
6027
+ _params = kwargs.pop("params", {}) or {}
6028
+
6029
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
6030
+ cls: ClsType[None] = kwargs.pop("cls", None)
6031
+
6032
+ content_type = content_type or "application/json"
6033
+ _json = None
6034
+ _content = None
6035
+ if isinstance(body, (IOBase, bytes)):
6036
+ _content = body
6037
+ else:
6038
+ _json = body
6039
+
6040
+ _request = build_receive_svix_operational_event_request(
6041
+ content_type=content_type,
6042
+ json=_json,
6043
+ content=_content,
6044
+ headers=_headers,
6045
+ params=_params,
6046
+ )
6047
+ _request.url = self._client.format_url(_request.url)
6048
+
6049
+ _stream = False
6050
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
6051
+ _request, stream=_stream, **kwargs
6052
+ )
6053
+
6054
+ response = pipeline_response.http_response
6055
+
6056
+ if response.status_code not in [204]:
6057
+ if _stream:
6058
+ await response.read() # Load the body in memory and close the socket
6059
+ map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
6060
+ raise HttpResponseError(response=response)
6061
+
6062
+ if cls:
6063
+ return cls(pipeline_response, None, {}) # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openmeter
3
- Version: 1.0.0b143
3
+ Version: 1.0.0b145
4
4
  Summary: Client for OpenMeter: Real-Time and Scalable Usage Metering
5
5
  Home-page: https://openmeter.io
6
6
  License: Apache-2.0
@@ -2,7 +2,7 @@ openmeter/__init__.py,sha256=7klRT7LAGDqBcZsl7LGZrgrABVwyncgVUlidfaPiJm4,702
2
2
  openmeter/_client.py,sha256=TIXIPi_UVO-d5BHra7_xIiKmLfZBrmc4L_Xq2gxi4lM,3982
3
3
  openmeter/_configuration.py,sha256=CIdMxPaIXwDLaCsnvmdmHTfplV_cRp24101RJCEWtes,1807
4
4
  openmeter/_operations/__init__.py,sha256=GVYObnS1nT-wbN8ONRxlAiH6NBeAXlOBi7olGJE9niA,682
5
- openmeter/_operations/_operations.py,sha256=Q6eslSlYM-NiONKeTBuJQCMhlsgKfd_aY65YHl0DjRw,280586
5
+ openmeter/_operations/_operations.py,sha256=Jdb0Mj3fSeK9wqYGdPyRbCCXAY2mc6Eor80093nours,306005
6
6
  openmeter/_operations/_patch.py,sha256=ptSL-JhY1fbGT9Cw2cUkPF1TPz5qVgXwTMMT5h41XUc,4874
7
7
  openmeter/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
8
8
  openmeter/_serialization.py,sha256=vQIv-wuCQabtiIq2DXOr7-InGADqxlXTGNEKv9OlDPs,78873
@@ -11,11 +11,11 @@ openmeter/aio/__init__.py,sha256=7klRT7LAGDqBcZsl7LGZrgrABVwyncgVUlidfaPiJm4,702
11
11
  openmeter/aio/_client.py,sha256=O0VpMfw42UuTN_ZTIL3dw944PviLIrBBCSp7UaexyKQ,4100
12
12
  openmeter/aio/_configuration.py,sha256=NtT-cxQWkt8q_FvMfwqqil18Tt9zJmWGVju4U9s7OsE,1817
13
13
  openmeter/aio/_operations/__init__.py,sha256=GVYObnS1nT-wbN8ONRxlAiH6NBeAXlOBi7olGJE9niA,682
14
- openmeter/aio/_operations/_operations.py,sha256=eeuzpWI0CiMt-SHDqS0ynFUqzl6-rCj4lE8AhZOZe1w,241116
14
+ openmeter/aio/_operations/_operations.py,sha256=YyreouzU_-vaZoKx8X_vXw_53wj0Fe18BoZFcRWLnoQ,264300
15
15
  openmeter/aio/_operations/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
16
16
  openmeter/aio/_patch.py,sha256=P7PMm3Gbjlk56lI6B_Ra43hSW5qGMEmN3cNYGH5uZ3s,674
17
17
  openmeter/aio/_vendor.py,sha256=CFsSbXOBydpg_f_uciu6Pe6cvF__6ofZ6KFEhkaMMEU,862
18
18
  openmeter/py.typed,sha256=dcrsqJrcYfTX-ckLFJMTaj6mD8aDe2u0tkQG-ZYxnEg,26
19
- openmeter-1.0.0b143.dist-info/METADATA,sha256=pJjTbP43s2LxIEPP_9t2M7yPEXdty7qFoZlLCenRrLk,2258
20
- openmeter-1.0.0b143.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
- openmeter-1.0.0b143.dist-info/RECORD,,
19
+ openmeter-1.0.0b145.dist-info/METADATA,sha256=NM6o30beJ1HLE0iDVwTInzugqKv5BaLLnGP5wY1BCew,2258
20
+ openmeter-1.0.0b145.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
+ openmeter-1.0.0b145.dist-info/RECORD,,