From 06cc863e67fdc79b1ae255117068ac61b4df3bca Mon Sep 17 00:00:00 2001 From: alexey Date: Mon, 23 Feb 2026 12:37:42 +0300 Subject: [PATCH] Codegen: Markiting Transactional --- hubspot/marketing/transactional/__init__.py | 12 +- .../marketing/transactional/api/__init__.py | 4 +- ...api.py => send_transactional_email_api.py} | 14 +- ..._smtp_tokens_api.py => smtp_tokens_api.py} | 10 +- hubspot/marketing/transactional/api_client.py | 9 +- .../marketing/transactional/configuration.py | 8 +- hubspot/marketing/transactional/exceptions.py | 13 +- .../transactional/models/__init__.py | 8 +- ...onse_smtp_api_token_view_forward_paging.py | 8 +- .../models/email_send_status_view.py | 247 ++++++++++-------- .../marketing/transactional/models/error.py | 128 ++++----- .../transactional/models/error_detail.py | 118 ++++----- .../transactional/models/event_id_view.py | 8 +- .../transactional/models/forward_paging.py | 8 +- .../transactional/models/next_page.py | 68 ++--- .../models/public_single_send_email.py | 126 ++++----- .../models/public_single_send_request_egg.py | 66 ++--- .../models/smtp_api_token_request_egg.py | 68 ++--- .../models/smtp_api_token_view.py | 196 +++++++------- hubspot/marketing/transactional/rest.py | 10 +- 20 files changed, 589 insertions(+), 540 deletions(-) rename hubspot/marketing/transactional/api/{single_send_api.py => send_transactional_email_api.py} (94%) rename hubspot/marketing/transactional/api/{public_smtp_tokens_api.py => smtp_tokens_api.py} (99%) diff --git a/hubspot/marketing/transactional/__init__.py b/hubspot/marketing/transactional/__init__.py index 9cc508ee..c32dff6e 100644 --- a/hubspot/marketing/transactional/__init__.py +++ b/hubspot/marketing/transactional/__init__.py @@ -3,12 +3,12 @@ # flake8: noqa """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -17,8 +17,8 @@ __version__ = "1.0.0" # import apis into sdk package -from hubspot.marketing.transactional.api.public_smtp_tokens_api import PublicSMTPTokensApi -from hubspot.marketing.transactional.api.single_send_api import SingleSendApi +from hubspot.marketing.transactional.api.smtp_tokens_api import SMTPTokensApi +from hubspot.marketing.transactional.api.send_transactional_email_api import SendTransactionalEmailApi # import ApiClient from hubspot.marketing.transactional.api_client import ApiClient diff --git a/hubspot/marketing/transactional/api/__init__.py b/hubspot/marketing/transactional/api/__init__.py index ed3db351..afff5c96 100644 --- a/hubspot/marketing/transactional/api/__init__.py +++ b/hubspot/marketing/transactional/api/__init__.py @@ -3,5 +3,5 @@ # flake8: noqa # import apis into api package -from hubspot.marketing.transactional.api.public_smtp_tokens_api import PublicSMTPTokensApi -from hubspot.marketing.transactional.api.single_send_api import SingleSendApi +from hubspot.marketing.transactional.api.smtp_tokens_api import SMTPTokensApi +from hubspot.marketing.transactional.api.send_transactional_email_api import SendTransactionalEmailApi diff --git a/hubspot/marketing/transactional/api/single_send_api.py b/hubspot/marketing/transactional/api/send_transactional_email_api.py similarity index 94% rename from hubspot/marketing/transactional/api/single_send_api.py rename to hubspot/marketing/transactional/api/send_transactional_email_api.py index 9c7eee9b..40d798d6 100644 --- a/hubspot/marketing/transactional/api/single_send_api.py +++ b/hubspot/marketing/transactional/api/send_transactional_email_api.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -21,7 +21,7 @@ from hubspot.marketing.transactional.exceptions import ApiTypeError, ApiValueError # noqa: F401 -class SingleSendApi(object): +class SendTransactionalEmailApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -34,7 +34,7 @@ def __init__(self, api_client=None): self.api_client = api_client def send_email(self, public_single_send_request_egg, **kwargs): # noqa: E501 - """Send a single transactional email asynchronously. # noqa: E501 + """Send a single send transactional email asynchronously. # noqa: E501 Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -64,7 +64,7 @@ def send_email(self, public_single_send_request_egg, **kwargs): # noqa: E501 return self.send_email_with_http_info(public_single_send_request_egg, **kwargs) # noqa: E501 def send_email_with_http_info(self, public_single_send_request_egg, **kwargs): # noqa: E501 - """Send a single transactional email asynchronously. # noqa: E501 + """Send a single send transactional email asynchronously. # noqa: E501 Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API. # noqa: E501 This method makes a synchronous HTTP request by default. To make an diff --git a/hubspot/marketing/transactional/api/public_smtp_tokens_api.py b/hubspot/marketing/transactional/api/smtp_tokens_api.py similarity index 99% rename from hubspot/marketing/transactional/api/public_smtp_tokens_api.py rename to hubspot/marketing/transactional/api/smtp_tokens_api.py index 944f29ed..c8620935 100644 --- a/hubspot/marketing/transactional/api/public_smtp_tokens_api.py +++ b/hubspot/marketing/transactional/api/smtp_tokens_api.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -21,7 +21,7 @@ from hubspot.marketing.transactional.exceptions import ApiTypeError, ApiValueError # noqa: F401 -class PublicSMTPTokensApi(object): +class SMTPTokensApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech diff --git a/hubspot/marketing/transactional/api_client.py b/hubspot/marketing/transactional/api_client.py index 48e2a1b2..7af007b4 100644 --- a/hubspot/marketing/transactional/api_client.py +++ b/hubspot/marketing/transactional/api_client.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ from __future__ import absolute_import @@ -135,6 +135,7 @@ def __call_api( _host=None, _request_auth=None, ): + config = self.configuration # header parameters diff --git a/hubspot/marketing/transactional/configuration.py b/hubspot/marketing/transactional/configuration.py index 7f775e99..9a489cf0 100644 --- a/hubspot/marketing/transactional/configuration.py +++ b/hubspot/marketing/transactional/configuration.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ diff --git a/hubspot/marketing/transactional/exceptions.py b/hubspot/marketing/transactional/exceptions.py index 35c866fe..ec9c664b 100644 --- a/hubspot/marketing/transactional/exceptions.py +++ b/hubspot/marketing/transactional/exceptions.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -100,6 +100,7 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): + def __init__(self, status=None, reason=None, http_resp=None): if http_resp: self.status = http_resp.status @@ -125,21 +126,25 @@ def __str__(self): class NotFoundException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(NotFoundException, self).__init__(status, reason, http_resp) class UnauthorizedException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(UnauthorizedException, self).__init__(status, reason, http_resp) class ForbiddenException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(ForbiddenException, self).__init__(status, reason, http_resp) class ServiceException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(ServiceException, self).__init__(status, reason, http_resp) diff --git a/hubspot/marketing/transactional/models/__init__.py b/hubspot/marketing/transactional/models/__init__.py index 3f6ba02e..ef83ef3d 100644 --- a/hubspot/marketing/transactional/models/__init__.py +++ b/hubspot/marketing/transactional/models/__init__.py @@ -2,12 +2,12 @@ # flake8: noqa """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ diff --git a/hubspot/marketing/transactional/models/collection_response_smtp_api_token_view_forward_paging.py b/hubspot/marketing/transactional/models/collection_response_smtp_api_token_view_forward_paging.py index f3e7e4fb..d7e019dd 100644 --- a/hubspot/marketing/transactional/models/collection_response_smtp_api_token_view_forward_paging.py +++ b/hubspot/marketing/transactional/models/collection_response_smtp_api_token_view_forward_paging.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ diff --git a/hubspot/marketing/transactional/models/email_send_status_view.py b/hubspot/marketing/transactional/models/email_send_status_view.py index 824484d3..90f2f3e5 100644 --- a/hubspot/marketing/transactional/models/email_send_status_view.py +++ b/hubspot/marketing/transactional/models/email_send_status_view.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,45 +35,81 @@ class EmailSendStatusView(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"event_id": "EventIdView", "completed_at": "datetime", "status_id": "str", "send_result": "str", "requested_at": "datetime", "started_at": "datetime", "status": "str"} + openapi_types = { + "completed_at": "datetime", + "event_id": "EventIdView", + "message": "str", + "requested_at": "datetime", + "send_result": "str", + "started_at": "datetime", + "status": "str", + "status_id": "str", + } attribute_map = { - "event_id": "eventId", "completed_at": "completedAt", - "status_id": "statusId", - "send_result": "sendResult", + "event_id": "eventId", + "message": "message", "requested_at": "requestedAt", + "send_result": "sendResult", "started_at": "startedAt", "status": "status", + "status_id": "statusId", } - def __init__(self, event_id=None, completed_at=None, status_id=None, send_result=None, requested_at=None, started_at=None, status=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, completed_at=None, event_id=None, message=None, requested_at=None, send_result=None, started_at=None, status=None, status_id=None, local_vars_configuration=None): # noqa: E501 """EmailSendStatusView - 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._event_id = None self._completed_at = None - self._status_id = None - self._send_result = None + self._event_id = None + self._message = None self._requested_at = None + self._send_result = None self._started_at = None self._status = None + self._status_id = None self.discriminator = None - if event_id is not None: - self.event_id = event_id if completed_at is not None: self.completed_at = completed_at - self.status_id = status_id - if send_result is not None: - self.send_result = send_result + if event_id is not None: + self.event_id = event_id + if message is not None: + self.message = message if requested_at is not None: self.requested_at = requested_at + if send_result is not None: + self.send_result = send_result if started_at is not None: self.started_at = started_at self.status = status + self.status_id = status_id + + @property + def completed_at(self): + """Gets the completed_at of this EmailSendStatusView. # noqa: E501 + + Time when the send was completed. # noqa: E501 + + :return: The completed_at of this EmailSendStatusView. # noqa: E501 + :rtype: datetime + """ + return self._completed_at + + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this EmailSendStatusView. + + Time when the send was completed. # noqa: E501 + + :param completed_at: The completed_at of this EmailSendStatusView. # noqa: E501 + :type completed_at: datetime + """ + + self._completed_at = completed_at @property def event_id(self): @@ -97,52 +133,50 @@ def event_id(self, event_id): self._event_id = event_id @property - def completed_at(self): - """Gets the completed_at of this EmailSendStatusView. # noqa: E501 + def message(self): + """Gets the message of this EmailSendStatusView. # noqa: E501 - Time when the send was completed. # noqa: E501 + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - :return: The completed_at of this EmailSendStatusView. # noqa: E501 - :rtype: datetime + :return: The message of this EmailSendStatusView. # noqa: E501 + :rtype: str """ - return self._completed_at + return self._message - @completed_at.setter - def completed_at(self, completed_at): - """Sets the completed_at of this EmailSendStatusView. + @message.setter + def message(self, message): + """Sets the message of this EmailSendStatusView. - Time when the send was completed. # noqa: E501 + A human readable message describing the error along with remediation steps where appropriate # noqa: E501 - :param completed_at: The completed_at of this EmailSendStatusView. # noqa: E501 - :type completed_at: datetime + :param message: The message of this EmailSendStatusView. # noqa: E501 + :type message: str """ - self._completed_at = completed_at + self._message = message @property - def status_id(self): - """Gets the status_id of this EmailSendStatusView. # noqa: E501 + def requested_at(self): + """Gets the requested_at of this EmailSendStatusView. # noqa: E501 - Identifier used to query the status of the send. # noqa: E501 + Time when the send was requested. # noqa: E501 - :return: The status_id of this EmailSendStatusView. # noqa: E501 - :rtype: str + :return: The requested_at of this EmailSendStatusView. # noqa: E501 + :rtype: datetime """ - return self._status_id + return self._requested_at - @status_id.setter - def status_id(self, status_id): - """Sets the status_id of this EmailSendStatusView. + @requested_at.setter + def requested_at(self, requested_at): + """Sets the requested_at of this EmailSendStatusView. - Identifier used to query the status of the send. # noqa: E501 + Time when the send was requested. # noqa: E501 - :param status_id: The status_id of this EmailSendStatusView. # noqa: E501 - :type status_id: str + :param requested_at: The requested_at of this EmailSendStatusView. # noqa: E501 + :type requested_at: datetime """ - if self.local_vars_configuration.client_side_validation and status_id is None: # noqa: E501 - raise ValueError("Invalid value for `status_id`, must not be `None`") # noqa: E501 - self._status_id = status_id + self._requested_at = requested_at @property def send_result(self): @@ -165,78 +199,60 @@ def send_result(self, send_result): :type send_result: str """ allowed_values = [ - "SENT", - "IDEMPOTENT_IGNORE", - "QUEUED", - "IDEMPOTENT_FAIL", - "THROTTLED", - "EMAIL_DISABLED", - "PORTAL_SUSPENDED", - "INVALID_TO_ADDRESS", + "ADDRESS_LIST_BOMBED", + "ADDRESS_ONLY_ACCEPTED_ON_PROD", + "ADDRESS_OPTED_OUT", + "ATTACHMENT_DOWNLOAD_QUEUE_FULL", + "BLOCKED_ADDRESS", "BLOCKED_DOMAIN", - "PREVIOUSLY_BOUNCED", + "BRAND_RECIPIENT_FATIGUE_SUPPRESSED", + "CAMPAIGN_CANCELLED", + "CANCELLED_ABUSE", + "CORRUPT_INPUT", + "EMAIL_DISABLED", "EMAIL_UNCONFIRMED", - "PREVIOUS_SPAM", - "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", - "PREVIOUSLY_UNSUBSCRIBED_PORTAL", + "GDPR_DOI_ENABLED", + "GRAYMAIL_SUPPRESSED", + "HUBL_LIMIT_EXCEEDED", + "IDEMPOTENT_FAIL", + "IDEMPOTENT_IGNORE", "INVALID_FROM_ADDRESS", - "CAMPAIGN_CANCELLED", - "VALIDATION_FAILED", + "INVALID_TO_ADDRESS", + "LOW_CONTACT_QUALITY_SCORE", + "MISSING_CONTENT", + "MISSING_REQUIRED_PARAMETER", + "MISSING_TEMPLATE_PROPERTIES", "MTA_IGNORE", - "BLOCKED_ADDRESS", - "PORTAL_OVER_LIMIT", + "NON_MARKETABLE_CONTACT", + "PORTAL_AUTHENTICATION_FAILURE", "PORTAL_EXPIRED", "PORTAL_MISSING_MARKETING_SCOPE", - "MISSING_TEMPLATE_PROPERTIES", - "MISSING_REQUIRED_PARAMETER", - "PORTAL_AUTHENTICATION_FAILURE", - "MISSING_CONTENT", - "CORRUPT_INPUT", - "TEMPLATE_RENDER_EXCEPTION", - "GRAYMAIL_SUPPRESSED", - "UNCONFIGURED_SENDING_DOMAIN", - "UNDELIVERABLE", - "CANCELLED_ABUSE", - "QUARANTINED_ADDRESS", - "ADDRESS_ONLY_ACCEPTED_ON_PROD", "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION", - "ADDRESS_LIST_BOMBED", - "ADDRESS_OPTED_OUT", - "RECIPIENT_FATIGUE_SUPPRESSED", - "TOO_MANY_RECIPIENTS", + "PORTAL_OVER_LIMIT", + "PORTAL_SUSPENDED", + "PREVIOUS_SPAM", + "PREVIOUSLY_BOUNCED", "PREVIOUSLY_UNSUBSCRIBED_BRAND", - "NON_MARKETABLE_CONTACT", "PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT", - "GDPR_DOI_ENABLED", + "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", + "PREVIOUSLY_UNSUBSCRIBED_PORTAL", + "QUARANTINED_ADDRESS", + "QUEUED", + "RECIPIENT_FATIGUE_SUPPRESSED", + "SENT", + "TEMPLATE_RENDER_EXCEPTION", + "THROTTLED", + "TOO_MANY_RECIPIENTS", + "UBB_GOVERNANCE_MISSING", + "UNCONFIGURED_SENDING_DOMAIN", + "UNDELIVERABLE", + "VALIDATION_FAILED", ] # noqa: E501 if self.local_vars_configuration.client_side_validation and send_result not in allowed_values: # noqa: E501 raise ValueError("Invalid value for `send_result` ({0}), must be one of {1}".format(send_result, allowed_values)) # noqa: E501 self._send_result = send_result - @property - def requested_at(self): - """Gets the requested_at of this EmailSendStatusView. # noqa: E501 - - Time when the send was requested. # noqa: E501 - - :return: The requested_at of this EmailSendStatusView. # noqa: E501 - :rtype: datetime - """ - return self._requested_at - - @requested_at.setter - def requested_at(self, requested_at): - """Sets the requested_at of this EmailSendStatusView. - - Time when the send was requested. # noqa: E501 - - :param requested_at: The requested_at of this EmailSendStatusView. # noqa: E501 - :type requested_at: datetime - """ - - self._requested_at = requested_at - @property def started_at(self): """Gets the started_at of this EmailSendStatusView. # noqa: E501 @@ -282,12 +298,37 @@ def status(self, status): """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"] # noqa: E501 + allowed_values = ["CANCELED", "COMPLETE", "PENDING", "PROCESSING"] # noqa: E501 if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError("Invalid value for `status` ({0}), must be one of {1}".format(status, allowed_values)) # noqa: E501 self._status = status + @property + def status_id(self): + """Gets the status_id of this EmailSendStatusView. # noqa: E501 + + Identifier used to query the status of the send. # noqa: E501 + + :return: The status_id of this EmailSendStatusView. # noqa: E501 + :rtype: str + """ + return self._status_id + + @status_id.setter + def status_id(self, status_id): + """Sets the status_id of this EmailSendStatusView. + + Identifier used to query the status of the send. # noqa: E501 + + :param status_id: The status_id of this EmailSendStatusView. # noqa: E501 + :type status_id: str + """ + if self.local_vars_configuration.client_side_validation and status_id is None: # noqa: E501 + raise ValueError("Invalid value for `status_id`, must not be `None`") # noqa: E501 + + self._status_id = status_id + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/marketing/transactional/models/error.py b/hubspot/marketing/transactional/models/error.py index fd38b980..d28e3e4f 100644 --- a/hubspot/marketing/transactional/models/error.py +++ b/hubspot/marketing/transactional/models/error.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,59 +35,61 @@ class Error(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"sub_category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "links": "dict[str, str]", "message": "str", "category": "str", "errors": "list[ErrorDetail]"} + openapi_types = {"category": "str", "context": "dict[str, list[str]]", "correlation_id": "str", "errors": "list[ErrorDetail]", "links": "dict[str, str]", "message": "str", "sub_category": "str"} - attribute_map = {"sub_category": "subCategory", "context": "context", "correlation_id": "correlationId", "links": "links", "message": "message", "category": "category", "errors": "errors"} + attribute_map = {"category": "category", "context": "context", "correlation_id": "correlationId", "errors": "errors", "links": "links", "message": "message", "sub_category": "subCategory"} - def __init__(self, sub_category=None, context=None, correlation_id=None, links=None, message=None, category=None, errors=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, category=None, context=None, correlation_id=None, errors=None, links=None, message=None, sub_category=None, local_vars_configuration=None): # noqa: E501 """Error - 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._sub_category = None + self._category = None self._context = None self._correlation_id = None + self._errors = None self._links = None self._message = None - self._category = None - self._errors = None + self._sub_category = None self.discriminator = None - if sub_category is not None: - self.sub_category = sub_category + self.category = category if context is not None: self.context = context self.correlation_id = correlation_id + if errors is not None: + self.errors = errors if links is not None: self.links = links self.message = message - self.category = category - if errors is not None: - self.errors = errors + if sub_category is not None: + self.sub_category = sub_category @property - def sub_category(self): - """Gets the sub_category of this Error. # noqa: E501 + def category(self): + """Gets the category of this Error. # noqa: E501 - A specific category that contains more specific detail about the error # noqa: E501 + The error category # noqa: E501 - :return: The sub_category of this Error. # noqa: E501 + :return: The category of this Error. # noqa: E501 :rtype: str """ - return self._sub_category + return self._category - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this Error. + @category.setter + def category(self, category): + """Sets the category of this Error. - A specific category that contains more specific detail about the error # noqa: E501 + The error category # noqa: E501 - :param sub_category: The sub_category of this Error. # noqa: E501 - :type sub_category: str + :param category: The category of this Error. # noqa: E501 + :type category: str """ + if self.local_vars_configuration.client_side_validation and category is None: # noqa: E501 + raise ValueError("Invalid value for `category`, must not be `None`") # noqa: E501 - self._sub_category = sub_category + self._category = category @property def context(self): @@ -137,6 +139,29 @@ def correlation_id(self, correlation_id): self._correlation_id = correlation_id + @property + def errors(self): + """Gets the errors of this Error. # noqa: E501 + + further information about the error # noqa: E501 + + :return: The errors of this Error. # noqa: E501 + :rtype: list[ErrorDetail] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this Error. + + further information about the error # noqa: E501 + + :param errors: The errors of this Error. # noqa: E501 + :type errors: list[ErrorDetail] + """ + + self._errors = errors + @property def links(self): """Gets the links of this Error. # noqa: E501 @@ -186,52 +211,27 @@ def message(self, message): self._message = message @property - def category(self): - """Gets the category of this Error. # noqa: E501 + def sub_category(self): + """Gets the sub_category of this Error. # noqa: E501 - The error category # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :return: The category of this Error. # noqa: E501 + :return: The sub_category of this Error. # noqa: E501 :rtype: str """ - return self._category - - @category.setter - def category(self, category): - """Sets the category of this Error. - - The error category # noqa: E501 - - :param category: The category of this Error. # noqa: E501 - :type category: str - """ - if self.local_vars_configuration.client_side_validation and category is None: # noqa: E501 - raise ValueError("Invalid value for `category`, must not be `None`") # noqa: E501 - - self._category = category - - @property - def errors(self): - """Gets the errors of this Error. # noqa: E501 - - further information about the error # noqa: E501 - - :return: The errors of this Error. # noqa: E501 - :rtype: list[ErrorDetail] - """ - return self._errors + return self._sub_category - @errors.setter - def errors(self, errors): - """Sets the errors of this Error. + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this Error. - further information about the error # noqa: E501 + A specific category that contains more specific detail about the error # noqa: E501 - :param errors: The errors of this Error. # noqa: E501 - :type errors: list[ErrorDetail] + :param sub_category: The sub_category of this Error. # noqa: E501 + :type sub_category: str """ - self._errors = errors + self._sub_category = sub_category def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/marketing/transactional/models/error_detail.py b/hubspot/marketing/transactional/models/error_detail.py index 7698d3a0..d1f5dc6e 100644 --- a/hubspot/marketing/transactional/models/error_detail.py +++ b/hubspot/marketing/transactional/models/error_detail.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,55 +35,32 @@ class ErrorDetail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"sub_category": "str", "code": "str", "_in": "str", "context": "dict[str, list[str]]", "message": "str"} + openapi_types = {"code": "str", "context": "dict[str, list[str]]", "_in": "str", "message": "str", "sub_category": "str"} - attribute_map = {"sub_category": "subCategory", "code": "code", "_in": "in", "context": "context", "message": "message"} + attribute_map = {"code": "code", "context": "context", "_in": "in", "message": "message", "sub_category": "subCategory"} - def __init__(self, sub_category=None, code=None, _in=None, context=None, message=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, code=None, context=None, _in=None, message=None, sub_category=None, local_vars_configuration=None): # noqa: E501 """ErrorDetail - 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._sub_category = None self._code = None - self.__in = None self._context = None + self.__in = None self._message = None + self._sub_category = None self.discriminator = None - if sub_category is not None: - self.sub_category = sub_category if code is not None: self.code = code - if _in is not None: - self._in = _in if context is not None: self.context = context + if _in is not None: + self._in = _in self.message = message - - @property - def sub_category(self): - """Gets the sub_category of this ErrorDetail. # noqa: E501 - - A specific category that contains more specific detail about the error # noqa: E501 - - :return: The sub_category of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self._sub_category - - @sub_category.setter - def sub_category(self, sub_category): - """Sets the sub_category of this ErrorDetail. - - A specific category that contains more specific detail about the error # noqa: E501 - - :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 - :type sub_category: str - """ - - self._sub_category = sub_category + if sub_category is not None: + self.sub_category = sub_category @property def code(self): @@ -108,29 +85,6 @@ def code(self, code): self._code = code - @property - def _in(self): - """Gets the _in of this ErrorDetail. # noqa: E501 - - The name of the field or parameter in which the error was found. # noqa: E501 - - :return: The _in of this ErrorDetail. # noqa: E501 - :rtype: str - """ - return self.__in - - @_in.setter - def _in(self, _in): - """Sets the _in of this ErrorDetail. - - The name of the field or parameter in which the error was found. # noqa: E501 - - :param _in: The _in of this ErrorDetail. # noqa: E501 - :type _in: str - """ - - self.__in = _in - @property def context(self): """Gets the context of this ErrorDetail. # noqa: E501 @@ -154,6 +108,29 @@ def context(self, context): self._context = context + @property + def _in(self): + """Gets the _in of this ErrorDetail. # noqa: E501 + + The name of the field or parameter in which the error was found. # noqa: E501 + + :return: The _in of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self.__in + + @_in.setter + def _in(self, _in): + """Sets the _in of this ErrorDetail. + + The name of the field or parameter in which the error was found. # noqa: E501 + + :param _in: The _in of this ErrorDetail. # noqa: E501 + :type _in: str + """ + + self.__in = _in + @property def message(self): """Gets the message of this ErrorDetail. # noqa: E501 @@ -179,6 +156,29 @@ def message(self, message): self._message = message + @property + def sub_category(self): + """Gets the sub_category of this ErrorDetail. # noqa: E501 + + A specific category that contains more specific detail about the error # noqa: E501 + + :return: The sub_category of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._sub_category + + @sub_category.setter + def sub_category(self, sub_category): + """Sets the sub_category of this ErrorDetail. + + A specific category that contains more specific detail about the error # noqa: E501 + + :param sub_category: The sub_category of this ErrorDetail. # noqa: E501 + :type sub_category: str + """ + + self._sub_category = sub_category + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/marketing/transactional/models/event_id_view.py b/hubspot/marketing/transactional/models/event_id_view.py index 3176366d..dd93e61a 100644 --- a/hubspot/marketing/transactional/models/event_id_view.py +++ b/hubspot/marketing/transactional/models/event_id_view.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ diff --git a/hubspot/marketing/transactional/models/forward_paging.py b/hubspot/marketing/transactional/models/forward_paging.py index 4341b805..d2321fcd 100644 --- a/hubspot/marketing/transactional/models/forward_paging.py +++ b/hubspot/marketing/transactional/models/forward_paging.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ diff --git a/hubspot/marketing/transactional/models/next_page.py b/hubspot/marketing/transactional/models/next_page.py index 4fa1b132..ddc2f1bc 100644 --- a/hubspot/marketing/transactional/models/next_page.py +++ b/hubspot/marketing/transactional/models/next_page.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,52 +35,29 @@ class NextPage(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"link": "str", "after": "str"} + openapi_types = {"after": "str", "link": "str"} - attribute_map = {"link": "link", "after": "after"} + attribute_map = {"after": "after", "link": "link"} - def __init__(self, link=None, after=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, after=None, link=None, local_vars_configuration=None): # noqa: E501 """NextPage - 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._link = None self._after = None + self._link = None self.discriminator = None + self.after = after if link is not None: self.link = link - self.after = after - - @property - def link(self): - """Gets the link of this NextPage. # noqa: E501 - - # noqa: E501 - - :return: The link of this NextPage. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this NextPage. - - # noqa: E501 - - :param link: The link of this NextPage. # noqa: E501 - :type link: str - """ - - self._link = link @property def after(self): """Gets the after of this NextPage. # noqa: E501 - # noqa: E501 + A paging cursor token for retrieving subsequent pages. # noqa: E501 :return: The after of this NextPage. # noqa: E501 :rtype: str @@ -91,7 +68,7 @@ def after(self): def after(self, after): """Sets the after of this NextPage. - # noqa: E501 + A paging cursor token for retrieving subsequent pages. # noqa: E501 :param after: The after of this NextPage. # noqa: E501 :type after: str @@ -101,6 +78,29 @@ def after(self, after): self._after = after + @property + def link(self): + """Gets the link of this NextPage. # noqa: E501 + + A URL that can be used to retrieve the next page results. # noqa: E501 + + :return: The link of this NextPage. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this NextPage. + + A URL that can be used to retrieve the next page results. # noqa: E501 + + :param link: The link of this NextPage. # noqa: E501 + :type link: str + """ + + self._link = link + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/marketing/transactional/models/public_single_send_email.py b/hubspot/marketing/transactional/models/public_single_send_email.py index 86baa7b0..a7b3ef68 100644 --- a/hubspot/marketing/transactional/models/public_single_send_email.py +++ b/hubspot/marketing/transactional/models/public_single_send_email.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,36 +35,59 @@ class PublicSingleSendEmail(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"cc": "list[str]", "send_id": "str", "bcc": "list[str]", "reply_to": "list[str]", "_from": "str", "to": "str"} + openapi_types = {"bcc": "list[str]", "cc": "list[str]", "_from": "str", "reply_to": "list[str]", "send_id": "str", "to": "str"} - attribute_map = {"cc": "cc", "send_id": "sendId", "bcc": "bcc", "reply_to": "replyTo", "_from": "from", "to": "to"} + attribute_map = {"bcc": "bcc", "cc": "cc", "_from": "from", "reply_to": "replyTo", "send_id": "sendId", "to": "to"} - def __init__(self, cc=None, send_id=None, bcc=None, reply_to=None, _from=None, to=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, bcc=None, cc=None, _from=None, reply_to=None, send_id=None, to=None, local_vars_configuration=None): # noqa: E501 """PublicSingleSendEmail - 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._cc = None - self._send_id = None self._bcc = None - self._reply_to = None + self._cc = None self.__from = None + self._reply_to = None + self._send_id = None self._to = None self.discriminator = None - if cc is not None: - self.cc = cc - if send_id is not None: - self.send_id = send_id if bcc is not None: self.bcc = bcc - if reply_to is not None: - self.reply_to = reply_to + if cc is not None: + self.cc = cc if _from is not None: self._from = _from + if reply_to is not None: + self.reply_to = reply_to + if send_id is not None: + self.send_id = send_id self.to = to + @property + def bcc(self): + """Gets the bcc of this PublicSingleSendEmail. # noqa: E501 + + List of email addresses to send as Bcc. # noqa: E501 + + :return: The bcc of this PublicSingleSendEmail. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this PublicSingleSendEmail. + + List of email addresses to send as Bcc. # noqa: E501 + + :param bcc: The bcc of this PublicSingleSendEmail. # noqa: E501 + :type bcc: list[str] + """ + + self._bcc = bcc + @property def cc(self): """Gets the cc of this PublicSingleSendEmail. # noqa: E501 @@ -89,50 +112,27 @@ def cc(self, cc): self._cc = cc @property - def send_id(self): - """Gets the send_id of this PublicSingleSendEmail. # noqa: E501 + def _from(self): + """Gets the _from of this PublicSingleSendEmail. # noqa: E501 - ID for a particular send. No more than one email will be sent per sendId. # noqa: E501 + The From header for the email. # noqa: E501 - :return: The send_id of this PublicSingleSendEmail. # noqa: E501 + :return: The _from of this PublicSingleSendEmail. # noqa: E501 :rtype: str """ - return self._send_id - - @send_id.setter - def send_id(self, send_id): - """Sets the send_id of this PublicSingleSendEmail. - - ID for a particular send. No more than one email will be sent per sendId. # noqa: E501 - - :param send_id: The send_id of this PublicSingleSendEmail. # noqa: E501 - :type send_id: str - """ - - self._send_id = send_id - - @property - def bcc(self): - """Gets the bcc of this PublicSingleSendEmail. # noqa: E501 - - List of email addresses to send as Bcc. # noqa: E501 - - :return: The bcc of this PublicSingleSendEmail. # noqa: E501 - :rtype: list[str] - """ - return self._bcc + return self.__from - @bcc.setter - def bcc(self, bcc): - """Sets the bcc of this PublicSingleSendEmail. + @_from.setter + def _from(self, _from): + """Sets the _from of this PublicSingleSendEmail. - List of email addresses to send as Bcc. # noqa: E501 + The From header for the email. # noqa: E501 - :param bcc: The bcc of this PublicSingleSendEmail. # noqa: E501 - :type bcc: list[str] + :param _from: The _from of this PublicSingleSendEmail. # noqa: E501 + :type _from: str """ - self._bcc = bcc + self.__from = _from @property def reply_to(self): @@ -158,27 +158,27 @@ def reply_to(self, reply_to): self._reply_to = reply_to @property - def _from(self): - """Gets the _from of this PublicSingleSendEmail. # noqa: E501 + def send_id(self): + """Gets the send_id of this PublicSingleSendEmail. # noqa: E501 - The From header for the email. # noqa: E501 + ID for a particular send. No more than one email will be sent per sendId. # noqa: E501 - :return: The _from of this PublicSingleSendEmail. # noqa: E501 + :return: The send_id of this PublicSingleSendEmail. # noqa: E501 :rtype: str """ - return self.__from + return self._send_id - @_from.setter - def _from(self, _from): - """Sets the _from of this PublicSingleSendEmail. + @send_id.setter + def send_id(self, send_id): + """Sets the send_id of this PublicSingleSendEmail. - The From header for the email. # noqa: E501 + ID for a particular send. No more than one email will be sent per sendId. # noqa: E501 - :param _from: The _from of this PublicSingleSendEmail. # noqa: E501 - :type _from: str + :param send_id: The send_id of this PublicSingleSendEmail. # noqa: E501 + :type send_id: str """ - self.__from = _from + self._send_id = send_id @property def to(self): diff --git a/hubspot/marketing/transactional/models/public_single_send_request_egg.py b/hubspot/marketing/transactional/models/public_single_send_request_egg.py index a088f5c6..2081492b 100644 --- a/hubspot/marketing/transactional/models/public_single_send_request_egg.py +++ b/hubspot/marketing/transactional/models/public_single_send_request_egg.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,28 +35,51 @@ class PublicSingleSendRequestEgg(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"custom_properties": "dict[str, object]", "email_id": "int", "message": "PublicSingleSendEmail", "contact_properties": "dict[str, str]"} + openapi_types = {"contact_properties": "dict[str, str]", "custom_properties": "dict[str, object]", "email_id": "int", "message": "PublicSingleSendEmail"} - attribute_map = {"custom_properties": "customProperties", "email_id": "emailId", "message": "message", "contact_properties": "contactProperties"} + attribute_map = {"contact_properties": "contactProperties", "custom_properties": "customProperties", "email_id": "emailId", "message": "message"} - def __init__(self, custom_properties=None, email_id=None, message=None, contact_properties=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, contact_properties=None, custom_properties=None, email_id=None, message=None, local_vars_configuration=None): # noqa: E501 """PublicSingleSendRequestEgg - 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._contact_properties = None self._custom_properties = None self._email_id = None self._message = None - self._contact_properties = None self.discriminator = None + if contact_properties is not None: + self.contact_properties = contact_properties if custom_properties is not None: self.custom_properties = custom_properties self.email_id = email_id self.message = message - if contact_properties is not None: - self.contact_properties = contact_properties + + @property + def contact_properties(self): + """Gets the contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 + + The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment. # noqa: E501 + + :return: The contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 + :rtype: dict[str, str] + """ + return self._contact_properties + + @contact_properties.setter + def contact_properties(self, contact_properties): + """Sets the contact_properties of this PublicSingleSendRequestEgg. + + The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment. # noqa: E501 + + :param contact_properties: The contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 + :type contact_properties: dict[str, str] + """ + + self._contact_properties = contact_properties @property def custom_properties(self): @@ -129,29 +152,6 @@ def message(self, message): self._message = message - @property - def contact_properties(self): - """Gets the contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 - - The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment. # noqa: E501 - - :return: The contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 - :rtype: dict[str, str] - """ - return self._contact_properties - - @contact_properties.setter - def contact_properties(self, contact_properties): - """Sets the contact_properties of this PublicSingleSendRequestEgg. - - The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment. # noqa: E501 - - :param contact_properties: The contact_properties of this PublicSingleSendRequestEgg. # noqa: E501 - :type contact_properties: dict[str, str] - """ - - self._contact_properties = contact_properties - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/marketing/transactional/models/smtp_api_token_request_egg.py b/hubspot/marketing/transactional/models/smtp_api_token_request_egg.py index 02b197da..247f1614 100644 --- a/hubspot/marketing/transactional/models/smtp_api_token_request_egg.py +++ b/hubspot/marketing/transactional/models/smtp_api_token_request_egg.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,47 +35,22 @@ class SmtpApiTokenRequestEgg(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"create_contact": "bool", "campaign_name": "str"} + openapi_types = {"campaign_name": "str", "create_contact": "bool"} - attribute_map = {"create_contact": "createContact", "campaign_name": "campaignName"} + attribute_map = {"campaign_name": "campaignName", "create_contact": "createContact"} - def __init__(self, create_contact=None, campaign_name=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, campaign_name=None, create_contact=None, local_vars_configuration=None): # noqa: E501 """SmtpApiTokenRequestEgg - 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._create_contact = None self._campaign_name = None + self._create_contact = None self.discriminator = None - self.create_contact = create_contact self.campaign_name = campaign_name - - @property - def create_contact(self): - """Gets the create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 - - Indicates whether a contact should be created for email recipients. # noqa: E501 - - :return: The create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 - :rtype: bool - """ - return self._create_contact - - @create_contact.setter - def create_contact(self, create_contact): - """Sets the create_contact of this SmtpApiTokenRequestEgg. - - Indicates whether a contact should be created for email recipients. # noqa: E501 - - :param create_contact: The create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 - :type create_contact: bool - """ - if self.local_vars_configuration.client_side_validation and create_contact is None: # noqa: E501 - raise ValueError("Invalid value for `create_contact`, must not be `None`") # noqa: E501 - - self._create_contact = create_contact + self.create_contact = create_contact @property def campaign_name(self): @@ -102,6 +77,31 @@ def campaign_name(self, campaign_name): self._campaign_name = campaign_name + @property + def create_contact(self): + """Gets the create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 + + Indicates whether a contact should be created for email recipients. # noqa: E501 + + :return: The create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 + :rtype: bool + """ + return self._create_contact + + @create_contact.setter + def create_contact(self, create_contact): + """Sets the create_contact of this SmtpApiTokenRequestEgg. + + Indicates whether a contact should be created for email recipients. # noqa: E501 + + :param create_contact: The create_contact of this SmtpApiTokenRequestEgg. # noqa: E501 + :type create_contact: bool + """ + if self.local_vars_configuration.client_side_validation and create_contact is None: # noqa: E501 + raise ValueError("Invalid value for `create_contact`, must not be `None`") # noqa: E501 + + self._create_contact = create_contact + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/hubspot/marketing/transactional/models/smtp_api_token_view.py b/hubspot/marketing/transactional/models/smtp_api_token_view.py index 3f2042f8..bebaeca8 100644 --- a/hubspot/marketing/transactional/models/smtp_api_token_view.py +++ b/hubspot/marketing/transactional/models/smtp_api_token_view.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -35,41 +35,91 @@ class SmtpApiTokenView(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"created_at": "datetime", "password": "str", "created_by": "str", "create_contact": "bool", "id": "str", "email_campaign_id": "str", "campaign_name": "str"} + openapi_types = {"campaign_name": "str", "create_contact": "bool", "created_at": "datetime", "created_by": "str", "email_campaign_id": "str", "id": "str", "password": "str"} attribute_map = { + "campaign_name": "campaignName", + "create_contact": "createContact", "created_at": "createdAt", - "password": "password", "created_by": "createdBy", - "create_contact": "createContact", - "id": "id", "email_campaign_id": "emailCampaignId", - "campaign_name": "campaignName", + "id": "id", + "password": "password", } - def __init__(self, created_at=None, password=None, created_by=None, create_contact=None, id=None, email_campaign_id=None, campaign_name=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, campaign_name=None, create_contact=None, created_at=None, created_by=None, email_campaign_id=None, id=None, password=None, local_vars_configuration=None): # noqa: E501 """SmtpApiTokenView - 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._campaign_name = None + self._create_contact = None self._created_at = None - self._password = None self._created_by = None - self._create_contact = None - self._id = None self._email_campaign_id = None - self._campaign_name = None + self._id = None + self._password = None self.discriminator = None + self.campaign_name = campaign_name + self.create_contact = create_contact self.created_at = created_at - if password is not None: - self.password = password self.created_by = created_by - self.create_contact = create_contact - self.id = id self.email_campaign_id = email_campaign_id - self.campaign_name = campaign_name + self.id = id + if password is not None: + self.password = password + + @property + def campaign_name(self): + """Gets the campaign_name of this SmtpApiTokenView. # noqa: E501 + + A name for the campaign tied to the SMTP API token. # noqa: E501 + + :return: The campaign_name of this SmtpApiTokenView. # noqa: E501 + :rtype: str + """ + return self._campaign_name + + @campaign_name.setter + def campaign_name(self, campaign_name): + """Sets the campaign_name of this SmtpApiTokenView. + + A name for the campaign tied to the SMTP API token. # noqa: E501 + + :param campaign_name: The campaign_name of this SmtpApiTokenView. # noqa: E501 + :type campaign_name: str + """ + if self.local_vars_configuration.client_side_validation and campaign_name is None: # noqa: E501 + raise ValueError("Invalid value for `campaign_name`, must not be `None`") # noqa: E501 + + self._campaign_name = campaign_name + + @property + def create_contact(self): + """Gets the create_contact of this SmtpApiTokenView. # noqa: E501 + + Indicates whether a contact should be created for email recipients. # noqa: E501 + + :return: The create_contact of this SmtpApiTokenView. # noqa: E501 + :rtype: bool + """ + return self._create_contact + + @create_contact.setter + def create_contact(self, create_contact): + """Sets the create_contact of this SmtpApiTokenView. + + Indicates whether a contact should be created for email recipients. # noqa: E501 + + :param create_contact: The create_contact of this SmtpApiTokenView. # noqa: E501 + :type create_contact: bool + """ + if self.local_vars_configuration.client_side_validation and create_contact is None: # noqa: E501 + raise ValueError("Invalid value for `create_contact`, must not be `None`") # noqa: E501 + + self._create_contact = create_contact @property def created_at(self): @@ -96,29 +146,6 @@ def created_at(self, created_at): self._created_at = created_at - @property - def password(self): - """Gets the password of this SmtpApiTokenView. # noqa: E501 - - Password used to log into the HubSpot SMTP server. # noqa: E501 - - :return: The password of this SmtpApiTokenView. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this SmtpApiTokenView. - - Password used to log into the HubSpot SMTP server. # noqa: E501 - - :param password: The password of this SmtpApiTokenView. # noqa: E501 - :type password: str - """ - - self._password = password - @property def created_by(self): """Gets the created_by of this SmtpApiTokenView. # noqa: E501 @@ -145,35 +172,35 @@ def created_by(self, created_by): self._created_by = created_by @property - def create_contact(self): - """Gets the create_contact of this SmtpApiTokenView. # noqa: E501 + def email_campaign_id(self): + """Gets the email_campaign_id of this SmtpApiTokenView. # noqa: E501 - Indicates whether a contact should be created for email recipients. # noqa: E501 + Identifier assigned to the campaign provided in the token creation request. # noqa: E501 - :return: The create_contact of this SmtpApiTokenView. # noqa: E501 - :rtype: bool + :return: The email_campaign_id of this SmtpApiTokenView. # noqa: E501 + :rtype: str """ - return self._create_contact + return self._email_campaign_id - @create_contact.setter - def create_contact(self, create_contact): - """Sets the create_contact of this SmtpApiTokenView. + @email_campaign_id.setter + def email_campaign_id(self, email_campaign_id): + """Sets the email_campaign_id of this SmtpApiTokenView. - Indicates whether a contact should be created for email recipients. # noqa: E501 + Identifier assigned to the campaign provided in the token creation request. # noqa: E501 - :param create_contact: The create_contact of this SmtpApiTokenView. # noqa: E501 - :type create_contact: bool + :param email_campaign_id: The email_campaign_id of this SmtpApiTokenView. # noqa: E501 + :type email_campaign_id: str """ - if self.local_vars_configuration.client_side_validation and create_contact is None: # noqa: E501 - raise ValueError("Invalid value for `create_contact`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and email_campaign_id is None: # noqa: E501 + raise ValueError("Invalid value for `email_campaign_id`, must not be `None`") # noqa: E501 - self._create_contact = create_contact + self._email_campaign_id = email_campaign_id @property def id(self): """Gets the id of this SmtpApiTokenView. # noqa: E501 - User name to log into the HubSpot SMTP server. # noqa: E501 + Identifier of event. # noqa: E501 :return: The id of this SmtpApiTokenView. # noqa: E501 :rtype: str @@ -184,7 +211,7 @@ def id(self): def id(self, id): """Sets the id of this SmtpApiTokenView. - User name to log into the HubSpot SMTP server. # noqa: E501 + Identifier of event. # noqa: E501 :param id: The id of this SmtpApiTokenView. # noqa: E501 :type id: str @@ -195,54 +222,27 @@ def id(self, id): self._id = id @property - def email_campaign_id(self): - """Gets the email_campaign_id of this SmtpApiTokenView. # noqa: E501 - - Identifier assigned to the campaign provided in the token creation request. # noqa: E501 - - :return: The email_campaign_id of this SmtpApiTokenView. # noqa: E501 - :rtype: str - """ - return self._email_campaign_id - - @email_campaign_id.setter - def email_campaign_id(self, email_campaign_id): - """Sets the email_campaign_id of this SmtpApiTokenView. - - Identifier assigned to the campaign provided in the token creation request. # noqa: E501 - - :param email_campaign_id: The email_campaign_id of this SmtpApiTokenView. # noqa: E501 - :type email_campaign_id: str - """ - if self.local_vars_configuration.client_side_validation and email_campaign_id is None: # noqa: E501 - raise ValueError("Invalid value for `email_campaign_id`, must not be `None`") # noqa: E501 - - self._email_campaign_id = email_campaign_id - - @property - def campaign_name(self): - """Gets the campaign_name of this SmtpApiTokenView. # noqa: E501 + def password(self): + """Gets the password of this SmtpApiTokenView. # noqa: E501 - A name for the campaign tied to the token. # noqa: E501 + Password used to log into the HubSpot SMTP server. # noqa: E501 - :return: The campaign_name of this SmtpApiTokenView. # noqa: E501 + :return: The password of this SmtpApiTokenView. # noqa: E501 :rtype: str """ - return self._campaign_name + return self._password - @campaign_name.setter - def campaign_name(self, campaign_name): - """Sets the campaign_name of this SmtpApiTokenView. + @password.setter + def password(self, password): + """Sets the password of this SmtpApiTokenView. - A name for the campaign tied to the token. # noqa: E501 + Password used to log into the HubSpot SMTP server. # noqa: E501 - :param campaign_name: The campaign_name of this SmtpApiTokenView. # noqa: E501 - :type campaign_name: str + :param password: The password of this SmtpApiTokenView. # noqa: E501 + :type password: str """ - if self.local_vars_configuration.client_side_validation and campaign_name is None: # noqa: E501 - raise ValueError("Invalid value for `campaign_name`, must not be `None`") # noqa: E501 - self._campaign_name = campaign_name + self._password = password def to_dict(self, serialize=False): """Returns the model properties as a dict""" diff --git a/hubspot/marketing/transactional/rest.py b/hubspot/marketing/transactional/rest.py index 9c379464..f1633d16 100644 --- a/hubspot/marketing/transactional/rest.py +++ b/hubspot/marketing/transactional/rest.py @@ -1,12 +1,12 @@ # coding: utf-8 """ - Transactional Single Send +Transactional Single Send - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: v3 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: v3 +Generated by: https://openapi-generator.tech """ @@ -30,6 +30,7 @@ class RESTResponse(io.IOBase): + def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -46,6 +47,7 @@ def getheader(self, name, default=None): class RESTClientObject(object): + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501