-
Notifications
You must be signed in to change notification settings - Fork 573
/
Copy pathEvent.cs
executable file
·56 lines (43 loc) · 1.44 KB
/
Event.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
47
48
49
50
51
52
53
54
55
56
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;
public class Event : StripeEntityWithId
{
[JsonProperty("object")]
public string Object { get; set; }
[JsonProperty("account")]
public string Account { get; set; }
[JsonProperty("api_version")]
public string ApiVersion { get; set; }
[JsonProperty("created")]
[JsonConverter(typeof(DateTimeConverter))]
public DateTime? Created { get; set; }
[JsonProperty("data")]
public EventData Data { get; set; }
[JsonProperty("livemode")]
public bool Livemode { get; set; }
[JsonProperty("pending_webhooks")]
public int PendingWebhooks { get; set; }
#region Request
/*
* This works like expandable properties. it's used for the event having just a string for the request id or
* the Request object for requests after the 2017-05-25 api release
*/
public string RequestId { get; set; }
[JsonIgnore]
public EventRequest Request { get; set; }
[JsonProperty("request")]
internal object InternalRequest
{
set
{
StringOrObject<EventRequest>.Map(value, s => this.RequestId = s, o => this.Request = o);
}
}
#endregion
[JsonProperty("type")]
public string Type { get; set; }
}
}