Skip to content

Commit

Permalink
feat: Support for Domain TLS config (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
drish authored Jun 10, 2024
1 parent df93a04 commit 5259599
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ type ListDomainsResponse struct {
}

type UpdateDomainRequest struct {
OpenTracking bool `json:"open_tracking,omitempty"`
ClickTracking bool `json:"click_tracking,omitempty"`
OpenTracking bool `json:"open_tracking,omitempty"`
ClickTracking bool `json:"click_tracking,omitempty"`
Tls string `json:"tls,omitempty"`
}

type Domain struct {
Expand Down
1 change: 1 addition & 0 deletions domains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func TestUpdateDomain(t *testing.T) {

params := &UpdateDomainRequest{
OpenTracking: true,
Tls: "opportunistic",
}
updated, err := client.Domains.Update("d91cd9bd-1176-453e-8fc1-35364d380206", params)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions examples/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func domainsExample() {
updateDomainParams := &resend.UpdateDomainRequest{
OpenTracking: true,
ClickTracking: true,
Tls: "opportunistic",
}

updated, err := client.Domains.UpdateWithContext(ctx, domain.Id, updateDomainParams)
Expand Down
2 changes: 1 addition & 1 deletion resend.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
version = "2.5.0"
version = "2.6.0"
userAgent = "resend-go/" + version
contentType = "application/json"
)
Expand Down

0 comments on commit 5259599

Please sign in to comment.