def request_accounts( self, password: str, dtacctup: datetime.datetime, dryrun: bool = False, version: Optional[int] = None, verify_ssl: bool = True, timeout: Optional[float] = None, ) -> BinaryIO: """ Package and send OFX account info requests (ACCTINFORQ) """ logger.info("Creating account info request") signon = self.signon(password) acctinforq = ACCTINFORQ(dtacctup=dtacctup) acctinfotrnrq = ACCTINFOTRNRQ(trnuid=self.uuid, acctinforq=acctinforq) msgs = SIGNUPMSGSRQV1(acctinfotrnrq) logger.debug(f"Wrapped account info request messages: {msgs}") ofx = OFX(signonmsgsrqv1=signon, signupmsgsrqv1=msgs) return self.download(ofx, dryrun=dryrun, verify_ssl=verify_ssl, timeout=timeout)
def request_accounts( self, password: str, dtacctup: datetime.datetime, dryrun: bool = False, version: Optional[int] = None, gen_newfileuid: bool = True, timeout: Optional[float] = None, ) -> BinaryIO: """ Package and send OFX account info requests (ACCTINFORQ) """ if dryrun: url = "" else: RqCls2url = self._get_service_urls( timeout=timeout, gen_newfileuid=gen_newfileuid, ) # HACK FIXME # As a simplification, we assume that FIs handle all classes # of statement request from a single URL. urls = set(RqCls2url.values()) assert len(urls) == 1 url = urls.pop() logger.info("Creating account info request") signon = self.signon(password) acctinforq = ACCTINFORQ(dtacctup=dtacctup) acctinfotrnrq = ACCTINFOTRNRQ(trnuid=self.uuid, acctinforq=acctinforq) msgs = SIGNUPMSGSRQV1(acctinfotrnrq) logger.debug(f"Wrapped account info request messages: {msgs}") ofx = OFX(signonmsgsrqv1=signon, signupmsgsrqv1=msgs) if gen_newfileuid: newfileuid = self.uuid else: newfileuid = None return self.download( ofx, newfileuid=newfileuid, dryrun=dryrun, timeout=timeout, url=url, )
def request_accounts( self, user, password, dtacctup, clientuid=None, dryrun=False, prettyprint=False, close_elements=True, ): """ Package and send OFX account info requests (ACCTINFORQ) """ signonmsgs = self.signon(user, password, clientuid=clientuid) acctinforq = ACCTINFORQ(dtacctup=dtacctup) acctinfotrnrq = ACCTINFOTRNRQ(trnuid=self.uuid, acctinforq=acctinforq) signupmsgs = SIGNUPMSGSRQV1(acctinfotrnrq) ofx = OFX(signonmsgsrqv1=signonmsgs, signupmsgsrqv1=signupmsgs) return self.download( ofx, dryrun=dryrun, prettyprint=prettyprint, close_elements=close_elements )
def request_accounts(self, user, password, dtacctup, language=None, clientuid=None, appid=None, appver=None, dryrun=False, version=None, prettyprint=False, close_elements=True, timeout=None): """ Package and send OFX account info requests (ACCTINFORQ) """ signon = self.signon(user, password, language=language, clientuid=clientuid, appid=appid, appver=appver) acctinforq = ACCTINFORQ(dtacctup=dtacctup) acctinfotrnrq = ACCTINFOTRNRQ(trnuid=self.uuid, acctinforq=acctinforq) signupmsgs = SIGNUPMSGSRQV1(acctinfotrnrq) ofx = OFX(signonmsgsrqv1=signon, signupmsgsrqv1=signupmsgs) return self.download( ofx, dryrun=dryrun, version=version, prettyprint=prettyprint, close_elements=close_elements, timeout=timeout, )
def aggregate(cls): return SIGNUPMSGSRQV1(signup.EnrolltrnrqTestCase.aggregate, signup.EnrolltrnrqTestCase.aggregate)