Documentation
¶
Index ¶
- Variables
- type CreateRecipientRequest
- type DeleteRecipientResponse
- type List
- type PostUp
- func (pu *PostUp) DeleteRecipientByAddress(ctx context.Context, addr string) (*DeleteRecipientResponse, error)
- func (pu *PostUp) GetListByExternalID(ctx context.Context, id string) (*List, error)
- func (pu *PostUp) GetListByListID(ctx context.Context, id int) (*List, error)
- func (pu *PostUp) GetListByTitle(ctx context.Context, title string) (*List, error)
- func (pu *PostUp) GetLists(ctx context.Context) ([]*List, error)
- func (pu *PostUp) GetListsByBrandID(ctx context.Context, id int) ([]*List, error)
- func (pu *PostUp) GetRecipientByAddress(ctx context.Context, addr string) (*Recipient, error)
- func (pu *PostUp) GetRecipientByExternalID(ctx context.Context, id string) (*Recipient, error)
- func (pu *PostUp) GetRecipientByRecipientID(ctx context.Context, id int) (*Recipient, error)
- func (pu *PostUp) RecipientCreate(ctx context.Context, crr *CreateRecipientRequest) (*Recipient, error)
- func (pu *PostUp) RecipientUpdate(ctx context.Context, id int, urr *UpdateRecipientRequest) (*Recipient, error)
- func (pu *PostUp) SubscribeRecipientToList(ctx context.Context, srr *SubscribeRecipientRequest) (*SubscribeRecipientResponse, error)
- func (pu *PostUp) UnsubscribeRecipientFromList(ctx context.Context, urr *UnsubscribeRecipientRequest) (*UnsubscribeRecipientResponse, error)
- type Recipient
- type SubscribeRecipientRequest
- type SubscribeRecipientResponse
- type SubscriptionStatus
- type Time
- type UnsubscribeRecipientRequest
- type UnsubscribeRecipientResponse
- type UpdateRecipientRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRecipientNotFound = errors.New("recipient not found") ErrListNotFound = errors.New("list not found") ErrRecipientMissingIdentifier = errors.New("recipient has no address, recipientId or externalId") ErrListMissingIdentifier = errors.New("recipient has no listId or externalId") )
Functions ¶
This section is empty.
Types ¶
type CreateRecipientRequest ¶
type CreateRecipientRequest struct {
ExternalID string `json:"externalId,omitempty"`
Address string `json:"address,omitempty"`
Channel string `json:"channel,omitempty"`
Status string `json:"status,omitempty"`
Comment string `json:"comment,omitempty"`
Password string `json:"password,omitempty"`
SourceDescription string `json:"sourceDescription,omitempty"`
Demographics map[string]string `json:"-"`
}
func (*CreateRecipientRequest) MarshalJSON ¶
func (crr *CreateRecipientRequest) MarshalJSON() ([]byte, error)
type DeleteRecipientResponse ¶
type List ¶
type List struct {
ID int `json:"listId"`
Title string `json:"title"`
FriendlyTitle string `json:"friendlyTitle"`
Description string `json:"description"`
Populated bool `json:"populated"`
PublicSignup bool `json:"publicSignup"`
GlobalUnsub bool `json:"globalUnsub"`
Query string `json:"query"`
CategoryID int `json:"categoryId"`
BlockDomains string `json:"blockDomains"`
SeedListID int `json:"seedListId"`
CreateTime Time `json:"createTime"`
Creator string `json:"creator"`
ExternalID string `json:"externalID"`
Custom1 string `json:"custom1"`
Channel string `json:"channel"`
CountRecips bool `json:"countRecips"`
BrandIDs []int `json:"brandIds"`
ListCount int `json:"listCount"`
TestMessageList bool `json:"testMessageList"`
}
type PostUp ¶
type PostUp struct {
// contains filtered or unexported fields
}
func (*PostUp) DeleteRecipientByAddress ¶
func (*PostUp) GetListByExternalID ¶
func (*PostUp) GetListByListID ¶
func (*PostUp) GetListByTitle ¶
func (*PostUp) GetListsByBrandID ¶
func (*PostUp) GetRecipientByAddress ¶
func (*PostUp) GetRecipientByExternalID ¶
func (*PostUp) GetRecipientByRecipientID ¶
func (*PostUp) RecipientCreate ¶
func (*PostUp) RecipientUpdate ¶
func (*PostUp) SubscribeRecipientToList ¶
func (pu *PostUp) SubscribeRecipientToList(ctx context.Context, srr *SubscribeRecipientRequest) (*SubscribeRecipientResponse, error)
func (*PostUp) UnsubscribeRecipientFromList ¶
func (pu *PostUp) UnsubscribeRecipientFromList(ctx context.Context, urr *UnsubscribeRecipientRequest) (*UnsubscribeRecipientResponse, error)
type Recipient ¶
type Recipient struct {
ID int `json:"recipientId"`
ExternalID string `json:"externalId"`
ImportID int `json:"importId"`
Address string `json:"address"`
Channel string `json:"channel"`
Status string `json:"status"`
Comment string `json:"comment"`
Password string `json:"password"`
SourceDescription string `json:"sourceDescription"`
SourceSignupDate *Time `json:"sourceSignupDate,omitempty"`
SignupMethod string `json:"signupMethod"`
DateJoined *Time `json:"dateJoined,omitempty"`
Demographics map[string]string `json:"-"`
}
func (*Recipient) MarshalJSON ¶
func (*Recipient) UnmarshalJSON ¶
type SubscribeRecipientResponse ¶
type SubscribeRecipientResponse struct {
MailingID interface{} `json:"mailingId"`
RecipientID int `json:"recipientId"`
ListID int `json:"listId"`
Status SubscriptionStatus `json:"status"`
ListStatus string `json:"listStatus"`
GlobalStatus string `json:"globalStatus"`
DateUnsub *Time `json:"dateUnsub,omitempty"`
DateJoined *Time `json:"dateJoined,omitempty"`
SourceID string `json:"sourceId,omitempty"`
Confirmed bool `json:"confirmed"`
}
type SubscriptionStatus ¶
type SubscriptionStatus string
const SubscriptionStatusNormal SubscriptionStatus = "NORMAL"
const SubscriptionStatusUnsub SubscriptionStatus = "UNSUB"
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time is a time struct that can be unmarshalled from PostUps time encoding.
func (*Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type UnsubscribeRecipientResponse ¶
type UnsubscribeRecipientResponse struct {
MailingID interface{} `json:"mailingId"`
RecipientID int `json:"recipientId"`
ListID int `json:"listId"`
Status SubscriptionStatus `json:"status"`
ListStatus string `json:"listStatus"`
GlobalStatus string `json:"globalStatus"`
DateUnsub *Time `json:"dateUnsub,omitempty"`
DateJoined *Time `json:"dateJoined,omitempty"`
SourceID string `json:"sourceId,omitempty"`
Confirmed bool `json:"confirmed"`
}
type UpdateRecipientRequest ¶
type UpdateRecipientRequest struct {
Address string `json:"address"`
ExternalID string `json:"externalId"`
Channel string `json:"channel"`
Status string `json:"status"`
Comment string `json:"comment"`
Password string `json:"password"`
SourceDescription string `json:"sourceDescription"`
Demographics map[string]string `json:"-"`
}
func (*UpdateRecipientRequest) MarshalJSON ¶
func (urr *UpdateRecipientRequest) MarshalJSON() ([]byte, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.