コード例 #1
0
ファイル: CardList.cs プロジェクト: iyzico/iyzipay-dotnet
 public static CardList Retrieve(RetrieveCardListRequest request, Options options)
 {
     return RestHttpClient.Create().Post<CardList>(options.BaseUrl + "/cardstorage/cards", GetHttpHeaders(request, options), request);
 }
コード例 #2
0
        public void Should_Retrieve_Cards()
        {
            RetrieveCardListRequest request = new RetrieveCardListRequest();
            request.Locale = Locale.TR.ToString();
            request.ConversationId = "123456789";
            request.CardUserKey = "card user key";

            CardList cardList = CardList.Retrieve(request, options);

            PrintResponse<CardList>(cardList);

            Assert.AreEqual(Status.SUCCESS.ToString(), cardList.Status);
            Assert.AreEqual(Locale.TR.ToString(), cardList.Locale);
            Assert.AreEqual("123456789", cardList.ConversationId);
            Assert.IsNotNull(cardList.SystemTime);
            Assert.IsNull(cardList.ErrorCode);
            Assert.IsNull(cardList.ErrorMessage);
            Assert.IsNull(cardList.ErrorGroup);
            Assert.IsNotNull(cardList.CardDetails);
            Assert.IsNotEmpty(cardList.CardDetails);
            Assert.IsNotNull(cardList.CardUserKey);
        }