-
Notifications
You must be signed in to change notification settings - Fork 3
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 #109 from baloise/feature/BABEL-1305-api-implement…
…-sved [BABEL-1305] - change Cancellation entity to accept Identifier identi…
- Loading branch information
Showing
3 changed files
with
31 additions
and
69 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
57 changes: 20 additions & 37 deletions
57
src/main/java/ch/baloise/corellia/api/entities/Cancellation.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 |
---|---|---|
@@ -1,52 +1,35 @@ | ||
package ch.baloise.corellia.api.entities; | ||
|
||
import static ch.baloise.corellia.api.constraints.SizeConstraint.CONTRACT_ID_MAX_SIZE; | ||
|
||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
import java.io.Serializable; | ||
import java.time.LocalDate; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
|
||
public class Cancellation implements Serializable { | ||
|
||
private static final long serialVersionUID = 10; | ||
|
||
@NotNull | ||
@Size(max = CONTRACT_ID_MAX_SIZE) | ||
@JsonPropertyDescription( | ||
"Id given by SaaS provider. Identifies the contract which should be cancelled") | ||
private String contractId; | ||
|
||
@NotNull | ||
@JsonPropertyDescription("effecitve date of cancellation") | ||
private LocalDate effectiveDate; | ||
private static final long serialVersionUID = 10; | ||
|
||
@NotNull | ||
@JsonPropertyDescription("A code uniquely identifying the cancellation reason") | ||
private Integer reasonCode; | ||
@NotNull | ||
@Valid | ||
private Identifier identifier; | ||
|
||
public String getContractId() { | ||
return contractId; | ||
} | ||
@NotNull | ||
@Valid | ||
private Action action; | ||
|
||
public void setContractId(String contractId) { | ||
this.contractId = contractId; | ||
} | ||
public Identifier getIdentifier() { | ||
return identifier; | ||
} | ||
|
||
public LocalDate getEffectiveDate() { | ||
return effectiveDate; | ||
} | ||
public void setIdentifier(Identifier identifier) { | ||
this.identifier = identifier; | ||
} | ||
|
||
public void setEffectiveDate(LocalDate effectiveDate) { | ||
this.effectiveDate = effectiveDate; | ||
} | ||
public Action getAction() { | ||
return action; | ||
} | ||
|
||
public Integer getReasonCode() { | ||
return reasonCode; | ||
} | ||
public void setAction(Action action) { | ||
this.action = action; | ||
} | ||
|
||
public void setReasonCode(Integer reasonCode) { | ||
this.reasonCode = reasonCode; | ||
} | ||
} |