Exemple #1
0
    def signon(
        self,
        userpass: str,
        userid: Optional[str] = None,
        sesscookie: Optional[str] = None,
    ) -> SIGNONMSGSRQV1:
        """ Construct SONRQ; package in SIGNONMSGSRQV1 """
        if self.org:
            fi: Optional[FI] = FI(org=self.org, fid=self.fid)
        else:
            fi = None

        if userid is None:
            userid = self.userid

        # CLIENTUID was introduced to the spec in OFXv1.0.3
        if self.version < 103:
            clientuid = None
        else:
            clientuid = self.clientuid

        sonrq = SONRQ(
            dtclient=self.dtclient(),
            userid=userid,
            userpass=userpass,
            language=self.language,
            fi=fi,
            sesscookie=sesscookie,
            appid=self.appid,
            appver=self.appver,
            clientuid=clientuid,
        )
        return SIGNONMSGSRQV1(sonrq=sonrq)
Exemple #2
0
    def signon(self, userid, userpass, sesscookie=None, clientuid=None):
        """ Construct SONRQ; package in SIGNONMSGSRQV1 """
        if self.org:
            fi = FI(org=self.org, fid=self.fid)
        else:
            fi = None

        dtclient = datetime.datetime.now()
        sonrq = SONRQ(dtclient=dtclient, userid=userid, userpass=userpass,
                      language=self.language, fi=fi, sesscookie=sesscookie,
                      appid=self.appid, appver=self.appver,
                      clientuid=clientuid)
        return SIGNONMSGSRQV1(sonrq=sonrq)
 def aggregate(cls):
     return FI(org="IBLLC-US", fid="4705")