public override void GotCoupon(NITCoupon Coupon, NITTrackingInfo TrackingInfo) { XCCouponNotification XCoupon = AdapterCoupon.GetCommonType(Coupon); if (NearPCL.GetContentManager() != null) { NearPCL.GetContentManager().GotXCouponNotification(XCoupon); } else { Console.WriteLine("You receive a content but you haven't registered a content manager"); } }
public static XCCouponNotification GetCommonType(Coupon CouponNotification) { XCCouponNotification XCoupon = new XCCouponNotification(); XCoupon.NotificationMessage = CouponNotification.NotificationMessage; XCoupon.Description = CouponNotification.Description; XCoupon.Value = CouponNotification.Value; XCoupon.ExpiresAt = CouponNotification.ExpiresAt; XCoupon.RedeemableFrom = CouponNotification.RedeemableFrom; if (CouponNotification.IconSet != null) { XCoupon.IconSet = new XCImageSet(); XCoupon.IconSet.FullSize = CouponNotification.IconSet.FullSize; XCoupon.IconSet.SmallSize = CouponNotification.IconSet.SmallSize; } XCoupon.Id = CouponNotification.Id; XCoupon.Serial = CouponNotification.Serial; XCoupon.ClaimedAt = CouponNotification.ClaimedAt; XCoupon.RedeemedAt = CouponNotification.RedeemedAt; return(XCoupon); }
public static XCCouponNotification GetCommonType(NITCoupon CouponNotification) { XCCouponNotification XCoupon = new XCCouponNotification(); XCoupon.NotificationMessage = CouponNotification.NotificationMessage; XCoupon.Description = CouponNotification.Description; XCoupon.Value = CouponNotification.Value; XCoupon.ExpiresAt = CouponNotification.ExpiresAt; XCoupon.RedeemableFrom = CouponNotification.RedeemableFrom; if (CouponNotification.Icon != null) { XCoupon.IconSet = new XCImageSet(); XCoupon.IconSet.FullSize = CouponNotification.Icon.Url.AbsoluteString; XCoupon.IconSet.SmallSize = CouponNotification.Icon.SmallSizeURL.AbsoluteString; } XCoupon.Id = CouponNotification.ID; XCoupon.Serial = CouponNotification.Claims[0].SerialNumber; XCoupon.ClaimedAt = CouponNotification.Claims[0].ClaimedAt; XCoupon.RedeemedAt = CouponNotification.Claims[0].RedeemedAt; return(XCoupon); }
public void GotXCouponNotification(XCCouponNotification notification) { throw new NotImplementedException(); }