...
Account Details GET /account/details
Account Block Code POST /account/block-code
Target
Account Details
Source
Fiserv endpoint:
GET /account/details
Class:
FiservRepository
Service:
getAccountDetails
...
Code Block | ||
---|---|---|
| ||
public abstract class AbstractFiservBaseRequest { @Builder.Default protected String organizationNumber = "950"; } |
...
Target (MongoDB) Account Mirror
Collection name:
accountDetails
Schema:
Code Block language json db.createCollection("accountDetails", { validator: { $jsonSchema: { bsonType: "object", title: "Account Details Object Validation", required: ["accountNumber"], properties: { accountNumber: { bsonType: "string", description: "'accountNumber' must be a string and is required" }, customerNumber: { bsonType: "string", description: "'customerNumber' must be a string" }, blockCode1: { bsonType: "string", description: "'blockCode1' must be a string" }, blockCode1Date: { bsonType: "string", description: "'blockCode1Date' must be a string" }, blockCode2: { bsonType: "string", description: "'blockCode2' must be a string" }, blockCode2Date: { bsonType: "string", description: "'blockCode2Date' must be a string" }, blocksBy: { bsonType: "string", description: "'blocksBy' must be a string" } } } } });
Index
Code Block language json db.accountDetails.createIndex({accountNumber: 1});
...
Target (Java) Account Mirror
Code Block | ||
---|---|---|
| ||
import lombok.Getter; import lombok.Setter; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; @Getter @Setter @Document(collection = "accountDetails") public class AccountDetail { @Id private String id; @NotNull(message="account number is mandatory") private String accountNumber; private String customerNumber; private String blockCode1; private String blockCode1Date; private String blockCode2; private String blockCode2Date; private String blocksBy; } |
...