def __init__(self, key=None, client=None): self.api_key = key from stripe import verify_ssl_certs self._client = client or http_client.new_default_http_client( verify_ssl_certs=verify_ssl_certs)
def __init__(self, key=None, client=None, api_base=None, account=None): self.api_base = api_base or stripe.api_base self.api_key = key self.stripe_account = account from stripe import verify_ssl_certs as verify self._client = client or stripe.default_http_client or \ http_client.new_default_http_client(verify_ssl_certs=verify)
def __init__( self, key=None, client=None, api_base=None, api_version=None, account=None, ): self.api_base = api_base or stripe.api_base self.api_key = key self.api_version = api_version or stripe.api_version self.stripe_account = account self._default_proxy = None from stripe import verify_ssl_certs as verify from stripe import proxy if client: self._client = client elif stripe.default_http_client: self._client = stripe.default_http_client if proxy != self._default_proxy: warnings.warn( "stripe.proxy was updated after sending a " "request - this is a no-op. To use a different proxy, " "set stripe.default_http_client to a new client " "configured with the proxy.") else: # If the stripe.default_http_client has not been set by the user # yet, we'll set it here. This way, we aren't creating a new # HttpClient for every request. stripe.default_http_client = http_client.new_default_http_client( verify_ssl_certs=verify, proxy=proxy) self._client = stripe.default_http_client self._default_proxy = proxy self._last_request_metrics = None
def __init__( self, key=None, client=None, api_base=None, api_version=None, account=None, ): self.api_base = api_base or stripe.api_base self.api_key = key self.api_version = api_version or stripe.api_version self.stripe_account = account self._default_proxy = None from stripe import verify_ssl_certs as verify from stripe import proxy if client: self._client = client elif stripe.default_http_client: self._client = stripe.default_http_client if proxy != self._default_proxy: warnings.warn( "stripe.proxy was updated after sending a " "request - this is a no-op. To use a different proxy, " "set stripe.default_http_client to a new client " "configured with the proxy." ) else: # If the stripe.default_http_client has not been set by the user # yet, we'll set it here. This way, we aren't creating a new # HttpClient for every request. stripe.default_http_client = http_client.new_default_http_client( verify_ssl_certs=verify, proxy=proxy ) self._client = stripe.default_http_client self._default_proxy = proxy