-
Notifications
You must be signed in to change notification settings - Fork 573
/
Copy pathStripeList.cs
46 lines (40 loc) · 1.33 KB
/
StripeList.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace Stripe
{
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;
[JsonObject]
public class StripeList<T> : StripeEntity, IHasObject, IEnumerable<T>
{
/// <summary>
/// A string describing the object type returned.
/// </summary>
[JsonProperty("object")]
public string Object { get; set; }
/// <summary>
/// A list containing the actual response elements, paginated by any request parameters.
/// </summary>
[JsonProperty("data", ItemConverterType = typeof(StripeObjectConverter))]
public List<T> Data { get; set; }
/// <summary>
/// Whether or not there are more elements available after this set. If <code>false</code>,
/// this set comprises the end of the list.
/// </summary>
[JsonProperty("has_more")]
public bool HasMore { get; set; }
/// <summary>
/// The URL for accessing this list.
/// </summary>
[JsonProperty("url")]
public string Url { get; set; }
public IEnumerator<T> GetEnumerator()
{
return this.Data.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.Data.GetEnumerator();
}
}
}