|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Products |
| 5 | +
|
| 6 | + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: v3 |
| 9 | + Generated by: https://openapi-generator.tech |
| 10 | +""" |
| 11 | + |
| 12 | + |
| 13 | +from __future__ import absolute_import |
| 14 | + |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +# python 2 and python 3 compatibility library |
| 18 | +import six |
| 19 | + |
| 20 | +from hubspot.crm.products.api_client import ApiClient |
| 21 | +from hubspot.crm.products.exceptions import ApiTypeError, ApiValueError # noqa: F401 |
| 22 | + |
| 23 | + |
| 24 | +class GDPRApi(object): |
| 25 | + """NOTE: This class is auto generated by OpenAPI Generator |
| 26 | + Ref: https://openapi-generator.tech |
| 27 | +
|
| 28 | + Do not edit the class manually. |
| 29 | + """ |
| 30 | + |
| 31 | + def __init__(self, api_client=None): |
| 32 | + if api_client is None: |
| 33 | + api_client = ApiClient() |
| 34 | + self.api_client = api_client |
| 35 | + |
| 36 | + def purge(self, public_gdpr_delete_input, **kwargs): # noqa: E501 |
| 37 | + """GDPR DELETE # noqa: E501 |
| 38 | +
|
| 39 | + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 |
| 40 | + This method makes a synchronous HTTP request by default. To make an |
| 41 | + asynchronous HTTP request, please pass async_req=True |
| 42 | +
|
| 43 | + >>> thread = api.purge(public_gdpr_delete_input, async_req=True) |
| 44 | + >>> result = thread.get() |
| 45 | +
|
| 46 | + :param public_gdpr_delete_input: (required) |
| 47 | + :type public_gdpr_delete_input: PublicGdprDeleteInput |
| 48 | + :param async_req: Whether to execute the request asynchronously. |
| 49 | + :type async_req: bool, optional |
| 50 | + :param _preload_content: if False, the urllib3.HTTPResponse object will |
| 51 | + be returned without reading/decoding response |
| 52 | + data. Default is True. |
| 53 | + :type _preload_content: bool, optional |
| 54 | + :param _request_timeout: timeout setting for this request. If one |
| 55 | + number provided, it will be total request |
| 56 | + timeout. It can also be a pair (tuple) of |
| 57 | + (connection, read) timeouts. |
| 58 | + :return: Returns the result object. |
| 59 | + If the method is called asynchronously, |
| 60 | + returns the request thread. |
| 61 | + :rtype: None |
| 62 | + """ |
| 63 | + kwargs["_return_http_data_only"] = True |
| 64 | + return self.purge_with_http_info(public_gdpr_delete_input, **kwargs) # noqa: E501 |
| 65 | + |
| 66 | + def purge_with_http_info(self, public_gdpr_delete_input, **kwargs): # noqa: E501 |
| 67 | + """GDPR DELETE # noqa: E501 |
| 68 | +
|
| 69 | + Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future. # noqa: E501 |
| 70 | + This method makes a synchronous HTTP request by default. To make an |
| 71 | + asynchronous HTTP request, please pass async_req=True |
| 72 | +
|
| 73 | + >>> thread = api.purge_with_http_info(public_gdpr_delete_input, async_req=True) |
| 74 | + >>> result = thread.get() |
| 75 | +
|
| 76 | + :param public_gdpr_delete_input: (required) |
| 77 | + :type public_gdpr_delete_input: PublicGdprDeleteInput |
| 78 | + :param async_req: Whether to execute the request asynchronously. |
| 79 | + :type async_req: bool, optional |
| 80 | + :param _return_http_data_only: response data without head status code |
| 81 | + and headers |
| 82 | + :type _return_http_data_only: bool, optional |
| 83 | + :param _preload_content: if False, the urllib3.HTTPResponse object will |
| 84 | + be returned without reading/decoding response |
| 85 | + data. Default is True. |
| 86 | + :type _preload_content: bool, optional |
| 87 | + :param _request_timeout: timeout setting for this request. If one |
| 88 | + number provided, it will be total request |
| 89 | + timeout. It can also be a pair (tuple) of |
| 90 | + (connection, read) timeouts. |
| 91 | + :param _request_auth: set to override the auth_settings for an a single |
| 92 | + request; this effectively ignores the authentication |
| 93 | + in the spec for a single request. |
| 94 | + :type _request_auth: dict, optional |
| 95 | + :type _content_type: string, optional: force content-type for the request |
| 96 | + :return: Returns the result object. |
| 97 | + If the method is called asynchronously, |
| 98 | + returns the request thread. |
| 99 | + :rtype: None |
| 100 | + """ |
| 101 | + |
| 102 | + local_var_params = locals() |
| 103 | + |
| 104 | + all_params = ["public_gdpr_delete_input"] |
| 105 | + all_params.extend(["async_req", "_return_http_data_only", "_preload_content", "_request_timeout", "_request_auth", "_content_type", "_headers"]) |
| 106 | + |
| 107 | + for key, val in six.iteritems(local_var_params["kwargs"]): |
| 108 | + if key not in all_params: |
| 109 | + raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method purge" % key) |
| 110 | + local_var_params[key] = val |
| 111 | + del local_var_params["kwargs"] |
| 112 | + # verify the required parameter 'public_gdpr_delete_input' is set |
| 113 | + if self.api_client.client_side_validation and local_var_params.get("public_gdpr_delete_input") is None: # noqa: E501 |
| 114 | + raise ApiValueError("Missing the required parameter `public_gdpr_delete_input` when calling `purge`") # noqa: E501 |
| 115 | + |
| 116 | + collection_formats = {} |
| 117 | + |
| 118 | + path_params = {} |
| 119 | + |
| 120 | + query_params = [] |
| 121 | + |
| 122 | + header_params = dict(local_var_params.get("_headers", {})) |
| 123 | + |
| 124 | + form_params = [] |
| 125 | + local_var_files = {} |
| 126 | + |
| 127 | + body_params = None |
| 128 | + if "public_gdpr_delete_input" in local_var_params: |
| 129 | + body_params = local_var_params["public_gdpr_delete_input"] |
| 130 | + # HTTP header `Accept` |
| 131 | + header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) # noqa: E501 |
| 132 | + |
| 133 | + # HTTP header `Content-Type` |
| 134 | + content_types_list = local_var_params.get("_content_type", self.api_client.select_header_content_type(["application/json"], "POST", body_params)) # noqa: E501 |
| 135 | + if content_types_list: |
| 136 | + header_params["Content-Type"] = content_types_list |
| 137 | + |
| 138 | + # Authentication setting |
| 139 | + auth_settings = ["oauth2"] # noqa: E501 |
| 140 | + |
| 141 | + response_types_map = {} |
| 142 | + |
| 143 | + return self.api_client.call_api( |
| 144 | + "/crm/v3/objects/products/gdpr-delete", |
| 145 | + "POST", |
| 146 | + path_params, |
| 147 | + query_params, |
| 148 | + header_params, |
| 149 | + body=body_params, |
| 150 | + post_params=form_params, |
| 151 | + files=local_var_files, |
| 152 | + response_types_map=response_types_map, |
| 153 | + auth_settings=auth_settings, |
| 154 | + async_req=local_var_params.get("async_req"), |
| 155 | + _return_http_data_only=local_var_params.get("_return_http_data_only"), # noqa: E501 |
| 156 | + _preload_content=local_var_params.get("_preload_content", True), |
| 157 | + _request_timeout=local_var_params.get("_request_timeout"), |
| 158 | + collection_formats=collection_formats, |
| 159 | + _request_auth=local_var_params.get("_request_auth"), |
| 160 | + ) |
0 commit comments