This commit is contained in:
Mohd-Arham
2025-12-04 18:37:44 +05:30
parent 812aa3c2ff
commit f15e967e58
17 changed files with 177 additions and 100 deletions
@@ -1,5 +1,6 @@
package com.billpaymentservice.bbps.dto;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -10,6 +11,7 @@ import lombok.Setter;
@AllArgsConstructor
@NoArgsConstructor
public class Tag {
private String name;
private String value;
private String name;
private String value;
}
@@ -1,6 +1,6 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -12,7 +12,7 @@ import lombok.Setter;
@NoArgsConstructor
public class BillFetchByBillIdRequest extends BaseClass {
@NotNull
@NotBlank(message = "bill id not be null")
private String billId;
}
@@ -1,6 +1,9 @@
package com.billpaymentservice.bbps.dto.request;
import java.util.List;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@@ -8,25 +11,47 @@ import lombok.Setter;
@Setter
public class BillPaymentRequest extends BaseClass {
private String tenantId;
private String refId;
private String billId;
private boolean amountOptions;
private String paymentMode;
private String paymentInformation;
private String billerId;
private String billerName;
private String billerCategory;
private String macAdress;
private String customerMobNo;
private Integer txnAmount;
private String paymentRefId;
private String clientReqId;
private String paymentChannel;
@NotBlank(message = "ref id cannot be null or empty")
private String refId;
private List<DeviceBlockTagRequest> deviceBlockTags;
private List<CustomerParamTagRequest> customerParamsRequest;
private List<RemitterIdentityRequest> remitterIdentity;
private List<AmountBreakRequest> amountBreakSet;
@NotBlank(message = "bill id cannot be null or empty")
private String billId;
// Change the field to Boolean (wrapper) type to allow @NotNull validation
@NotNull(message = "Amount options cannot be null.")
private boolean amountOptions; // Changed to Boolean (wrapper type)
@NotBlank(message = "payment mode cannot be null or empty")
private String paymentMode;
@NotBlank(message = "payment information cannot be null or empty")
private String paymentInformation;
@NotBlank(message = "biller id cannot be null or empty")
private String billerId;
@NotBlank(message = "biller name cannot be null or empty")
private String billerName;
@NotBlank(message = "biller category cannot be null or empty")
private String billerCategory;
private String macAdress;
private String customerMobNo;
@NotNull(message = "Transaction amount cannot be null.")
private Integer txnAmount; // Changed to @NotNull as it's an Integer (non-nullable)
private String paymentRefId;
private String clientReqId;
@NotBlank(message = "payment channel cannot be null or empty")
private String paymentChannel;
private List<DeviceBlockTagRequest> deviceBlockTags;
private List<CustomerParamTagRequest> customerParamsRequest;
private List<RemitterIdentityRequest> remitterIdentity;
private List<AmountBreakRequest> amountBreakSet;
}
@@ -1,5 +1,6 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@@ -10,7 +11,7 @@ import lombok.ToString;
@ToString(callSuper = true)
public class BillerDetailRequest extends BaseClass{
@NotNull
@NotBlank(message = "biller id not be null")
private String billerId;
}
@@ -1,6 +1,6 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -14,6 +14,6 @@ import lombok.ToString;
@ToString
public class CustomParamRequest extends BaseClass {
@NotNull
@NotBlank(message = "biller id not be null")
private String billerId;
}
@@ -6,11 +6,13 @@ import com.billpaymentservice.bbps.dto.CustomerParamsRequest;
import com.billpaymentservice.bbps.dto.RemitterIdentity;
import com.billpaymentservice.bbps.dto.Tag;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@AllArgsConstructor
@@ -18,19 +20,29 @@ import lombok.ToString;
@ToString
public class FetchBillRequest extends BaseClass {
// private String tenantId; // M
private String billerId; // M
private String billerName; //M
// private String digiledgeKey; // M
// private String agentId; // M
private String billerCategory; // M
private String clientReqId; // C
private String macAdress; // C
private String customerMobNo; // M
private String remitterName; // O
private String paymentChannel; // M
private List<Tag> deviceBlockTags; // M
private CustomerParamsRequest customerParamsRequest; // M
private List<RemitterIdentity> remitterIdentity; // O
@NotBlank(message = "biller id not be null")
private String billerId;
@NotBlank(message = "biller name not be null")
private String billerName;
@NotBlank(message = "biller category not be null")
private String billerCategory;
private String clientReqId;
private String macAdress;
@NotBlank(message = "customer mob no not be null")
private String customerMobNo;
private String remitterName;
@NotBlank(message = "payment channel not be null")
private String paymentChannel;
private List<Tag> deviceBlockTags;
private CustomerParamsRequest customerParamsRequest;
private List<RemitterIdentity> remitterIdentity;
}
@@ -2,6 +2,7 @@ package com.billpaymentservice.bbps.dto.request;
import com.billpaymentservice.bbps.dto.CustomerParamsRequest;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -14,18 +15,18 @@ import lombok.Setter;
@NoArgsConstructor
public class FetchBillValidatestRequest extends BaseClass {
@NotNull
private String billerId; // Alphanumeric, Unique ID assigned by NPCI
@NotNull
private String billerName; // String, Name of the biller
@NotNull
private String billerCategory; // String, CategoryResponseList of the biller
@NotNull
private String customerMobNo; // String, Mobile of the Customer
@NotBlank(message = "biller id not be null")
private String billerId;
@NotBlank(message = "biller name not be null")
private String billerName;
@NotBlank(message = "biller category not be null")
private String billerCategory;
@NotBlank(message = "biller mob no not be null")
private String customerMobNo;
private String clientReqId;
// Optional Fields
private String macAddress; // Alphanumeric MAC Address of the Agent Server
//private String clientReqId; // String, Unique id provided by the client
private String macAddress;
// private String clientReqId;
private CustomerParamsRequest customerParamsRequest; // Customer parameters for identifying the bill
}
@@ -1,6 +1,7 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -15,7 +16,7 @@ public class MasterCategoryRequest extends BaseClass {
private String billerName;
@NotNull
@NotBlank(message = "category name not be null")
private String category;
private Integer pageNo = 0;
@@ -1,6 +1,8 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@@ -26,8 +28,9 @@ public class PlanRequest extends BaseClass {
private String circle;
// ✅ Optional pagination parameters
private Integer page;
private Integer page = 0;
@NotNull(message = "pageEnd is required")
@Min(value = 1, message = "pageEnd must be greater than 0")
private Integer pagesize;
}
@@ -1,15 +1,18 @@
package com.billpaymentservice.bbps.dto.request;
import jakarta.validation.constraints.Min;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ViewAllComplaintsTicketsRequest extends BaseClass{
public class ViewAllComplaintsTicketsRequest extends BaseClass {
private String statusType; // e.g. COMPLAINT_OPEN_SUCCESS
private Integer pageNo; // default 0
private Integer pageSize; // default 10
@Min(value = 0, message = "Page number must be a non-negative integer.")
private Integer pageNo;
@Min(value = 1, message = "Page size must be at least 1.")
private Integer pageSize;
private String ticketType; // default 10
}