Showing
1 changed file
with
15 additions
and
0 deletions
... | @@ -24,12 +24,14 @@ import java.util.ArrayList; | ... | @@ -24,12 +24,14 @@ import java.util.ArrayList; |
24 | 24 | ||
25 | import ly.warp.sdk.R; | 25 | import ly.warp.sdk.R; |
26 | import ly.warp.sdk.activities.ActiveCouponsActivity; | 26 | import ly.warp.sdk.activities.ActiveCouponsActivity; |
27 | +import ly.warp.sdk.activities.BaseFragmentActivity; | ||
27 | import ly.warp.sdk.activities.TelematicsActivity; | 28 | import ly.warp.sdk.activities.TelematicsActivity; |
28 | import ly.warp.sdk.activities.TelematicsHistoryActivity; | 29 | import ly.warp.sdk.activities.TelematicsHistoryActivity; |
29 | import ly.warp.sdk.activities.WarpViewActivity; | 30 | import ly.warp.sdk.activities.WarpViewActivity; |
30 | import ly.warp.sdk.io.callbacks.CallbackReceiver; | 31 | import ly.warp.sdk.io.callbacks.CallbackReceiver; |
31 | import ly.warp.sdk.io.models.Campaign; | 32 | import ly.warp.sdk.io.models.Campaign; |
32 | import ly.warp.sdk.io.models.CouponList; | 33 | import ly.warp.sdk.io.models.CouponList; |
34 | +import ly.warp.sdk.io.models.UnifiedCoupon; | ||
33 | import ly.warp.sdk.io.request.WarplyGetCampaignsRequest; | 35 | import ly.warp.sdk.io.request.WarplyGetCampaignsRequest; |
34 | import ly.warp.sdk.utils.WarplyManagerHelper; | 36 | import ly.warp.sdk.utils.WarplyManagerHelper; |
35 | import ly.warp.sdk.utils.managers.WarplyManager; | 37 | import ly.warp.sdk.utils.managers.WarplyManager; |
... | @@ -103,6 +105,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip | ... | @@ -103,6 +105,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip |
103 | public void onRefresh() { | 105 | public void onRefresh() { |
104 | WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); | 106 | WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); |
105 | WarplyManager.getCampaigns(mCampaignsCallback); | 107 | WarplyManager.getCampaigns(mCampaignsCallback); |
108 | + WarplyManager.getUnifiedCouponsDeals(mUnifiedCallback); | ||
106 | mSwipeRefresh.setRefreshing(false); | 109 | mSwipeRefresh.setRefreshing(false); |
107 | } | 110 | } |
108 | 111 | ||
... | @@ -159,6 +162,18 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip | ... | @@ -159,6 +162,18 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip |
159 | } | 162 | } |
160 | }; | 163 | }; |
161 | 164 | ||
165 | + private final CallbackReceiver<ArrayList<UnifiedCoupon>> mUnifiedCallback = new CallbackReceiver<ArrayList<UnifiedCoupon>>() { | ||
166 | + @Override | ||
167 | + public void onSuccess(ArrayList<UnifiedCoupon> result) { | ||
168 | + Toast.makeText(getActivity(), "Unified Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show(); | ||
169 | + } | ||
170 | + | ||
171 | + @Override | ||
172 | + public void onFailure(int errorCode) { | ||
173 | + Toast.makeText(getActivity(), "Unified Coupons Error", Toast.LENGTH_SHORT).show(); | ||
174 | + } | ||
175 | + }; | ||
176 | + | ||
162 | private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() { | 177 | private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() { |
163 | @Override | 178 | @Override |
164 | public void onSuccess(JSONObject result) { | 179 | public void onSuccess(JSONObject result) { | ... | ... |
-
Please register or login to post a comment