示例#1
0
 public static Card Delete(DeleteCardRequest request, Options options)
 {
     return RestHttpClient.Create().Delete<Card>(options.BaseUrl + "/cardstorage/card", GetHttpHeaders(request, options), request);
 }
        public void Should_Delete_Card()
        {
            DeleteCardRequest request = new DeleteCardRequest();
            request.Locale = Locale.TR.ToString();
            request.ConversationId = "123456789";
            request.CardToken = "card token";
            request.CardUserKey = "card user key";

            Card card = Card.Delete(request, options);

            PrintResponse<Card>(card);

            Assert.AreEqual(Status.SUCCESS.ToString(), card.Status);
            Assert.AreEqual(Locale.TR.ToString(), card.Locale);
            Assert.AreEqual("123456789", card.ConversationId);
            Assert.IsNotNull(card.SystemTime);
            Assert.IsNull(card.ErrorCode);
            Assert.IsNull(card.ErrorMessage);
            Assert.IsNull(card.ErrorGroup);
            Assert.IsNull(card.BinNumber);
            Assert.IsNull(card.CardAlias);
            Assert.IsNull(card.CardType);
            Assert.IsNull(card.CardAssociation);
            Assert.IsNull(card.CardFamily);
            Assert.IsNull(card.CardBankName);
            Assert.IsNull(card.CardBankCode);
            Assert.IsNull(card.CardUserKey);
            Assert.IsNull(card.CardToken);
            Assert.IsNull(card.Email);
            Assert.IsNull(card.ExternalId);
        }