Exemplo n.º 1
0
 def faircoin_incoming_exchange_type(cls):
     use_case = UseCase.objects.get(name="Incoming Exchange")
     xt = ExchangeType.objects.filter(use_case=use_case,
                                      name="Receive FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(use_case=use_case, name="Receive FairCoins")
         xt.save()
     return xt
Exemplo n.º 2
0
 def faircoin_outgoing_exchange_type(cls):
     use_case = UseCase.objects.get(name="Outgoing Exchange")
     xt = ExchangeType.objects.filter(use_case=use_case,
                                      name="Send FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(use_case=use_case, name="Send FairCoins")
         xt.save()
     return xt
Exemplo n.º 3
0
 def faircoin_internal_exchange_type(cls):
     use_case = UseCase.objects.get(name="Internal Exchange")
     xt = ExchangeType.objects.filter(use_case=use_case,
                                      name="Transfer FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(use_case=use_case, name="Transfer FairCoins")
         xt.save()
     return xt
Exemplo n.º 4
0
 def faircoin_incoming_exchange_type(cls):
     use_case = UseCase.objects.get(name="Incoming Exchange")
     xt = ExchangeType.objects.filter(
         use_case=use_case,
         name="Receive FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(
             use_case=use_case,
             name="Receive FairCoins")
         xt.save()
     return xt
Exemplo n.º 5
0
 def faircoin_outgoing_exchange_type(cls):
     use_case = UseCase.objects.get(name="Outgoing Exchange")
     xt = ExchangeType.objects.filter(
         use_case=use_case,
         name="Send FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(
             use_case=use_case,
             name="Send FairCoins")
         xt.save()
     return xt
Exemplo n.º 6
0
 def faircoin_internal_exchange_type(cls):
     use_case = UseCase.objects.get(name="Internal Exchange")
     xt = ExchangeType.objects.filter(
         use_case=use_case,
         name="Transfer FairCoins")
     if xt:
         xt = xt[0]
     else:
         xt = ExchangeType(
             use_case=use_case,
             name="Transfer FairCoins")
         xt.save()
     return xt