Exemplo n.º 1
0
 public async Task<StripeResponse<Pagination<Card>>> GetCards(RecipientCardListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<RecipientCardListFilter, Pagination<Card>>
     {
         UrlPath = PathHelper.GetPath(Paths.Recipients, filter.RecipientId, Paths.Cards),
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
 public void Init()
 {
     _filter = GenFu.GenFu.New<RecipientCardListFilter>();
 }
 public async Task GetCardsTest()
 {
     var filter = new RecipientCardListFilter
     {
         RecipientId = "recipient-id"
     };
     _stripe.Get(
         Arg.Is<StripeRequest<RecipientCardListFilter, Pagination<Card>>>(
             a => a.UrlPath == "recipients/" + filter.RecipientId + "/cards" && a.Model == filter),
         _cancellationToken).Returns(Task.FromResult(new StripeResponse<Pagination<Card>>()));
     var response = await _client.GetCards(filter, _cancellationToken);
     response.Should().NotBeNull();
 }