Ejemplo n.º 1
0
 public async Task<StripeResponse<Pagination<TransferReversal>>> GetTransferReversals(
     TransferReversalListFilter filter, CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<TransferReversalListFilter, Pagination<TransferReversal>>
     {
         UrlPath = PathHelper.GetPath(Paths.Transfers, filter.TransferId, Paths.Reversals),
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
        public async Task GetTransferReversalsTest()
        {
            // Arrange
            var filter = new TransferReversalListFilter
            {
                TransferId = "transfer-id"
            };
            _stripe.Get(
                Arg.Is<StripeRequest<TransferReversalListFilter, Pagination<TransferReversal>>>(
                    a => a.UrlPath == "transfers/" + filter.TransferId + "/reversals" && a.Model == filter),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<Pagination<TransferReversal>>()));

            // Act
            var response = await _client.GetTransferReversals(filter, _cancellationToken);

            // Assert
            response.Should().NotBeNull();
        }
 public void Init()
 {
     _filter = GenFu.GenFu.New<TransferReversalListFilter>();
 }