Skip to content

Commit

Permalink
Merge pull request #4 from realexpayments-developers/master
Browse files Browse the repository at this point in the history
Annotation to prevent request values being populated with NULL.
  • Loading branch information
RealexITSO authored Jun 14, 2018
2 parents 35b9e7c + 9332499 commit 1521e71
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.realexpayments.hpp.sdk</groupId>
<artifactId>rxp-hpp-java</artifactId>
<version>1.3</version>
<version>1.3.2</version>
</dependency>
```

### Gradle users
Add this dependency to your project's build file:
```
compile "com.realexpayments.hpp.sdk:rxp-hpp-java:1.3"
compile "com.realexpayments.hpp.sdk:rxp-hpp-java:1.3.2"
```

## Usage
### Creating Request JSON for Realex JS Library
```java
HppRequest hppRequest = new HppRequest()
.addAmount(100)
.addCurrency("EUR")
.addMerchantId("merchantId");
.addAmount(100)
.addCurrency("EUR")
.addMerchantId("merchantId");

RealexHpp realexHpp = new RealexHpp("mySecret");
String requestJson = realexHpp.requestToJson(hppRequest);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.realexpayments.hpp.sdk</groupId>
<artifactId>rxp-hpp-java</artifactId>
<version>1.3</version>
<version>1.3.2</version>
<name>Realex Payments HPP Java SDK</name>
<description>The official Realex Payments HPP Java SDK</description>
<url>http://www.realexpayments.com</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
*
* @author markstanford
*/
@JsonInclude(Include.NON_NULL)
@OtbAmount
public class HppRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.realexpayments.hpp.sdk.utils.GenerationUtils;
Expand All @@ -18,6 +20,7 @@
* @author markstanford
*
*/
@JsonInclude(Include.NON_NULL)
public class HppResponse {

/**
Expand Down

0 comments on commit 1521e71

Please sign in to comment.