diff --git a/pom.xml b/pom.xml
index b0cc7dc..d9281ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,10 +11,11 @@
fraudo
- 0.0.1-SNAPSHOT
+ 0.0.2-SNAPSHOT
2.0.0.0
+ ${project.basedir}/../target/jacoco.exec
@@ -74,6 +75,29 @@
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.2
+
+ ${sonar.jacoco.reportPath}
+ true
+
+ com/rbkmoney/fraudo/constant/**/*
+ com/rbkmoney/fraudo/model/**/*
+
+
+
+
+ agent
+
+ prepare-agent
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/rbkmoney/fraudo/aggregator/CountAggregator.java b/src/main/java/com/rbkmoney/fraudo/aggregator/CountAggregator.java
index 0c515bf..0535156 100644
--- a/src/main/java/com/rbkmoney/fraudo/aggregator/CountAggregator.java
+++ b/src/main/java/com/rbkmoney/fraudo/aggregator/CountAggregator.java
@@ -1,13 +1,14 @@
package com.rbkmoney.fraudo.aggregator;
import com.rbkmoney.fraudo.constant.CheckedField;
+import com.rbkmoney.fraudo.model.FraudModel;
public interface CountAggregator {
- Integer count(CheckedField checkedField, String valueField, Long timeInMinutes);
+ Integer count(CheckedField checkedField, FraudModel model, Long timeInMinutes);
- Integer countSuccess(CheckedField checkedField, String valueField, Long timeInMinutes);
+ Integer countSuccess(CheckedField checkedField, FraudModel model, Long timeInMinutes);
- Integer countError(CheckedField checkedField, String valueField, Long timeInMinutes, String errorCode);
+ Integer countError(CheckedField checkedField, FraudModel model, Long timeInMinutes, String errorCode);
}
diff --git a/src/main/java/com/rbkmoney/fraudo/aggregator/SumAggregator.java b/src/main/java/com/rbkmoney/fraudo/aggregator/SumAggregator.java
index e03f255..2aea2b2 100644
--- a/src/main/java/com/rbkmoney/fraudo/aggregator/SumAggregator.java
+++ b/src/main/java/com/rbkmoney/fraudo/aggregator/SumAggregator.java
@@ -1,13 +1,14 @@
package com.rbkmoney.fraudo.aggregator;
import com.rbkmoney.fraudo.constant.CheckedField;
+import com.rbkmoney.fraudo.model.FraudModel;
public interface SumAggregator {
- Double sum(CheckedField checkedField, String email, Long timeInMinutes);
+ Double sum(CheckedField checkedField, FraudModel model, Long timeInMinutes);
- Double sumSuccess(CheckedField checkedField, String valueField, Long timeInMinutes);
+ Double sumSuccess(CheckedField checkedField, FraudModel model, Long timeInMinutes);
- Double sumError(CheckedField checkedField, String valueField, Long timeInMinutes, String errorCode);
+ Double sumError(CheckedField checkedField, FraudModel model, Long timeInMinutes, String errorCode);
}
diff --git a/src/main/java/com/rbkmoney/fraudo/constant/ResultStatus.java b/src/main/java/com/rbkmoney/fraudo/constant/ResultStatus.java
index 954c716..17bb6bb 100644
--- a/src/main/java/com/rbkmoney/fraudo/constant/ResultStatus.java
+++ b/src/main/java/com/rbkmoney/fraudo/constant/ResultStatus.java
@@ -8,6 +8,7 @@ public enum ResultStatus {
ACCEPT("accept"),
THREE_DS("3ds"),
DECLINE("decline"),
+ NORMAL("normal"),
NOTIFY("notify");
private String value;
diff --git a/src/main/java/com/rbkmoney/fraudo/model/ResultModel.java b/src/main/java/com/rbkmoney/fraudo/model/ResultModel.java
new file mode 100644
index 0000000..03149e9
--- /dev/null
+++ b/src/main/java/com/rbkmoney/fraudo/model/ResultModel.java
@@ -0,0 +1,15 @@
+package com.rbkmoney.fraudo.model;
+
+import com.rbkmoney.fraudo.constant.ResultStatus;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+public class ResultModel {
+
+ private ResultStatus resultStatus;
+ private List notificationsRule;
+}
diff --git a/src/main/java/com/rbkmoney/fraudo/visitor/CountVisitorImpl.java b/src/main/java/com/rbkmoney/fraudo/visitor/CountVisitorImpl.java
index 943d9df..63b297f 100644
--- a/src/main/java/com/rbkmoney/fraudo/visitor/CountVisitorImpl.java
+++ b/src/main/java/com/rbkmoney/fraudo/visitor/CountVisitorImpl.java
@@ -18,7 +18,7 @@ public class CountVisitorImpl extends FraudoBaseVisitor