Exemplo n.º 1
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "space": SingleCase("space", CharactersSH),
         "id": SingleCase("id", CharactersSH, True),
         "get_quotes": NoCase,
         "quote_source": SingleCase("quote_source",
                                    CharactersSH),
         "quote_tz": NoCase})
Exemplo n.º 2
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "account": DictCase("accounts", AccountSH,
                             lambda ac: ac.id),
         "transaction": DictCase("transactions",
                                 TransactionSH, lambda tr: tr.id),
         "count-data": NoCase,
         "commodity": DictCase("commodities", CommoditySH,
                               lambda cm: cm.id),
         "budget": NoCase})
Exemplo n.º 3
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "value": SingleCase("value", FractionSH, True),
         "quantity": SingleCase("quantity",
                                FractionSH, True),
         "account": SingleCase("account",
                               CharactersSH, True),
         "memo": SingleCase("memo", CharactersSH),
         "reconciled-state": SingleCase(
             "reconciled-state", CharactersSH)
     })
Exemplo n.º 4
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "id": SingleCase("id", CharactersSH, True),
         "description": SingleCase("description",
                                   CharactersSH),
         "num": SingleCase("num", CharactersSH),
         "splits": SingleCase("splits", SplitsSH),
         "currency": SingleCase("currency",
                                CommoditySH, True),
         "slots": NoCase,
         "date-posted": SingleCase(
             "date-posted", TimeStampSH),
         "date-entered": SingleCase(
             "date-entered", TimeStampSH)})
Exemplo n.º 5
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "name": SingleCase("name", CharactersSH, True),
         "id": SingleCase("id", CharactersSH, True),
         "type": SingleCase("type", CharactersSH, True),
         "parent": SingleCase("parent", CharactersSH),
         "description": SingleCase("description",
                                   CharactersSH),
         "code": SingleCase("code", CharactersSH),
         "commodity": SingleCase("commodity",
                                 CommoditySH),
         "commodity-scu": SingleCase("commodity-scu",
                                     IntSH),
         "slots": NoCase
     })
Exemplo n.º 6
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Commodity(result))
Exemplo n.º 7
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Book(result, sh.scheme))
Exemplo n.º 8
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, File(result))
Exemplo n.º 9
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "split": DictCase("splits", SplitSH, lambda s: s.id)})
Exemplo n.º 10
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, result['gnc'])
Exemplo n.º 11
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {"gnc-v2": SingleCase("gnc", GncSH)})
Exemplo n.º 12
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, TimeStamp(result))
Exemplo n.º 13
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "date": SingleCase("date", TimeSH, True),
         "ns": SingleCase("ns", IntSH)
     })
Exemplo n.º 14
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Split(result))
Exemplo n.º 15
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, result['splits'])
Exemplo n.º 16
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Account(result))
Exemplo n.º 17
0
 def __init__(self, ot):
     SwitchSH.__init__(self, ot, {
         "book": DictCase("books", BookSH,
                          lambda bk: bk.id),
         "count-data": NoCase})
Exemplo n.º 18
0
 def post_result(self, sh, result):
     SwitchSH.post_result(self, sh, Transaction(result))