This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from moip/release/v3.5.0
[RELEASE] v4.0.0
- Loading branch information
Showing
39 changed files
with
698 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ target | |
*.swp | ||
.gradle | ||
build/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package br.com.moip.request; | ||
|
||
public class MoipAccountRequest { | ||
|
||
private final String id; | ||
|
||
public MoipAccountRequest(String moipAccount) { | ||
this.id = moipAccount; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/br/com/moip/request/TransferInstrumentRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package br.com.moip.request; | ||
|
||
public class TransferInstrumentRequest { | ||
|
||
private Method method; | ||
private BankAccountRequest bankAccount; | ||
private MoipAccountRequest moipAccount; | ||
|
||
public TransferInstrumentRequest bankAccount(BankAccountRequest bankAccount) { | ||
this.method = Method.BANK_ACCOUNT; | ||
this.bankAccount = bankAccount; | ||
|
||
return this; | ||
} | ||
|
||
public TransferInstrumentRequest moipAccount(MoipAccountRequest moipAccount) { | ||
this.method = Method.MOIP_ACCOUNT; | ||
this.moipAccount = moipAccount; | ||
|
||
return this; | ||
} | ||
|
||
public enum Method{ | ||
BANK_ACCOUNT, MOIP_ACCOUNT; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("TransferInstrument{"); | ||
sb.append("method=").append(method); | ||
sb.append(", bankAccount=").append(bankAccount); | ||
sb.append(", moipAccount=").append(moipAccount); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package br.com.moip.request; | ||
|
||
public class TransferRequest { | ||
|
||
private Integer amount; | ||
private TransferInstrumentRequest transferInstrument; | ||
|
||
public TransferRequest amount(Integer amount){ | ||
this.amount = amount; | ||
|
||
return this; | ||
} | ||
|
||
public Integer getAmount() { return amount; } | ||
|
||
public TransferRequest transferInstrument(TransferInstrumentRequest transferInstrument){ | ||
this.transferInstrument = transferInstrument; | ||
|
||
return this; | ||
} | ||
|
||
public TransferInstrumentRequest getTransferInstrument() { return transferInstrument; } | ||
|
||
@Override | ||
public String toString(){ | ||
return new StringBuilder("TransferRequest{") | ||
.append("amount=").append(amount) | ||
.append(", transferInstrument=").append(transferInstrument) | ||
.append("}").toString(); | ||
} | ||
} |
Oops, something went wrong.