diff --git a/hubspot/webhooks/api/settings_api.py b/hubspot/webhooks/api/settings_api.py index 11759a9f..a82ba77a 100644 --- a/hubspot/webhooks/api/settings_api.py +++ b/hubspot/webhooks/api/settings_api.py @@ -34,15 +34,16 @@ def __init__(self, api_client=None): self.api_client = api_client def clear(self, app_id, **kwargs): # noqa: E501 - """clear # noqa: E501 + """Delete webhook settings # noqa: E501 + Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.clear(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -63,15 +64,16 @@ def clear(self, app_id, **kwargs): # noqa: E501 return self.clear_with_http_info(app_id, **kwargs) # noqa: E501 def clear_with_http_info(self, app_id, **kwargs): # noqa: E501 - """clear # noqa: E501 + """Delete webhook settings # noqa: E501 + Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.clear_with_http_info(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -153,15 +155,16 @@ def clear_with_http_info(self, app_id, **kwargs): # noqa: E501 ) def configure(self, app_id, settings_change_request, **kwargs): # noqa: E501 - """configure # noqa: E501 + """Update webhook settings # noqa: E501 + Update webhook settings for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.configure(app_id, settings_change_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param settings_change_request: (required) :type settings_change_request: SettingsChangeRequest @@ -184,15 +187,16 @@ def configure(self, app_id, settings_change_request, **kwargs): # noqa: E501 return self.configure_with_http_info(app_id, settings_change_request, **kwargs) # noqa: E501 def configure_with_http_info(self, app_id, settings_change_request, **kwargs): # noqa: E501 - """configure # noqa: E501 + """Update webhook settings # noqa: E501 + Update webhook settings for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.configure_with_http_info(app_id, settings_change_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param settings_change_request: (required) :type settings_change_request: SettingsChangeRequest @@ -288,15 +292,16 @@ def configure_with_http_info(self, app_id, settings_change_request, **kwargs): ) def get_all(self, app_id, **kwargs): # noqa: E501 - """get_all # noqa: E501 + """Read webhook settings # noqa: E501 + Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -317,15 +322,16 @@ def get_all(self, app_id, **kwargs): # noqa: E501 return self.get_all_with_http_info(app_id, **kwargs) # noqa: E501 def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501 - """get_all # noqa: E501 + """Read webhook settings # noqa: E501 + Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_with_http_info(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/hubspot/webhooks/api/subscriptions_api.py b/hubspot/webhooks/api/subscriptions_api.py index dc80feb5..22de413f 100644 --- a/hubspot/webhooks/api/subscriptions_api.py +++ b/hubspot/webhooks/api/subscriptions_api.py @@ -34,17 +34,18 @@ def __init__(self, api_client=None): self.api_client = api_client def archive(self, subscription_id, app_id, **kwargs): # noqa: E501 - """archive # noqa: E501 + """Delete event subscription # noqa: E501 + Delete an existing event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.archive(subscription_id, app_id, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -65,17 +66,18 @@ def archive(self, subscription_id, app_id, **kwargs): # noqa: E501 return self.archive_with_http_info(subscription_id, app_id, **kwargs) # noqa: E501 def archive_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E501 - """archive # noqa: E501 + """Delete event subscription # noqa: E501 + Delete an existing event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.archive_with_http_info(subscription_id, app_id, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -162,15 +164,16 @@ def archive_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E5 ) def create(self, app_id, subscription_create_request, **kwargs): # noqa: E501 - """create # noqa: E501 + """Create an event subscription # noqa: E501 + Create new event subscription for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create(app_id, subscription_create_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param subscription_create_request: (required) :type subscription_create_request: SubscriptionCreateRequest @@ -193,15 +196,16 @@ def create(self, app_id, subscription_create_request, **kwargs): # noqa: E501 return self.create_with_http_info(app_id, subscription_create_request, **kwargs) # noqa: E501 def create_with_http_info(self, app_id, subscription_create_request, **kwargs): # noqa: E501 - """create # noqa: E501 + """Create an event subscription # noqa: E501 + Create new event subscription for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_with_http_info(app_id, subscription_create_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param subscription_create_request: (required) :type subscription_create_request: SubscriptionCreateRequest @@ -297,15 +301,16 @@ def create_with_http_info(self, app_id, subscription_create_request, **kwargs): ) def get_all(self, app_id, **kwargs): # noqa: E501 - """get_all # noqa: E501 + """Read event subscriptions # noqa: E501 + Retrieve event subscriptions for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -326,15 +331,16 @@ def get_all(self, app_id, **kwargs): # noqa: E501 return self.get_all_with_http_info(app_id, **kwargs) # noqa: E501 def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501 - """get_all # noqa: E501 + """Read event subscriptions # noqa: E501 + Retrieve event subscriptions for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_with_http_info(app_id, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -418,17 +424,18 @@ def get_all_with_http_info(self, app_id, **kwargs): # noqa: E501 ) def get_by_id(self, subscription_id, app_id, **kwargs): # noqa: E501 - """get_by_id # noqa: E501 + """Read an event subscription # noqa: E501 + Retrieve a specific event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_by_id(subscription_id, app_id, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -449,17 +456,18 @@ def get_by_id(self, subscription_id, app_id, **kwargs): # noqa: E501 return self.get_by_id_with_http_info(subscription_id, app_id, **kwargs) # noqa: E501 def get_by_id_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: E501 - """get_by_id # noqa: E501 + """Read an event subscription # noqa: E501 + Retrieve a specific event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_by_id_with_http_info(subscription_id, app_id, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -548,17 +556,18 @@ def get_by_id_with_http_info(self, subscription_id, app_id, **kwargs): # noqa: ) def update(self, subscription_id, app_id, subscription_patch_request, **kwargs): # noqa: E501 - """update # noqa: E501 + """Update an event subscription # noqa: E501 + Update an existing event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update(subscription_id, app_id, subscription_patch_request, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param subscription_patch_request: (required) :type subscription_patch_request: SubscriptionPatchRequest @@ -581,17 +590,18 @@ def update(self, subscription_id, app_id, subscription_patch_request, **kwargs): return self.update_with_http_info(subscription_id, app_id, subscription_patch_request, **kwargs) # noqa: E501 def update_with_http_info(self, subscription_id, app_id, subscription_patch_request, **kwargs): # noqa: E501 - """update # noqa: E501 + """Update an event subscription # noqa: E501 + Update an existing event subscription by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_with_http_info(subscription_id, app_id, subscription_patch_request, async_req=True) >>> result = thread.get() - :param subscription_id: (required) + :param subscription_id: The ID of the event subscription. (required) :type subscription_id: int - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param subscription_patch_request: (required) :type subscription_patch_request: SubscriptionPatchRequest @@ -692,15 +702,16 @@ def update_with_http_info(self, subscription_id, app_id, subscription_patch_requ ) def update_batch(self, app_id, batch_input_subscription_batch_update_request, **kwargs): # noqa: E501 - """update_batch # noqa: E501 + """Batch create event subscriptions # noqa: E501 + Batch create event subscriptions for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_batch(app_id, batch_input_subscription_batch_update_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param batch_input_subscription_batch_update_request: (required) :type batch_input_subscription_batch_update_request: BatchInputSubscriptionBatchUpdateRequest @@ -723,15 +734,16 @@ def update_batch(self, app_id, batch_input_subscription_batch_update_request, ** return self.update_batch_with_http_info(app_id, batch_input_subscription_batch_update_request, **kwargs) # noqa: E501 def update_batch_with_http_info(self, app_id, batch_input_subscription_batch_update_request, **kwargs): # noqa: E501 - """update_batch # noqa: E501 + """Batch create event subscriptions # noqa: E501 + Batch create event subscriptions for the specified app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_batch_with_http_info(app_id, batch_input_subscription_batch_update_request, async_req=True) >>> result = thread.get() - :param app_id: (required) + :param app_id: The ID of the app. (required) :type app_id: int :param batch_input_subscription_batch_update_request: (required) :type batch_input_subscription_batch_update_request: BatchInputSubscriptionBatchUpdateRequest diff --git a/hubspot/webhooks/models/subscription_create_request.py b/hubspot/webhooks/models/subscription_create_request.py index 49ad67ce..8bfefcbb 100644 --- a/hubspot/webhooks/models/subscription_create_request.py +++ b/hubspot/webhooks/models/subscription_create_request.py @@ -35,27 +35,51 @@ class SubscriptionCreateRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"property_name": "str", "active": "bool", "event_type": "str"} + openapi_types = {"object_type_id": "str", "property_name": "str", "active": "bool", "event_type": "str"} - attribute_map = {"property_name": "propertyName", "active": "active", "event_type": "eventType"} + attribute_map = {"object_type_id": "objectTypeId", "property_name": "propertyName", "active": "active", "event_type": "eventType"} - def __init__(self, property_name=None, active=None, event_type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, object_type_id=None, property_name=None, active=None, event_type=None, local_vars_configuration=None): # noqa: E501 """SubscriptionCreateRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration + self._object_type_id = None self._property_name = None self._active = None self._event_type = None self.discriminator = None + if object_type_id is not None: + self.object_type_id = object_type_id if property_name is not None: self.property_name = property_name if active is not None: self.active = active self.event_type = event_type + @property + def object_type_id(self): + """Gets the object_type_id of this SubscriptionCreateRequest. # noqa: E501 + + + :return: The object_type_id of this SubscriptionCreateRequest. # noqa: E501 + :rtype: str + """ + return self._object_type_id + + @object_type_id.setter + def object_type_id(self, object_type_id): + """Sets the object_type_id of this SubscriptionCreateRequest. + + + :param object_type_id: The object_type_id of this SubscriptionCreateRequest. # noqa: E501 + :type object_type_id: str + """ + + self._object_type_id = object_type_id + @property def property_name(self): """Gets the property_name of this SubscriptionCreateRequest. # noqa: E501 @@ -166,6 +190,12 @@ def event_type(self, event_type): "deal.associationChange", "ticket.associationChange", "line_item.associationChange", + "object.propertyChange", + "object.creation", + "object.deletion", + "object.merge", + "object.restore", + "object.associationChange", ] # noqa: E501 if self.local_vars_configuration.client_side_validation and event_type not in allowed_values: # noqa: E501 raise ValueError("Invalid value for `event_type` ({0}), must be one of {1}".format(event_type, allowed_values)) # noqa: E501 diff --git a/hubspot/webhooks/models/subscription_response.py b/hubspot/webhooks/models/subscription_response.py index 25ecefb0..e8817f35 100644 --- a/hubspot/webhooks/models/subscription_response.py +++ b/hubspot/webhooks/models/subscription_response.py @@ -35,17 +35,18 @@ class SubscriptionResponse(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"created_at": "datetime", "property_name": "str", "active": "bool", "event_type": "str", "id": "str", "updated_at": "datetime"} + openapi_types = {"created_at": "datetime", "object_type_id": "str", "property_name": "str", "active": "bool", "event_type": "str", "id": "str", "updated_at": "datetime"} - attribute_map = {"created_at": "createdAt", "property_name": "propertyName", "active": "active", "event_type": "eventType", "id": "id", "updated_at": "updatedAt"} + attribute_map = {"created_at": "createdAt", "object_type_id": "objectTypeId", "property_name": "propertyName", "active": "active", "event_type": "eventType", "id": "id", "updated_at": "updatedAt"} - def __init__(self, created_at=None, property_name=None, active=None, event_type=None, id=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, created_at=None, object_type_id=None, property_name=None, active=None, event_type=None, id=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """SubscriptionResponse - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._created_at = None + self._object_type_id = None self._property_name = None self._active = None self._event_type = None @@ -54,6 +55,8 @@ def __init__(self, created_at=None, property_name=None, active=None, event_type= self.discriminator = None self.created_at = created_at + if object_type_id is not None: + self.object_type_id = object_type_id if property_name is not None: self.property_name = property_name self.active = active @@ -87,6 +90,27 @@ def created_at(self, created_at): self._created_at = created_at + @property + def object_type_id(self): + """Gets the object_type_id of this SubscriptionResponse. # noqa: E501 + + + :return: The object_type_id of this SubscriptionResponse. # noqa: E501 + :rtype: str + """ + return self._object_type_id + + @object_type_id.setter + def object_type_id(self, object_type_id): + """Sets the object_type_id of this SubscriptionResponse. + + + :param object_type_id: The object_type_id of this SubscriptionResponse. # noqa: E501 + :type object_type_id: str + """ + + self._object_type_id = object_type_id + @property def property_name(self): """Gets the property_name of this SubscriptionResponse. # noqa: E501 @@ -199,6 +223,12 @@ def event_type(self, event_type): "deal.associationChange", "ticket.associationChange", "line_item.associationChange", + "object.propertyChange", + "object.creation", + "object.deletion", + "object.merge", + "object.restore", + "object.associationChange", ] # noqa: E501 if self.local_vars_configuration.client_side_validation and event_type not in allowed_values: # noqa: E501 raise ValueError("Invalid value for `event_type` ({0}), must be one of {1}".format(event_type, allowed_values)) # noqa: E501 diff --git a/hubspot/webhooks/models/throttling_settings.py b/hubspot/webhooks/models/throttling_settings.py index 7f2fcc53..e327bf4f 100644 --- a/hubspot/webhooks/models/throttling_settings.py +++ b/hubspot/webhooks/models/throttling_settings.py @@ -35,51 +35,21 @@ class ThrottlingSettings(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"period": "str", "max_concurrent_requests": "int"} + openapi_types = {"max_concurrent_requests": "int"} - attribute_map = {"period": "period", "max_concurrent_requests": "maxConcurrentRequests"} + attribute_map = {"max_concurrent_requests": "maxConcurrentRequests"} - def __init__(self, period=None, max_concurrent_requests=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, max_concurrent_requests=None, local_vars_configuration=None): # noqa: E501 """ThrottlingSettings - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration - self._period = None self._max_concurrent_requests = None self.discriminator = None - self.period = period self.max_concurrent_requests = max_concurrent_requests - @property - def period(self): - """Gets the period of this ThrottlingSettings. # noqa: E501 - - Time scale for this setting. Can be either `SECONDLY` (per second) or `ROLLING_MINUTE` (per minute). # noqa: E501 - - :return: The period of this ThrottlingSettings. # noqa: E501 - :rtype: str - """ - return self._period - - @period.setter - def period(self, period): - """Sets the period of this ThrottlingSettings. - - Time scale for this setting. Can be either `SECONDLY` (per second) or `ROLLING_MINUTE` (per minute). # noqa: E501 - - :param period: The period of this ThrottlingSettings. # noqa: E501 - :type period: str - """ - if self.local_vars_configuration.client_side_validation and period is None: # noqa: E501 - raise ValueError("Invalid value for `period`, must not be `None`") # noqa: E501 - allowed_values = ["SECONDLY", "ROLLING_MINUTE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and period not in allowed_values: # noqa: E501 - raise ValueError("Invalid value for `period` ({0}), must be one of {1}".format(period, allowed_values)) # noqa: E501 - - self._period = period - @property def max_concurrent_requests(self): """Gets the max_concurrent_requests of this ThrottlingSettings. # noqa: E501