Skip to content

Commit 289d0de

Browse files
Codegen: CrmObjects
1 parent 023bb9c commit 289d0de

File tree

103 files changed

+5243
-5102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+5243
-5102
lines changed

hubspot/crm/products/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# import apis into sdk package
2020
from hubspot.crm.products.api.basic_api import BasicApi
2121
from hubspot.crm.products.api.batch_api import BatchApi
22+
from hubspot.crm.products.api.gdpr_api import GDPRApi
2223
from hubspot.crm.products.api.public_object_api import PublicObjectApi
2324
from hubspot.crm.products.api.search_api import SearchApi
2425

@@ -53,6 +54,7 @@
5354
from hubspot.crm.products.models.paging import Paging
5455
from hubspot.crm.products.models.previous_page import PreviousPage
5556
from hubspot.crm.products.models.public_associations_for_object import PublicAssociationsForObject
57+
from hubspot.crm.products.models.public_gdpr_delete_input import PublicGdprDeleteInput
5658
from hubspot.crm.products.models.public_merge_input import PublicMergeInput
5759
from hubspot.crm.products.models.public_object_id import PublicObjectId
5860
from hubspot.crm.products.models.public_object_search_request import PublicObjectSearchRequest

hubspot/crm/products/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
# import apis into api package
66
from hubspot.crm.products.api.basic_api import BasicApi
77
from hubspot.crm.products.api.batch_api import BatchApi
8+
from hubspot.crm.products.api.gdpr_api import GDPRApi
89
from hubspot.crm.products.api.public_object_api import PublicObjectApi
910
from hubspot.crm.products.api.search_api import SearchApi

hubspot/crm/products/api/gdpr_api.py

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
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+
)

hubspot/crm/products/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from hubspot.crm.products.models.paging import Paging
3535
from hubspot.crm.products.models.previous_page import PreviousPage
3636
from hubspot.crm.products.models.public_associations_for_object import PublicAssociationsForObject
37+
from hubspot.crm.products.models.public_gdpr_delete_input import PublicGdprDeleteInput
3738
from hubspot.crm.products.models.public_merge_input import PublicMergeInput
3839
from hubspot.crm.products.models.public_object_id import PublicObjectId
3940
from hubspot.crm.products.models.public_object_search_request import PublicObjectSearchRequest

hubspot/crm/products/models/batch_read_input_simple_public_object_id.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,27 @@ class BatchReadInputSimplePublicObjectId(object):
3535
attribute_map (dict): The key is attribute name
3636
and the value is json key in definition.
3737
"""
38-
openapi_types = {"properties": "list[str]", "properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]"}
38+
openapi_types = {"properties_with_history": "list[str]", "id_property": "str", "inputs": "list[SimplePublicObjectId]", "properties": "list[str]"}
3939

40-
attribute_map = {"properties": "properties", "properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs"}
40+
attribute_map = {"properties_with_history": "propertiesWithHistory", "id_property": "idProperty", "inputs": "inputs", "properties": "properties"}
4141

42-
def __init__(self, properties=None, properties_with_history=None, id_property=None, inputs=None, local_vars_configuration=None): # noqa: E501
42+
def __init__(self, properties_with_history=None, id_property=None, inputs=None, properties=None, local_vars_configuration=None): # noqa: E501
4343
"""BatchReadInputSimplePublicObjectId - a model defined in OpenAPI""" # noqa: E501
4444
if local_vars_configuration is None:
4545
local_vars_configuration = Configuration.get_default_copy()
4646
self.local_vars_configuration = local_vars_configuration
4747

48-
self._properties = None
4948
self._properties_with_history = None
5049
self._id_property = None
5150
self._inputs = None
51+
self._properties = None
5252
self.discriminator = None
5353

54-
self.properties = properties
5554
self.properties_with_history = properties_with_history
5655
if id_property is not None:
5756
self.id_property = id_property
5857
self.inputs = inputs
59-
60-
@property
61-
def properties(self):
62-
"""Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
63-
64-
65-
:return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
66-
:rtype: list[str]
67-
"""
68-
return self._properties
69-
70-
@properties.setter
71-
def properties(self, properties):
72-
"""Sets the properties of this BatchReadInputSimplePublicObjectId.
73-
74-
75-
:param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
76-
:type properties: list[str]
77-
"""
78-
if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501
79-
raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501
80-
81-
self._properties = properties
58+
self.properties = properties
8259

8360
@property
8461
def properties_with_history(self):
@@ -147,6 +124,29 @@ def inputs(self, inputs):
147124

148125
self._inputs = inputs
149126

127+
@property
128+
def properties(self):
129+
"""Gets the properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
130+
131+
132+
:return: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
133+
:rtype: list[str]
134+
"""
135+
return self._properties
136+
137+
@properties.setter
138+
def properties(self, properties):
139+
"""Sets the properties of this BatchReadInputSimplePublicObjectId.
140+
141+
142+
:param properties: The properties of this BatchReadInputSimplePublicObjectId. # noqa: E501
143+
:type properties: list[str]
144+
"""
145+
if self.local_vars_configuration.client_side_validation and properties is None: # noqa: E501
146+
raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501
147+
148+
self._properties = properties
149+
150150
def to_dict(self, serialize=False):
151151
"""Returns the model properties as a dict"""
152152
result = {}

0 commit comments

Comments
 (0)