Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37898 ranu 1
package com.spice.profitmandi.web.model;
2
 
3
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
 
6
import java.util.List;
7
 
8
/**
9
 * Matches the JSON produced by emi_world_scraper.py --json.
10
 */
11
@JsonIgnoreProperties(ignoreUnknown = true)
12
public class EmiOfferImportDTO {
13
 
14
    @JsonProperty("generated_at")
15
    private String generatedAt;
16
    @JsonProperty("product_count")
17
    private int productCount;
18
    @JsonProperty("offer_row_count")
19
    private int offerRowCount;
20
    private List<Product> products;
21
 
22
    public String getGeneratedAt() {
23
        return generatedAt;
24
    }
25
 
26
    public void setGeneratedAt(String generatedAt) {
27
        this.generatedAt = generatedAt;
28
    }
29
 
30
    public int getProductCount() {
31
        return productCount;
32
    }
33
 
34
    public void setProductCount(int productCount) {
35
        this.productCount = productCount;
36
    }
37
 
38
    public int getOfferRowCount() {
39
        return offerRowCount;
40
    }
41
 
42
    public void setOfferRowCount(int offerRowCount) {
43
        this.offerRowCount = offerRowCount;
44
    }
45
 
46
    public List<Product> getProducts() {
47
        return products;
48
    }
49
 
50
    public void setProducts(List<Product> products) {
51
        this.products = products;
52
    }
53
 
54
    @JsonIgnoreProperties(ignoreUnknown = true)
55
    public static class Product {
56
        private String brand;
57
        @JsonProperty("brand_tag")
58
        private String brandTag;
59
        @JsonProperty("product_name")
60
        private String productName;
61
        private String sku;
62
        private String price;
63
        @JsonProperty("card_types")
64
        private List<CardType> cardTypes;
65
 
66
        public String getBrand() {
67
            return brand;
68
        }
69
 
70
        public void setBrand(String brand) {
71
            this.brand = brand;
72
        }
73
 
74
        public String getBrandTag() {
75
            return brandTag;
76
        }
77
 
78
        public void setBrandTag(String brandTag) {
79
            this.brandTag = brandTag;
80
        }
81
 
82
        public String getProductName() {
83
            return productName;
84
        }
85
 
86
        public void setProductName(String productName) {
87
            this.productName = productName;
88
        }
89
 
90
        public String getSku() {
91
            return sku;
92
        }
93
 
94
        public void setSku(String sku) {
95
            this.sku = sku;
96
        }
97
 
98
        public String getPrice() {
99
            return price;
100
        }
101
 
102
        public void setPrice(String price) {
103
            this.price = price;
104
        }
105
 
106
        public List<CardType> getCardTypes() {
107
            return cardTypes;
108
        }
109
 
110
        public void setCardTypes(List<CardType> cardTypes) {
111
            this.cardTypes = cardTypes;
112
        }
113
    }
114
 
115
    @JsonIgnoreProperties(ignoreUnknown = true)
116
    public static class CardType {
117
        @JsonProperty("card_type")
118
        private String cardType;
119
        private List<Bank> banks;
120
 
121
        public String getCardType() {
122
            return cardType;
123
        }
124
 
125
        public void setCardType(String cardType) {
126
            this.cardType = cardType;
127
        }
128
 
129
        public List<Bank> getBanks() {
130
            return banks;
131
        }
132
 
133
        public void setBanks(List<Bank> banks) {
134
            this.banks = banks;
135
        }
136
    }
137
 
138
    @JsonIgnoreProperties(ignoreUnknown = true)
139
    public static class Bank {
140
        @JsonProperty("bank_name")
141
        private String bankName;
142
        private List<Plan> plans;
143
 
144
        public String getBankName() {
145
            return bankName;
146
        }
147
 
148
        public void setBankName(String bankName) {
149
            this.bankName = bankName;
150
        }
151
 
152
        public List<Plan> getPlans() {
153
            return plans;
154
        }
155
 
156
        public void setPlans(List<Plan> plans) {
157
            this.plans = plans;
158
        }
159
    }
160
 
161
    @JsonIgnoreProperties(ignoreUnknown = true)
162
    public static class Plan {
163
        private String tenure;
164
        @JsonProperty("emi_amount")
165
        private String emiAmount;
166
        @JsonProperty("offer_type")
167
        private String offerType;
168
        @JsonProperty("total_cost")
169
        private String totalCost;
170
        @JsonProperty("interest_rate")
171
        private String interestRate;
172
        @JsonProperty("interest_amount")
173
        private String interestAmount;
174
        private String discount;
175
        private String raw;
176
 
177
        public String getTenure() {
178
            return tenure;
179
        }
180
 
181
        public void setTenure(String tenure) {
182
            this.tenure = tenure;
183
        }
184
 
185
        public String getEmiAmount() {
186
            return emiAmount;
187
        }
188
 
189
        public void setEmiAmount(String emiAmount) {
190
            this.emiAmount = emiAmount;
191
        }
192
 
193
        public String getOfferType() {
194
            return offerType;
195
        }
196
 
197
        public void setOfferType(String offerType) {
198
            this.offerType = offerType;
199
        }
200
 
201
        public String getTotalCost() {
202
            return totalCost;
203
        }
204
 
205
        public void setTotalCost(String totalCost) {
206
            this.totalCost = totalCost;
207
        }
208
 
209
        public String getInterestRate() {
210
            return interestRate;
211
        }
212
 
213
        public void setInterestRate(String interestRate) {
214
            this.interestRate = interestRate;
215
        }
216
 
217
        public String getInterestAmount() {
218
            return interestAmount;
219
        }
220
 
221
        public void setInterestAmount(String interestAmount) {
222
            this.interestAmount = interestAmount;
223
        }
224
 
225
        public String getDiscount() {
226
            return discount;
227
        }
228
 
229
        public void setDiscount(String discount) {
230
            this.discount = discount;
231
        }
232
 
233
        public String getRaw() {
234
            return raw;
235
        }
236
 
237
        public void setRaw(String raw) {
238
            this.raw = raw;
239
        }
240
    }
241
}