def __stage_order(self):
<EOL>if self.__already_staged is True and self.__i_know_what_im_doing is True:<EOL><INDENT>self.__log('<STR_LIT>'.format(len(self.loans)))<EOL>return<EOL><DEDENT>self.__log('<STR_LIT>'.format(len(self.loans)))<EOL>self.lc.session.clear_session_order()<EOL>loan_ids = self.loans.keys()<EOL>self.__log('<STR_LIT>'.format(loan_ids))<EOL>f = FilterByLoanID(loan_ids)<EOL>results = self.lc.search(f, limit=len(self.loans))<EOL>if len(results['<STR_LIT>']) == <NUM_LIT:0> or results['<STR_LIT>'] != len(self.loans):<EOL><INDENT>raise LendingClubError('<STR_LIT>'.format(len(self.loans), results['<STR_LIT>']), results)<EOL><DEDENT>for loan_id, amount in self.loans.iteritems():<EOL><INDENT>payload = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': loan_id,<EOL>'<STR_LIT>': amount,<EOL>'<STR_LIT>': '<STR_LIT:false>'<EOL>}<EOL>response = self.lc.session.get('<STR_LIT>', query=payload)<EOL>json_response = response.json()<EOL>if not self.lc.session.json_success(json_response):<EOL><INDENT>raise LendingClubError('<STR_LIT>'.format(loan_id, response.text), response)<EOL><DEDENT><DEDENT>payload = {<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>response = self.lc.session.get('<STR_LIT>', query=payload)<EOL>json_response = response.json()<EOL>if self.lc.session.json_success(json_response):<EOL><INDENT>self.__log(json_response['<STR_LIT:message>'])<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>raise self.__log('<STR_LIT>'.format(response.text))<EOL>raise LendingClubError('<STR_LIT>', response.text)<EOL><DEDENT>
Add all the loans to the LC order session