-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from konduto/2.12.0
Merge 2.12.0 including new order [GET] and [POST] response fields, which are triggered decision lists and rules, and bureaux queries. Additionally, order [POST] requests accept payment amount/description.
- Loading branch information
Showing
26 changed files
with
521 additions
and
94 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
56 changes: 56 additions & 0 deletions
56
src/main/java/com/konduto/sdk/models/KondutoBureauQuery.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,56 @@ | ||
package com.konduto.sdk.models; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class KondutoBureauQuery extends KondutoModel { | ||
@SerializedName("service") | ||
private String kondutoBureauService; | ||
@SerializedName("response") | ||
private Map<String, Object> kondutoBureauResponse; | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if(!(obj instanceof KondutoBureauQuery)) { return false; } | ||
KondutoBureauQuery that = (KondutoBureauQuery) obj; | ||
return this.kondutoBureauService == that.kondutoBureauService && | ||
this.kondutoBureauResponse.equals(that.kondutoBureauResponse); | ||
} | ||
|
||
public String getService() { | ||
return kondutoBureauService; | ||
} | ||
|
||
public void setService(String kondutoBureauService) { | ||
this.kondutoBureauService = kondutoBureauService; | ||
} | ||
|
||
public Map<String, Object> getResponse() { | ||
return kondutoBureauResponse; | ||
} | ||
|
||
public void setResponse(Map<String, Object> kondutoBureauResponse) { | ||
this.kondutoBureauResponse = kondutoBureauResponse; | ||
} | ||
|
||
/** | ||
* Return the value of a field in a bureau response (e.g. | ||
* email_domain_exists). | ||
* | ||
* @param field what field to look for | ||
* @return the value of that field | ||
*/ | ||
public Object getAttribute(String field) { | ||
if(field == null || this.kondutoBureauResponse == null) { return null; } | ||
return this.kondutoBureauResponse.get(field); | ||
} | ||
|
||
public void setAttribute(String key, Object value) { | ||
if(this.kondutoBureauResponse == null) { | ||
this.kondutoBureauResponse = new HashMap<String, Object>(); | ||
} | ||
this.kondutoBureauResponse.put(key, value); | ||
} | ||
} |
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
44 changes: 44 additions & 0 deletions
44
src/main/java/com/konduto/sdk/models/KondutoDecisionListTrigger.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,44 @@ | ||
package com.konduto.sdk.models; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public enum KondutoDecisionListTrigger { | ||
@SerializedName("email") | ||
EMAIL, | ||
@SerializedName("billing") | ||
BILLING, | ||
@SerializedName("shipping") | ||
SHIPPING, | ||
@SerializedName("tax_id") | ||
TAX_ID, | ||
@SerializedName("phone_1") | ||
PHONE_1, | ||
@SerializedName("phone_2") | ||
PHONE_2, | ||
@SerializedName("ip") | ||
IP, | ||
@SerializedName("shipping_zip") | ||
SHIPPING_ZIP, | ||
@SerializedName("billing_zip") | ||
BILLING_ZIP, | ||
@SerializedName("hotel_zip") | ||
HOTEL_ZIP, | ||
@SerializedName("customer_name") | ||
CUSTOMER_NAME, | ||
@SerializedName("shipping_name") | ||
SHIPPING_NAME, | ||
@SerializedName("billing_name") | ||
BILLING_NAME, | ||
@SerializedName("bin_last4") | ||
BIN_LAST4, | ||
@SerializedName("passenger_name") | ||
PASSENGER_NAME, | ||
@SerializedName("passenger_document") | ||
PASSENGER_DOCUMENT, | ||
@SerializedName("guest_name") | ||
GUEST_NAME, | ||
@SerializedName("guest_document") | ||
GUEST_DOCUMENT, | ||
@SerializedName("device_ip") | ||
DEVICE_IP | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/konduto/sdk/models/KondutoDecisionListType.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,20 @@ | ||
package com.konduto.sdk.models; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public enum KondutoDecisionListType { | ||
@SerializedName("email") | ||
EMAIL, | ||
@SerializedName("tax_id") | ||
TAX_ID, | ||
@SerializedName("phone") | ||
PHONE, | ||
@SerializedName("bin_last4") | ||
BIN_LAST4, | ||
@SerializedName("zip") | ||
ZIP, | ||
@SerializedName("name") | ||
NAME, | ||
@SerializedName("ip") | ||
IP | ||
} |
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.