Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions webhooks/pre_renewal_notification.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package webhooks

import "github.com/autopilot3/recurly"

const (
PreRenewal = "prerenewal_notification"
)

// NewDunningEventNotification is returned for new dunning events.
type PreRenewalNotification struct {
Type string `xml:"-"`
Account Account
Subscription recurly.Subscription
}
2 changes: 2 additions & 0 deletions webhooks/webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func nameToNotification(name string) (interface{}, error) {
return &PaymentNotification{Type: name}, nil
case NewDunningEvent:
return &NewDunningEventNotification{Type: name}, nil
case PreRenewal:
return &PreRenewalNotification{Type: name}, nil
}
return nil, ErrUnknownNotification{name: name}
}
Expand Down