Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
2.49.0
- Loading branch information
1 parent
e4a2ba3
commit bfe17ea
Showing
14 changed files
with
309 additions
and
9 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
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
60 changes: 60 additions & 0 deletions
60
src/main/java/com/braintreegateway/TransactionOptionsAmexRewardsRequest.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,60 @@ | ||
package com.braintreegateway; | ||
|
||
public class TransactionOptionsAmexRewardsRequest extends Request { | ||
private TransactionOptionsRequest parent; | ||
private String points; | ||
private String currencyAmount; | ||
private String currencyIsoCode; | ||
private String requestId; | ||
|
||
public TransactionOptionsAmexRewardsRequest(TransactionOptionsRequest parent) { | ||
this.parent = parent; | ||
} | ||
|
||
public TransactionOptionsRequest done() { | ||
return parent; | ||
} | ||
|
||
public TransactionOptionsAmexRewardsRequest points(String points) { | ||
this.points = points; | ||
return this; | ||
} | ||
|
||
public TransactionOptionsAmexRewardsRequest currencyAmount(String currencyAmount) { | ||
this.currencyAmount = currencyAmount; | ||
return this; | ||
} | ||
|
||
public TransactionOptionsAmexRewardsRequest currencyIsoCode(String currencyIsoCode) { | ||
this.currencyIsoCode = currencyIsoCode; | ||
return this; | ||
} | ||
|
||
public TransactionOptionsAmexRewardsRequest requestId(String requestId) { | ||
this.requestId = requestId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toXML() { | ||
return buildRequest("amex-rewards").toXML(); | ||
} | ||
|
||
@Override | ||
public String toQueryString() { | ||
return toQueryString("amex-rewards"); | ||
} | ||
|
||
@Override | ||
public String toQueryString(String root) { | ||
return buildRequest(root).toQueryString(); | ||
} | ||
|
||
protected RequestBuilder buildRequest(String root) { | ||
return new RequestBuilder(root). | ||
addElement("request-id", requestId). | ||
addElement("points", points). | ||
addElement("currency-amount", currencyAmount). | ||
addElement("currency-iso-code", currencyIsoCode); | ||
} | ||
} |
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
Oops, something went wrong.