Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) WebhooksHandler ¶
func (l *Listener) WebhooksHandler(cb func(err error, n *Subscription)) http.HandlerFunc
Listen for webhooks
type Subscription ¶
type Subscription struct { ID string `json:"id"` ResourceType string `json:"resource_type"` EventType string `json:"event_type"` Summary string `json:"summary"` Resource struct { ID string `json:"id"` Subscriber struct { ID string `json:"id"` Summary string `json:"summary"` EventType string `json:"event_type"` Name struct { GivenName string `json:"given_name"` SurName string `json:"surname"` } `json:"name"` Email string `json:"email_address"` } `json:"subscriber"` ParentPayment string `json:"parent_payment"` Amount struct { Total string `json:"total"` Currency string `json:"currency"` } `json:"amount"` } `json:"resource"` }
Click to show internal directories.
Click to hide internal directories.