Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
"""initialize an ecommerce bridge client"""
super(EcommerceBridgeClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.ecommerce_bridge")
def __init__(self, *args, **kwargs):
super(PipelinesClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.crm-pipelines")
def __init__(self, *args, **kwargs):
super(LinesClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.lines")
) -> None:
super(BaseClient, self).__init__()
# reverse so that the first one in the list because the first parent
if not mixins:
mixins = []
mixins.reverse()
for mixin_class in mixins:
if mixin_class not in self.__class__.__bases__:
self.__class__.__bases__ = (mixin_class,) + self.__class__.__bases__
self.api_key = api_key
self.access_token = access_token
self.refresh_token = refresh_token
self.client_id = client_id
self.client_secret = client_secret
self.log = utils.get_log("hubspot3")
if not disable_auth:
if self.api_key and self.access_token:
raise HubspotBadConfig("Cannot use both api_key and access_token.")
if not (self.api_key or self.access_token or self.refresh_token):
raise HubspotNoConfig("Missing required credentials.")
self.options = {
"api_base": api_base,
"debug": debug,
"disable_auth": disable_auth,
"timeout": timeout,
}
self.options.update(extra_options)
self._prepare_connection_type()
def __init__(self, *args, **kwargs):
"""initialize a contacts client"""
# Since this client is used to generate tokens for authentication, it does not require
# authentication itself.
kwargs["disable_auth"] = True
super(OAuth2Client, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.oauth2")
self.options["content_type"] = "application/x-www-form-urlencoded"
# Make sure that certain credentials that wouldn't be used anyway are not set. Not having
# an access token will also make sure that the `_call_raw` implementation does not try to
# refresh access tokens on its own.
self.api_key = None
self.access_token = None
def __init__(self, *args, **kwargs):
"""initialize an email subscription client"""
super(EmailSubscriptionClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.email_subscription")
def __init__(self, *args, **kwargs):
"""initialize a workflows client"""
super(WorkflowsClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.workflows")
def __init__(self, *args, **kwargs):
super(CompaniesClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.companies")
def __init__(self, *args, **kwargs):
"""initialize a tickets client"""
super(TicketsClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.tickets")
def __init__(self, *args, **kwargs):
super(PropertiesClient, self).__init__(*args, **kwargs)
self.log = get_log("hubspot3.properties")