コード例 #1
0
            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");
                }
            }
コード例 #2
0
ファイル: AdapterCoupon.cs プロジェクト: nearit/Xamarin-SDK
        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);
        }
コード例 #3
0
ファイル: AdapterCoupon.cs プロジェクト: nearit/Xamarin-SDK
        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);
        }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: nearit/Xamarin-SDK
 public void GotXCouponNotification(XCCouponNotification notification)
 {
     throw new NotImplementedException();
 }