示例#1
0
 def _ccreq(self, acctid, dtstart):
     req = tag('CCSTMTRQ',
         tag('CCACCTFROM',field('ACCTID',acctid)),
         tag('INCTRAN',
         field('DTSTART',dtstart),
         field('INCLUDE','Y')))
     return self._message('CREDITCARD','CCSTMT',req)
示例#2
0
 def _bareq(self, acctid, routing_number, dtstart, accttype):
     config = self.config
     req = tag(
         'STMTRQ',
         tag('BANKACCTFROM', field('BANKID', str(routing_number)),
             field('ACCTID', acctid), field('ACCTTYPE', accttype)),
         tag('INCTRAN', field('DTSTART', dtstart), field('INCLUDE', 'Y')))
     return self._message('BANK', 'STMT', req)
示例#3
0
 def _message(self, msgType, trnType, request):
     return tag(
         msgType + 'MSGSRQV1',
         tag(
             trnType + 'TRNRQ',
             field('TRNUID', _genuuid()),
             field('CLTCOOKIE', self._cookie()),  # what is cookie used for?
             request))
示例#4
0
 def _bareq(self, acctid,routing_number,  dtstart, accttype):
     config=self.config
     req = tag('STMTRQ',
         tag('BANKACCTFROM',
             field('BANKID', str(routing_number)),
                 field('ACCTID',acctid),
             field('ACCTTYPE',accttype)),
         tag('INCTRAN',
             field('DTSTART',dtstart),
             field('INCLUDE','Y')))
     return self._message('BANK','STMT',req)
示例#5
0
 def _invstreq(self, brokerid, acctid, dtstart):
     dtnow = time.strftime('%Y%m%d%H%M%S', time.localtime())
     req = tag(
         'INVSTMTRQ',
         tag('INVACCTFROM', field('BROKERID', brokerid),
             field('ACCTID', acctid)),
         tag('INCTRAN', field('DTSTART', dtstart), field('INCLUDE', 'Y')),
         field('INCOO', 'Y'),
         tag('INCPOS', field('DTASOF', dtnow), field('INCLUDE', 'Y')),
         field('INCBAL', 'Y'))
     return self._message('INVSTMT', 'INVSTMT', req)
示例#6
0
 def _invstreq(self, brokerid, acctid, dtstart):
     dtnow = time.strftime('%Y%m%d%H%M%S',time.localtime())
     req = tag('INVSTMTRQ',
                tag('INVACCTFROM',
                   field('BROKERID', brokerid),
                   field('ACCTID',acctid)),
                tag('INCTRAN',
                     field('DTSTART',dtstart),
                     field('INCLUDE','Y')),
                field('INCOO','Y'),
                tag('INCPOS',
                     field('DTASOF', dtnow),
                     field('INCLUDE','Y')),
                field('INCBAL','Y'))
     return self._message('INVSTMT','INVSTMT',req)
示例#7
0
 def _signOn(self):
     config = self.config
     fidata = [ field('ORG',config['fiorg']) ]
     if config.has_key('fid'):
         fidata += [ field('FID',config['fid']) ]
     return tag('SIGNONMSGSRQV1',
                 tag('SONRQ',
                      field('DTCLIENT',_date()),
                      field('USERID',config['user']),
                      field('USERPASS',config['password']),
                      field('LANGUAGE','ENG'),
                      tag('FI', *fidata),
                      field('APPID',config['appid']),
                      field('APPVER',config['appver']),
                      ))
示例#8
0
 def _signOn(self):
     config = self.config
     fidata = [field('ORG', config['fiorg'])]
     if config.has_key('fid'):
         fidata += [field('FID', config['fid'])]
     return tag(
         'SIGNONMSGSRQV1',
         tag(
             'SONRQ',
             field('DTCLIENT', _date()),
             field('USERID', config['user']),
             field('USERPASS', config['password']),
             field('LANGUAGE', 'ENG'),
             tag('FI', *fidata),
             field('APPID', config['appid']),
             field('APPVER', config['appver']),
         ))
示例#9
0
 def _acctreq(self, dtstart):
     req = tag('ACCTINFORQ',field('DTACCTUP',dtstart))
     return self._message('SIGNUP','ACCTINFO',req)
示例#10
0
 def _message(self,msgType,trnType,request):
     return tag(msgType+'MSGSRQV1',
                 tag(trnType+'TRNRQ',
                      field('TRNUID',_genuuid()),
                      field('CLTCOOKIE',self._cookie()), # what is cookie used for?
                      request))
示例#11
0
 def _ccreq(self, acctid, dtstart):
     req = tag(
         'CCSTMTRQ', tag('CCACCTFROM', field('ACCTID', acctid)),
         tag('INCTRAN', field('DTSTART', dtstart), field('INCLUDE', 'Y')))
     return self._message('CREDITCARD', 'CCSTMT', req)
示例#12
0
 def _acctreq(self, dtstart):
     req = tag('ACCTINFORQ', field('DTACCTUP', dtstart))
     return self._message('SIGNUP', 'ACCTINFO', req)