Skip to content

Commit

Permalink
SDK regeneration (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored May 3, 2024
1 parent 323b6bf commit 117cf36
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (r *RequestOptions) cloneHeader() http.Header {
headers := r.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/trycourier/courier-go/v3")
headers.Set("X-Fern-SDK-Version", "v3.0.9")
headers.Set("X-Fern-SDK-Version", "v3.0.10")
return headers
}

Expand Down
69 changes: 66 additions & 3 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3327,9 +3327,13 @@ func (m MessageRoutingMethod) Ptr() *MessageRoutingMethod {
}

type Notification struct {
CreatedAt int64 `json:"created_at" url:"created_at"`
Id string `json:"id" url:"id"`
Routing *MessageRouting `json:"routing,omitempty" url:"routing,omitempty"`
CreatedAt int64 `json:"created_at" url:"created_at"`
UpdatedAt int64 `json:"updated_at" url:"updated_at"`
Id string `json:"id" url:"id"`
Routing *MessageRouting `json:"routing,omitempty" url:"routing,omitempty"`
Tags *NotificationTag `json:"tags,omitempty" url:"tags,omitempty"`
Title *string `json:"title,omitempty" url:"title,omitempty"`
TopicId string `json:"topic_id" url:"topic_id"`

_rawJSON json.RawMessage
}
Expand Down Expand Up @@ -3461,6 +3465,65 @@ func (n *NotificationContentHierarchy) String() string {
return fmt.Sprintf("%#v", n)
}

type NotificationTag struct {
Data []*NotificationTagData `json:"data,omitempty" url:"data,omitempty"`

_rawJSON json.RawMessage
}

func (n *NotificationTag) UnmarshalJSON(data []byte) error {
type unmarshaler NotificationTag
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*n = NotificationTag(value)
n._rawJSON = json.RawMessage(data)
return nil
}

func (n *NotificationTag) String() string {
if len(n._rawJSON) > 0 {
if value, err := core.StringifyJSON(n._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(n); err == nil {
return value
}
return fmt.Sprintf("%#v", n)
}

type NotificationTagData struct {
Id string `json:"id" url:"id"`
Name string `json:"name" url:"name"`

_rawJSON json.RawMessage
}

func (n *NotificationTagData) UnmarshalJSON(data []byte) error {
type unmarshaler NotificationTagData
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*n = NotificationTagData(value)
n._rawJSON = json.RawMessage(data)
return nil
}

func (n *NotificationTagData) String() string {
if len(n._rawJSON) > 0 {
if value, err := core.StringifyJSON(n._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(n); err == nil {
return value
}
return fmt.Sprintf("%#v", n)
}

type Address struct {
Formatted string `json:"formatted" url:"formatted"`
StreetAddress string `json:"street_address" url:"street_address"`
Expand Down

0 comments on commit 117cf36

Please sign in to comment.