diff --git a/change_events.go b/change_events.go index c1f9308f..08a63f82 100644 --- a/change_events.go +++ b/change_events.go @@ -19,10 +19,10 @@ type ChangeEvent struct { // Payload ChangeEvent Payload // https://developer.pagerduty.com/docs/events-api-v2/send-change-events/#example-request-payload type Payload struct { - Source string `json:"source"` - Summary string `json:"summary"` - Timestamp string `json:"timestamp"` - CustomDetails interface{} `json:"custom_details"` + Source string `json:"source"` + Summary string `json:"summary"` + Timestamp string `json:"timestamp"` + CustomDetails map[string]interface{} `json:"custom_details"` } // Link represents a single link in a ChangeEvent diff --git a/change_events_test.go b/change_events_test.go index 3abf84e8..46b3e490 100644 --- a/change_events_test.go +++ b/change_events_test.go @@ -38,7 +38,7 @@ func TestChangeEvent_Create(t *testing.T) { Message: "Change event processed", } - eventDetails := map[string]string{"DetailKey1": "DetailValue1", "DetailKey2": "DetailValue2"} + eventDetails := map[string]interface{}{"DetailKey1": "DetailValue1", "DetailKey2": "DetailValue2"} ce := ChangeEvent{ RoutingKey: "a0000000aa0000a0a000aa0a0a0aa000", Payload: Payload{ @@ -89,7 +89,7 @@ func TestChangeEvent_CreateWithPayloadVerification(t *testing.T) { HTTPClient: defaultHTTPClient, } - eventDetails := map[string]string{"DetailKey1": "DetailValue1", "DetailKey2": "DetailValue2"} + eventDetails := map[string]interface{}{"DetailKey1": "DetailValue1", "DetailKey2": "DetailValue2"} ce := ChangeEvent{ RoutingKey: "a0000000aa0000a0a000aa0a0a0aa000", Payload: Payload{