-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/io/github/jpdev/asaassdk/rest/pix/transaction/PixTransactionQrCodeCreator.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,39 @@ | ||
package io.github.jpdev.asaassdk.rest.pix.transaction; | ||
|
||
import io.github.jpdev.asaassdk.http.Domain; | ||
import io.github.jpdev.asaassdk.rest.action.Creator; | ||
import io.github.jpdev.asaassdk.rest.pix.transaction.children.QrCode; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class PixTransactionQrCodeCreator extends Creator<PixTransaction> { | ||
|
||
private QrCode qrCode; | ||
private BigDecimal value; | ||
|
||
public BigDecimal getValue() { | ||
return value; | ||
} | ||
|
||
public PixTransactionQrCodeCreator setValue(BigDecimal value) { | ||
this.value = value; | ||
return this; | ||
} | ||
|
||
public PixTransactionQrCodeCreator setPayload(String payload) { | ||
this.qrCode = new QrCode().setPayload(payload); | ||
return this; | ||
} | ||
|
||
public QrCode getQrCode() { | ||
return qrCode; | ||
} | ||
|
||
public String getResourceUrl() { | ||
return Domain.PIX_TRANSACTION_QR_CODE.toString(); | ||
} | ||
|
||
public Class<PixTransaction> getResourceClass() { | ||
return PixTransaction.class; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/io/github/jpdev/asaassdk/rest/pix/transaction/children/QrCode.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,15 @@ | ||
package io.github.jpdev.asaassdk.rest.pix.transaction.children; | ||
|
||
public class QrCode { | ||
|
||
public String payload; | ||
|
||
public String getPayload() { | ||
return payload; | ||
} | ||
|
||
public QrCode setPayload(String payload) { | ||
this.payload = payload; | ||
return this; | ||
} | ||
} |