labpack/banking/capitalone.py
def _get_products(self):
        
        ''' a method to retrieve account product details at initialization '''
    
    # request product list
        products_request = self.account_products()
        if products_request['error']:
            raise Exception(products_request['error'])

    # construct list of product ids
        product_ids = []
        for product in products_request["json"]["entries"]:
            product_ids.append(product['productId'])
    
    # construct default product map
        self.products = {}
    
    # request product details
        for id in product_ids:
            product_request = self.account_product(id)
            if product_request['error']:
                raise Exception(product_request['error'])
            self.products[id] = product_request['json']

        return self.products
 a method to retrieve account product details at initialization 
a method to retrieve account product details at initialization
a method to retrieve account product details at initialization
def _get_products(self):
        products_request = self.account_products()
        if products_request['error']:
            raise Exception(products_request['error'])
        product_ids = []
        for product in products_request["json"]["entries"]:
            product_ids.append(product['productId'])
        self.products = {}
        for id in product_ids:
            product_request = self.account_product(id)
            if product_request['error']:
                raise Exception(product_request['error'])
            self.products[id] = product_request['json']
        return self.products
def _get_products ( self ) : products_request = self . account_products ( ) if products_request [ 'error' ] : raise Exception ( products_request [ 'error' ] ) product_ids = [ ] for product in products_request [ "json" ] [ "entries" ] : product_ids . append ( product [ 'productId' ] ) self . products = { } for id in product_ids : product_request = self . account_product ( id ) if product_request [ 'error' ] : raise Exception ( product_request [ 'error' ] ) self . products [ id ] = product_request [ 'json' ] return self . products
a method to retrieve account product details at initialization
a method to retrieve account product details at initialization
''' a method to retrieve account product details at initialization ''' # request product list # construct list of product ids # construct default product map # request product details
self