generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PO-559: Update DraftAccount POST endpoint
- Loading branch information
1 parent
7b6883e
commit 50e19d2
Showing
8 changed files
with
177 additions
and
17 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: 57 additions & 0 deletions
57
src/main/java/uk/gov/hmcts/opal/dto/AddDraftAccountRequestDto.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,57 @@ | ||
package uk.gov.hmcts.opal.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.OffsetDateTime; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class AddDraftAccountRequestDto implements ToJsonString { | ||
|
||
@JsonProperty("draft_account_id") | ||
private Long draftAccountId; | ||
|
||
@JsonProperty("business_unit_id") | ||
private Short businessUnitId; | ||
|
||
@JsonProperty("created_at") | ||
private OffsetDateTime createdDate; | ||
|
||
@JsonProperty("submitted_by") | ||
private String submittedBy; | ||
|
||
@JsonProperty("validated_at") | ||
private OffsetDateTime validatedDate; | ||
|
||
@JsonProperty("validated_by") | ||
private String validatedBy; | ||
|
||
@JsonProperty("account") | ||
private String account; | ||
|
||
@JsonProperty("account_snapshot") | ||
private String accountSnapshot; | ||
|
||
@JsonProperty("account_type") | ||
private String accountType; | ||
|
||
@JsonProperty("account_status") | ||
private String accountStatus; | ||
|
||
@JsonProperty("timeline_data") | ||
private String timelineData; | ||
|
||
@JsonProperty("account_number") | ||
private String accountNumber; | ||
|
||
@JsonProperty("account_id") | ||
private Long accountId; | ||
} |
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
39 changes: 39 additions & 0 deletions
39
src/main/resources/jsonSchemas/addDraftAccountRequest.json
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,39 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"business_unit_id": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "ID of the Business Unit the Draft Account belongs to" | ||
}, | ||
"submitted_by": { | ||
"type": "string", | ||
"description": "ID of the User that last submitted the Draft Account for checking" | ||
}, | ||
"account": { | ||
"type": "string", | ||
"description": "The structured Account data (JSON)" | ||
}, | ||
"account_type": { | ||
"type": "string", | ||
"description": "Type of Account, such as Fixed Penalty Registration" | ||
}, | ||
"account_status": { | ||
"type": "string", | ||
"description": "Status of the Draft Account - one of Submitted, Resubmitted, Rejected, Approved, Deleted" | ||
}, | ||
"timeline_data": { | ||
"type": "string", | ||
"description": "Status changes to the Draft Account in chronological order (JSON Array) - System generated (UI)" | ||
} | ||
}, | ||
"required": [ | ||
"business_unit_id", | ||
"submitted_by", | ||
"account", | ||
"account_type", | ||
"account_status", | ||
"timeline_data" | ||
] | ||
} |
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