Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Riskified JAVA SDK
=================

version: 5.1.0
version: 6.0.0
------------------

See http://apiref.riskified.com for full API documentation
Expand Down Expand Up @@ -104,7 +104,7 @@ curl -H "Content-Type: application/json" -H "X-RISKIFIED-HMAC-SHA256: 071ef80d5
<dependency>
<groupId>com.riskified</groupId>
<artifactId>riskified-sdk</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
</dependency>
```

2 changes: 1 addition & 1 deletion riskified-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>com.riskified</groupId>
<artifactId>riskified-sdk</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static Order generateOrder() {

AccommodationLineItem accommodationLineItem = new AccommodationLineItem(300, "Holiday Inn", "hotel", "New York City", "US", new Date(114, 01, 10, 11, 00, 00), new Date(114, 01, 10, 11, 00, 00));
accommodationLineItem.setRoomType("Presidential Suite");
accommodationLineItem.setRating(3.9f);
accommodationLineItem.setRating("3.9");
accommodationLineItem.setNumberOfGuests(2);
accommodationLineItem.setCancellationPolicy("No");
accommodationLineItem.setAccommodationType("Hotel");
Expand Down
2 changes: 1 addition & 1 deletion riskified-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.riskified</groupId>
<artifactId>riskified-sdk</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<name>Riskified SDK</name>
<description>Riskified rest api SDK for java</description>
<url>https://www.riskified.com</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ private HttpPost createPostRequest(String url) {
postRequest.setHeader(HttpHeaders.ACCEPT, "application/vnd.riskified.com; version=2");
postRequest.setHeader(HttpHeaders.ACCEPT, "application/json");
postRequest.setHeader("X-RISKIFIED-SHOP-DOMAIN", shopUrl);
postRequest.setHeader("User-Agent","riskified_java_sdk/5.1.0"); // TODO: take the version automatically
postRequest.setHeader("User-Agent","riskified_java_sdk/6.0.0"); // TODO: take the version automatically
postRequest.setHeader("Version",versionHeaderValue);
return postRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AccommodationLineItem extends LineItem {
private String countryCode;
private Date checkInDate;
private Date checkOutDate;
private Float rating;
private String rating;
private Integer numberOfGuests;
private String cancellationPolicy;
private String accommodationType;
Expand Down Expand Up @@ -90,11 +90,11 @@ public void setCheckOutDate(Date checkOutDate) {
this.checkOutDate = checkOutDate;
}

public float getRating() {
public String getRating() {
return rating;
}

public void setRating(float rating) {
public void setRating(String rating) {
this.rating = rating;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class LineItem implements IValidated {
private String variantId;
private String variantTitle;
private String variantInventoryManagement;
private String vendor;
private Vendor vendor;
private String name;
private Boolean requiresShipping;
private Boolean taxable;
Expand Down Expand Up @@ -179,11 +179,11 @@ public void setVariantInventoryManagement(String variantInventoryManagement) {
this.variantInventoryManagement = variantInventoryManagement;
}

public String getVendor() {
public Vendor getVendor() {
return vendor;
}

public void setVendor(String vendor) {
public void setVendor(Vendor vendor) {
this.vendor = vendor;
}

Expand Down
30 changes: 30 additions & 0 deletions riskified-sdk/src/main/java/com/riskified/models/Vendor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.riskified.models;

public class Vendor {

private String vendorName;
private String vendorId;

public Vendor() {}

public Vendor(String vendorName, String vendorId) {
this.vendorName = vendorName;
this.vendorId = vendorId;
}

public String getVendorName() {
return vendorName;
}

public void setVendorName(String vendorName) {
this.vendorName = vendorName;
}

public String getVendorId() {
return vendorId;
}

public void setVendorId(String vendorId) {
this.vendorId = vendorId;
}
}