示例#1
0
        /// <summary>
        /// Suica の残高を取得します。
        /// </summary>
        /// <returns>Suica の残高。</returns>
        public static int GetSuicaBalance()
        {
            var data = FelicaUtility.ReadWithoutEncryption(FelicaSystemCode.Suica, FelicaServiceCode.SuicaAttributes, 0);
            var item = new SuicaAttributesItem(data);

            return(item.Balance);
        }
示例#2
0
        /// <summary>
        /// WAON の残高を取得します。
        /// </summary>
        /// <returns>WAON の残高。</returns>
        public static int GetWaonBalance()
        {
            var data = FelicaUtility.ReadWithoutEncryption(FelicaSystemCode.Waon, FelicaServiceCode.WaonBalance, 0);
            var item = new WaonBalanceItem(data);

            return(item.Balance);
        }
示例#3
0
        /// <summary>
        /// Suica の利用履歴を取得します。
        /// </summary>
        /// <returns>Suica の利用履歴。</returns>
        public static IEnumerable <SuicaHistoryItem> GetSuicaHistory()
        {
            var data = FelicaUtility.ReadBlocksWithoutEncryption(FelicaSystemCode.Suica, FelicaServiceCode.SuicaHistory, 0, 20);

            return(data.Select(x => new SuicaHistoryItem(x)));
        }