Пример #1
0
 public async Task<StripeResponse<Dispute>> UpdateDispute(DisputeUpdateArguments arguments,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<DisputeUpdateArguments, Dispute>
     {
         UrlPath = PathHelper.GetPath(Paths.Disputes, arguments.DisputeId),
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }
        public async Task UpdateDisputeTest()
        {
            // Arrange
            var args = new DisputeUpdateArguments
            {
                DisputeId = "dispute-id"
            };
            _stripe.Post(
                Arg.Is<StripeRequest<DisputeUpdateArguments, Dispute>>(
                    a => a.UrlPath == "disputes/" + args.DisputeId && a.Model == args), _cancellationToken)
                .Returns(Task.FromResult(new StripeResponse<Dispute>()));

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

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