github.com/Ingenico-ePayments/connect-sdk-go@v0.0.0-20240318153750-1f8cd329b9c9/domain/webhooks/Event.go (about) 1 package webhooks 2 3 import ( 4 "github.com/Ingenico-ePayments/connect-sdk-go/domain/dispute" 5 "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" 6 "github.com/Ingenico-ePayments/connect-sdk-go/domain/payout" 7 "github.com/Ingenico-ePayments/connect-sdk-go/domain/refund" 8 "github.com/Ingenico-ePayments/connect-sdk-go/domain/token" 9 ) 10 11 // Event represents an event that is sent by webhooks 12 type Event struct { 13 APIVersion *string `json:"apiVersion,omitempty"` 14 ID *string `json:"id,omitempty"` 15 Created *string `json:"created,omitempty"` 16 MerchantID *string `json:"merchantId,omitempty"` 17 Type *string `json:"type,omitempty"` 18 Payment *payment.Response `json:"payment,omitempty"` 19 Refund *refund.Response `json:"refund,omitempty"` 20 Payout *payout.Response `json:"payout,omitempty"` 21 Token *token.Response `json:"token,omitempty"` 22 Dispute *dispute.Response `json:"dispute,omitempty"` 23 } 24 25 // NewEvent constructs a new Event 26 func NewEvent() (*Event, error) { 27 return &Event{}, nil 28 }