Subversion Repositories SmartDukaan

Rev

Rev 32025 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25982 amit.gupta 1
package com.spice.profitmandi.dao.model;
25976 amit.gupta 2
 
3
import com.fasterxml.jackson.annotation.JsonProperty;
26196 amit.gupta 4
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
5
import com.spice.profitmandi.dao.serializer.CustomDateTimeDeserializer;
25976 amit.gupta 6
 
32025 amit.gupta 7
import java.time.LocalDateTime;
8
 
25976 amit.gupta 9
public class AddPaymentRequest {
10
	private String transactionId;
11
	private String remitterName;
12
	private String fromAccountNumber;
13
	private String fromBankName;
14
	private String utr;
15
 
16
	@JsonProperty("Virtual_Account")
17
	private String virtualAccount;
32025 amit.gupta 18
 
25976 amit.gupta 19
	private double amount;
20
	private String mmid;
21
	private String transferMode;
32025 amit.gupta 22
 
23
 
24
	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
25976 amit.gupta 25
	private LocalDateTime creditDateTime;
32025 amit.gupta 26
 
27
	public int getRetailerId() {
32166 amit.gupta 28
		return Integer.parseInt(this.getVirtualAccount().toLowerCase().replace("nwspic", ""));
32025 amit.gupta 29
	}
30
 
25976 amit.gupta 31
	@Override
32
	public String toString() {
33
		return "AddPaymentRequest [transactionId=" + transactionId + ", remitterName=" + remitterName
34
				+ ", fromAccountNumber=" + fromAccountNumber + ", fromBankName=" + fromBankName + ", utr=" + utr
35
				+ ", virtualAccount=" + virtualAccount + ", amount=" + amount + ", mmid=" + mmid + ", transferMode="
36
				+ transferMode + ", creditDateTime=" + creditDateTime + "]";
37
	}
38
	public String getTransactionId() {
39
		return transactionId;
40
	}
41
	public void setTransactionId(String transactionId) {
42
		this.transactionId = transactionId;
43
	}
44
	public String getRemitterName() {
45
		return remitterName;
46
	}
47
	public void setRemitterName(String remitterName) {
48
		this.remitterName = remitterName;
49
	}
50
	public String getFromAccountNumber() {
51
		return fromAccountNumber;
52
	}
53
	public void setFromAccountNumber(String fromAccountNumber) {
54
		this.fromAccountNumber = fromAccountNumber;
55
	}
56
	public String getFromBankName() {
57
		return fromBankName;
58
	}
59
	public void setFromBankName(String fromBankName) {
60
		this.fromBankName = fromBankName;
61
	}
62
	public String getUtr() {
63
		return utr;
64
	}
65
	public void setUtr(String utr) {
66
		this.utr = utr;
67
	}
68
	public String getVirtualAccount() {
69
		return virtualAccount;
70
	}
71
	public void setVirtualAccount(String virtualAccount) {
72
		this.virtualAccount = virtualAccount;
73
	}
74
	public double getAmount() {
75
		return amount;
76
	}
77
	public void setAmount(double amount) {
78
		this.amount = amount;
79
	}
80
	public String getMmid() {
81
		return mmid;
82
	}
83
	public void setMmid(String mmid) {
84
		this.mmid = mmid;
85
	}
86
	public String getTransferMode() {
87
		return transferMode;
88
	}
89
	public void setTransferMode(String transferMode) {
90
		this.transferMode = transferMode;
91
	}
92
	public LocalDateTime getCreditDateTime() {
93
		return creditDateTime;
94
	}
95
	public void setCreditDateTime(LocalDateTime creditDateTime) {
96
		this.creditDateTime = creditDateTime;
97
	}
98
	@Override
99
	public int hashCode() {
100
		final int prime = 31;
101
		int result = 1;
102
		long temp;
103
		temp = Double.doubleToLongBits(amount);
104
		result = prime * result + (int) (temp ^ (temp >>> 32));
105
		result = prime * result + ((creditDateTime == null) ? 0 : creditDateTime.hashCode());
106
		result = prime * result + ((fromAccountNumber == null) ? 0 : fromAccountNumber.hashCode());
107
		result = prime * result + ((fromBankName == null) ? 0 : fromBankName.hashCode());
108
		result = prime * result + ((mmid == null) ? 0 : mmid.hashCode());
109
		result = prime * result + ((remitterName == null) ? 0 : remitterName.hashCode());
110
		result = prime * result + ((transactionId == null) ? 0 : transactionId.hashCode());
111
		result = prime * result + ((transferMode == null) ? 0 : transferMode.hashCode());
112
		result = prime * result + ((utr == null) ? 0 : utr.hashCode());
113
		result = prime * result + ((virtualAccount == null) ? 0 : virtualAccount.hashCode());
114
		return result;
115
	}
116
	@Override
117
	public boolean equals(Object obj) {
118
		if (this == obj)
119
			return true;
120
		if (obj == null)
121
			return false;
122
		if (getClass() != obj.getClass())
123
			return false;
124
		AddPaymentRequest other = (AddPaymentRequest) obj;
125
		if (Double.doubleToLongBits(amount) != Double.doubleToLongBits(other.amount))
126
			return false;
127
		if (creditDateTime == null) {
128
			if (other.creditDateTime != null)
129
				return false;
130
		} else if (!creditDateTime.equals(other.creditDateTime))
131
			return false;
132
		if (fromAccountNumber == null) {
133
			if (other.fromAccountNumber != null)
134
				return false;
135
		} else if (!fromAccountNumber.equals(other.fromAccountNumber))
136
			return false;
137
		if (fromBankName == null) {
138
			if (other.fromBankName != null)
139
				return false;
140
		} else if (!fromBankName.equals(other.fromBankName))
141
			return false;
142
		if (mmid == null) {
143
			if (other.mmid != null)
144
				return false;
145
		} else if (!mmid.equals(other.mmid))
146
			return false;
147
		if (remitterName == null) {
148
			if (other.remitterName != null)
149
				return false;
150
		} else if (!remitterName.equals(other.remitterName))
151
			return false;
152
		if (transactionId == null) {
153
			if (other.transactionId != null)
154
				return false;
155
		} else if (!transactionId.equals(other.transactionId))
156
			return false;
157
		if (transferMode == null) {
158
			if (other.transferMode != null)
159
				return false;
160
		} else if (!transferMode.equals(other.transferMode))
161
			return false;
162
		if (utr == null) {
163
			if (other.utr != null)
164
				return false;
165
		} else if (!utr.equals(other.utr))
166
			return false;
167
		if (virtualAccount == null) {
168
			if (other.virtualAccount != null)
169
				return false;
170
		} else if (!virtualAccount.equals(other.virtualAccount))
171
			return false;
172
		return true;
173
	}
174
 
175
 
176
 
177
 
178
}