public void Init()
 {
     _args = GenFu.GenFu.New<TransferReversalUpdateArguments>();
 }
        public async Task UpdateTransferReversalTest()
        {
            // Arrange
            var args = new TransferReversalUpdateArguments
            {
                TransferReversalId = "transfer-reversal-id",
                TransferId = "transfer-id"
            };
            _stripe.Post(
                Arg.Is<StripeRequest<TransferReversalUpdateArguments, TransferReversal>>(
                    a => a.UrlPath == "transfers/" + args.TransferId + "/reversals/" + args.TransferReversalId && a.Model == args),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<TransferReversal>()));

            // Act
            var response = await _client.UpdateTransferReversal(args, _cancellationToken);

            // Assert
            response.Should().NotBeNull();
        }
Exemplo n.º 3
0
 public async Task<StripeResponse<TransferReversal>> UpdateTransferReversal(
     TransferReversalUpdateArguments arguments, CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<TransferReversalUpdateArguments, TransferReversal>
     {
         UrlPath = PathHelper.GetPath(Paths.Transfers, arguments.TransferId, Paths.Reversals, arguments.TransferReversalId),
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }