Skip to content

Commit

Permalink
change resfulzoldwts methods and returning wallet from pull
Browse files Browse the repository at this point in the history
  • Loading branch information
ammaratef45 committed Jan 20, 2019
1 parent faca7b2 commit a001ab2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 34 deletions.
38 changes: 7 additions & 31 deletions src/main/java/com/amihaiemil/zold/RestfulZoldWts.java
Expand Up @@ -35,7 +35,7 @@
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
* @since 0.0.1
* @todo #4 implement body of interface methods.
* @todo #11:30min implement body of interface methods.
*/
public final class RestfulZoldWts implements ZoldWts {

Expand Down Expand Up @@ -78,36 +78,12 @@ public RestfulZoldWts(final HttpClient client, final URI baseUri) {

/**
* Pull the wallet from the network.
* @return Wallet object.
* @todo #11:30min should avoid using null
* (it's here for now till the body is implemented)
* maybe should throw an exception when pull fails too
*/
public void pull() {

}

/**
* Get the balance of the wallet.
* @return Balance
*/
public double balance() {
return 0.0;
}

/**
* Pay to another wallet.
* @param keygap Sender keygap
* @param user Recipient user id
* @param amount Amount to be sent
* @param details The details of transfer
*/
public void pay(String keygap, String user, double amount, String details) {

}

/**
* Finds all payments that match this query and returns.
* @param id Wallet id
* @param details Regex of payment details
*/
public void find(final String id, final String details) {

public Wallet pull() {
return null;
}
}
5 changes: 3 additions & 2 deletions src/main/java/com/amihaiemil/zold/Wallet.java
@@ -1,7 +1,7 @@
package com.amihaiemil.zold;

/**
* Zold network entry point.
* Zold Wallet.
* @author Ammar Atef (ammar.atef45@gmail.com)
* @version $Id$
* @since 0.0.1
Expand All @@ -19,7 +19,8 @@ public interface Wallet {
* @param user Recipient user id
* @param amount Amount to be sent
* @param details The details of transfer
* @todo #4 solve checkstyle paramternumber error.
* @todo #11:30min solve checkstyle paramternumber error either by cahnging the
* method structure or supressing the warning
*/
void pay(String keygap, String user, double amount, String details);

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/amihaiemil/zold/ZoldWts.java
Expand Up @@ -34,7 +34,8 @@
public interface ZoldWts {
/**
* Pull the wallet from the network.
* @return Wallet object.
*/
void pull();
Wallet pull();

}

0 comments on commit a001ab2

Please sign in to comment.