Skip to content

Commit

Permalink
#5 amount removed from adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Dec 3, 2014
1 parent 946d364 commit ce4cf49
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/jcabi/odesk/Adjustments.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,18 @@ public interface Adjustments {
/**
* Make a custom/bonus payment.
* @param engagement Engagement reference number
* @param amount Amount that the provider will receive (can be zero)
* @param charge Amount to be charged from the payer (can be zero)
* @param comments Payment comments
* @param notes Notes to add to the payment
* @return Reference ID of a new adjustment
* @throws IOException If fails due to IO problem
* @see <a href="http://developers.odesk.com/w/page/25400171/Custom%20Payment%20API">Custom Payment API</a>
* @checkstyle ParameterNumber (10 lines)
* @since 0.7
*/
@NotNull(message = "adjustment ID is never NULL")
String add(
@NotNull(message = "engagement ref can't be NULL") String engagement,
@NotNull(message = "amount can't be NULL") Cash amount,
@NotNull(message = "charge amount can't be NULL") Cash charge,
@NotNull(message = "comments can't be NULL") String comments,
@NotNull(message = "notes can't be NULL") String notes)
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/jcabi/odesk/RtAdjustments.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ final class RtAdjustments implements Adjustments {
public String add(
@NotNull(message = "engagement ref can't be NULL")
final String engagement,
@NotNull(message = "amount can't be NULL") final Cash amount,
@NotNull(message = "charge amount can't be NULL") final Cash charge,
@NotNull(message = "comments can't be NULL") final String comments,
@NotNull(message = "notes can't be NULL") final String notes)
Expand All @@ -90,9 +89,6 @@ public String add(
.queryParam("engagement__reference", engagement)
.queryParam("comments", comments)
.queryParam("notes", notes);
if (!amount.isEmpty()) {
uri = uri.queryParam("amount", amount.toString());
}
if (!charge.isEmpty()) {
uri = uri.queryParam("charge_amount", charge.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/odesk/RtAdjustmentsITCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void makesBonusPayment() throws Exception {
.team(RtAdjustmentsITCase.TEAM)
.adjustments();
adjustments.add(
"13369359", new Cash.S("10.00"), new Cash.S("0.0"),
"13369359", new Cash.S("10.0"),
"advance payment",
"please, keep this money for the future, I'm testing :)"
);
Expand Down

0 comments on commit ce4cf49

Please sign in to comment.