def __init__( self, client_id, secret, public_key, environment, request_session, suppress_warnings=False, timeout=DEFAULT_TIMEOUT, api_version=None, client_app=None, ): ''' Initialize a client with credentials. :param str client_id: Your Plaid client ID :arg str secret: Your Plaid secret :arg str public_key: Your Plaid public key :arg str environment: One of ``sandbox``, ``development``, or ``production``. :arg bool suppress_warnings: Suppress Plaid warnings. :arg int timeout: Timeout for API requests. :arg str api_version: API version to use for requests :arg str client_app: Internal header to include in requests :arg request_session: aiohttp ClientSession for http request ''' self.client_id = client_id self.secret = secret self.public_key = public_key self.environment = environment self.suppress_warnings = suppress_warnings self.timeout = timeout self.api_version = api_version self.client_app = client_app self.request_session = request_session if self.environment == 'development' and not self.suppress_warnings: warnings.warn(''' Development is not intended for production usage. Swap out url for https://production.plaid.com via Client.config before switching to production ''') # Mirror the HTTP API hierarchy self.Accounts = Accounts(self) self.AssetReport = AssetReport(self) self.Auth = Auth(self) self.Categories = Categories(self) self.CreditDetails = CreditDetails(self) self.Holdings = Holdings(self) self.Identity = Identity(self) self.Income = Income(self) self.Institutions = Institutions(self) self.InvestmentTransactions = InvestmentTransactions(self) self.Item = Item(self) self.Liabilities = Liabilities(self) self.Processor = Processor(self) self.Sandbox = Sandbox(self) self.Transactions = Transactions(self)
def __init__(self, client_id, secret, public_key, environment, suppress_warnings=False, timeout=DEFAULT_TIMEOUT): ''' Initialize a client with credentials. :param str client_id: Your Plaid client ID :arg str secret: Your Plaid secret :arg str public_key: Your Plaid public key :arg str environment: One of ``sandbox``, ``development``, or ``production``. :arg bool suppress_warnings: Suppress Plaid warnings. :arg int timeout: Timeout for API requests. ''' self.client_id = client_id self.secret = secret self.public_key = public_key self.environment = environment self.suppress_warnings = suppress_warnings self.timeout = timeout if self.environment == 'development' and not self.suppress_warnings: warnings.warn(''' Development is not intended for production usage. Swap out url for https://production.plaid.com via Client.config before switching to production ''') # Mirror the HTTP API hierarchy self.Accounts = Accounts(self) self.Auth = Auth(self) self.Categories = Categories(self) self.CreditDetails = CreditDetails(self) self.Identity = Identity(self) self.Income = Income(self) self.Institutions = Institutions(self) self.Item = Item(self) self.Processor = Processor(self) self.Sandbox = Sandbox(self) self.Transactions = Transactions(self)