Ejemplo n.º 1
0
 public static CardList Retrieve(RetrieveCardListRequest request, Options options)
 {
     return RestHttpClient.Create().Post<CardList>(options.BaseUrl + "/cardstorage/cards", GetHttpHeaders(request, options), request);
 }
Ejemplo n.º 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);
        }