コード例 #1
0
 public async Task<StripeResponse<Pagination<Sku>>> GetSkus(SkuListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<SkuListFilter, Pagination<Sku>>
     {
         UrlPath = Paths.Skus,
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
コード例 #2
0
        public void SkuListFilter_DoesNotHaveRequiredFields()
        {
            // Arrange 
            _filter = new SkuListFilter();

            // Act
            var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList();

            // Assert
            keyValuePairs.Should().HaveCount(0);
        }
コード例 #3
0
        public async Task GetSkusTest()
        {
            // Arrange
            var filter = new SkuListFilter();
            _stripe.Get(
                Arg.Is<StripeRequest<SkuListFilter, Pagination<Sku>>>(a => a.UrlPath == "skus" && a.Model == filter),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<Pagination<Sku>>()));

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

            // Assert
            response.Should().NotBeNull();
        }
コード例 #4
0
 public void Init()
 {
     _filter = GenFu.GenFu.New<SkuListFilter>();
 }