Unified-python-sdk 0.61.0__py3-none-any.whl → 0.61.2__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.
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "Unified-python-sdk"
6
- __version__: str = "0.61.0"
6
+ __version__: str = "0.61.2"
7
7
  __openapi_doc_version__: str = "1.0"
8
- __gen_version__: str = "2.950.2"
9
- __user_agent__: str = "speakeasy-sdk/python 0.61.0 2.950.2 1.0 Unified-python-sdk"
8
+ __gen_version__: str = "2.950.13"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.61.2 2.950.13 1.0 Unified-python-sdk"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -10,6 +10,194 @@ from unified_python_sdk.utils.unmarshal_json_response import unmarshal_json_resp
10
10
 
11
11
 
12
12
  class Call(BaseSDK):
13
+ def create_uc_call(
14
+ self,
15
+ *,
16
+ request: Union[
17
+ operations.CreateUcCallRequest, operations.CreateUcCallRequestTypedDict
18
+ ],
19
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
20
+ server_url: Optional[str] = None,
21
+ timeout_ms: Optional[int] = None,
22
+ http_headers: Optional[Mapping[str, str]] = None,
23
+ ) -> operations.CreateUcCallResponse:
24
+ r"""Create a call
25
+
26
+ Creates a UcCall. Provide the unified UcCall fields in the request body; they are mapped to the provider's API. Returns the created UcCall.
27
+
28
+ :param request: The request object to send.
29
+ :param retries: Override the default retry configuration for this method
30
+ :param server_url: Override the default server URL for this method
31
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
32
+ :param http_headers: Additional headers to set or replace on requests.
33
+ """
34
+ base_url = None
35
+ url_variables = None
36
+ if timeout_ms is None:
37
+ timeout_ms = self.sdk_configuration.timeout_ms
38
+
39
+ if server_url is not None:
40
+ base_url = server_url
41
+ else:
42
+ base_url = self._get_url(base_url, url_variables)
43
+
44
+ if not isinstance(request, BaseModel):
45
+ request = utils.unmarshal(request, operations.CreateUcCallRequest)
46
+ request = cast(operations.CreateUcCallRequest, request)
47
+
48
+ req = self._build_request(
49
+ method="POST",
50
+ path="/uc/{connection_id}/call",
51
+ base_url=base_url,
52
+ url_variables=url_variables,
53
+ request=request,
54
+ request_body_required=True,
55
+ request_has_path_params=True,
56
+ request_has_query_params=True,
57
+ user_agent_header="user-agent",
58
+ accept_header_value="application/json",
59
+ http_headers=http_headers,
60
+ security=self.sdk_configuration.security,
61
+ get_serialized_body=lambda: utils.serialize_request_body(
62
+ request.uc_call, False, False, "json", shared.UcCall
63
+ ),
64
+ allow_empty_value=None,
65
+ timeout_ms=timeout_ms,
66
+ )
67
+
68
+ if retries == UNSET:
69
+ if self.sdk_configuration.retry_config is not UNSET:
70
+ retries = self.sdk_configuration.retry_config
71
+
72
+ retry_config = None
73
+ if isinstance(retries, utils.RetryConfig):
74
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
75
+
76
+ http_res = self.do_request(
77
+ hook_ctx=HookContext(
78
+ config=self.sdk_configuration,
79
+ base_url=base_url or "",
80
+ operation_id="createUcCall",
81
+ oauth2_scopes=None,
82
+ security_source=self.sdk_configuration.security,
83
+ tags=["uc", "call"],
84
+ extensions=None,
85
+ ),
86
+ request=req,
87
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
88
+ retry_config=retry_config,
89
+ )
90
+
91
+ if utils.match_response(http_res, "200", "application/json"):
92
+ return operations.CreateUcCallResponse(
93
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
94
+ status_code=http_res.status_code,
95
+ content_type=http_res.headers.get("Content-Type") or "",
96
+ raw_response=http_res,
97
+ )
98
+ if utils.match_response(http_res, "4XX", "*"):
99
+ http_res_text = utils.stream_to_text(http_res)
100
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
101
+ if utils.match_response(http_res, "5XX", "*"):
102
+ http_res_text = utils.stream_to_text(http_res)
103
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
104
+
105
+ raise errors.SDKError("Unexpected response received", http_res)
106
+
107
+ async def create_uc_call_async(
108
+ self,
109
+ *,
110
+ request: Union[
111
+ operations.CreateUcCallRequest, operations.CreateUcCallRequestTypedDict
112
+ ],
113
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
114
+ server_url: Optional[str] = None,
115
+ timeout_ms: Optional[int] = None,
116
+ http_headers: Optional[Mapping[str, str]] = None,
117
+ ) -> operations.CreateUcCallResponse:
118
+ r"""Create a call
119
+
120
+ Creates a UcCall. Provide the unified UcCall fields in the request body; they are mapped to the provider's API. Returns the created UcCall.
121
+
122
+ :param request: The request object to send.
123
+ :param retries: Override the default retry configuration for this method
124
+ :param server_url: Override the default server URL for this method
125
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
126
+ :param http_headers: Additional headers to set or replace on requests.
127
+ """
128
+ base_url = None
129
+ url_variables = None
130
+ if timeout_ms is None:
131
+ timeout_ms = self.sdk_configuration.timeout_ms
132
+
133
+ if server_url is not None:
134
+ base_url = server_url
135
+ else:
136
+ base_url = self._get_url(base_url, url_variables)
137
+
138
+ if not isinstance(request, BaseModel):
139
+ request = utils.unmarshal(request, operations.CreateUcCallRequest)
140
+ request = cast(operations.CreateUcCallRequest, request)
141
+
142
+ req = self._build_request_async(
143
+ method="POST",
144
+ path="/uc/{connection_id}/call",
145
+ base_url=base_url,
146
+ url_variables=url_variables,
147
+ request=request,
148
+ request_body_required=True,
149
+ request_has_path_params=True,
150
+ request_has_query_params=True,
151
+ user_agent_header="user-agent",
152
+ accept_header_value="application/json",
153
+ http_headers=http_headers,
154
+ security=self.sdk_configuration.security,
155
+ get_serialized_body=lambda: utils.serialize_request_body(
156
+ request.uc_call, False, False, "json", shared.UcCall
157
+ ),
158
+ allow_empty_value=None,
159
+ timeout_ms=timeout_ms,
160
+ )
161
+
162
+ if retries == UNSET:
163
+ if self.sdk_configuration.retry_config is not UNSET:
164
+ retries = self.sdk_configuration.retry_config
165
+
166
+ retry_config = None
167
+ if isinstance(retries, utils.RetryConfig):
168
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
169
+
170
+ http_res = await self.do_request_async(
171
+ hook_ctx=HookContext(
172
+ config=self.sdk_configuration,
173
+ base_url=base_url or "",
174
+ operation_id="createUcCall",
175
+ oauth2_scopes=None,
176
+ security_source=self.sdk_configuration.security,
177
+ tags=["uc", "call"],
178
+ extensions=None,
179
+ ),
180
+ request=req,
181
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
182
+ retry_config=retry_config,
183
+ )
184
+
185
+ if utils.match_response(http_res, "200", "application/json"):
186
+ return operations.CreateUcCallResponse(
187
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
188
+ status_code=http_res.status_code,
189
+ content_type=http_res.headers.get("Content-Type") or "",
190
+ raw_response=http_res,
191
+ )
192
+ if utils.match_response(http_res, "4XX", "*"):
193
+ http_res_text = await utils.stream_to_text_async(http_res)
194
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
195
+ if utils.match_response(http_res, "5XX", "*"):
196
+ http_res_text = await utils.stream_to_text_async(http_res)
197
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
198
+
199
+ raise errors.SDKError("Unexpected response received", http_res)
200
+
13
201
  def get_uc_call(
14
202
  self,
15
203
  *,
@@ -377,3 +565,379 @@ class Call(BaseSDK):
377
565
  raise errors.SDKError("API error occurred", http_res, http_res_text)
378
566
 
379
567
  raise errors.SDKError("Unexpected response received", http_res)
568
+
569
+ def patch_uc_call(
570
+ self,
571
+ *,
572
+ request: Union[
573
+ operations.PatchUcCallRequest, operations.PatchUcCallRequestTypedDict
574
+ ],
575
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
576
+ server_url: Optional[str] = None,
577
+ timeout_ms: Optional[int] = None,
578
+ http_headers: Optional[Mapping[str, str]] = None,
579
+ ) -> operations.PatchUcCallResponse:
580
+ r"""Update a call
581
+
582
+ Updates the UcCall identified by `id`. Provide the unified UcCall fields to change in the request body.
583
+
584
+ :param request: The request object to send.
585
+ :param retries: Override the default retry configuration for this method
586
+ :param server_url: Override the default server URL for this method
587
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
588
+ :param http_headers: Additional headers to set or replace on requests.
589
+ """
590
+ base_url = None
591
+ url_variables = None
592
+ if timeout_ms is None:
593
+ timeout_ms = self.sdk_configuration.timeout_ms
594
+
595
+ if server_url is not None:
596
+ base_url = server_url
597
+ else:
598
+ base_url = self._get_url(base_url, url_variables)
599
+
600
+ if not isinstance(request, BaseModel):
601
+ request = utils.unmarshal(request, operations.PatchUcCallRequest)
602
+ request = cast(operations.PatchUcCallRequest, request)
603
+
604
+ req = self._build_request(
605
+ method="PATCH",
606
+ path="/uc/{connection_id}/call/{id}",
607
+ base_url=base_url,
608
+ url_variables=url_variables,
609
+ request=request,
610
+ request_body_required=True,
611
+ request_has_path_params=True,
612
+ request_has_query_params=True,
613
+ user_agent_header="user-agent",
614
+ accept_header_value="application/json",
615
+ http_headers=http_headers,
616
+ security=self.sdk_configuration.security,
617
+ get_serialized_body=lambda: utils.serialize_request_body(
618
+ request.uc_call, False, False, "json", shared.UcCall
619
+ ),
620
+ allow_empty_value=None,
621
+ timeout_ms=timeout_ms,
622
+ )
623
+
624
+ if retries == UNSET:
625
+ if self.sdk_configuration.retry_config is not UNSET:
626
+ retries = self.sdk_configuration.retry_config
627
+
628
+ retry_config = None
629
+ if isinstance(retries, utils.RetryConfig):
630
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
631
+
632
+ http_res = self.do_request(
633
+ hook_ctx=HookContext(
634
+ config=self.sdk_configuration,
635
+ base_url=base_url or "",
636
+ operation_id="patchUcCall",
637
+ oauth2_scopes=None,
638
+ security_source=self.sdk_configuration.security,
639
+ tags=["uc", "call"],
640
+ extensions=None,
641
+ ),
642
+ request=req,
643
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
644
+ retry_config=retry_config,
645
+ )
646
+
647
+ if utils.match_response(http_res, "200", "application/json"):
648
+ return operations.PatchUcCallResponse(
649
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
650
+ status_code=http_res.status_code,
651
+ content_type=http_res.headers.get("Content-Type") or "",
652
+ raw_response=http_res,
653
+ )
654
+ if utils.match_response(http_res, "4XX", "*"):
655
+ http_res_text = utils.stream_to_text(http_res)
656
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
657
+ if utils.match_response(http_res, "5XX", "*"):
658
+ http_res_text = utils.stream_to_text(http_res)
659
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
660
+
661
+ raise errors.SDKError("Unexpected response received", http_res)
662
+
663
+ async def patch_uc_call_async(
664
+ self,
665
+ *,
666
+ request: Union[
667
+ operations.PatchUcCallRequest, operations.PatchUcCallRequestTypedDict
668
+ ],
669
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
670
+ server_url: Optional[str] = None,
671
+ timeout_ms: Optional[int] = None,
672
+ http_headers: Optional[Mapping[str, str]] = None,
673
+ ) -> operations.PatchUcCallResponse:
674
+ r"""Update a call
675
+
676
+ Updates the UcCall identified by `id`. Provide the unified UcCall fields to change in the request body.
677
+
678
+ :param request: The request object to send.
679
+ :param retries: Override the default retry configuration for this method
680
+ :param server_url: Override the default server URL for this method
681
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
682
+ :param http_headers: Additional headers to set or replace on requests.
683
+ """
684
+ base_url = None
685
+ url_variables = None
686
+ if timeout_ms is None:
687
+ timeout_ms = self.sdk_configuration.timeout_ms
688
+
689
+ if server_url is not None:
690
+ base_url = server_url
691
+ else:
692
+ base_url = self._get_url(base_url, url_variables)
693
+
694
+ if not isinstance(request, BaseModel):
695
+ request = utils.unmarshal(request, operations.PatchUcCallRequest)
696
+ request = cast(operations.PatchUcCallRequest, request)
697
+
698
+ req = self._build_request_async(
699
+ method="PATCH",
700
+ path="/uc/{connection_id}/call/{id}",
701
+ base_url=base_url,
702
+ url_variables=url_variables,
703
+ request=request,
704
+ request_body_required=True,
705
+ request_has_path_params=True,
706
+ request_has_query_params=True,
707
+ user_agent_header="user-agent",
708
+ accept_header_value="application/json",
709
+ http_headers=http_headers,
710
+ security=self.sdk_configuration.security,
711
+ get_serialized_body=lambda: utils.serialize_request_body(
712
+ request.uc_call, False, False, "json", shared.UcCall
713
+ ),
714
+ allow_empty_value=None,
715
+ timeout_ms=timeout_ms,
716
+ )
717
+
718
+ if retries == UNSET:
719
+ if self.sdk_configuration.retry_config is not UNSET:
720
+ retries = self.sdk_configuration.retry_config
721
+
722
+ retry_config = None
723
+ if isinstance(retries, utils.RetryConfig):
724
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
725
+
726
+ http_res = await self.do_request_async(
727
+ hook_ctx=HookContext(
728
+ config=self.sdk_configuration,
729
+ base_url=base_url or "",
730
+ operation_id="patchUcCall",
731
+ oauth2_scopes=None,
732
+ security_source=self.sdk_configuration.security,
733
+ tags=["uc", "call"],
734
+ extensions=None,
735
+ ),
736
+ request=req,
737
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
738
+ retry_config=retry_config,
739
+ )
740
+
741
+ if utils.match_response(http_res, "200", "application/json"):
742
+ return operations.PatchUcCallResponse(
743
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
744
+ status_code=http_res.status_code,
745
+ content_type=http_res.headers.get("Content-Type") or "",
746
+ raw_response=http_res,
747
+ )
748
+ if utils.match_response(http_res, "4XX", "*"):
749
+ http_res_text = await utils.stream_to_text_async(http_res)
750
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
751
+ if utils.match_response(http_res, "5XX", "*"):
752
+ http_res_text = await utils.stream_to_text_async(http_res)
753
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
754
+
755
+ raise errors.SDKError("Unexpected response received", http_res)
756
+
757
+ def update_uc_call(
758
+ self,
759
+ *,
760
+ request: Union[
761
+ operations.UpdateUcCallRequest, operations.UpdateUcCallRequestTypedDict
762
+ ],
763
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
764
+ server_url: Optional[str] = None,
765
+ timeout_ms: Optional[int] = None,
766
+ http_headers: Optional[Mapping[str, str]] = None,
767
+ ) -> operations.UpdateUcCallResponse:
768
+ r"""Update a call
769
+
770
+ Updates the UcCall identified by `id`. Provide the unified UcCall fields to change in the request body.
771
+
772
+ :param request: The request object to send.
773
+ :param retries: Override the default retry configuration for this method
774
+ :param server_url: Override the default server URL for this method
775
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
776
+ :param http_headers: Additional headers to set or replace on requests.
777
+ """
778
+ base_url = None
779
+ url_variables = None
780
+ if timeout_ms is None:
781
+ timeout_ms = self.sdk_configuration.timeout_ms
782
+
783
+ if server_url is not None:
784
+ base_url = server_url
785
+ else:
786
+ base_url = self._get_url(base_url, url_variables)
787
+
788
+ if not isinstance(request, BaseModel):
789
+ request = utils.unmarshal(request, operations.UpdateUcCallRequest)
790
+ request = cast(operations.UpdateUcCallRequest, request)
791
+
792
+ req = self._build_request(
793
+ method="PUT",
794
+ path="/uc/{connection_id}/call/{id}",
795
+ base_url=base_url,
796
+ url_variables=url_variables,
797
+ request=request,
798
+ request_body_required=True,
799
+ request_has_path_params=True,
800
+ request_has_query_params=True,
801
+ user_agent_header="user-agent",
802
+ accept_header_value="application/json",
803
+ http_headers=http_headers,
804
+ security=self.sdk_configuration.security,
805
+ get_serialized_body=lambda: utils.serialize_request_body(
806
+ request.uc_call, False, False, "json", shared.UcCall
807
+ ),
808
+ allow_empty_value=None,
809
+ timeout_ms=timeout_ms,
810
+ )
811
+
812
+ if retries == UNSET:
813
+ if self.sdk_configuration.retry_config is not UNSET:
814
+ retries = self.sdk_configuration.retry_config
815
+
816
+ retry_config = None
817
+ if isinstance(retries, utils.RetryConfig):
818
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
819
+
820
+ http_res = self.do_request(
821
+ hook_ctx=HookContext(
822
+ config=self.sdk_configuration,
823
+ base_url=base_url or "",
824
+ operation_id="updateUcCall",
825
+ oauth2_scopes=None,
826
+ security_source=self.sdk_configuration.security,
827
+ tags=["uc", "call"],
828
+ extensions=None,
829
+ ),
830
+ request=req,
831
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
832
+ retry_config=retry_config,
833
+ )
834
+
835
+ if utils.match_response(http_res, "200", "application/json"):
836
+ return operations.UpdateUcCallResponse(
837
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
838
+ status_code=http_res.status_code,
839
+ content_type=http_res.headers.get("Content-Type") or "",
840
+ raw_response=http_res,
841
+ )
842
+ if utils.match_response(http_res, "4XX", "*"):
843
+ http_res_text = utils.stream_to_text(http_res)
844
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
845
+ if utils.match_response(http_res, "5XX", "*"):
846
+ http_res_text = utils.stream_to_text(http_res)
847
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
848
+
849
+ raise errors.SDKError("Unexpected response received", http_res)
850
+
851
+ async def update_uc_call_async(
852
+ self,
853
+ *,
854
+ request: Union[
855
+ operations.UpdateUcCallRequest, operations.UpdateUcCallRequestTypedDict
856
+ ],
857
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
858
+ server_url: Optional[str] = None,
859
+ timeout_ms: Optional[int] = None,
860
+ http_headers: Optional[Mapping[str, str]] = None,
861
+ ) -> operations.UpdateUcCallResponse:
862
+ r"""Update a call
863
+
864
+ Updates the UcCall identified by `id`. Provide the unified UcCall fields to change in the request body.
865
+
866
+ :param request: The request object to send.
867
+ :param retries: Override the default retry configuration for this method
868
+ :param server_url: Override the default server URL for this method
869
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
870
+ :param http_headers: Additional headers to set or replace on requests.
871
+ """
872
+ base_url = None
873
+ url_variables = None
874
+ if timeout_ms is None:
875
+ timeout_ms = self.sdk_configuration.timeout_ms
876
+
877
+ if server_url is not None:
878
+ base_url = server_url
879
+ else:
880
+ base_url = self._get_url(base_url, url_variables)
881
+
882
+ if not isinstance(request, BaseModel):
883
+ request = utils.unmarshal(request, operations.UpdateUcCallRequest)
884
+ request = cast(operations.UpdateUcCallRequest, request)
885
+
886
+ req = self._build_request_async(
887
+ method="PUT",
888
+ path="/uc/{connection_id}/call/{id}",
889
+ base_url=base_url,
890
+ url_variables=url_variables,
891
+ request=request,
892
+ request_body_required=True,
893
+ request_has_path_params=True,
894
+ request_has_query_params=True,
895
+ user_agent_header="user-agent",
896
+ accept_header_value="application/json",
897
+ http_headers=http_headers,
898
+ security=self.sdk_configuration.security,
899
+ get_serialized_body=lambda: utils.serialize_request_body(
900
+ request.uc_call, False, False, "json", shared.UcCall
901
+ ),
902
+ allow_empty_value=None,
903
+ timeout_ms=timeout_ms,
904
+ )
905
+
906
+ if retries == UNSET:
907
+ if self.sdk_configuration.retry_config is not UNSET:
908
+ retries = self.sdk_configuration.retry_config
909
+
910
+ retry_config = None
911
+ if isinstance(retries, utils.RetryConfig):
912
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
913
+
914
+ http_res = await self.do_request_async(
915
+ hook_ctx=HookContext(
916
+ config=self.sdk_configuration,
917
+ base_url=base_url or "",
918
+ operation_id="updateUcCall",
919
+ oauth2_scopes=None,
920
+ security_source=self.sdk_configuration.security,
921
+ tags=["uc", "call"],
922
+ extensions=None,
923
+ ),
924
+ request=req,
925
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
926
+ retry_config=retry_config,
927
+ )
928
+
929
+ if utils.match_response(http_res, "200", "application/json"):
930
+ return operations.UpdateUcCallResponse(
931
+ uc_call=unmarshal_json_response(Optional[shared.UcCall], http_res),
932
+ status_code=http_res.status_code,
933
+ content_type=http_res.headers.get("Content-Type") or "",
934
+ raw_response=http_res,
935
+ )
936
+ if utils.match_response(http_res, "4XX", "*"):
937
+ http_res_text = await utils.stream_to_text_async(http_res)
938
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
939
+ if utils.match_response(http_res, "5XX", "*"):
940
+ http_res_text = await utils.stream_to_text_async(http_res)
941
+ raise errors.SDKError("API error occurred", http_res, http_res_text)
942
+
943
+ raise errors.SDKError("Unexpected response received", http_res)