public async Task<StripeResponse<BitcoinReceiver>> CreateBitcoinReceiver( BitcoinReceiverCreateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<BitcoinReceiverCreateArguments, BitcoinReceiver> { UrlPath = PathHelper.GetPath(Paths.Bitcoin, Paths.Receivers), Model = arguments }; return await _client.Post(request, cancellationToken); }
public async Task <StripeResponse <BitcoinReceiver> > CreateBitcoinReceiver( BitcoinReceiverCreateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest <BitcoinReceiverCreateArguments, BitcoinReceiver> { UrlPath = PathHelper.GetPath(Paths.Bitcoin, Paths.Receivers), Model = arguments }; return(await _client.Post(request, cancellationToken)); }
public async Task CreateBitcoinReceiverTest() { // Arrange var args = new BitcoinReceiverCreateArguments(); _stripe.Post( Arg.Is<StripeRequest<BitcoinReceiverCreateArguments, BitcoinReceiver>>( a => a.UrlPath == "bitcoin/receivers" && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse<BitcoinReceiver>())); // Act var response = await _client.CreateBitcoinReceiver(args, _cancellationToken); // Assert response.Should().NotBeNull(); }
public async Task CreateBitcoinReceiverTest() { // Arrange var args = new BitcoinReceiverCreateArguments(); _stripe.Post( Arg.Is <StripeRequest <BitcoinReceiverCreateArguments, BitcoinReceiver> >( a => a.UrlPath == "bitcoin/receivers" && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse <BitcoinReceiver>())); // Act var response = await _client.CreateBitcoinReceiver(args, _cancellationToken); // Assert response.Should().NotBeNull(); }