summaryrefslogtreecommitdiffstats
path: root/Register/src/com/essentials/register/payment/Method.java
diff options
context:
space:
mode:
Diffstat (limited to 'Register/src/com/essentials/register/payment/Method.java')
-rw-r--r--Register/src/com/essentials/register/payment/Method.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/Register/src/com/essentials/register/payment/Method.java b/Register/src/com/essentials/register/payment/Method.java
new file mode 100644
index 000000000..935a9bb00
--- /dev/null
+++ b/Register/src/com/essentials/register/payment/Method.java
@@ -0,0 +1,48 @@
+package com.nijikokun.register.payment;
+
+public interface Method {
+ public Object getPlugin();
+ public String getName();
+ public String getVersion();
+ public String format(double amount);
+ public boolean hasBanks();
+ public boolean hasBank(String bank);
+ public boolean hasAccount(String name);
+ public boolean hasBankAccount(String bank, String name);
+ public MethodAccount getAccount(String name);
+ public MethodBankAccount getBankAccount(String bank, String name);
+
+ public interface MethodAccount {
+ public double balance();
+ public boolean add(double amount);
+ public boolean subtract(double amount);
+ public boolean multiply(double amount);
+ public boolean divide(double amount);
+ public boolean hasEnough(double amount);
+ public boolean hasOver(double amount);
+ public boolean hasUnder(double amount);
+ public boolean isNegative();
+ public boolean remove();
+
+ @Override
+ public String toString();
+ }
+
+ public interface MethodBankAccount {
+ public double balance();
+ public String getBankName();
+ public int getBankId();
+ public boolean add(double amount);
+ public boolean subtract(double amount);
+ public boolean multiply(double amount);
+ public boolean divide(double amount);
+ public boolean hasEnough(double amount);
+ public boolean hasOver(double amount);
+ public boolean hasUnder(double amount);
+ public boolean isNegative();
+ public boolean remove();
+
+ @Override
+ public String toString();
+ }
+}