Пример #1
0
 def aggregate(cls):
     return models.OFX(signonmsgsrsv1=models.SIGNONMSGSRSV1(
         sonrs=models.SONRS(status=models.STATUS(
             code="3000", severity="ERROR",
             message="Further information required"),
             dtserver=datetime(2006, 3, 21, 8, 30, 15, tzinfo=UTC),
             language="ENG", fi=FI)))
Пример #2
0
 def aggregate(cls):
     return models.OFX(
         signonmsgsrsv1=models.SIGNONMSGSRSV1(
             sonrs=models.SONRS(
                 status=OK_STATUS,
                 dtserver=datetime(2006, 3, 21, 8, 30, 25, tzinfo=UTC),
                 language="ENG",
                 fi=FI,
             ),
             mfachallengetrnrs=models.MFACHALLENGETRNRS(
                 trnuid="66D3749F-5B3B-4DC3-87A3-8F795EA59EDB",
                 status=SUCCESS_STATUS,
                 mfachallengers=models.MFACHALLENGERS(
                     models.MFACHALLENGE(
                         mfaphraseid="MFA13",
                         mfaphraselabel="Please enter the last four digits of your social security number",
                     ),
                     models.MFACHALLENGE(mfaphraseid="MFA107"),
                     models.MFACHALLENGE(
                         mfaphraseid="123",
                         mfaphraselabel="With which branch is your account associated?",
                     ),
                 ),
             ),
         )
     )
Пример #3
0
 def aggregate(cls):
     return models.OFX(signonmsgsrsv1=models.SIGNONMSGSRSV1(
         sonrs=models.SONRS(status=models.STATUS(
             code="15512", severity="ERROR",
             message="Please provide Authentication Token"),
             dtserver=datetime(2006, 3, 21, 8, 30, 15, tzinfo=UTC),
             language="ENG", fi=FI)))
Пример #4
0
 def aggregate(cls):
     return models.OFX(signonmsgsrqv1=models.SIGNONMSGSRQV1(
         sonrq=models.SONRQ(
             dtclient=datetime(2006, 3, 21, 8, 30, 10, tzinfo=UTC),
             userid="12345", userpass="******", language="ENG",
             fi=FI, appid="MyApp", appver="1600",
             clientuid="22576921-8E39-4A82-9E3E-EDDB121ADDEE")))
Пример #5
0
    def aggregate(cls):
        banktranlist = models.BANKTRANLIST(
            models.STMTTRN(trntype="CHECK",
                           dtposted=datetime(2005, 10, 4, tzinfo=UTC),
                           trnamt=Decimal("-200.00"),
                           fitid="00002",
                           checknum="1000"),
            models.STMTTRN(trntype="ATM",
                           dtposted=datetime(2005, 10, 20, tzinfo=UTC),
                           dtuser=datetime(2005, 10, 20, tzinfo=UTC),
                           trnamt=Decimal("-300.00"),
                           fitid="00003"),
            dtstart=datetime(2005, 10, 1, tzinfo=UTC),
            dtend=datetime(2005, 10, 28, tzinfo=UTC))

        balargs = {
            "balamt": Decimal("200.29"),
            "dtasof": datetime(2005, 10, 29, 11, 20, tzinfo=UTC)
        }

        stmttrnrs = models.STMTTRNRS(trnuid="1001",
                                     status=STATUS,
                                     stmtrs=models.STMTRS(
                                         curdef="USD",
                                         bankacctfrom=BANKACCTFROM,
                                         banktranlist=banktranlist,
                                         ledgerbal=models.LEDGERBAL(**balargs),
                                         availbal=models.AVAILBAL(**balargs)))
        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(stmttrnrs))
Пример #6
0
    def aggregate(cls):
        tax1099b = models.TAX1099B_V100(
            srvrtid="IMASRVRTID",
            taxyear=2018,
            payeraddr=PAYERADDR,
            payerid="012345678",
            recid="****56789",
        )

        dd0 = models.FIDIRECTDEPOSITINFO(
            finame_directdeposit="Your FI name here",
            firoutingnum="122000247",
            fiacctnum="080808080808",
        )
        dd1 = models.FIDIRECTDEPOSITINFO(
            finame_directdeposit="Your FI name here",
            firoutingnum="933000247",
            fiacctnum="090809080808",
            fiaccountnickname="James’ nest egg",
        )

        return models.OFX(
            signonmsgsrsv1=SIGNONMSGSRSV1,
            tax1099msgsrsv1=models.TAX1099MSGSRSV1(
                models.TAX1099TRNRS(
                    trnuid="1001",
                    status=STATUS,
                    tax1099rs=models.TAX1099RS(dd0, dd1, tax1099b, recid="111423815"),
                )
            ),
        )
Пример #7
0
 def aggregate(cls):
     return models.OFX(signonmsgsrsv1=models.SIGNONMSGSRSV1(
         sonrs=models.SONRS(
             status=SUCCESS_STATUS,
             dtserver=datetime(2006, 3, 21, 8, 34, 45, tzinfo=UTC),
             language="ENG", fi=FI,
             accesskey="EE225228-38E6-4E35-8266-CD69B5370675")))
Пример #8
0
 def aggregate(cls):
     stmttrnrq = models.STMTTRNRQ(trnuid="1001",
                                  stmtrq=models.STMTRQ(
                                      bankacctfrom=BANKACCTFROM,
                                      inctran=models.INCTRAN(include=True)))
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(stmttrnrq))
Пример #9
0
 def aggregate(cls):
     trnrq = models.STPCHKTRNRQ(
         trnuid="1001",
         stpchkrq=models.STPCHKRQ(bankacctfrom=BANKACCTFROM,
                                  chkrange=models.CHKRANGE(
                                      chknumstart="200", chknumend="202")))
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(trnrq))
Пример #10
0
    def aggregate(cls):
        sonrs = models.SONRS(
            status=STATUS,
            dtserver=datetime(2018, 1, 30, 13, 25, 10, tzinfo=UTC),
            language="ENG",
        )

        payeraddr = models.PAYERADDR(
            payername1="Charles Schwab",
            addr1="123 Schwab Way",
            city="Philadelphia",
            state="PA",
            postalcode="26433",
        )

        recaddr = models.RECADDR(
            recname1="Mr Investor",
            addr1="464 Investor Way",
            city="Mountain View",
            state="CA",
            postalcode="96433",
        )

        tax1099int = models.TAX1099INT_V100(
            srvrtid="2345",
            taxyear=2018,
            intincome=Decimal("3000.12"),
            fedtaxwh=Decimal("200.56"),
            payeraddr=payeraddr,
            payerid="2331243",
            recaddr=recaddr,
            recid="123456789",
            recacct="12345",
        )

        tax1099div = models.TAX1099DIV_V100(
            srvrtid="2346",
            taxyear=2018,
            totcapgain=Decimal("34000"),
            p28gain=Decimal("34000"),
            payeraddr=payeraddr,
            payerid="2331243",
            recaddr=recaddr,
            recid="123456789",
            recacct="12345",
        )

        trnrs = models.TAX1099TRNRS(
            trnuid="12345",
            status=STATUS,
            tax1099rs=models.TAX1099RS(tax1099int, tax1099div, recid="123456789"),
        )

        return models.OFX(
            signonmsgsrsv1=models.SIGNONMSGSRSV1(sonrs=sonrs),
            tax1099msgsrsv1=models.TAX1099MSGSRSV1(trnrs),
        )
Пример #11
0
 def aggregate(cls):
     intratrnrq = models.INTRATRNRQ(
         trnuid="1001",
         intrarq=models.INTRARQ(
             xferinfo=models.XFERINFO(bankacctfrom=BANKACCTFROM,
                                      bankacctto=BANKACCTTO,
                                      trnamt=Decimal("200.00"))))
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(intratrnrq))
Пример #12
0
 def aggregate(cls):
     rq = models.RECINTRASYNCRQ(models.RECINTRATRNRQ(
         trnuid="1005",
         recintracanrq=models.RECINTRACANRQ(recsrvrtid="20000",
                                            canpending=True)),
                                token="324789987",
                                rejectifmissing=True,
                                bankacctfrom=BANKACCTFROM)
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(rq))
Пример #13
0
 def aggregate(cls):
     rq = models.RECINTRARQ(recurrinst=models.RECURRINST(freq="MONTHLY"),
                            intrarq=models.INTRARQ(xferinfo=models.XFERINFO(
                                bankacctfrom=BANKACCTFROM,
                                bankacctto=BANKACCTTO,
                                trnamt=Decimal("1000.00"),
                                dtdue=datetime(2006, 11, 15, tzinfo=UTC))))
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(
                           models.RECINTRATRNRQ(recintrarq=rq,
                                                trnuid="1001")))
Пример #14
0
 def aggregate(cls):
     trnrs = models.RECINTRATRNRS(trnuid="1005",
                                  status=STATUS,
                                  recintracanrs=models.RECINTRACANRS(
                                      recsrvrtid="20000", canpending=True))
     return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                       bankmsgsrsv1=models.BANKMSGSRSV1(
                           models.RECINTRASYNCRS(
                               trnrs,
                               token="324789988",
                               bankacctfrom=BANKACCTFROM)))
Пример #15
0
 def aggregate(cls):
     return models.OFX(signonmsgsrqv1=models.SIGNONMSGSRQV1(
         sonrq=models.SONRQ(
             dtclient=datetime(2006, 3, 21, 8, 30, 20, tzinfo=UTC),
             userid="12345", userpass="******", language="ENG",
             fi=FI, appid="MyApp", appver="1600",
             clientuid="22576921-8E39-4A82-9E3E-EDDB121ADDEE"),
         mfachallengetrnrq=models.MFACHALLENGETRNRQ(
             trnuid="66D3749F-5B3B-4DC3-87A3-8F795EA59EDB",
             mfachallengerq=models.MFACHALLENGERQ(
                 dtclient=datetime(2006, 3, 21, 8, 30, 20, tzinfo=UTC)))))
Пример #16
0
    def aggregate(cls):
        rs = models.STPCHKRS(models.STPCHKNUM(checknum="200", chkstatus="101"),
                             models.STPCHKNUM(checknum="201", chkstatus="0"),
                             models.STPCHKNUM(checknum="202", chkstatus="0"),
                             curdef="USD",
                             bankacctfrom=BANKACCTFROM,
                             fee=Decimal("10.00"),
                             feemsg="Fee for stop payment")

        trnrs = models.STPCHKTRNRS(trnuid="1001", status=STATUS, stpchkrs=rs)
        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(trnrs))
Пример #17
0
 def aggregate(cls):
     rq = models.INVSTMTRQ(invacctfrom=INVACCTFROM,
                           inctran=models.INCTRAN(dtstart=datetime(
                               2005, 8, 24, 13, 1, 5, tzinfo=UTC),
                                                  include=True),
                           incoo=True,
                           incpos=models.INCPOS(include=True),
                           incbal=True)
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       invstmtmsgsrqv1=models.INVSTMTMSGSRQV1(
                           models.INVSTMTTRNRQ(trnuid="1001",
                                               invstmtrq=rq)))
Пример #18
0
 def aggregate(cls):
     return models.OFX(signonmsgsrqv1=models.SIGNONMSGSRQV1(
         sonrq=models.SONRQ(
             models.MFACHALLENGEA(
                 mfaphraseid="MFA13", mfaphrasea="1234"),
             models.MFACHALLENGEA(
                 mfaphraseid="MFA107", mfaphrasea="ClientUserAgent"),
             models.MFACHALLENGEA(
                 mfaphraseid="123", mfaphrasea="Anytown"),
             dtclient=datetime(2006, 3, 21, 8, 34, 15, tzinfo=UTC),
             userid="12345", userpass="******", language="ENG",
             fi=FI, appid="MyApp", appver="1600",
             clientuid="22576921-8E39-4A82-9E3E-EDDB121ADDEE")))
Пример #19
0
    def aggregate(cls):
        rs = models.INTRARS(curdef="USD",
                            srvrtid="100100000",
                            xferinfo=models.XFERINFO(
                                bankacctfrom=BANKACCTFROM,
                                bankacctto=BANKACCTTO,
                                trnamt=Decimal("1000.00")),
                            dtxferprj=datetime(2006, 11, 15, tzinfo=UTC),
                            recsrvrtid="20000")

        trnrs = models.INTRATRNRS(trnuid="0", status=STATUS, intrars=rs)
        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(
                              models.INTRASYNCRS(trnrs,
                                                 token="22243",
                                                 bankacctfrom=BANKACCTFROM)))
Пример #20
0
    def aggregate(cls):
        intrars = models.INTRARS(
            curdef="USD",
            srvrtid="1001",
            xferinfo=models.XFERINFO(
                bankacctfrom=BANKACCTFROM,
                bankacctto=BANKACCTTO,
                trnamt=Decimal("200.00"),
            ),
            dtxferprj=datetime(2006, 8, 29, 10, tzinfo=UTC),
        )

        intratrnrs = models.INTRATRNRS(trnuid="1001",
                                       status=STATUS,
                                       intrars=intrars)
        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(intratrnrs))
Пример #21
0
 def aggregate(cls):
     sonrs = models.SONRS(
         status=STATUS,
         dtserver=datetime(2018, 1, 27, 13, 25, 10, tzinfo=UTC),
         language="ENG",
     )
     trnrs = models.TAX1099TRNRS(
         trnuid="12345",
         status=models.STATUS(
             code="14501",
             severity="ERROR",
             message="1099 Forms Unavailable for User",
         ),
     )
     return models.OFX(
         signonmsgsrsv1=models.SIGNONMSGSRSV1(sonrs=sonrs),
         tax1099msgsrsv1=models.TAX1099MSGSRSV1(trnrs),
     )
Пример #22
0
    def aggregate(cls):
        sonrq = models.SONRQ(
            dtclient=datetime(2018, 1, 30, 13, 25, 10, tzinfo=UTC),
            userid="123456789",
            userpass="******",
            language="ENG",
            appid="TTWin",
            appver="2018",
        )

        trnrq = models.TAX1099TRNRQ(
            trnuid="12345", tax1099rq=models.TAX1099RQ(2018, recid="123456789")
        )

        return models.OFX(
            signonmsgsrqv1=models.SIGNONMSGSRQV1(sonrq=sonrq),
            tax1099msgsrqv1=models.TAX1099MSGSRQV1(trnrq),
        )
Пример #23
0
    def aggregate(cls):
        rs = models.INTRARS(curdef="USD",
                            srvrtid="20000",
                            xferinfo=models.XFERINFO(bankacctfrom=BANKACCTFROM,
                                                     bankacctto=BANKACCTTO,
                                                     trnamt=Decimal("1000.00"),
                                                     dtdue=datetime(
                                                         2006,
                                                         11,
                                                         15,
                                                         tzinfo=UTC)))

        trnrs = models.RECINTRATRNRS(
            trnuid="1001",
            status=STATUS,
            recintrars=models.RECINTRARS(
                recsrvrtid="20000",
                recurrinst=models.RECURRINST(freq="MONTHLY"),
                intrars=rs))
        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(trnrs))
Пример #24
0
 def aggregate(cls):
     rq = models.INTRASYNCRQ(token="22243",
                             rejectifmissing=False,
                             bankacctfrom=BANKACCTFROM)
     return models.OFX(signonmsgsrqv1=SIGNONMSGSRQV1,
                       bankmsgsrqv1=models.BANKMSGSRQV1(rq))
Пример #25
0
    def aggregate(cls):
        trnrs0 = models.INTRATRNRS(
            trnuid="0",
            status=STATUS,
            intramodrs=models.INTRAMODRS(
                srvrtid="100100000",
                xferinfo=models.XFERINFO(
                    bankacctfrom=BANKACCTFROM,
                    bankacctto=BANKACCTTO,
                    trnamt=Decimal("1000.00"),
                ),
                xferprcsts=models.XFERPRCSTS(xferprccode="POSTEDON",
                                             dtxferprc=datetime(2006,
                                                                11,
                                                                15,
                                                                tzinfo=UTC)),
            ),
        )

        trnrs1 = models.INTRATRNRS(
            trnuid="0",
            status=STATUS,
            intrars=models.INTRARS(
                curdef="USD",
                srvrtid="112233",
                xferinfo=models.XFERINFO(
                    bankacctfrom=BANKACCTFROM,
                    bankacctto=BANKACCTTO,
                    trnamt=Decimal("1000.00"),
                ),
                dtxferprj=datetime(2006, 12, 15, tzinfo=UTC),
                recsrvrtid="20000",
            ),
        )

        trnrs2 = models.INTRATRNRS(
            trnuid="0",
            status=STATUS,
            intramodrs=models.INTRAMODRS(
                srvrtid="112233",
                xferinfo=models.XFERINFO(
                    bankacctfrom=BANKACCTFROM,
                    bankacctto=BANKACCTTO,
                    trnamt=Decimal("1000.00"),
                ),
                xferprcsts=models.XFERPRCSTS(xferprccode="POSTEDON",
                                             dtxferprc=datetime(2006,
                                                                12,
                                                                15,
                                                                tzinfo=UTC)),
            ),
        )

        trnrs3 = models.INTRATRNRS(
            trnuid="0",
            status=STATUS,
            intrars=models.INTRARS(
                curdef="USD",
                srvrtid="112255",
                xferinfo=models.XFERINFO(
                    bankacctfrom=BANKACCTFROM,
                    bankacctto=BANKACCTTO,
                    trnamt=Decimal("1000.00"),
                ),
                dtxferprj=datetime(2006, 1, 15, tzinfo=UTC),
                recsrvrtid="20000",
            ),
        )

        trnrs4 = models.INTRATRNRS(
            trnuid="0",
            status=STATUS,
            intracanrs=models.INTRACANRS(srvrtid="112255"))

        syncrs = models.INTRASYNCRS(
            trnrs0,
            trnrs1,
            trnrs2,
            trnrs3,
            trnrs4,
            token="22244",
            bankacctfrom=BANKACCTFROM,
        )

        return models.OFX(signonmsgsrsv1=SIGNONMSGSRSV1,
                          bankmsgsrsv1=models.BANKMSGSRSV1(syncrs))
Пример #26
0
    def aggregate(cls):
        procsum0 = models.PROCSUM_V100(
            form8949code="A",
            adjcode="M",
            sumcostbasis=Decimal("1050.33"),
            sumsalespr=Decimal("1140.00"),
        )

        procsum1 = models.PROCSUM_V100(
            form8949code="A",
            adjcode="MW",
            sumcostbasis=Decimal("1270.00"),
            sumsalespr=Decimal("1200.00"),
            sumadjamt=Decimal("100.00"),
            sumdescription="SHORT TERM WASH SALES",
        )

        procdet0 = models.PROCDET_V100(
            dtaqd=datetime(2017, 9, 10, tzinfo=UTC),
            dtsale=datetime(2018, 6, 18, tzinfo=UTC),
            saledescription="12.3 DFA TAX MGD FUND",
            costbasis=Decimal("350.11"),
            salespr=Decimal("380.00"),
            longshort="SHORT",
            noncoveredsecurity=False,
            basisnotshown=True,
        )

        procdet1 = models.PROCDET_V100(
            form8949code="A",
            dtaqd=datetime(2017, 9, 10, tzinfo=UTC),
            dtsale=datetime(2018, 6, 18, tzinfo=UTC),
            saledescription="12.3 DFA TAX MGD FUND",
            costbasis=Decimal("350.11"),
            salespr=Decimal("380.00"),
        )

        procdet2 = models.PROCDET_V100(
            form8949code="A",
            dtaqd=datetime(2017, 9, 10, tzinfo=UTC),
            dtsale=datetime(2018, 6, 18, tzinfo=UTC),
            saledescription="12.3 DFA TAX MGD FUND",
            costbasis=Decimal("350.11"),
            salespr=Decimal("380.00"),
            longshort="SHORT",
        )

        procdet3 = models.PROCDET_V100(
            form8949code="D",
            dtaqd=datetime(2013, 9, 10, tzinfo=UTC),
            dtsale=datetime(2018, 6, 18, tzinfo=UTC),
            saledescription="14.3 DFA TAX FUND",
            costbasis=Decimal("350.11"),
            salespr=Decimal("238.00"),
        )

        procdet4 = models.PROCDET_V100(
            form8949code="A",
            dtaqd=datetime(2018, 1, 21, tzinfo=UTC),
            dtsale=datetime(2018, 2, 1, tzinfo=UTC),
            secname="Security #1",
            numshrs=Decimal("125"),
            costbasis=Decimal("1050.00"),
            salespr=Decimal("1000.00"),
            washsale=True,
            washsalelossdisallowed=Decimal("50.00"),
        )

        procdet5 = models.PROCDET_V100(
            form8949code="A",
            dtaqd=datetime(2018, 1, 21, tzinfo=UTC),
            dtsale=datetime(2018, 2, 1, tzinfo=UTC),
            secname="Security #3",
            numshrs=Decimal("200"),
            costbasis=Decimal("220.00"),
            salespr=Decimal("200.00"),
            washsalelossdisallowed=Decimal("50.00"),
        )

        recaddr = models.RECADDR(
            recname1="Diane Jones",
            addr1="7535 Santa Fe Rd",
            city="Recipient City",
            state="CA",
            postalcode="9876-54321",
        )

        extdbinfo = models.EXTDBINFO_V100(
            procsum0,
            procsum1,
            procdet0,
            procdet1,
            procdet2,
            procdet3,
            procdet4,
            procdet5,
        )

        tax1099b = models.TAX1099B_V100(
            srvrtid="IMASRVRTID",
            taxyear=2018,
            extdbinfo_v100=extdbinfo,
            payeraddr=PAYERADDR,
            payerid="012345678",
            recaddr=recaddr,
            recid="****56789",
            recacct="1000002222",
        )

        return models.OFX(
            signonmsgsrsv1=SIGNONMSGSRSV1,
            tax1099msgsrsv1=models.TAX1099MSGSRSV1(
                models.TAX1099TRNRS(
                    trnuid="1001", status=STATUS, tax1099rs=models.TAX1099RS(tax1099b)
                )
            ),
        )
Пример #27
0
    def aggregate(cls):
        invtranlist = models.INVTRANLIST(
            models.BUYMF(
                invbuy=models.INVBUY(
                    invtran=models.INVTRAN(
                        fitid="212839062820295310723",
                        dttrade=datetime(2005, 1, 19, 5, tzinfo=UTC),
                    ),
                    secid=MF_SECID,
                    units=Decimal("14.6860"),
                    unitprice=Decimal("18.9000"),
                    total=Decimal("-277.5700"),
                    currency=models.CURRENCY(currate=Decimal("1.0000"), cursym="USD"),
                    subacctsec="OTHER",
                    subacctfund="OTHER",
                    loanid="2",
                    loanprincipal=Decimal("277.5700"),
                    loaninterest=Decimal("0.0000"),
                    inv401ksource="ROLLOVER",
                    dtpayroll=datetime(2005, 1, 14, 5, tzinfo=UTC),
                    prioryearcontrib=False,
                ),
                buytype="BUY",
            ),
            models.BUYMF(
                invbuy=models.INVBUY(
                    invtran=models.INVTRAN(
                        fitid="212839062820510822977",
                        dttrade=datetime(2005, 1, 19, 5, tzinfo=UTC),
                    ),
                    secid=MF_SECID,
                    units=Decimal("2.0220"),
                    unitprice=Decimal("18.9000"),
                    total=Decimal("-38.2200"),
                    currency=models.CURRENCY(currate=Decimal("1.0000"), cursym="USD"),
                    subacctsec="OTHER",
                    subacctfund="OTHER",
                    loanid="2",
                    loanprincipal=Decimal("0.0000"),
                    loaninterest=Decimal("38.2200"),
                    inv401ksource="ROLLOVER",
                    dtpayroll=datetime(2005, 1, 14, 5, tzinfo=UTC),
                    prioryearcontrib=False,
                ),
                buytype="BUY",
            ),
            models.BUYMF(
                invbuy=models.INVBUY(
                    invtran=models.INVTRAN(
                        fitid="212849815151950488609",
                        dttrade=datetime(2005, 1, 6, 5, tzinfo=UTC),
                    ),
                    secid=MF_SECID,
                    units=Decimal("4.9010"),
                    unitprice=Decimal("18.7900"),
                    total=Decimal("-92.0900"),
                    currency=models.CURRENCY(currate=Decimal("1.0000"), cursym="USD"),
                    subacctsec="OTHER",
                    subacctfund="OTHER",
                    inv401ksource="PRETAX",
                    dtpayroll=datetime(2005, 12, 31, 5, tzinfo=UTC),
                    prioryearcontrib=True,
                ),
                buytype="BUY",
            ),
            dtstart=datetime(2005, 1, 5, 22, 25, 32, tzinfo=UTC),
            dtend=datetime(2005, 1, 31, 21, 25, 32, tzinfo=UTC),
        )

        inv401k = models.INV401K(
            employername="ELGIN NATIONAL INDUSTRIES INC",
            planid="4343",
            planjoindate=datetime(1994, 1, 1, 5, tzinfo=UTC),
            matchinfo=models.MATCHINFO(matchpct=Decimal("0.00")),
            contribinfo=models.CONTRIBINFO(
                models.CONTRIBSECURITY(
                    secid=MF_SECID,
                    pretaxcontribpct=Decimal("50.0000"),
                    profitsharingcontribpct=Decimal("100.0000"),
                    rollovercontribpct=Decimal("100.0000"),
                    othervestpct=Decimal("100.0000"),
                ),
                models.CONTRIBSECURITY(
                    secid=models.SECID(uniqueid="74431M105", uniqueidtype="CUSIP"),
                    pretaxcontribpct=Decimal("25.0000"),
                    profitsharingcontribpct=Decimal("0.0000"),
                    rollovercontribpct=Decimal("0.0000"),
                    othervestpct=Decimal("0.0000"),
                ),
                models.CONTRIBSECURITY(
                    secid=models.SECID(uniqueid="743969107", uniqueidtype="CUSIP"),
                    pretaxcontribpct=Decimal("25.0000"),
                    profitsharingcontribpct=Decimal("0.0000"),
                    rollovercontribpct=Decimal("0.0000"),
                    othervestpct=Decimal("0.0000"),
                ),
            ),
            inv401ksummary=models.INV401KSUMMARY(
                yeartodate=models.YEARTODATE(
                    dtstart=datetime(2005, 1, 1, tzinfo=UTC),
                    dtend=datetime(2005, 1, 31, tzinfo=UTC),
                    contributions=models.CONTRIBUTIONS(
                        pretax=Decimal("843.2500"),
                        aftertax=Decimal("43.4200"),
                        match=Decimal("421.6200"),
                        total=Decimal("1308.2900"),
                    ),
                )
            ),
        )

        inv401kbal = models.INV401KBAL(
            pretax=Decimal("31690.340000"),
            profitsharing=Decimal("10725.640000"),
            rollover=Decimal("15945.750000"),
            othervest=Decimal("108.800000"),
            total=Decimal("58470.530000"),
        )

        invstmtrs = models.INVSTMTRS(
            dtasof=datetime(2005, 1, 31, 21, 26, 5, tzinfo=UTC),
            curdef="USD",
            invacctfrom=INVACCTFROM,
            invtranlist=invtranlist,
            inv401k=inv401k,
            inv401kbal=inv401kbal,
        )

        return models.OFX(
            signonmsgsrsv1=SIGNONMSGSRSV1,
            invstmtmsgsrsv1=models.INVSTMTMSGSRSV1(
                models.INVSTMTTRNRS(trnuid="1002", status=STATUS, invstmtrs=invstmtrs)
            ),
        )
Пример #28
0
    def aggregate(cls):
        invtranlist = models.INVTRANLIST(
            models.BUYSTOCK(
                invbuy=models.INVBUY(
                    invtran=models.INVTRAN(
                        fitid="23321",
                        dttrade=datetime(2005, 8, 25, tzinfo=UTC),
                        dtsettle=datetime(2005, 8, 28, tzinfo=UTC),
                    ),
                    secid=STOCK_SECID,
                    units=Decimal("100"),
                    unitprice=Decimal("50.00"),
                    commission=Decimal("25.00"),
                    total=Decimal("-5025.00"),
                    subacctsec="CASH",
                    subacctfund="CASH",
                ),
                buytype="BUY",
            ),
            models.INVBANKTRAN(
                stmttrn=models.STMTTRN(
                    trntype="CREDIT",
                    dtposted=datetime(2005, 8, 25, tzinfo=UTC),
                    dtuser=datetime(2005, 8, 25, tzinfo=UTC),
                    trnamt=Decimal("1000.00"),
                    fitid="12345",
                    name="Customer deposit",
                    memo="Your check #1034",
                ),
                subacctfund="CASH",
            ),
            dtstart=datetime(2005, 8, 24, 13, 1, 5, tzinfo=UTC),
            dtend=datetime(2005, 8, 28, 10, 10, tzinfo=UTC),
        )

        invposlist = models.INVPOSLIST(
            models.POSSTOCK(
                invpos=models.INVPOS(
                    secid=STOCK_SECID,
                    heldinacct="CASH",
                    postype="LONG",
                    units=Decimal("200"),
                    unitprice=Decimal("49.50"),
                    mktval=Decimal("9900.00"),
                    dtpriceasof=datetime(2005, 8, 27, 1, tzinfo=UTC),
                    memo="Next dividend payable Sept 1",
                )
            ),
            models.POSOPT(
                invpos=models.INVPOS(
                    secid=OPT_SECID,
                    heldinacct="CASH",
                    postype="LONG",
                    units=Decimal("1"),
                    unitprice=Decimal("5"),
                    mktval=Decimal("500"),
                    dtpriceasof=datetime(2005, 8, 27, 1, tzinfo=UTC),
                    memo="Option is in the money",
                )
            ),
        )

        invbal = models.INVBAL(
            availcash=Decimal("200.00"),
            marginbalance=Decimal("-50.00"),
            shortbalance=Decimal("0"),
            ballist=models.BALLIST(
                models.BAL(
                    name="Margin Interest Rate",
                    desc="Current interest rate on margin balances",
                    baltype="PERCENT",
                    value=Decimal("7.85"),
                    dtasof=datetime(2005, 8, 27, 1, tzinfo=UTC),
                )
            ),
        )

        invoolist = models.INVOOLIST(
            models.OOBUYSTOCK(
                oo=models.OO(
                    fitid="23321",
                    secid=models.SECID(uniqueid="666678578", uniqueidtype="CUSIP"),
                    dtplaced=datetime(2005, 6, 24, 3, 15, 5, tzinfo=UTC),
                    units=Decimal("100"),
                    subacct="CASH",
                    duration="GOODTILCANCEL",
                    restriction="NONE",
                    limitprice=Decimal("50.00"),
                ),
                buytype="BUY",
            )
        )

        rs = models.INVSTMTRS(
            dtasof=datetime(2005, 8, 27, 1, tzinfo=UTC),
            curdef="USD",
            invacctfrom=INVACCTFROM,
            invtranlist=invtranlist,
            invposlist=invposlist,
            invbal=invbal,
            invoolist=invoolist,
        )

        seclist = models.SECLIST(
            models.STOCKINFO(
                secinfo=models.SECINFO(
                    secid=STOCK_SECID,
                    secname="Acme Development, Inc.",
                    ticker="ACME",
                    fiid="1024",
                ),
                yld=Decimal("10"),
                assetclass="SMALLSTOCK",
            ),
            models.STOCKINFO(
                secinfo=models.SECINFO(
                    secid=models.SECID(uniqueid="666678578", uniqueidtype="CUSIP"),
                    secname="Hackson Unlimited, Inc.",
                    ticker="HACK",
                    fiid="1027",
                ),
                yld=Decimal("17"),
                assetclass="SMALLSTOCK",
            ),
            models.OPTINFO(
                secinfo=models.SECINFO(
                    secid=OPT_SECID,
                    secname="Lucky Airlines Jan 97 Put",
                    ticker="LUAXX",
                    fiid="0013",
                ),
                opttype="PUT",
                strikeprice=Decimal("35.00"),
                dtexpire=datetime(2005, 1, 21, tzinfo=UTC),
                shperctrct=Decimal("100"),
                secid=models.SECID(uniqueid="000342200", uniqueidtype="CUSIP"),
                assetclass="LARGESTOCK",
            ),
        )

        return models.OFX(
            signonmsgsrsv1=SIGNONMSGSRSV1,
            invstmtmsgsrsv1=models.INVSTMTMSGSRSV1(
                models.INVSTMTTRNRS(trnuid="1001", status=STATUS, invstmtrs=rs)
            ),
            seclistmsgsrsv1=models.SECLISTMSGSRSV1(seclist),
        )