public async Task<StripeResponse<Customer>> UpdateCustomer(CustomerUpdateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<CustomerUpdateArguments, Customer> { UrlPath = PathHelper.GetPath(Paths.Customers, arguments.CustomerId), Model = arguments }; return await _client.Post(request, cancellationToken); }
public async Task UpdateCustomerTest() { // Arrange var args = new CustomerUpdateArguments { CustomerId = "customer-id" }; _stripe.Post( Arg.Is<StripeRequest<CustomerUpdateArguments, Customer>>( a => a.UrlPath == "customers/" + args.CustomerId && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse<Customer>())); // Act var response = await _client.UpdateCustomer(args, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _args = GenFu.GenFu.New<CustomerUpdateArguments>(); }