Skip to content

Commit

Permalink
Merge pull request #8 from hookdeck/fern-bot/08-21-2024-0645PM
Browse files Browse the repository at this point in the history
🌿 Fern Regeneration -- August 21, 2024
  • Loading branch information
leggetter authored Aug 21, 2024
2 parents 9555ec3 + e539e60 commit 6a363d4
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/client_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ func (c *ClientOptions) cloneHeader() http.Header {
headers := c.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/hookdeck/hookdeck-go-sdk")
headers.Set("X-Fern-SDK-Version", "v0.4.1")
headers.Set("X-Fern-SDK-Version", "v0.5.0")
return headers
}
70 changes: 70 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,8 @@ const (
IntegrationProviderTebex IntegrationProvider = "TEBEX"
IntegrationProviderSlack IntegrationProvider = "SLACK"
IntegrationProviderRazorpay IntegrationProvider = "RAZORPAY"
IntegrationProviderMailchimp IntegrationProvider = "MAILCHIMP"
IntegrationProviderPaddle IntegrationProvider = "PADDLE"
)

func NewIntegrationProviderFromString(s string) (IntegrationProvider, error) {
Expand Down Expand Up @@ -1872,6 +1874,10 @@ func NewIntegrationProviderFromString(s string) (IntegrationProvider, error) {
return IntegrationProviderSlack, nil
case "RAZORPAY":
return IntegrationProviderRazorpay, nil
case "MAILCHIMP":
return IntegrationProviderMailchimp, nil
case "PADDLE":
return IntegrationProviderPaddle, nil
}
var t IntegrationProvider
return "", fmt.Errorf("%s is not a valid %T", s, t)
Expand Down Expand Up @@ -3923,6 +3929,8 @@ type VerificationConfig struct {
Tebex *VerificationTebex
Slack *VerificationSlack
Razorpay *VerificationRazorpay
Mailchimp *VerificationMailchimp
Paddle *VerificationPaddle
}

func NewVerificationConfigFromHmac(value *VerificationHmac) *VerificationConfig {
Expand Down Expand Up @@ -4157,6 +4165,14 @@ func NewVerificationConfigFromRazorpay(value *VerificationRazorpay) *Verificatio
return &VerificationConfig{Type: "razorpay", Razorpay: value}
}

func NewVerificationConfigFromMailchimp(value *VerificationMailchimp) *VerificationConfig {
return &VerificationConfig{Type: "mailchimp", Mailchimp: value}
}

func NewVerificationConfigFromPaddle(value *VerificationPaddle) *VerificationConfig {
return &VerificationConfig{Type: "paddle", Paddle: value}
}

func (v *VerificationConfig) UnmarshalJSON(data []byte) error {
var unmarshaler struct {
Type string `json:"type"`
Expand Down Expand Up @@ -4514,6 +4530,18 @@ func (v *VerificationConfig) UnmarshalJSON(data []byte) error {
return err
}
v.Razorpay = value
case "mailchimp":
value := new(VerificationMailchimp)
if err := json.Unmarshal(data, &value); err != nil {
return err
}
v.Mailchimp = value
case "paddle":
value := new(VerificationPaddle)
if err := json.Unmarshal(data, &value); err != nil {
return err
}
v.Paddle = value
}
return nil
}
Expand Down Expand Up @@ -5044,6 +5072,24 @@ func (v VerificationConfig) MarshalJSON() ([]byte, error) {
VerificationRazorpay: v.Razorpay,
}
return json.Marshal(marshaler)
case "mailchimp":
var marshaler = struct {
Type string `json:"type"`
*VerificationMailchimp
}{
Type: v.Type,
VerificationMailchimp: v.Mailchimp,
}
return json.Marshal(marshaler)
case "paddle":
var marshaler = struct {
Type string `json:"type"`
*VerificationPaddle
}{
Type: v.Type,
VerificationPaddle: v.Paddle,
}
return json.Marshal(marshaler)
}
}

Expand Down Expand Up @@ -5106,6 +5152,8 @@ type VerificationConfigVisitor interface {
VisitTebex(*VerificationTebex) error
VisitSlack(*VerificationSlack) error
VisitRazorpay(*VerificationRazorpay) error
VisitMailchimp(*VerificationMailchimp) error
VisitPaddle(*VerificationPaddle) error
}

func (v *VerificationConfig) Accept(visitor VerificationConfigVisitor) error {
Expand Down Expand Up @@ -5228,6 +5276,10 @@ func (v *VerificationConfig) Accept(visitor VerificationConfigVisitor) error {
return visitor.VisitSlack(v.Slack)
case "razorpay":
return visitor.VisitRazorpay(v.Razorpay)
case "mailchimp":
return visitor.VisitMailchimp(v.Mailchimp)
case "paddle":
return visitor.VisitPaddle(v.Paddle)
}
}

Expand Down Expand Up @@ -5371,6 +5423,15 @@ type VerificationLinearConfigs struct {
WebhookSecretKey string `json:"webhook_secret_key"`
}

type VerificationMailchimp struct {
Configs *VerificationMailchimpConfigs `json:"configs,omitempty"`
}

// The verification configs for Mailchimp. Only included if the ?include=verification.configs query param is present
type VerificationMailchimpConfigs struct {
WebhookSecretKey string `json:"webhook_secret_key"`
}

type VerificationMailgun struct {
Configs *VerificationMailgunConfigs `json:"configs,omitempty"`
}
Expand Down Expand Up @@ -5407,6 +5468,15 @@ type VerificationOuraConfigs struct {
WebhookSecretKey string `json:"webhook_secret_key"`
}

type VerificationPaddle struct {
Configs *VerificationPaddleConfigs `json:"configs,omitempty"`
}

// The verification configs for Paddle. Only included if the ?include=verification.configs query param is present
type VerificationPaddleConfigs struct {
WebhookSecretKey string `json:"webhook_secret_key"`
}

type VerificationPersona struct {
Configs *VerificationPersonaConfigs `json:"configs,omitempty"`
}
Expand Down

0 comments on commit 6a363d4

Please sign in to comment.