def get_ad_accounts(self, business_id): """Returns list of adaccounts associated with the ads pixel""" response = self.get_api_assured().call( 'GET', (self.get_id_assured(), 'shared_accounts'), params={'business': business_id}, ).json() ret_val = [] if response: keys = response['data'] for item in keys: search_obj = AdAccount() search_obj.update(item) ret_val.append(search_obj) return ret_val
def get_ad_accounts(self, business_id): """Returns list of adaccounts associated with the ads pixel""" response = self.get_api_assured().call( 'GET', (self.get_id_assured(), 'shared_accounts'), params={ 'business': business_id }, ).json() ret_val = [] if response: keys = response['data'] for item in keys: search_obj = AdAccount() search_obj.update(item) ret_val.append(search_obj) return ret_val