Showing
5 changed files
with
458 additions
and
1 deletions
... | @@ -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-cosbeta7' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta8' |
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.models; | ||
27 | + | ||
28 | +import java.util.HashMap; | ||
29 | + | ||
30 | +/** | ||
31 | + * Created by Panagiotis Triantafyllou on 25-May-22. | ||
32 | + */ | ||
33 | + | ||
34 | +public class LoyaltySDKFirebaseEventModel { | ||
35 | + private String eventName; | ||
36 | + private HashMap<String, String> parameters; | ||
37 | + | ||
38 | + public LoyaltySDKFirebaseEventModel() { | ||
39 | + this.eventName = ""; | ||
40 | + this.parameters = new HashMap(); | ||
41 | + } | ||
42 | + | ||
43 | + public String getEventName() { | ||
44 | + return eventName; | ||
45 | + } | ||
46 | + | ||
47 | + public void setEventName(String eventName) { | ||
48 | + this.eventName = eventName; | ||
49 | + } | ||
50 | + | ||
51 | + public HashMap<String, String> getParameters() { | ||
52 | + return parameters; | ||
53 | + } | ||
54 | + | ||
55 | + public void setParameter(String key, String value) { | ||
56 | + this.parameters.put(key, value); | ||
57 | + } | ||
58 | +} |
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.models; | ||
27 | + | ||
28 | +import android.os.Parcel; | ||
29 | +import android.os.Parcelable; | ||
30 | + | ||
31 | +import org.json.JSONException; | ||
32 | +import org.json.JSONObject; | ||
33 | + | ||
34 | +import java.io.Serializable; | ||
35 | +import java.util.ArrayList; | ||
36 | + | ||
37 | +import ly.warp.sdk.utils.WarpUtils; | ||
38 | +import ly.warp.sdk.utils.constants.WarpConstants; | ||
39 | + | ||
40 | +/** | ||
41 | + * Created by Panagiotis Triantafyllou on 25-May-22. | ||
42 | + */ | ||
43 | + | ||
44 | +public class WarplyPacingModel { | ||
45 | + | ||
46 | +// [ | ||
47 | +// { | ||
48 | +// type: 'Tree', | ||
49 | +// data: { | ||
50 | +// year: { | ||
51 | +// emmision: '', | ||
52 | +// distance: '', | ||
53 | +// consumption: '', | ||
54 | +// liters: '', | ||
55 | +// emmisionSaving: '', | ||
56 | +// treeSum: '' | ||
57 | +// }, | ||
58 | +// month: { | ||
59 | +// emmision: '', | ||
60 | +// distance: '', | ||
61 | +// consumption: '', | ||
62 | +// liters: '', | ||
63 | +// emmisionSaving: '', | ||
64 | +// treeSum: '' | ||
65 | +// }, | ||
66 | +// week: { | ||
67 | +// emmision: '', | ||
68 | +// distance: '', | ||
69 | +// consumption: '', | ||
70 | +// liters: '', | ||
71 | +// emmisionSaving: '', | ||
72 | +// treeSum: '' | ||
73 | +// }, | ||
74 | +// day: { | ||
75 | +// emmision: '', | ||
76 | +// distance: '', | ||
77 | +// consumption: '', | ||
78 | +// liters: '', | ||
79 | +// emmisionSaving: '', | ||
80 | +// treeSum: '' | ||
81 | +// } | ||
82 | +// } | ||
83 | +// } | ||
84 | +//] | ||
85 | + | ||
86 | + private double tree_co2_year; | ||
87 | + private double tree_co2_month; | ||
88 | + private double tree_co2_week; | ||
89 | + private double tree_co2_day; | ||
90 | + | ||
91 | + private double car_distance_year; | ||
92 | + private double car_distance_month; | ||
93 | + private double car_distance_week; | ||
94 | + private double car_distance_day; | ||
95 | + | ||
96 | + private double car_consumption_year; | ||
97 | + private double car_consumption_month; | ||
98 | + private double car_consumption_week; | ||
99 | + private double car_consumption_day; | ||
100 | + | ||
101 | + private double car_co2_year; | ||
102 | + private double car_co2_month; | ||
103 | + private double car_co2_week; | ||
104 | + private double car_co2_day; | ||
105 | + | ||
106 | + private double walking_distance_year; | ||
107 | + private double walking_distance_month; | ||
108 | + private double walking_distance_week; | ||
109 | + private double walking_distance_day; | ||
110 | + | ||
111 | + private double liters_saved_year; | ||
112 | + private double liters_saved_month; | ||
113 | + private double liters_saved_week; | ||
114 | + private double liters_saved_day; | ||
115 | + | ||
116 | + private double co2_saved_year; | ||
117 | + private double co2_saved_month; | ||
118 | + private double co2_saved_week; | ||
119 | + private double co2_saved_day; | ||
120 | + | ||
121 | + | ||
122 | + public WarplyPacingModel() { | ||
123 | + this.tree_co2_year = 0.0d; | ||
124 | + this.tree_co2_month = 0.0d; | ||
125 | + this.tree_co2_week = 0.0d; | ||
126 | + this.tree_co2_day = 0.0d; | ||
127 | + | ||
128 | + this.car_distance_year = 0.0d; | ||
129 | + this.car_distance_month = 0.0d; | ||
130 | + this.car_distance_week = 0.0d; | ||
131 | + this.car_distance_day = 0.0d; | ||
132 | + | ||
133 | + this.car_consumption_year = 0.0d; | ||
134 | + this.car_consumption_month = 0.0d; | ||
135 | + this.car_consumption_week = 0.0d; | ||
136 | + this.car_consumption_day = 0.0d; | ||
137 | + | ||
138 | + this.car_co2_year = 0.0d; | ||
139 | + this.car_co2_month = 0.0d; | ||
140 | + this.car_co2_week = 0.0d; | ||
141 | + this.car_co2_day = 0.0d; | ||
142 | + | ||
143 | + this.walking_distance_year = 0.0d; | ||
144 | + this.walking_distance_month = 0.0d; | ||
145 | + this.walking_distance_week = 0.0d; | ||
146 | + this.walking_distance_day = 0.0d; | ||
147 | + | ||
148 | + this.liters_saved_year = 0.0d; | ||
149 | + this.liters_saved_month = 0.0d; | ||
150 | + this.liters_saved_week = 0.0d; | ||
151 | + this.liters_saved_day = 0.0d; | ||
152 | + | ||
153 | + this.co2_saved_year = 0.0d; | ||
154 | + this.co2_saved_month = 0.0d; | ||
155 | + this.co2_saved_week = 0.0d; | ||
156 | + this.co2_saved_day = 0.0d; | ||
157 | + } | ||
158 | + | ||
159 | + public double getTree_co2_year() { | ||
160 | + return tree_co2_year; | ||
161 | + } | ||
162 | + | ||
163 | + public void setTree_co2_year(double tree_co2_year) { | ||
164 | + this.tree_co2_year = tree_co2_year; | ||
165 | + } | ||
166 | + | ||
167 | + public double getTree_co2_month() { | ||
168 | + return tree_co2_month; | ||
169 | + } | ||
170 | + | ||
171 | + public void setTree_co2_month(double tree_co2_month) { | ||
172 | + this.tree_co2_month = tree_co2_month; | ||
173 | + } | ||
174 | + | ||
175 | + public double getTree_co2_week() { | ||
176 | + return tree_co2_week; | ||
177 | + } | ||
178 | + | ||
179 | + public void setTree_co2_week(double tree_co2_week) { | ||
180 | + this.tree_co2_week = tree_co2_week; | ||
181 | + } | ||
182 | + | ||
183 | + public double getTree_co2_day() { | ||
184 | + return tree_co2_day; | ||
185 | + } | ||
186 | + | ||
187 | + public void setTree_co2_day(double tree_co2_day) { | ||
188 | + this.tree_co2_day = tree_co2_day; | ||
189 | + } | ||
190 | + | ||
191 | + public double getCar_distance_year() { | ||
192 | + return car_distance_year; | ||
193 | + } | ||
194 | + | ||
195 | + public void setCar_distance_year(double car_distance_year) { | ||
196 | + this.car_distance_year = car_distance_year; | ||
197 | + } | ||
198 | + | ||
199 | + public double getCar_distance_month() { | ||
200 | + return car_distance_month; | ||
201 | + } | ||
202 | + | ||
203 | + public void setCar_distance_month(double car_distance_month) { | ||
204 | + this.car_distance_month = car_distance_month; | ||
205 | + } | ||
206 | + | ||
207 | + public double getCar_distance_week() { | ||
208 | + return car_distance_week; | ||
209 | + } | ||
210 | + | ||
211 | + public void setCar_distance_week(double car_distance_week) { | ||
212 | + this.car_distance_week = car_distance_week; | ||
213 | + } | ||
214 | + | ||
215 | + public double getCar_distance_day() { | ||
216 | + return car_distance_day; | ||
217 | + } | ||
218 | + | ||
219 | + public void setCar_distance_day(double car_distance_day) { | ||
220 | + this.car_distance_day = car_distance_day; | ||
221 | + } | ||
222 | + | ||
223 | + public double getCar_consumption_year() { | ||
224 | + return car_consumption_year; | ||
225 | + } | ||
226 | + | ||
227 | + public void setCar_consumption_year(double car_consumption_year) { | ||
228 | + this.car_consumption_year = car_consumption_year; | ||
229 | + } | ||
230 | + | ||
231 | + public double getCar_consumption_month() { | ||
232 | + return car_consumption_month; | ||
233 | + } | ||
234 | + | ||
235 | + public void setCar_consumption_month(double car_consumption_month) { | ||
236 | + this.car_consumption_month = car_consumption_month; | ||
237 | + } | ||
238 | + | ||
239 | + public double getCar_consumption_week() { | ||
240 | + return car_consumption_week; | ||
241 | + } | ||
242 | + | ||
243 | + public void setCar_consumption_week(double car_consumption_week) { | ||
244 | + this.car_consumption_week = car_consumption_week; | ||
245 | + } | ||
246 | + | ||
247 | + public double getCar_consumption_day() { | ||
248 | + return car_consumption_day; | ||
249 | + } | ||
250 | + | ||
251 | + public void setCar_consumption_day(double car_consumption_day) { | ||
252 | + this.car_consumption_day = car_consumption_day; | ||
253 | + } | ||
254 | + | ||
255 | + public double getCar_co2_year() { | ||
256 | + return car_co2_year; | ||
257 | + } | ||
258 | + | ||
259 | + public void setCar_co2_year(double car_co2_year) { | ||
260 | + this.car_co2_year = car_co2_year; | ||
261 | + } | ||
262 | + | ||
263 | + public double getCar_co2_month() { | ||
264 | + return car_co2_month; | ||
265 | + } | ||
266 | + | ||
267 | + public void setCar_co2_month(double car_co2_month) { | ||
268 | + this.car_co2_month = car_co2_month; | ||
269 | + } | ||
270 | + | ||
271 | + public double getCar_co2_week() { | ||
272 | + return car_co2_week; | ||
273 | + } | ||
274 | + | ||
275 | + public void setCar_co2_week(double car_co2_week) { | ||
276 | + this.car_co2_week = car_co2_week; | ||
277 | + } | ||
278 | + | ||
279 | + public double getCar_co2_day() { | ||
280 | + return car_co2_day; | ||
281 | + } | ||
282 | + | ||
283 | + public void setCar_co2_day(double car_co2_day) { | ||
284 | + this.car_co2_day = car_co2_day; | ||
285 | + } | ||
286 | + | ||
287 | + public double getWalking_distance_year() { | ||
288 | + return walking_distance_year; | ||
289 | + } | ||
290 | + | ||
291 | + public void setWalking_distance_year(double walking_distance_year) { | ||
292 | + this.walking_distance_year = walking_distance_year; | ||
293 | + } | ||
294 | + | ||
295 | + public double getWalking_distance_month() { | ||
296 | + return walking_distance_month; | ||
297 | + } | ||
298 | + | ||
299 | + public void setWalking_distance_month(double walking_distance_month) { | ||
300 | + this.walking_distance_month = walking_distance_month; | ||
301 | + } | ||
302 | + | ||
303 | + public double getWalking_distance_week() { | ||
304 | + return walking_distance_week; | ||
305 | + } | ||
306 | + | ||
307 | + public void setWalking_distance_week(double walking_distance_week) { | ||
308 | + this.walking_distance_week = walking_distance_week; | ||
309 | + } | ||
310 | + | ||
311 | + public double getWalking_distance_day() { | ||
312 | + return walking_distance_day; | ||
313 | + } | ||
314 | + | ||
315 | + public void setWalking_distance_day(double walking_distance_day) { | ||
316 | + this.walking_distance_day = walking_distance_day; | ||
317 | + } | ||
318 | + | ||
319 | + public double getLiters_saved_year() { | ||
320 | + return liters_saved_year; | ||
321 | + } | ||
322 | + | ||
323 | + public void setLiters_saved_year(double liters_saved_year) { | ||
324 | + this.liters_saved_year = liters_saved_year; | ||
325 | + } | ||
326 | + | ||
327 | + public double getLiters_saved_month() { | ||
328 | + return liters_saved_month; | ||
329 | + } | ||
330 | + | ||
331 | + public void setLiters_saved_month(double liters_saved_month) { | ||
332 | + this.liters_saved_month = liters_saved_month; | ||
333 | + } | ||
334 | + | ||
335 | + public double getLiters_saved_week() { | ||
336 | + return liters_saved_week; | ||
337 | + } | ||
338 | + | ||
339 | + public void setLiters_saved_week(double liters_saved_week) { | ||
340 | + this.liters_saved_week = liters_saved_week; | ||
341 | + } | ||
342 | + | ||
343 | + public double getLiters_saved_day() { | ||
344 | + return liters_saved_day; | ||
345 | + } | ||
346 | + | ||
347 | + public void setLiters_saved_day(double liters_saved_day) { | ||
348 | + this.liters_saved_day = liters_saved_day; | ||
349 | + } | ||
350 | + | ||
351 | + public double getCo2_saved_year() { | ||
352 | + return co2_saved_year; | ||
353 | + } | ||
354 | + | ||
355 | + public void setCo2_saved_year(double co2_saved_year) { | ||
356 | + this.co2_saved_year = co2_saved_year; | ||
357 | + } | ||
358 | + | ||
359 | + public double getCo2_saved_month() { | ||
360 | + return co2_saved_month; | ||
361 | + } | ||
362 | + | ||
363 | + public void setCo2_saved_month(double co2_saved_month) { | ||
364 | + this.co2_saved_month = co2_saved_month; | ||
365 | + } | ||
366 | + | ||
367 | + public double getCo2_saved_week() { | ||
368 | + return co2_saved_week; | ||
369 | + } | ||
370 | + | ||
371 | + public void setCo2_saved_week(double co2_saved_week) { | ||
372 | + this.co2_saved_week = co2_saved_week; | ||
373 | + } | ||
374 | + | ||
375 | + public double getCo2_saved_day() { | ||
376 | + return co2_saved_day; | ||
377 | + } | ||
378 | + | ||
379 | + public void setCo2_saved_day(double co2_saved_day) { | ||
380 | + this.co2_saved_day = co2_saved_day; | ||
381 | + } | ||
382 | +} |
... | @@ -84,6 +84,10 @@ public class WarplyManagerHelper { | ... | @@ -84,6 +84,10 @@ public class WarplyManagerHelper { |
84 | return url; | 84 | return url; |
85 | } | 85 | } |
86 | 86 | ||
87 | + public static String constructCcmsUrl(LoyaltyContextualOfferModel item) { | ||
88 | + return /*url*/ ""; | ||
89 | + } | ||
90 | + | ||
87 | // public static CampaignList mergeCCMS(ArrayList<LoyaltyContextualOfferModel> ccmslist, CampaignList clist) { | 91 | // public static CampaignList mergeCCMS(ArrayList<LoyaltyContextualOfferModel> ccmslist, CampaignList clist) { |
88 | // CampaignList mergedList = clist; | 92 | // CampaignList mergedList = clist; |
89 | // for (LoyaltyContextualOfferModel element : ccmslist) { | 93 | // for (LoyaltyContextualOfferModel element : ccmslist) { | ... | ... |
1 | package ly.warp.sdk.utils.managers; | 1 | package ly.warp.sdk.utils.managers; |
2 | 2 | ||
3 | +import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; | ||
4 | +import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; | ||
5 | + | ||
3 | /** | 6 | /** |
4 | * Created by Panagiotis Triantafyllou on 26/Απρ/2022. | 7 | * Created by Panagiotis Triantafyllou on 26/Απρ/2022. |
5 | */ | 8 | */ |
6 | public class WarplyEventBusManager { | 9 | public class WarplyEventBusManager { |
7 | private String eventName; | 10 | private String eventName; |
11 | + private LoyaltySDKFirebaseEventModel fireEvent; | ||
12 | + private LoyaltyContextualOfferModel ccms; | ||
8 | 13 | ||
9 | public WarplyEventBusManager(String eventName) { | 14 | public WarplyEventBusManager(String eventName) { |
10 | this.eventName = eventName; | 15 | this.eventName = eventName; |
11 | } | 16 | } |
17 | + | ||
18 | + public WarplyEventBusManager(LoyaltySDKFirebaseEventModel fireEvent) { | ||
19 | + this.fireEvent = fireEvent; | ||
20 | + } | ||
21 | + | ||
22 | + public WarplyEventBusManager(LoyaltyContextualOfferModel ccms) { | ||
23 | + this.ccms = ccms; | ||
24 | + } | ||
12 | } | 25 | } | ... | ... |
-
Please register or login to post a comment