def pnl_cancel(self, asset_manager_id, pnl_type,<EOL>business_date, book_id,<EOL>next_hash_key=None, next_range_key=None,<EOL>page_size=None):
self.logger.info('<STR_LIT>' %(pnl_type, asset_manager_id, business_date, book_id))<EOL>url = '<STR_LIT>' % (self.endpoint, asset_manager_id)<EOL>params = {'<STR_LIT>': pnl_type,<EOL>'<STR_LIT>': business_date.isoformat(),<EOL>'<STR_LIT>': book_id}<EOL>if next_hash_key:<EOL><INDENT>params['<STR_LIT>'] = next_hash_key<EOL><DEDENT>if next_range_key:<EOL><INDENT>params['<STR_LIT>'] = next_range_key<EOL><DEDENT>if page_size:<EOL><INDENT>params['<STR_LIT>'] = page_size<EOL><DEDENT>response = self.session.delete(url, params=params)<EOL>if response.ok:<EOL><INDENT>json_body = response.json()<EOL>next_hash_key = json_body.get('<STR_LIT>')<EOL>next_range_key = json_body.get('<STR_LIT>')<EOL>count = json_body.get('<STR_LIT:count>')<EOL>self.logger.info('<STR_LIT>', count)<EOL>return next_hash_key, next_range_key, count<EOL><DEDENT>else:<EOL><INDENT>self.logger.error(response.text)<EOL>response.raise_for_status()<EOL><DEDENT>
Cancel the PNL records matching the request

Args:
    asset_manager_id (int): id of asset manager owning the pnl records
    pnl_type (str): either "Position" or "Transaction
    business_date (date): date of the pnl records to return
    book_id (str): book id filter on pnl records
    next_hash_key (str): continuation hash key for paging the results
    next_range_key (str): continuation range key for paging the results
    page_size (int): the number of results to return