Exemplo n.º 1
0
class INTERXFERMSGSRSV1(List):
    """ OFX section 11.13.1.3.2 """

    intertrnrs = ListItem(INTERTRNRS)
    recintertrnrs = ListItem(RECINTERTRNRS)
    intersyncrs = ListItem(INTERSYNCRS)
    recintersyncrs = ListItem(RECINTERSYNCRS)
Exemplo n.º 2
0
class INVPOSLIST(List):
    """ OFX section 13.9.2.2 """

    posdebt = ListItem(POSDEBT)
    posmf = ListItem(POSMF)
    posopt = ListItem(POSOPT)
    posother = ListItem(POSOTHER)
    posstock = ListItem(POSSTOCK)
Exemplo n.º 3
0
class SECLIST(List):
    """ OFX section 13.8.4.4 """

    debtinfo = ListItem(DEBTINFO)
    mfinfo = ListItem(MFINFO)
    optinfo = ListItem(OPTINFO)
    otherinfo = ListItem(OTHERINFO)
    stockinfo = ListItem(STOCKINFO)
Exemplo n.º 4
0
class CREDITCARDMSGSRSV1(List):
    """ OFX section 11.13.1.1.2 """

    ccstmttrnrs = ListItem(CCSTMTTRNRS)
    ccstmtendtrnrs = ListItem(CCSTMTTRNRS)

    @property
    def statements(self):
        return [trnrs.statement for trnrs in self]
Exemplo n.º 5
0
class BANKMSGSRQV1(List):
    """ OFX section 11.13.1.1.1 """

    stmttrnrq = ListItem(STMTTRNRQ)
    stmtendtrnrq = ListItem(STMTENDTRNRQ)
    stpchktrnrq = ListItem(STPCHKTRNRQ)
    intratrnrq = ListItem(INTRATRNRQ)
    recintratrnrq = ListItem(RECINTRATRNRQ)
    bankmailtrnrq = ListItem(BANKMAILTRNRQ)
    stpchksyncrq = ListItem(STPCHKSYNCRQ)
    intrasyncrq = ListItem(INTRASYNCRQ)
    recintrasyncrq = ListItem(RECINTRASYNCRQ)
    bankmailsyncrq = ListItem(BANKMAILSYNCRQ)
Exemplo n.º 6
0
class INVMAILSYNCRQ(SyncRqList):
    """ OFX Section 13.10.2.1 """

    incimages = Bool(required=True)
    usehtml = Bool(required=True)
    invacctfrom = SubAggregate(INVACCTFROM)
    invmailtrnrq = ListItem(INVMAILTRNRQ)
Exemplo n.º 7
0
class INVSTMTMSGSRSV1(List):
    """ OFX section 13.7.1.2.2 """

    invstmttrnrs = ListItem(INVSTMTTRNRS)
    invmailtrnrs = ListItem(INVMAILTRNRS)
    invmailsyncrs = ListItem(INVMAILSYNCRS)

    @property
    def statements(self):
        stmts = []
        for rs in self:
            if isinstance(rs, INVSTMTTRNRS):
                stmtrs = rs.invstmtrs
                if stmtrs is not None:
                    stmts.append(stmtrs)
        return stmts
Exemplo n.º 8
0
class RECINTRASYNCRS(SyncRsList):
    """ OFX section 11.12.5.2 """

    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    recintratrnrs = ListItem(RECINTRATRNRS)

    requiredMutexes = [("bankacctfrom", "ccacctfrom")]
Exemplo n.º 9
0
class BANKMAILSYNCRS(SyncRsList):
    """ OFX section 11.12.7.2 """

    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    bankmailtrnrs = ListItem(BANKMAILTRNRS)

    requiredMutexes = [("bankacctfrom", "ccacctfrom")]
Exemplo n.º 10
0
class INTERSYNCRS(SyncRsList):
    """ OFX section 11.12.3.2 """

    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    intertrnrs = ListItem(INTERTRNRS)

    requiredMutexes = [("bankacctfrom", "ccacctfrom")]
Exemplo n.º 11
0
class SECLISTMSGSRSV1(List):
    """ OFX section 13.7.2.2.2 """

    # N.B. this part of the spec is unusual in that SECLIST is a direct
    # child of SECLISTMSGSRSV1, unwrapped.  SECLISTRS, wrapped in SECLISTTRNS,
    # is an empty aggregate; including SECLISTTRNRS/SECLISTRS under
    # SECLISTMSGSTSV1 merely indicates that the accompanying SECLIST was
    # generated in response to a client SECLISTRQ.
    seclisttrnrs = ListItem(SECLISTTRNRS)
    seclist = ListItem(SECLIST)

    @property
    def securities(self):
        securities = []
        for child in self:
            if isinstance(child, SECLIST):
                securities.extend(child)
        return securities
Exemplo n.º 12
0
class INVOICE(List):
    """ OFX Section 12.5.2.3 """
    invno = String(32, required=True)
    invtotalamt = Decimal(required=True)
    invpaidamt = Decimal(required=True)
    invdate = DateTime(required=True)
    invdesc = String(80, required=True)
    discount = SubAggregate(DISCOUNT)
    adjustment = SubAggregate(ADJUSTMENT)
    lineitem = ListItem(LINEITEM)
Exemplo n.º 13
0
class INTERSYNCRQ(SyncRqList):
    """ OFX section 11.12.3.1 """

    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    intertrnrq = ListItem(INTERTRNRQ)

    requiredMutexes = SyncRqList.requiredMutexes + [
        ("bankacctfrom", "ccacctfrom")
    ]
Exemplo n.º 14
0
class RECINTRASYNCRQ(SyncRqList):
    """ OFX section 11.12.5.1 """

    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    recintratrnrq = ListItem(RECINTRATRNRQ)

    requiredMutexes = SyncRqList.requiredMutexes + [
        ("bankacctfrom", "ccacctfrom")
    ]
Exemplo n.º 15
0
class BANKMAILSYNCRQ(SyncRqList):
    """ OFX section 11.12.7.1 """

    incimages = Bool(required=True)
    usehtml = Bool(required=True)
    bankacctfrom = SubAggregate(BANKACCTFROM)
    ccacctfrom = SubAggregate(CCACCTFROM)
    bankmailtrnrq = ListItem(BANKMAILTRNRQ)

    requiredMutexes = SyncRqList.requiredMutexes + [
        ("bankacctfrom", "ccacctfrom")
    ]
Exemplo n.º 16
0
class BANKMSGSRSV1(List):
    """ OFX section 11.13.1.1.2 """

    stmttrnrs = ListItem(STMTTRNRS)
    stmtendtrnrs = ListItem(STMTENDTRNRS)
    stpchktrnrs = ListItem(STPCHKTRNRS)
    intratrnrs = ListItem(INTRATRNRS)
    recintratrnrs = ListItem(RECINTRATRNRS)
    bankmailtrnrs = ListItem(BANKMAILTRNRS)
    stpchksyncrs = ListItem(STPCHKSYNCRS)
    intrasyncrs = ListItem(INTRASYNCRS)
    recintrasyncrs = ListItem(RECINTRASYNCRS)
    bankmailsyncrs = ListItem(BANKMAILSYNCRS)

    @property
    def statements(self):
        stmts = []
        for rs in self:
            if isinstance(rs, STMTTRNRS):
                stmtrs = rs.stmtrs
                if stmtrs is not None:
                    stmts.append(stmtrs)
        return stmts
Exemplo n.º 17
0
class EXTDPMT(List):
    """ OFX Section 12.5.2.2 """
    extdpmtfor = OneOf("INDIVIDUAL", "BUSINESS")
    extdpmtchk = Integer(10)
    extdpmtdsc = String(255)
    extdpmtinv = ListItem(EXTDPMTINV)

    @classmethod
    def validate_args(cls, *args, **kwargs):
        # "At least one of the following: <EXTDPMTDSC>, or <EXTDPMTINV>"
        listitems = [arg.__class__.__name__ for arg in args]
        if "EXTDPMTINV" not in listitems and "extdpmtdsc" not in kwargs:
            msg = "{} must contain at least one of [EXTDPMTDSC, EXTPMTINV]"
            raise ValueError(msg.format(cls.__name__))

        super().validate_args(*args, **kwargs)
Exemplo n.º 18
0
class PMTINFO(List):
    """ OFX Section 12.5.2 """
    bankacctfrom = SubAggregate(BANKACCTFROM, required=True)
    trnamt = Decimal(required=True)
    payeeid = String(12)
    payee = SubAggregate(PAYEE)
    payeelstid = String(12)
    bankacctto = SubAggregate(BANKACCTTO)
    extdpmt = ListItem(EXTDPMT)
    payacct = String(32, required=True)
    dtdue = DateTime(required=True)
    memo = String(255)
    billrefinfo = String(80)
    billpubinfo = SubAggregate(BILLPUBINFO)

    requiredMutexes = [("payeeid", "payee")]
Exemplo n.º 19
0
class BILLPAYMSGSRSV1(List):
    """ OFX section 12.11.1.2 """

    pmttrnrs = ListItem(PMTTRNRS)
    recpmttrnrs = ListItem(RECPMTTRNRS)
    #  payeetrnrs = ListItem(PAYEETRNRS)
    payeetrnrs = Unsupported()
    pmtinqtrnrs = ListItem(PMTINQTRNRS)
    pmtmailtrns = ListItem(PMTMAILTRNRS)
    pmtsyncrs = ListItem(PMTSYNCRS)
    recpmtsyncrs = ListItem(RECPMTSYNCRS)
Exemplo n.º 20
0
class BILLPAYMSGSRQV1(List):
    """ OFX section 12.11.1.1 """

    pmttrnrq = ListItem(PMTTRNRQ)
    recpmttrnrq = ListItem(RECPMTTRNRQ)
    #  payeetrnrq = ListItem(PAYEETRNRQ)
    payeetrnrq = Unsupported()
    pmtinqtrnrq = ListItem(PMTINQTRNRQ)
    pmtmailtrnrq = ListItem(PMTMAILTRNRQ)
    pmtsyncrq = ListItem(PMTSYNCRQ)
    recpmtsyncrq = ListItem(RECPMTSYNCRQ)
Exemplo n.º 21
0
class BALLIST(List):
    """ OFX section 11.4.2.2 & 13.9.2.7 """

    bal = ListItem(BAL)
Exemplo n.º 22
0
class BANKTRANLIST(TranList):
    """ OFX section 11.4.2.2 """

    stmttrn = ListItem(STMTTRN)
Exemplo n.º 23
0
class INVMAILSYNCRS(SyncRsList):
    """ OFX Section 13.10.2.2 """

    invacctfrom = SubAggregate(INVACCTFROM)
    invmailtrnrs = ListItem(INVMAILTRNRS)
Exemplo n.º 24
0
class INVOOLIST(List):
    """ OFX section 13.9.2.2 """

    oobuydebt = ListItem(OOBUYDEBT)
    oobuymf = ListItem(OOBUYMF)
    oobuyopt = ListItem(OOBUYOPT)
    oobuyother = ListItem(OOBUYOTHER)
    oobuystock = ListItem(OOBUYSTOCK)
    ooselldebt = ListItem(OOSELLDEBT)
    oosellmf = ListItem(OOSELLMF)
    oosellopt = ListItem(OOSELLOPT)
    oosellother = ListItem(OOSELLOTHER)
    oosellstock = ListItem(OOSELLSTOCK)
    switchmf = ListItem(SWITCHMF)
Exemplo n.º 25
0
class WIRESYNCRQ(SyncRqList):
    """ OFX section 11.12.4.1 """

    bankacctfrom = SubAggregate(BANKACCTFROM, required=True)
    wiretrnrq = ListItem(WIRETRNRQ)
Exemplo n.º 26
0
class CREDITCARDMSGSRQV1(List):
    """ OFX section 11.13.1.1.1 """

    ccstmttrnrq = ListItem(CCSTMTTRNRQ)
    ccstmtendtrnrq = ListItem(CCSTMTTRNRQ)
Exemplo n.º 27
0
class INTERXFERMSGSRQV1(List):
    """ OFX section 11.13.1.3.1 """
    intertrnrq = ListItem(INTERTRNRQ)
    recintertrnrq = ListItem(RECINTERTRNRQ)
    intersyncrq = ListItem(INTERSYNCRQ)
    recintersyncrq = ListItem(RECINTERSYNCRQ)
Exemplo n.º 28
0
class STPCHKSYNCRS(SyncRsList):
    """ OFX section 11.12.1.2 """

    bankacctfrom = SubAggregate(BANKACCTFROM, required=True)
    stpchktrnrs = ListItem(STPCHKTRNRS)
Exemplo n.º 29
0
class WIREXFERMSGSRQV1(List):
    """ OFX section 11.13.1.4.1 """

    wiretrnrq = ListItem(WIRETRNRQ)
    wiresyncrq = ListItem(WIRESYNCRQ)
Exemplo n.º 30
0
class WIREXFERMSGSRSV1(List):
    """ OFX section 11.13.1.4.2 """

    wiretrnrs = ListItem(WIRETRNRS)
    wiresyncrs = ListItem(WIRESYNCRS)