-
Notifications
You must be signed in to change notification settings - Fork 30
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
6 changed files
with
125 additions
and
6 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
61 changes: 60 additions & 1 deletion
61
src/main/java/com/hyperwallet/clientsdk/model/HyperwalletProgram.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 |
---|---|---|
@@ -1,70 +1,129 @@ | ||
package com.hyperwallet.clientsdk.model; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonFilter; | ||
import com.hyperwallet.clientsdk.util.HyperwalletJsonConfiguration; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import java.util.Date; | ||
import java.util.List; | ||
|
||
@JsonFilter(HyperwalletJsonConfiguration.INCLUSION_FILTER) | ||
@XmlRootElement | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class HyperwalletProgram { | ||
public class HyperwalletProgram extends HyperwalletBaseMonitor{ | ||
|
||
private String token; | ||
private Date createdOn; | ||
private String name; | ||
private String parentToken; | ||
private List<HyperwalletLink> links; | ||
|
||
public String getToken() { | ||
return token; | ||
} | ||
|
||
public void setToken(String token) { | ||
addField("token", token); | ||
this.token = token; | ||
} | ||
|
||
public HyperwalletProgram token(String token) { | ||
addField("token", token); | ||
this.token = token; | ||
return this; | ||
} | ||
|
||
public HyperwalletProgram clearToken() { | ||
clearField("token"); | ||
this.token = null; | ||
return this; | ||
} | ||
|
||
public Date getCreatedOn() { | ||
return createdOn; | ||
} | ||
|
||
public void setCreatedOn(Date createdOn) { | ||
addField("createdOn", createdOn); | ||
this.createdOn = createdOn; | ||
} | ||
|
||
public HyperwalletProgram createdOn(Date createdOn) { | ||
addField("createdOn", createdOn); | ||
this.createdOn = createdOn; | ||
return this; | ||
} | ||
|
||
public HyperwalletProgram clearCreatedOn() { | ||
clearField("createdOn"); | ||
this.createdOn = null; | ||
return this; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
addField("name", name); | ||
this.name = name; | ||
} | ||
|
||
public HyperwalletProgram name(String name) { | ||
addField("name", name); | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public HyperwalletProgram clearName() { | ||
clearField("name"); | ||
this.name = null; | ||
return this; | ||
} | ||
|
||
public String getParentToken() { | ||
return parentToken; | ||
} | ||
|
||
public void setParentToken(String parentToken) { | ||
addField("parentToken", parentToken); | ||
this.parentToken = parentToken; | ||
} | ||
|
||
public HyperwalletProgram parentToken(String parentToken) { | ||
addField("parentToken", parentToken); | ||
this.parentToken = parentToken; | ||
return this; | ||
} | ||
|
||
public HyperwalletProgram clearParentToken() { | ||
clearField("parentToken"); | ||
this.parentToken = null; | ||
return this; | ||
} | ||
|
||
public List<HyperwalletLink> getLinks() { | ||
return links; | ||
} | ||
|
||
public void setLinks(List<HyperwalletLink> links) { | ||
addField("links", links); | ||
this.links = links; | ||
} | ||
|
||
public HyperwalletProgram links(List<HyperwalletLink> links) { | ||
addField("links", links); | ||
this.links = links; | ||
return this; | ||
} | ||
|
||
public HyperwalletProgram clearLinks() { | ||
clearField("links"); | ||
this.links = null; | ||
return this; | ||
} | ||
} | ||
|
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
8 changes: 7 additions & 1 deletion
8
src/test/java/com/hyperwallet/clientsdk/model/HyperwalletProgramTest.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
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,3 @@ | ||
curl -X "GET" "https://api.sandbox.hyperwallet.com/rest/v4/programs/prg-83836cdf-2ce2-4696-8bc5-f1b86077238c" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Accept: application/json" |
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 @@ | ||
{ | ||
"token": "prg-83836cdf-2ce2-4696-8bc5-f1b86077238c", | ||
"createdOn": "2017-10-04T21:19:24", | ||
"name": "Hyperwallet - Portal", | ||
"parentToken": "prg-a4b617e2-24c9-4891-9ee5-741489613f73", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/programs/prg-83836cdf-2ce2-4696-8bc5-f1b86077238c" | ||
} | ||
] | ||
} |