| Line 16... |
Line 16... |
| 16 |
|
16 |
|
| 17 |
public class CreateOfferRequest {
|
17 |
public class CreateOfferRequest {
|
| 18 |
private int id;
|
18 |
private int id;
|
| 19 |
private boolean active;
|
19 |
private boolean active;
|
| 20 |
private boolean baseCriteria;
|
20 |
private boolean baseCriteria;
|
| - |
|
21 |
private boolean discount;
|
| 21 |
private String name;
|
22 |
private String name;
|
| 22 |
private boolean booster;
|
23 |
private boolean booster;
|
| 23 |
private LocalDateTime startDate;
|
24 |
private LocalDateTime startDate;
|
| 24 |
private LocalDateTime endDate;
|
25 |
private LocalDateTime endDate;
|
| 25 |
private LocalDateTime processTimestamp;
|
26 |
private LocalDateTime processTimestamp;
|
| Line 50... |
Line 51... |
| 50 |
public void setProcessTimestamp(LocalDateTime processTimestamp) {
|
51 |
public void setProcessTimestamp(LocalDateTime processTimestamp) {
|
| 51 |
this.processTimestamp = processTimestamp;
|
52 |
this.processTimestamp = processTimestamp;
|
| 52 |
}
|
53 |
}
|
| 53 |
|
54 |
|
| 54 |
@Override
|
55 |
@Override
|
| 55 |
public String toString() {
|
- |
|
| 56 |
return "CreateOfferRequest{" +
|
- |
|
| 57 |
"id=" + id +
|
- |
|
| 58 |
", active=" + active +
|
- |
|
| 59 |
", baseCriteria=" + baseCriteria +
|
- |
|
| 60 |
", name='" + name + '\'' +
|
- |
|
| 61 |
", booster=" + booster +
|
- |
|
| 62 |
", startDate=" + startDate +
|
- |
|
| 63 |
", endDate=" + endDate +
|
- |
|
| 64 |
", processTimestamp=" + processTimestamp +
|
- |
|
| 65 |
", offerNotes='" + offerNotes + '\'' +
|
- |
|
| 66 |
", terms='" + terms + '\'' +
|
- |
|
| 67 |
", targetType=" + targetType +
|
- |
|
| 68 |
", payoutType=" + payoutType +
|
- |
|
| 69 |
", activationBrands='" + activationBrands + '\'' +
|
- |
|
| 70 |
", schemeType=" + schemeType +
|
- |
|
| 71 |
", sellinPercentage=" + sellinPercentage +
|
- |
|
| 72 |
", brandShareTerms=" + brandShareTerms +
|
- |
|
| 73 |
", itemCriteria=" + itemCriteria +
|
- |
|
| 74 |
", itemCriteriaString='" + itemCriteriaString + '\'' +
|
- |
|
| 75 |
", createdOn=" + createdOn +
|
- |
|
| 76 |
", targetSlabs=" + targetSlabs +
|
- |
|
| 77 |
", partnerCriteria=" + partnerCriteria +
|
- |
|
| 78 |
", partnerCriteriaString='" + partnerCriteriaString + '\'' +
|
- |
|
| 79 |
", eligibleSale=" + eligibleSale +
|
- |
|
| 80 |
", nextTargetSlab=" + nextTargetSlab +
|
- |
|
| 81 |
", currentTargetSlab=" + currentTargetSlab +
|
- |
|
| 82 |
", currentTarget='" + currentTarget + '\'' +
|
- |
|
| 83 |
", nextTarget='" + nextTarget + '\'' +
|
- |
|
| 84 |
'}';
|
- |
|
| 85 |
}
|
- |
|
| 86 |
|
- |
|
| 87 |
@Override
|
- |
|
| 88 |
public boolean equals(Object o) {
|
56 |
public boolean equals(Object o) {
|
| 89 |
if (this == o) return true;
|
57 |
if (this == o) return true;
|
| 90 |
if (o == null || getClass() != o.getClass()) return false;
|
58 |
if (o == null || getClass() != o.getClass()) return false;
|
| 91 |
CreateOfferRequest that = (CreateOfferRequest) o;
|
59 |
CreateOfferRequest that = (CreateOfferRequest) o;
|
| 92 |
return id == that.id && active == that.active && baseCriteria == that.baseCriteria && booster == that.booster && Double.compare(that.sellinPercentage, sellinPercentage) == 0 && Double.compare(that.brandShareTerms, brandShareTerms) == 0 && eligibleSale == that.eligibleSale && Objects.equals(name, that.name) && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate) && Objects.equals(processTimestamp, that.processTimestamp) && Objects.equals(offerNotes, that.offerNotes) && Objects.equals(terms, that.terms) && targetType == that.targetType && payoutType == that.payoutType && Objects.equals(activationBrands, that.activationBrands) && schemeType == that.schemeType && Objects.equals(itemCriteria, that.itemCriteria) && Objects.equals(itemCriteriaString, that.itemCriteriaString) && Objects.equals(createdOn, that.createdOn) && Objects.equals(targetSlabs, that.targetSlabs) && Objects.equals(partnerCriteria, that.partnerCriteria) && Objects.equals(partnerCriteriaString, that.partnerCriteriaString) && Objects.equals(nextTargetSlab, that.nextTargetSlab) && Objects.equals(currentTargetSlab, that.currentTargetSlab) && Objects.equals(currentTarget, that.currentTarget) && Objects.equals(nextTarget, that.nextTarget);
|
60 |
return id == that.id && active == that.active && baseCriteria == that.baseCriteria && booster == that.booster && Double.compare(that.sellinPercentage, sellinPercentage) == 0 && Double.compare(that.brandShareTerms, brandShareTerms) == 0 && eligibleSale == that.eligibleSale && Objects.equals(name, that.name) && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate) && Objects.equals(processTimestamp, that.processTimestamp) && Objects.equals(offerNotes, that.offerNotes) && Objects.equals(terms, that.terms) && targetType == that.targetType && payoutType == that.payoutType && Objects.equals(activationBrands, that.activationBrands) && schemeType == that.schemeType && Objects.equals(itemCriteria, that.itemCriteria) && Objects.equals(itemCriteriaString, that.itemCriteriaString) && Objects.equals(createdOn, that.createdOn) && Objects.equals(targetSlabs, that.targetSlabs) && Objects.equals(partnerCriteria, that.partnerCriteria) && Objects.equals(partnerCriteriaString, that.partnerCriteriaString) && Objects.equals(nextTargetSlab, that.nextTargetSlab) && Objects.equals(currentTargetSlab, that.currentTargetSlab) && Objects.equals(currentTarget, that.currentTarget) && Objects.equals(nextTarget, that.nextTarget);
|
| Line 412... |
Line 380... |
| 412 |
}
|
380 |
}
|
| 413 |
|
381 |
|
| 414 |
public boolean isWithinRange(LocalDateTime testDate) {
|
382 |
public boolean isWithinRange(LocalDateTime testDate) {
|
| 415 |
return !(testDate.isBefore(startDate) || testDate.isAfter(endDate));
|
383 |
return !(testDate.isBefore(startDate) || testDate.isAfter(endDate));
|
| 416 |
}
|
384 |
}
|
| - |
|
385 |
|
| - |
|
386 |
public boolean isDiscount() {
|
| - |
|
387 |
return discount;
|
| - |
|
388 |
}
|
| - |
|
389 |
|
| - |
|
390 |
public void setDiscount(boolean discount) {
|
| - |
|
391 |
this.discount = discount;
|
| - |
|
392 |
}
|
| - |
|
393 |
|
| - |
|
394 |
@Override
|
| - |
|
395 |
public String toString() {
|
| - |
|
396 |
return "CreateOfferRequest{" +
|
| - |
|
397 |
"id=" + id +
|
| - |
|
398 |
", active=" + active +
|
| - |
|
399 |
", baseCriteria=" + baseCriteria +
|
| - |
|
400 |
", discount=" + discount +
|
| - |
|
401 |
", name='" + name + '\'' +
|
| - |
|
402 |
", booster=" + booster +
|
| - |
|
403 |
", startDate=" + startDate +
|
| - |
|
404 |
", endDate=" + endDate +
|
| - |
|
405 |
", processTimestamp=" + processTimestamp +
|
| - |
|
406 |
", offerNotes='" + offerNotes + '\'' +
|
| - |
|
407 |
", terms='" + terms + '\'' +
|
| - |
|
408 |
", targetType=" + targetType +
|
| - |
|
409 |
", payoutType=" + payoutType +
|
| - |
|
410 |
", activationBrands='" + activationBrands + '\'' +
|
| - |
|
411 |
", schemeType=" + schemeType +
|
| - |
|
412 |
", sellinPercentage=" + sellinPercentage +
|
| - |
|
413 |
", brandShareTerms=" + brandShareTerms +
|
| - |
|
414 |
", itemCriteria=" + itemCriteria +
|
| - |
|
415 |
", itemCriteriaString='" + itemCriteriaString + '\'' +
|
| - |
|
416 |
", createdOn=" + createdOn +
|
| - |
|
417 |
", targetSlabs=" + targetSlabs +
|
| - |
|
418 |
", partnerCriteria=" + partnerCriteria +
|
| - |
|
419 |
", partnerCriteriaString='" + partnerCriteriaString + '\'' +
|
| - |
|
420 |
", eligibleSale=" + eligibleSale +
|
| - |
|
421 |
", nextTargetSlab=" + nextTargetSlab +
|
| - |
|
422 |
", currentTargetSlab=" + currentTargetSlab +
|
| - |
|
423 |
", currentTarget='" + currentTarget + '\'' +
|
| - |
|
424 |
", nextTarget='" + nextTarget + '\'' +
|
| - |
|
425 |
'}';
|
| - |
|
426 |
}
|
| 417 |
}
|
427 |
}
|