public async Task<StripeResponse<Pagination<Plan>>> GetPlans(PlanListFilter filter, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<PlanListFilter, Pagination<Plan>> { UrlPath = Paths.Plans, Model = filter }; return await _client.Get(request, cancellationToken); }
public void PlanListFilter_DoesNotHaveRequiredFields() { // Arrange _filter = new PlanListFilter(); // Act var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList(); // Assert keyValuePairs.Should().HaveCount(0); }
public async Task GetPlansTest() { // Arrange var filter = new PlanListFilter(); _stripe.Get( Arg.Is<StripeRequest<PlanListFilter, Pagination<Plan>>>(a => a.UrlPath == "plans" && a.Model == filter), _cancellationToken).Returns(Task.FromResult(new StripeResponse<Pagination<Plan>>())); // Act var response = await _client.GetPlans(filter, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _filter = GenFu.GenFu.New<PlanListFilter>(); }