| 1 | signature MONEY = |
| 2 | sig |
| 3 | type transaction = {id :int, descr : string, amount : real, d : string, stamp : Init.C.timestamp} |
| 4 | |
| 5 | val addTransaction : string * real * string -> int |
| 6 | val lookupTransaction : int -> transaction |
| 7 | val modTransaction : transaction -> unit |
| 8 | val deleteTransaction : int -> unit |
| 9 | val listTransactions : unit -> transaction list |
| 10 | val listTransactionsLimit : int -> transaction list |
| 11 | val listUserTransactions : int -> (real * transaction) list |
| 12 | val listUserTransactionsLimit : int * int -> (real * transaction) list |
| 13 | (* Returns list of (your part, overall) pairs *) |
| 14 | val listUsers : int -> (bool * Init.user) list |
| 15 | (* List users and indicate whether they participated in a transaction *) |
| 16 | |
| 17 | type stripePayment = {charge_id : string, webuser_id : int, card_name : string, paid_on : string, gross_cents : int, fee_cents : int, net : real} |
| 18 | |
| 19 | val listUserPendingStripePayments : int -> stripePayment list |
| 20 | val listAllPendingStripePayments : unit -> stripePayment list |
| 21 | val lookupStripePayment : string -> stripePayment |
| 22 | val applyStripePayment : stripePayment -> int |
| 23 | |
| 24 | val lookupHostingUsage : int -> string option |
| 25 | |
| 26 | type charge = {trn : int, usr : int, amount : real} |
| 27 | |
| 28 | val addCharge : charge -> unit |
| 29 | val listCharges : int -> charge list |
| 30 | val listChargesWithNames : int -> (string * charge) list |
| 31 | |
| 32 | val clearCharges : int -> unit |
| 33 | val applyCharges : int -> unit |
| 34 | |
| 35 | val addEvenCharges : int * int list -> unit |
| 36 | |
| 37 | type hosting = {trn : int, cutoff : int, cost : real, usage : string} |
| 38 | val addHostingCharges : hosting -> unit |
| 39 | |
| 40 | val equalizeBalances : unit -> unit |
| 41 | |
| 42 | val costBase : real -> real |
| 43 | |
| 44 | val delinquentPledgers : unit -> { id : int, name : string, shares : int, balance : real } list |
| 45 | val resetPledges : int list -> unit |
| 46 | |
| 47 | val freezeworthyPledgers : unit -> { id : int, name : string, balance : real, joinedThisMonth : bool } list |
| 48 | val bootworthyPledgers : unit -> { id : int, name : string, balance : real, joinedThisMonth : bool } list |
| 49 | |
| 50 | val billDues : {descr : string, base : real, date : string} -> unit |
| 51 | end |