Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37898 ranu 1
package com.spice.profitmandi.service.inventory;
2
 
3
import java.io.Serializable;
4
import java.math.BigDecimal;
5
import java.time.LocalDateTime;
6
import java.util.ArrayList;
7
import java.util.List;
8
 
9
/**
10
 * Consumer-facing EMI payload attached to {@link FofoCatalogResponse}.
11
 * <p>
12
 * Shape mirrors the Pine Labs scraper JSON so the front-end can render the
13
 * same tabs → banks → plans accordion we already built on the admin side.
14
 */
15
public class EmiOffersView implements Serializable {
16
 
17
    private static final long serialVersionUID = 1L;
18
 
19
    private String pineSku;
20
    private String brand;
21
    private String productName;
22
    private String priceDisplay;
23
    private BigDecimal priceRupees;
24
    private LocalDateTime scrapedAt;
25
    private List<CardTypeView> cardTypes = new ArrayList<>();
26
 
27
    public String getPineSku() {
28
        return pineSku;
29
    }
30
 
31
    public void setPineSku(String pineSku) {
32
        this.pineSku = pineSku;
33
    }
34
 
35
    public String getBrand() {
36
        return brand;
37
    }
38
 
39
    public void setBrand(String brand) {
40
        this.brand = brand;
41
    }
42
 
43
    public String getProductName() {
44
        return productName;
45
    }
46
 
47
    public void setProductName(String productName) {
48
        this.productName = productName;
49
    }
50
 
51
    public String getPriceDisplay() {
52
        return priceDisplay;
53
    }
54
 
55
    public void setPriceDisplay(String priceDisplay) {
56
        this.priceDisplay = priceDisplay;
57
    }
58
 
59
    public BigDecimal getPriceRupees() {
60
        return priceRupees;
61
    }
62
 
63
    public void setPriceRupees(BigDecimal priceRupees) {
64
        this.priceRupees = priceRupees;
65
    }
66
 
67
    public LocalDateTime getScrapedAt() {
68
        return scrapedAt;
69
    }
70
 
71
    public void setScrapedAt(LocalDateTime scrapedAt) {
72
        this.scrapedAt = scrapedAt;
73
    }
74
 
75
    public List<CardTypeView> getCardTypes() {
76
        return cardTypes;
77
    }
78
 
79
    public void setCardTypes(List<CardTypeView> cardTypes) {
80
        this.cardTypes = cardTypes;
81
    }
82
 
83
    public static class CardTypeView implements Serializable {
84
        private static final long serialVersionUID = 1L;
85
        private String cardType;
86
        private List<BankView> banks = new ArrayList<>();
87
 
88
        public String getCardType() {
89
            return cardType;
90
        }
91
 
92
        public void setCardType(String cardType) {
93
            this.cardType = cardType;
94
        }
95
 
96
        public List<BankView> getBanks() {
97
            return banks;
98
        }
99
 
100
        public void setBanks(List<BankView> banks) {
101
            this.banks = banks;
102
        }
103
    }
104
 
105
    public static class BankView implements Serializable {
106
        private static final long serialVersionUID = 1L;
107
        private String bankName;
108
        private String dominantOffer;
109
        private int planCount;
110
        private List<PlanView> plans = new ArrayList<>();
111
 
112
        public String getBankName() {
113
            return bankName;
114
        }
115
 
116
        public void setBankName(String bankName) {
117
            this.bankName = bankName;
118
        }
119
 
120
        public String getDominantOffer() {
121
            return dominantOffer;
122
        }
123
 
124
        public void setDominantOffer(String dominantOffer) {
125
            this.dominantOffer = dominantOffer;
126
        }
127
 
128
        public int getPlanCount() {
129
            return planCount;
130
        }
131
 
132
        public void setPlanCount(int planCount) {
133
            this.planCount = planCount;
134
        }
135
 
136
        public List<PlanView> getPlans() {
137
            return plans;
138
        }
139
 
140
        public void setPlans(List<PlanView> plans) {
141
            this.plans = plans;
142
        }
143
    }
144
 
145
    public static class PlanView implements Serializable {
146
        private static final long serialVersionUID = 1L;
147
        private String tenureLabel;
148
        private Integer tenureMonths;
149
        private BigDecimal emiAmountRupees;
150
        private String offerType;
151
        private BigDecimal totalCostRupees;
152
        private BigDecimal interestRatePct;
153
        private BigDecimal interestRupees;
154
        private BigDecimal discountRupees;
155
 
156
        public String getTenureLabel() {
157
            return tenureLabel;
158
        }
159
 
160
        public void setTenureLabel(String tenureLabel) {
161
            this.tenureLabel = tenureLabel;
162
        }
163
 
164
        public Integer getTenureMonths() {
165
            return tenureMonths;
166
        }
167
 
168
        public void setTenureMonths(Integer tenureMonths) {
169
            this.tenureMonths = tenureMonths;
170
        }
171
 
172
        public BigDecimal getEmiAmountRupees() {
173
            return emiAmountRupees;
174
        }
175
 
176
        public void setEmiAmountRupees(BigDecimal emiAmountRupees) {
177
            this.emiAmountRupees = emiAmountRupees;
178
        }
179
 
180
        public String getOfferType() {
181
            return offerType;
182
        }
183
 
184
        public void setOfferType(String offerType) {
185
            this.offerType = offerType;
186
        }
187
 
188
        public BigDecimal getTotalCostRupees() {
189
            return totalCostRupees;
190
        }
191
 
192
        public void setTotalCostRupees(BigDecimal totalCostRupees) {
193
            this.totalCostRupees = totalCostRupees;
194
        }
195
 
196
        public BigDecimal getInterestRatePct() {
197
            return interestRatePct;
198
        }
199
 
200
        public void setInterestRatePct(BigDecimal interestRatePct) {
201
            this.interestRatePct = interestRatePct;
202
        }
203
 
204
        public BigDecimal getInterestRupees() {
205
            return interestRupees;
206
        }
207
 
208
        public void setInterestRupees(BigDecimal interestRupees) {
209
            this.interestRupees = interestRupees;
210
        }
211
 
212
        public BigDecimal getDiscountRupees() {
213
            return discountRupees;
214
        }
215
 
216
        public void setDiscountRupees(BigDecimal discountRupees) {
217
            this.discountRupees = discountRupees;
218
        }
219
    }
220
}