Skip to content

Commit a910afe

Browse files
authored
(for Rajesh) adding $decline_category to $transaction event (#55)
* adding $decline_category to $transaction event
1 parent 7d6317c commit a910afe

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

CHANGES.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.4.0 (2020-05-05)
2+
=================
3+
- Add support for `$decline_category` field to `$transaction` event
4+
15
3.3.0 (2020-02-19)
26
=================
37
- Add support for `$client_language` field to `$app` complex field

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Java 1.7 or later.
1313
<dependency>
1414
<groupId>com.siftscience</groupId>
1515
<artifactId>sift-java</artifactId>
16-
<version>3.3.0</version>
16+
<version>3.4.0</version>
1717
</dependency>
1818
```
1919
### Gradle
2020
```
2121
dependencies {
22-
compile 'com.siftscience:sift-java:3.3.0'
22+
compile 'com.siftscience:sift-java:3.4.0'
2323
}
2424
```
2525
### Other

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'signing'
55
apply plugin: 'java-library-distribution'
66

77
group = 'com.siftscience'
8-
version = '3.3.0'
8+
version = '3.4.0'
99

1010
repositories {
1111
mavenCentral()

src/main/java/com/siftscience/model/TransactionFieldSet.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class TransactionFieldSet extends BaseAppBrowserSiteBrandFieldSet<Transac
1717
@Expose @SerializedName("$seller_user_id") private String sellerUserId;
1818
@Expose @SerializedName("$transfer_recipient_user_id") private String transferRecipientUserId;
1919
@Expose @SerializedName("$ordered_from") private OrderedFrom orderedFrom;
20+
@Expose @SerializedName("$decline_category") private String declineCategory;
2021

2122
@Override
2223
public String getEventType() {
@@ -143,4 +144,13 @@ public TransactionFieldSet setOrderedFrom(OrderedFrom orderedFrom) {
143144
this.orderedFrom = orderedFrom;
144145
return this;
145146
}
147+
148+
public String getDeclineCategory() {
149+
return declineCategory;
150+
}
151+
152+
public TransactionFieldSet setDeclineCategory(String declineCategory) {
153+
this.declineCategory = declineCategory;
154+
return this;
155+
}
146156
}

src/test/java/com/siftscience/TransactionEventTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ public void testTransactionEvent() throws Exception {
2323
"\n" +
2424
" \"$user_email\" : \"bill@gmail.com\",\n" +
2525
" \"$transaction_type\" : \"$sale\",\n" +
26-
" \"$transaction_status\" : \"$success\",\n" +
26+
" \"$transaction_status\" : \"$failure\",\n" +
2727
" \"$order_id\" : \"ORDER-123124124\",\n" +
2828
" \"$transaction_id\" : \"719637215\",\n" +
29+
" \"$decline_category\" : \"$lost\",\n" +
2930
" \"$site_country\": \"US\",\n" +
3031
" \"$site_domain\": \"sift.com\",\n" +
3132
" \"$brand_name\": \"sift\",\n" +
@@ -105,7 +106,8 @@ public void testTransactionEvent() throws Exception {
105106
.setCurrencyCode("USD")
106107
.setUserEmail("bill@gmail.com")
107108
.setTransactionType("$sale")
108-
.setTransactionStatus("$success")
109+
.setTransactionStatus("$failure")
110+
.setDeclineCategory("$lost")
109111
.setSiteCountry("US")
110112
.setSiteDomain("sift.com")
111113
.setBrandName("sift")

0 commit comments

Comments
 (0)