|
22 | 22 | @author Jonathan Wenger <[email protected]> |
23 | 23 | @copyright 2022 Avalara, Inc. |
24 | 24 | @license https://www.apache.org/licenses/LICENSE-2.0 |
25 | | -@version 25.10.0 |
| 25 | +@version 25.10.1 |
26 | 26 | @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK |
27 | 27 | """ |
28 | 28 |
|
@@ -61,7 +61,7 @@ def __verify_api_client(self,api_client): |
61 | 61 |
|
62 | 62 | def __set_configuration(self, api_client): |
63 | 63 | self.__verify_api_client(api_client) |
64 | | - api_client.set_sdk_version("25.10.0") |
| 64 | + api_client.set_sdk_version("25.10.1") |
65 | 65 | self.api_client = api_client |
66 | 66 |
|
67 | 67 | self.create_and_send_w9_form_email_endpoint = _Endpoint( |
@@ -348,6 +348,77 @@ def __set_configuration(self, api_client): |
348 | 348 | required_scopes='', |
349 | 349 | microservice='A1099' |
350 | 350 | ) |
| 351 | + self.get_w9_form_pdf_endpoint = _Endpoint( |
| 352 | + settings={ |
| 353 | + 'response_type': None, |
| 354 | + 'auth': [ |
| 355 | + 'bearer' |
| 356 | + ], |
| 357 | + 'endpoint_path': '/w9/forms/{id}/pdf', |
| 358 | + 'operation_id': 'get_w9_form_pdf', |
| 359 | + 'http_method': 'GET', |
| 360 | + 'servers': None, |
| 361 | + }, |
| 362 | + params_map={ |
| 363 | + 'all': [ |
| 364 | + 'id', |
| 365 | + 'avalara_version', |
| 366 | + 'x_correlation_id', |
| 367 | + 'x_avalara_client', |
| 368 | + ], |
| 369 | + 'required': [ |
| 370 | + 'id', |
| 371 | + 'avalara_version', |
| 372 | + ], |
| 373 | + 'nullable': [ |
| 374 | + ], |
| 375 | + 'enum': [ |
| 376 | + ], |
| 377 | + 'validation': [ |
| 378 | + ] |
| 379 | + }, |
| 380 | + root_map={ |
| 381 | + 'validations': { |
| 382 | + }, |
| 383 | + 'allowed_values': { |
| 384 | + }, |
| 385 | + 'openapi_types': { |
| 386 | + 'id': |
| 387 | + (str,), |
| 388 | + 'avalara_version': |
| 389 | + (str,), |
| 390 | + 'x_correlation_id': |
| 391 | + (str,), |
| 392 | + 'x_avalara_client': |
| 393 | + (str,), |
| 394 | + }, |
| 395 | + 'attribute_map': { |
| 396 | + 'id': 'id', |
| 397 | + 'avalara_version': 'avalara-version', |
| 398 | + 'x_correlation_id': 'X-Correlation-Id', |
| 399 | + 'x_avalara_client': 'X-Avalara-Client', |
| 400 | + }, |
| 401 | + 'location_map': { |
| 402 | + 'id': 'path', |
| 403 | + 'avalara_version': 'header', |
| 404 | + 'x_correlation_id': 'header', |
| 405 | + 'x_avalara_client': 'header', |
| 406 | + }, |
| 407 | + 'collection_format_map': { |
| 408 | + } |
| 409 | + }, |
| 410 | + headers_map={ |
| 411 | + 'avalara-version': '2.0', |
| 412 | + 'accept': [ |
| 413 | + 'application/pdf', |
| 414 | + 'application/json' |
| 415 | + ], |
| 416 | + 'content_type': [], |
| 417 | + }, |
| 418 | + api_client=api_client, |
| 419 | + required_scopes='', |
| 420 | + microservice='A1099' |
| 421 | + ) |
351 | 422 | self.list_w9_forms_endpoint = _Endpoint( |
352 | 423 | settings={ |
353 | 424 | 'response_type': (PaginatedQueryResultModelW9FormBaseResponse,), |
@@ -952,6 +1023,78 @@ def get_w9_form( |
952 | 1023 | kwargs['avalara_version'] = avalara_version |
953 | 1024 | return self.get_w9_form_endpoint.call_with_http_info(**kwargs) |
954 | 1025 |
|
| 1026 | + @avalara_retry_oauth(max_retry_attempts=2) |
| 1027 | + def get_w9_form_pdf( |
| 1028 | + self, |
| 1029 | + id, |
| 1030 | + avalara_version, |
| 1031 | + **kwargs |
| 1032 | + ): |
| 1033 | + """Download the PDF for a W9/W4/W8 form. # noqa: E501 |
| 1034 | +
|
| 1035 | + Returns the PDF file for a W9/W4/W8 form. # noqa: E501 |
| 1036 | + This method makes a synchronous HTTP request by default. To make an |
| 1037 | + asynchronous HTTP request, please pass async_req=True |
| 1038 | +
|
| 1039 | + >>> thread = api.get_w9_form_pdf(id, avalara_version, async_req=True) |
| 1040 | + >>> result = thread.get() |
| 1041 | +
|
| 1042 | + Args: |
| 1043 | + id (str): Id of the form |
| 1044 | + avalara_version (str): API version |
| 1045 | +
|
| 1046 | + Keyword Args: |
| 1047 | + x_correlation_id (str): Unique correlation Id in a GUID format. [optional] |
| 1048 | + x_avalara_client (str): Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .. [optional] |
| 1049 | + _return_http_data_only (bool): response data without head status |
| 1050 | + code and headers. Default is True. |
| 1051 | + _preload_content (bool): if False, the urllib3.HTTPResponse object |
| 1052 | + will be returned without reading/decoding response data. |
| 1053 | + Default is True. |
| 1054 | + _request_timeout (int/float/tuple): timeout setting for this request. If |
| 1055 | + one number provided, it will be total request timeout. It can also |
| 1056 | + be a pair (tuple) of (connection, read) timeouts. |
| 1057 | + Default is None. |
| 1058 | + _check_input_type (bool): specifies if type checking |
| 1059 | + should be done one the data sent to the server. |
| 1060 | + Default is True. |
| 1061 | + _check_return_type (bool): specifies if type checking |
| 1062 | + should be done one the data received from the server. |
| 1063 | + Default is True. |
| 1064 | + _host_index (int/None): specifies the index of the server |
| 1065 | + that we want to use. |
| 1066 | + Default is read from the configuration. |
| 1067 | + async_req (bool): execute request asynchronously |
| 1068 | +
|
| 1069 | + Returns: |
| 1070 | + None |
| 1071 | + If the method is called asynchronously, returns the request |
| 1072 | + thread. |
| 1073 | + """ |
| 1074 | + self.__verify_api_client(self.api_client) |
| 1075 | + kwargs['async_req'] = kwargs.get( |
| 1076 | + 'async_req', False |
| 1077 | + ) |
| 1078 | + kwargs['_return_http_data_only'] = kwargs.get( |
| 1079 | + '_return_http_data_only', True |
| 1080 | + ) |
| 1081 | + kwargs['_preload_content'] = kwargs.get( |
| 1082 | + '_preload_content', True |
| 1083 | + ) |
| 1084 | + kwargs['_request_timeout'] = kwargs.get( |
| 1085 | + '_request_timeout', None |
| 1086 | + ) |
| 1087 | + kwargs['_check_input_type'] = kwargs.get( |
| 1088 | + '_check_input_type', True |
| 1089 | + ) |
| 1090 | + kwargs['_check_return_type'] = kwargs.get( |
| 1091 | + '_check_return_type', True |
| 1092 | + ) |
| 1093 | + kwargs['_host_index'] = kwargs.get('_host_index') |
| 1094 | + kwargs['id'] = id |
| 1095 | + kwargs['avalara_version'] = avalara_version |
| 1096 | + return self.get_w9_form_pdf_endpoint.call_with_http_info(**kwargs) |
| 1097 | + |
955 | 1098 | @avalara_retry_oauth(max_retry_attempts=2) |
956 | 1099 | def list_w9_forms( |
957 | 1100 | self, |
|
0 commit comments