Panagiotis Triantafyllou

retrofit fixes

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4.6rc21' 5 + PUBLISH_VERSION = '4.5.4.6rc29'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
1 -/*
2 - * Copyright 2010-2013 Warply Ltd. All rights reserved.
3 - *
4 - * Redistribution and use in source and binary forms, without modification, are
5 - * permitted provided that the following conditions are met:
6 - *
7 - * 1. Redistributions of source code must retain the above copyright notice,
8 - * this list of conditions and the following disclaimer.
9 - *
10 - * 2. Redistributions in binary form must reproduce the above copyright notice,
11 - * this list of conditions and the following disclaimer in the documentation
12 - * and/or other materials provided with the distribution.
13 - *
14 - * THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
15 - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17 - * EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20 - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 - */
25 -
26 -package ly.warp.sdk.io.callbacks;
27 -
28 -
29 -public interface RetrofitInterface {
30 -// @GET("/api/session/{sessionUuid}")
31 -// Call<ResponseBody> getSingleCampaign(@Path("sessionUuid") String sessionUuid);
32 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import com.google.gson.annotations.Expose;
4 -import com.google.gson.annotations.SerializedName;
5 -
6 -import java.util.ArrayList;
7 -import java.util.Date;
8 -
9 -/**
10 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
11 - */
12 -
13 -public class CouponModel {
14 - @SerializedName("msg")
15 - @Expose
16 - private String msg;
17 - @SerializedName("result")
18 - @Expose
19 - private ArrayList<CouponResult> result = null;
20 - @SerializedName("status")
21 - @Expose
22 - private Integer status;
23 -
24 - public String getMsg() {
25 - return msg;
26 - }
27 -
28 - public void setMsg(String msg) {
29 - this.msg = msg;
30 - }
31 -
32 - public Integer getStatus() {
33 - return status;
34 - }
35 -
36 - public void setStatus(Integer status) {
37 - this.status = status;
38 - }
39 -
40 - public ArrayList<CouponResult> getResult() {
41 - return result;
42 - }
43 -
44 - public void setResult(ArrayList<CouponResult> result) {
45 - this.result = result;
46 - }
47 -
48 - public class CouponResult {
49 - @SerializedName("changes_dates")
50 - @Expose
51 - private ChangesDates changesDates;
52 - @SerializedName("communication_uuid")
53 - @Expose
54 - private String communicationUuid;
55 - @SerializedName("coupon")
56 - @Expose
57 - private String coupon;
58 - @SerializedName("couponset_uuid")
59 - @Expose
60 - private String couponsetUuid;
61 - @SerializedName("description")
62 - @Expose
63 - private String description;
64 - @SerializedName("discount")
65 - @Expose
66 - private String discount;
67 - @SerializedName("expiration")
68 - @Expose
69 - private String expiration;
70 - @SerializedName("image")
71 - @Expose
72 - private String image;
73 - @SerializedName("name")
74 - @Expose
75 - private String name;
76 - @SerializedName("status")
77 - @Expose
78 - private Integer status;
79 - private String merchantUuid = "";
80 - private String innerText = "";
81 - private Date expirationDate = new Date();
82 - private String discount_type = "";
83 - private double final_price = 0.0d;
84 -
85 - public ChangesDates getChangesDates() {
86 - return changesDates;
87 - }
88 -
89 - public void setChangesDates(ChangesDates changesDates) {
90 - this.changesDates = changesDates;
91 - }
92 -
93 - public String getCommunicationUuid() {
94 - return communicationUuid;
95 - }
96 -
97 - public void setCommunicationUuid(String communicationUuid) {
98 - this.communicationUuid = communicationUuid;
99 - }
100 -
101 - public String getCoupon() {
102 - return coupon;
103 - }
104 -
105 - public void setCoupon(String coupon) {
106 - this.coupon = coupon;
107 - }
108 -
109 - public String getCouponsetUuid() {
110 - return couponsetUuid;
111 - }
112 -
113 - public void setCouponsetUuid(String couponsetUuid) {
114 - this.couponsetUuid = couponsetUuid;
115 - }
116 -
117 - public String getDescription() {
118 - return description;
119 - }
120 -
121 - public void setDescription(String description) {
122 - this.description = description;
123 - }
124 -
125 - public String getDiscount() {
126 - return discount;
127 - }
128 -
129 - public void setDiscount(String discount) {
130 - this.discount = discount;
131 - }
132 -
133 - public String getExpiration() {
134 - return expiration;
135 - }
136 -
137 - public void setExpiration(String expiration) {
138 - this.expiration = expiration;
139 - }
140 -
141 - public String getImage() {
142 - return image;
143 - }
144 -
145 - public void setImage(String image) {
146 - this.image = image;
147 - }
148 -
149 - public String getName() {
150 - return name;
151 - }
152 -
153 - public void setName(String name) {
154 - this.name = name;
155 - }
156 -
157 - public Integer getStatus() {
158 - return status;
159 - }
160 -
161 - public void setStatus(Integer status) {
162 - this.status = status;
163 - }
164 -
165 - public String getMerchantUuid() {
166 - return merchantUuid;
167 - }
168 -
169 - public void setMerchantUuid(String merchantUuid) {
170 - this.merchantUuid = merchantUuid;
171 - }
172 -
173 - public String getInnerText() {
174 - return innerText;
175 - }
176 -
177 - public void setInnerText(String innerText) {
178 - this.innerText = innerText;
179 - }
180 -
181 - public Date getExpirationDate() {
182 - return expirationDate;
183 - }
184 -
185 - public void setExpirationDate(Date expirationDate) {
186 - this.expirationDate = expirationDate;
187 - }
188 -
189 - public String getDiscount_type() {
190 - return discount_type;
191 - }
192 -
193 - public void setDiscount_type(String discount_type) {
194 - this.discount_type = discount_type;
195 - }
196 -
197 - public double getFinal_price() {
198 - return final_price;
199 - }
200 -
201 - public void setFinal_price(double final_price) {
202 - this.final_price = final_price;
203 - }
204 - }
205 -
206 - public class ChangesDates {
207 - @SerializedName("assigned")
208 - @Expose
209 - private String assigned;
210 - @SerializedName("created")
211 - @Expose
212 - private String created;
213 -
214 - public String getAssigned() {
215 - return assigned;
216 - }
217 -
218 - public void setAssigned(String assigned) {
219 - this.assigned = assigned;
220 - }
221 -
222 - public String getCreated() {
223 - return created;
224 - }
225 -
226 - public void setCreated(String created) {
227 - this.created = created;
228 - }
229 - }
230 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import org.json.JSONArray;
4 -
5 -import ly.warp.sdk.Warply;
6 -import ly.warp.sdk.utils.WarplyProperty;
7 -
8 -/**
9 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
10 - */
11 -public class CouponRequestModel {
12 - private CouponsetRequestInnerModel coupon;
13 -
14 - public CouponRequestModel() {
15 - this.coupon = new CouponsetRequestInnerModel();
16 - }
17 -
18 - private class CouponsetRequestInnerModel {
19 - private String action;
20 - private JSONArray fetch_data;
21 -
22 - public CouponsetRequestInnerModel() {
23 - this.action = "get_user_coupons";
24 - JSONArray fetch = new JSONArray();
25 - fetch.put("transaction");
26 - fetch.put("communication");
27 - this.fetch_data = fetch;
28 - }
29 - }
30 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import com.google.gson.annotations.Expose;
4 -import com.google.gson.annotations.SerializedName;
5 -
6 -import java.util.ArrayList;
7 -
8 -/**
9 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
10 - */
11 -
12 -public class CouponsetModel {
13 - @SerializedName("status")
14 - @Expose
15 - private String status;
16 - @SerializedName("context")
17 - @Expose
18 - private CouponsetContext context;
19 -
20 - public String getStatus() {
21 - return status;
22 - }
23 -
24 - public void setStatus(String status) {
25 - this.status = status;
26 - }
27 -
28 - public CouponsetContext getContext() {
29 - return context;
30 - }
31 -
32 - public void setContext(CouponsetContext context) {
33 - this.context = context;
34 - }
35 -
36 - public class CouponsetContext {
37 - @SerializedName("MAPP_COUPON-status")
38 - @Expose
39 - private Integer mAPPCOUPONStatus;
40 - @SerializedName("events_processed")
41 - @Expose
42 - private Integer eventsProcessed;
43 - @SerializedName("MAPP_COUPON")
44 - @Expose
45 - private ArrayList<MappCoupon> mappCoupon = null;
46 -
47 - public ArrayList<MappCoupon> getMappCoupon() {
48 - return mappCoupon;
49 - }
50 -
51 - public void setMappCoupon(ArrayList<MappCoupon> mappCoupon) {
52 - this.mappCoupon = mappCoupon;
53 - }
54 -
55 - public Integer getMAPPCOUPONStatus() {
56 - return mAPPCOUPONStatus;
57 - }
58 -
59 - public void setMAPPCOUPONStatus(Integer mAPPCOUPONStatus) {
60 - this.mAPPCOUPONStatus = mAPPCOUPONStatus;
61 - }
62 -
63 - public Integer getEventsProcessed() {
64 - return eventsProcessed;
65 - }
66 -
67 - public void setEventsProcessed(Integer eventsProcessed) {
68 - this.eventsProcessed = eventsProcessed;
69 - }
70 - }
71 -
72 - public class MappCoupon {
73 - @SerializedName("uuid")
74 - @Expose
75 - private String uuid;
76 - @SerializedName("img_preview")
77 - @Expose
78 - private String imgPreview;
79 - @SerializedName("final_price")
80 - @Expose
81 - private Integer finalPrice;
82 - @SerializedName("start_date")
83 - @Expose
84 - private String startDate;
85 - @SerializedName("end_date")
86 - @Expose
87 - private String endDate;
88 - @SerializedName("discount_type")
89 - @Expose
90 - private String discountType;
91 - @SerializedName("promoted")
92 - @Expose
93 - private Boolean promoted;
94 - @SerializedName("expiration")
95 - @Expose
96 - private CouponsetExpiration expiration;
97 - @SerializedName("name")
98 - @Expose
99 - private String name;
100 - @SerializedName("description")
101 - @Expose
102 - private String description;
103 - @SerializedName("short_description")
104 - @Expose
105 - private String shortDescription;
106 - @SerializedName("discount")
107 - @Expose
108 - private String discount;
109 - @SerializedName("terms")
110 - @Expose
111 - private String terms;
112 - @SerializedName("inner_text")
113 - @Expose
114 - private String innerText;
115 - @SerializedName("merchant_uuid")
116 - @Expose
117 - private String merchantUuid;
118 -
119 - public String getUuid() {
120 - return uuid;
121 - }
122 -
123 - public void setUuid(String uuid) {
124 - this.uuid = uuid;
125 - }
126 -
127 - public String getImgPreview() {
128 - return imgPreview;
129 - }
130 -
131 - public void setImgPreview(String imgPreview) {
132 - this.imgPreview = imgPreview;
133 - }
134 -
135 - public Integer getFinalPrice() {
136 - return finalPrice;
137 - }
138 -
139 - public void setFinalPrice(Integer finalPrice) {
140 - this.finalPrice = finalPrice;
141 - }
142 -
143 - public String getStartDate() {
144 - return startDate;
145 - }
146 -
147 - public void setStartDate(String startDate) {
148 - this.startDate = startDate;
149 - }
150 -
151 - public String getEndDate() {
152 - return endDate;
153 - }
154 -
155 - public void setEndDate(String endDate) {
156 - this.endDate = endDate;
157 - }
158 -
159 - public String getDiscountType() {
160 - return discountType;
161 - }
162 -
163 - public void setDiscountType(String discountType) {
164 - this.discountType = discountType;
165 - }
166 -
167 - public Boolean getPromoted() {
168 - return promoted;
169 - }
170 -
171 - public void setPromoted(Boolean promoted) {
172 - this.promoted = promoted;
173 - }
174 -
175 - public CouponsetExpiration getExpiration() {
176 - return expiration;
177 - }
178 -
179 - public void setExpiration(CouponsetExpiration expiration) {
180 - this.expiration = expiration;
181 - }
182 -
183 - public String getName() {
184 - return name;
185 - }
186 -
187 - public void setName(String name) {
188 - this.name = name;
189 - }
190 -
191 - public String getDescription() {
192 - return description;
193 - }
194 -
195 - public void setDescription(String description) {
196 - this.description = description;
197 - }
198 -
199 - public String getShortDescription() {
200 - return shortDescription;
201 - }
202 -
203 - public void setShortDescription(String shortDescription) {
204 - this.shortDescription = shortDescription;
205 - }
206 -
207 - public String getDiscount() {
208 - return discount;
209 - }
210 -
211 - public void setDiscount(String discount) {
212 - this.discount = discount;
213 - }
214 -
215 - public String getTerms() {
216 - return terms;
217 - }
218 -
219 - public void setTerms(String terms) {
220 - this.terms = terms;
221 - }
222 -
223 - public String getInnerText() {
224 - return innerText;
225 - }
226 -
227 - public void setInnerText(String innerText) {
228 - this.innerText = innerText;
229 - }
230 -
231 - public String getMerchantUuid() {
232 - return merchantUuid;
233 - }
234 -
235 - public void setMerchantUuid(String merchantUuid) {
236 - this.merchantUuid = merchantUuid;
237 - }
238 - }
239 -
240 - public class CouponsetExpiration {
241 - @SerializedName("type")
242 - @Expose
243 - private String type;
244 - @SerializedName("value")
245 - @Expose
246 - private String value;
247 -
248 - public String getType() {
249 - return type;
250 - }
251 -
252 - public void setType(String type) {
253 - this.type = type;
254 - }
255 -
256 - public String getValue() {
257 - return value;
258 - }
259 -
260 - public void setValue(String value) {
261 - this.value = value;
262 - }
263 - }
264 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import org.json.JSONArray;
4 -import org.json.JSONObject;
5 -
6 -import java.util.ArrayList;
7 -
8 -import ly.warp.sdk.Warply;
9 -import ly.warp.sdk.utils.WarplyProperty;
10 -
11 -/**
12 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
13 - */
14 -public class CouponsetRequestModel {
15 - private CouponsetRequestInnerModel coupon;
16 -
17 - public CouponsetRequestModel() {
18 - this.coupon = new CouponsetRequestInnerModel();
19 - }
20 -
21 - private class CouponsetRequestInnerModel {
22 - private String action;
23 - private boolean active;
24 - private boolean visible;
25 - private String language;
26 -
27 - public CouponsetRequestInnerModel() {
28 - this.action = "retrieve_multilingual";
29 - this.active = true;
30 - this.visible = true;
31 - this.language = WarplyProperty.getLanguage(Warply.getWarplyContext());
32 - }
33 - }
34 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import com.google.gson.annotations.Expose;
4 -import com.google.gson.annotations.SerializedName;
5 -
6 -import java.util.ArrayList;
7 -import java.util.Date;
8 -
9 -/**
10 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
11 - */
12 -
13 -public class MerchantModel {
14 - @SerializedName("status")
15 - @Expose
16 - private String status;
17 - @SerializedName("context")
18 - @Expose
19 - private MerchantContext context;
20 -
21 - public String getStatus() {
22 - return status;
23 - }
24 -
25 - public void setStatus(String status) {
26 - this.status = status;
27 - }
28 -
29 - public MerchantContext getContext() {
30 - return context;
31 - }
32 -
33 - public void setContext(MerchantContext context) {
34 - this.context = context;
35 - }
36 -
37 - public class MerchantContext {
38 - @SerializedName("MAPP_SHOPS")
39 - @Expose
40 - private MappShops mappShops;
41 - @SerializedName("MAPP_SHOPS-status")
42 - @Expose
43 - private Integer mAPPSHOPSStatus;
44 - @SerializedName("events_processed")
45 - @Expose
46 - private Integer eventsProcessed;
47 -
48 - public MappShops getMappShops() {
49 - return mappShops;
50 - }
51 -
52 - public void setMappShops(MappShops mappShops) {
53 - this.mappShops = mappShops;
54 - }
55 -
56 - public Integer getMAPPSHOPSStatus() {
57 - return mAPPSHOPSStatus;
58 - }
59 -
60 - public void setMAPPSHOPSStatus(Integer mAPPSHOPSStatus) {
61 - this.mAPPSHOPSStatus = mAPPSHOPSStatus;
62 - }
63 -
64 - public Integer getEventsProcessed() {
65 - return eventsProcessed;
66 - }
67 -
68 - public void setEventsProcessed(Integer eventsProcessed) {
69 - this.eventsProcessed = eventsProcessed;
70 - }
71 - }
72 -
73 - public class MappShops {
74 - @SerializedName("msg")
75 - @Expose
76 - private String msg;
77 - @SerializedName("result")
78 - @Expose
79 - private ArrayList<MerchantResult> result = null;
80 -
81 - public String getMsg() {
82 - return msg;
83 - }
84 -
85 - public void setMsg(String msg) {
86 - this.msg = msg;
87 - }
88 -
89 - public ArrayList<MerchantResult> getResult() {
90 - return result;
91 - }
92 -
93 - public void setResult(ArrayList<MerchantResult> result) {
94 - this.result = result;
95 - }
96 - }
97 -
98 - public class MerchantResult {
99 - @SerializedName("uuid")
100 - @Expose
101 - private String uuid;
102 - @SerializedName("img_preview")
103 - @Expose
104 - private String imgPreview;
105 - @SerializedName("admin_name")
106 - @Expose
107 - private String adminName;
108 - @SerializedName("address")
109 - @Expose
110 - private String address;
111 - @SerializedName("name")
112 - @Expose
113 - private String name;
114 - @SerializedName("latitude")
115 - @Expose
116 - private double latitude;
117 - @SerializedName("longitude")
118 - @Expose
119 - private double longitude;
120 - @SerializedName("telephone")
121 - @Expose
122 - private String telephone;
123 - @SerializedName("website")
124 - @Expose
125 - private String website;
126 -
127 - public String getUuid() {
128 - return uuid;
129 - }
130 -
131 - public void setUuid(String uuid) {
132 - this.uuid = uuid;
133 - }
134 -
135 - public String getImgPreview() {
136 - return imgPreview;
137 - }
138 -
139 - public void setImgPreview(String imgPreview) {
140 - this.imgPreview = imgPreview;
141 - }
142 -
143 - public String getAdminName() {
144 - return adminName;
145 - }
146 -
147 - public void setAdminName(String adminName) {
148 - this.adminName = adminName;
149 - }
150 -
151 - public String getAddress() {
152 - return address;
153 - }
154 -
155 - public void setAddress(String address) {
156 - this.address = address;
157 - }
158 -
159 - public String getName() {
160 - return name;
161 - }
162 -
163 - public void setName(String name) {
164 - this.name = name;
165 - }
166 -
167 - public double getLatitude() {
168 - return latitude;
169 - }
170 -
171 - public void setLatitude(double latitude) {
172 - this.latitude = latitude;
173 - }
174 -
175 - public double getLongitude() {
176 - return longitude;
177 - }
178 -
179 - public void setLongitude(double longitude) {
180 - this.longitude = longitude;
181 - }
182 -
183 - public String getTelephone() {
184 - return telephone;
185 - }
186 -
187 - public void setTelephone(String telephone) {
188 - this.telephone = telephone;
189 - }
190 -
191 - public String getWebsite() {
192 - return website;
193 - }
194 -
195 - public void setWebsite(String website) {
196 - this.website = website;
197 - }
198 - }
199 -}
1 -package ly.warp.sdk.io.models;
2 -
3 -import org.json.JSONArray;
4 -import org.json.JSONObject;
5 -
6 -import ly.warp.sdk.Warply;
7 -import ly.warp.sdk.utils.WarplyProperty;
8 -
9 -/**
10 - * Created by Panagiotis Triantafyllou on 24/Νοε/2022.
11 - */
12 -public class MerchantsRequestModel {
13 - private MerchantsRequestInnerModel shops;
14 -
15 - public MerchantsRequestModel() {
16 - this.shops = new MerchantsRequestInnerModel();
17 - }
18 -
19 - private class MerchantsRequestInnerModel {
20 - private String action;
21 - private JSONArray categories;
22 - private boolean active;
23 - private JSONObject location;
24 - private JSONArray parent_uuids;
25 - private String language;
26 -
27 - public MerchantsRequestInnerModel() {
28 - this.action = "retrieve_multilingual";
29 - this.categories = new JSONArray();
30 - this.active = true;
31 - this.location = null;
32 - this.parent_uuids = null;
33 - this.language = WarplyProperty.getLanguage(Warply.getWarplyContext());
34 - }
35 - }
36 -}
1 package ly.warp.sdk.io.volley; 1 package ly.warp.sdk.io.volley;
2 2
3 -import ly.warp.sdk.io.models.CouponModel;
4 -import ly.warp.sdk.io.models.CouponRequestModel;
5 -import ly.warp.sdk.io.models.CouponsetModel;
6 -import ly.warp.sdk.io.models.CouponsetRequestModel;
7 -import ly.warp.sdk.io.models.MerchantModel;
8 -import ly.warp.sdk.io.models.MerchantsRequestModel;
9 import ly.warp.sdk.utils.constants.WarpConstants; 3 import ly.warp.sdk.utils.constants.WarpConstants;
4 +import okhttp3.RequestBody;
5 +import okhttp3.ResponseBody;
10 import retrofit2.Call; 6 import retrofit2.Call;
11 import retrofit2.http.Body; 7 import retrofit2.http.Body;
12 import retrofit2.http.Header; 8 import retrofit2.http.Header;
9 +import retrofit2.http.Headers;
13 import retrofit2.http.POST; 10 import retrofit2.http.POST;
14 import retrofit2.http.Path; 11 import retrofit2.http.Path;
15 12
...@@ -33,36 +30,39 @@ public interface ApiService { ...@@ -33,36 +30,39 @@ public interface ApiService {
33 // Methods 30 // Methods
34 // =========================================================== 31 // ===========================================================
35 32
33 + @Headers("Content-Type: application/json")
36 @POST("/api/mobile/v2/{appUuid}/context/") 34 @POST("/api/mobile/v2/{appUuid}/context/")
37 - Call<CouponsetModel> getCouponsets(@Path("appUuid") String appUuid, 35 + Call<ResponseBody> getCouponsets(@Path("appUuid") String appUuid,
38 - @Body CouponsetRequestModel request, 36 + @Body RequestBody request,
39 - @Header(WarpConstants.HEADER_DATE) String timeStamp,
40 - @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId,
41 - @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId,
42 - @Header(WarpConstants.HEADER_CHANNEL) String channel,
43 - @Header(WarpConstants.HEADER_WEB_ID) String webId,
44 - @Header(WarpConstants.HEADER_SIGNATURE) String signature);
45 -
46 - @POST("/oauth/{appUuid}/context")
47 - Call<CouponModel> getUserCoupons(@Path("appUuid") String appUuid,
48 - @Body CouponRequestModel request,
49 @Header(WarpConstants.HEADER_DATE) String timeStamp, 37 @Header(WarpConstants.HEADER_DATE) String timeStamp,
50 @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId, 38 @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId,
51 @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId, 39 @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId,
52 @Header(WarpConstants.HEADER_CHANNEL) String channel, 40 @Header(WarpConstants.HEADER_CHANNEL) String channel,
53 @Header(WarpConstants.HEADER_WEB_ID) String webId, 41 @Header(WarpConstants.HEADER_WEB_ID) String webId,
54 - @Header(WarpConstants.HEADER_SIGNATURE) String signature, 42 + @Header(WarpConstants.HEADER_SIGNATURE) String signature);
55 - @Header(WarpConstants.HEADER_AUTHORIZATION) String bearer);
56 43
44 + @Headers("Content-Type: application/json")
45 + @POST("/oauth/{appUuid}/context")
46 + Call<ResponseBody> getUserCoupons(@Path("appUuid") String appUuid,
47 + @Body RequestBody request,
48 + @Header(WarpConstants.HEADER_DATE) String timeStamp,
49 + @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId,
50 + @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId,
51 + @Header(WarpConstants.HEADER_CHANNEL) String channel,
52 + @Header(WarpConstants.HEADER_WEB_ID) String webId,
53 + @Header(WarpConstants.HEADER_SIGNATURE) String signature,
54 + @Header(WarpConstants.HEADER_AUTHORIZATION) String bearer);
55 +
56 + @Headers("Content-Type: application/json")
57 @POST("/api/mobile/v2/{appUuid}/context/") 57 @POST("/api/mobile/v2/{appUuid}/context/")
58 - Call<MerchantModel> getMerchants(@Path("appUuid") String appUuid, 58 + Call<ResponseBody> getMerchants(@Path("appUuid") String appUuid,
59 - @Body MerchantsRequestModel request, 59 + @Body RequestBody request,
60 - @Header(WarpConstants.HEADER_DATE) String timeStamp, 60 + @Header(WarpConstants.HEADER_DATE) String timeStamp,
61 - @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId, 61 + @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId,
62 - @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId, 62 + @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId,
63 - @Header(WarpConstants.HEADER_CHANNEL) String channel, 63 + @Header(WarpConstants.HEADER_CHANNEL) String channel,
64 - @Header(WarpConstants.HEADER_WEB_ID) String webId, 64 + @Header(WarpConstants.HEADER_WEB_ID) String webId,
65 - @Header(WarpConstants.HEADER_SIGNATURE) String signature); 65 + @Header(WarpConstants.HEADER_SIGNATURE) String signature);
66 66
67 // =========================================================== 67 // ===========================================================
68 // Getter & Setter 68 // Getter & Setter
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
88 android:layout_width="240dp" 88 android:layout_width="240dp"
89 android:layout_height="50dp" 89 android:layout_height="50dp"
90 android:layout_marginHorizontal="32dp" 90 android:layout_marginHorizontal="32dp"
91 - android:layout_marginTop="88dp" 91 + android:layout_marginTop="27dp"
92 android:background="@drawable/selector_button_green" 92 android:background="@drawable/selector_button_green"
93 android:gravity="center" 93 android:gravity="center"
94 android:orientation="horizontal"> 94 android:orientation="horizontal">
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
12 android:id="@+id/cl_more_header" 12 android:id="@+id/cl_more_header"
13 android:layout_width="match_parent" 13 android:layout_width="match_parent"
14 android:layout_height="64dp" 14 android:layout_height="64dp"
15 - android:translationZ="10dp" 15 + android:background="@drawable/ic_background_transparent_shadow"
16 - android:background="@drawable/ic_background_transparent_shadow"> 16 + android:translationZ="10dp">
17 17
18 <ImageView 18 <ImageView
19 android:id="@+id/iv_list_close" 19 android:id="@+id/iv_list_close"
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 app:layout_constraintTop_toTopOf="parent" /> 43 app:layout_constraintTop_toTopOf="parent" />
44 </androidx.constraintlayout.widget.ConstraintLayout> 44 </androidx.constraintlayout.widget.ConstraintLayout>
45 45
46 - <LinearLayout 46 + <RelativeLayout
47 android:layout_width="match_parent" 47 android:layout_width="match_parent"
48 android:layout_height="match_parent" 48 android:layout_height="match_parent"
49 android:layout_marginTop="-18dp" 49 android:layout_marginTop="-18dp"
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
51 51
52 <ScrollView 52 <ScrollView
53 android:layout_width="match_parent" 53 android:layout_width="match_parent"
54 - android:layout_height="match_parent" 54 + android:layout_height="wrap_content"
55 android:fillViewport="true" 55 android:fillViewport="true"
56 android:overScrollMode="never"> 56 android:overScrollMode="never">
57 57
58 - <LinearLayout 58 + <RelativeLayout
59 android:layout_width="match_parent" 59 android:layout_width="match_parent"
60 android:layout_height="wrap_content" 60 android:layout_height="wrap_content"
61 android:orientation="vertical"> 61 android:orientation="vertical">
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
152 android:id="@+id/ll_exclusive_items" 152 android:id="@+id/ll_exclusive_items"
153 android:layout_width="match_parent" 153 android:layout_width="match_parent"
154 android:layout_height="wrap_content" 154 android:layout_height="wrap_content"
155 + android:layout_below="@+id/ll_research_items"
155 android:orientation="vertical" 156 android:orientation="vertical"
156 android:visibility="gone"> 157 android:visibility="gone">
157 158
...@@ -180,6 +181,7 @@ ...@@ -180,6 +181,7 @@
180 android:id="@+id/ll_contest_items" 181 android:id="@+id/ll_contest_items"
181 android:layout_width="match_parent" 182 android:layout_width="match_parent"
182 android:layout_height="wrap_content" 183 android:layout_height="wrap_content"
184 + android:layout_below="@+id/ll_exclusive_items"
183 android:orientation="vertical" 185 android:orientation="vertical"
184 android:visibility="gone"> 186 android:visibility="gone">
185 187
...@@ -208,6 +210,7 @@ ...@@ -208,6 +210,7 @@
208 android:id="@+id/ll_contextual_items" 210 android:id="@+id/ll_contextual_items"
209 android:layout_width="match_parent" 211 android:layout_width="match_parent"
210 android:layout_height="wrap_content" 212 android:layout_height="wrap_content"
213 + android:layout_below="@+id/ll_contest_items"
211 android:orientation="vertical" 214 android:orientation="vertical"
212 android:visibility="gone"> 215 android:visibility="gone">
213 216
...@@ -231,7 +234,7 @@ ...@@ -231,7 +234,7 @@
231 android:overScrollMode="never" 234 android:overScrollMode="never"
232 android:paddingBottom="4dp" /> 235 android:paddingBottom="4dp" />
233 </LinearLayout> 236 </LinearLayout>
234 - </LinearLayout> 237 + </RelativeLayout>
235 </ScrollView> 238 </ScrollView>
236 - </LinearLayout> 239 + </RelativeLayout>
237 </LinearLayout> 240 </LinearLayout>
...\ No newline at end of file ...\ No newline at end of file
......