Skip to content

Commit cf2b944

Browse files
committed
Corrected type issue
1 parent 60f3df0 commit cf2b944

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ And add following in dependencies,
2222

2323
```
2424
dependencies {
25-
compile 'in.clayfish:printful4j:0.1.0'
25+
compile 'in.clayfish:printful4j:0.2.0'
2626
}
2727
```
2828

2929
### Java
3030

31-
* **Using gradle**, `compile 'in.clayfish:printful4j:0.1.0'`
31+
* **Using gradle**, `compile 'in.clayfish:printful4j:0.2.0'`
3232
* **Using Maven**, Add following in `<repositories>`,
3333

3434
``` xml
@@ -43,7 +43,7 @@ dependencies {
4343
<dependency>
4444
<groupId>in.clayfish</groupId>
4545
<artifactId>printful4j</artifactId>
46-
<version>0.1.0</version>
46+
<version>0.2.0</version>
4747
</dependency>
4848
```
4949

@@ -53,7 +53,7 @@ resolvers += "jitpack" at "https://jitpack.io"
5353
```
5454
And add following in the dependencies,
5555
```
56-
libraryDependencies += "in.clayfish" % "printful4j" % "0.1.0"
56+
libraryDependencies += "in.clayfish" % "printful4j" % "0.2.0"
5757
```
5858

5959
* **Using leningen**, Add following in your project.clj at the end of repositories,
@@ -62,7 +62,7 @@ libraryDependencies += "in.clayfish" % "printful4j" % "0.1.0"
6262
```
6363
And add following,
6464
```
65-
:dependencies [[in.clayfish/printful4j "0.1.0"]]
65+
:dependencies [[in.clayfish/printful4j "0.2.0"]]
6666
```
6767

6868
For more information regarding download or using different build systems, please visit

client/src/main/java/in/clayfish/printful/enums/FileStatus.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ public enum FileStatus {
2020
*/
2121
FAIL;
2222

23+
/**
24+
* @param searchTerm The term to search status for
25+
* @return Found FileStatus
26+
*/
2327
public static FileStatus find(String searchTerm) {
28+
if (searchTerm == null || searchTerm.isEmpty()) {
29+
return null;
30+
}
2431
return FileStatus.valueOf(searchTerm.trim().toUpperCase());
2532
}
2633

client/src/main/java/in/clayfish/printful/utils/GsonAdapters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public Response deserialize(JsonElement jsonElement, Type typeOfT, JsonDeseriali
278278
}
279279

280280
if (json.has("paging")) {
281-
response.setPaging(context.deserialize(json.get("paging"), Paging.class));
281+
response.setPaging(context.<Paging>deserialize(json.get("paging"), Paging.class));
282282
}
283283

284284
if (json.has("result")) {

client/src/test/java/in/clayfish/printful/test/ProductCatalogApiClientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
2121
*/
2222
public class ProductCatalogApiClientTest {
23-
static String API_KEY = "l1zpya7z-w5e3-ce2a:kop5-fvlklkzc0qkn";
23+
static String API_KEY = "YOUR_API_KEY";
2424
private Client client;
2525

2626
@Before

0 commit comments

Comments
 (0)