Skip to content

Commit 2ce9c25

Browse files
Changes generated by a6217d304d5602bb22c499d5dfb7188ae5d19256
This commit was automatically created from gocardless/gocardless-dotnet-template@a6217d3 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/17487984632
1 parent 4ae9a1a commit 2ce9c25

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

GoCardless/Resources/Event.cs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ public class Event
104104
/// </summary>
105105
[JsonProperty("resource_type")]
106106
public EventResourceType? ResourceType { get; set; }
107+
108+
/// <summary>
109+
/// Audit information about the source of the event.
110+
/// </summary>
111+
[JsonProperty("source")]
112+
public EventSource Source { get; set; }
107113
}
108114

109115
/// <summary>
@@ -549,4 +555,47 @@ public enum EventResourceType {
549555
Subscriptions,
550556
}
551557

558+
/// <summary>
559+
/// Represents a event source resource.
560+
///
561+
/// Audit information about the source of the event.
562+
/// </summary>
563+
public class EventSource
564+
{
565+
/// <summary>
566+
/// The name of the event's source.
567+
/// </summary>
568+
[JsonProperty("name")]
569+
public string Name { get; set; }
570+
571+
/// <summary>
572+
/// The type of the event's source.
573+
/// </summary>
574+
[JsonProperty("type")]
575+
public EventSourceType? Type { get; set; }
576+
}
577+
578+
/// <summary>
579+
/// The type of the event's source.
580+
/// </summary>
581+
[JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)]
582+
public enum EventSourceType {
583+
/// <summary>Unknown status</summary>
584+
[EnumMember(Value = "unknown")]
585+
Unknown = 0,
586+
587+
/// <summary>`type` with a value of "app"</summary>
588+
[EnumMember(Value = "app")]
589+
App,
590+
/// <summary>`type` with a value of "user"</summary>
591+
[EnumMember(Value = "user")]
592+
User,
593+
/// <summary>`type` with a value of "gc_team"</summary>
594+
[EnumMember(Value = "gc_team")]
595+
GcTeam,
596+
/// <summary>`type` with a value of "access_token"</summary>
597+
[EnumMember(Value = "access_token")]
598+
AccessToken,
599+
}
600+
552601
}

0 commit comments

Comments
 (0)