You've already forked email-api-client
refactor: extract Destination type from EmailRequest for improved structure
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 19s
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 19s
This commit is contained in:
@@ -18,13 +18,15 @@ type Message struct {
|
|||||||
Subject Data `json:"Subject"`
|
Subject Data `json:"Subject"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Destination struct {
|
||||||
|
ToAddresses Addresses `json:"ToAddresses"`
|
||||||
|
CcAddresses Addresses `json:"CcAddresses,omitempty"`
|
||||||
|
BccAddresses Addresses `json:"BccAddresses,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type EmailRequest struct {
|
type EmailRequest struct {
|
||||||
Source string `json:"Source"`
|
Source string `json:"Source"`
|
||||||
Destination struct {
|
Destination Destination `json:"Destination"`
|
||||||
ToAddresses Addresses `json:"ToAddresses"`
|
|
||||||
CcAddresses Addresses `json:"CcAddresses"`
|
|
||||||
BccAddresses Addresses `json:"BccAddresses"`
|
|
||||||
} `json:"Destination"`
|
|
||||||
Message Message `json:"Message"`
|
Message Message `json:"Message"`
|
||||||
ScheduledTime time.Time `json:"ScheduledTime,omitempty"`
|
ScheduledTime time.Time `json:"ScheduledTime,omitempty"`
|
||||||
Catch bool `json:"Catch,omitempty"`
|
Catch bool `json:"Catch,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user