internal

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillingDetails added in v0.0.2

type BillingDetails struct {
	// Monthly plans
	CurrentTier        string
	MonthlyScheme      string
	CurrentMonthlyRate float64
	MarkupPercentage   int64

	// Pay as you go
	CanPurchaseCredits     bool
	Credits                int64
	MarkupOnDesignSpamTest float64
	BaseRatePerRecipient   float64
	MarkupPerRecipient     float64
	MarkupOnDelivery       float64
	BaseDeliveryRate       float64
	BaseDesignSpamTestRate float64

	// Common
	ClientPays bool
	Currency   string
}

BillingDetails represents a raw billing details type.

func (*BillingDetails) ToClientBillingDetails added in v0.0.2

func (b *BillingDetails) ToClientBillingDetails(pending *BillingDetails) *clients.BillingDetails

ToClientBillingDetails converts the raw model to a new createsend model.

type Campaign added in v0.0.2

type Campaign struct {
	FromName          string
	FromEmail         string
	ReplyTo           string
	WebVersionURL     string
	WebVersionTextURL string
	CampaignID        string
	Subject           string
	Name              string
}

Campaign represents a raw Campaign.

type Client

type Client interface {
	Get(path string, result interface{}) error
	Post(path string, result, body interface{}) error
	Put(path string, result, body interface{}) error
	Delete(path string) error
}

Client represent a client with shortcut methods for HTTP verbs.

type DraftCampaign added in v0.0.2

type DraftCampaign struct {
	Campaign
	// DateCreated the timestamp when the Campaign was created.
	DateCreated string
}

DraftCampaign represents a raw draft campaign.

func (*DraftCampaign) ToDraftCampaign added in v0.0.2

func (c *DraftCampaign) ToDraftCampaign() (*clients.DraftCampaign, error)

ToDraftCampaign converts the raw model to a new createsend model.

type ScheduledCampaign added in v0.0.2

type ScheduledCampaign struct {
	Campaign
	// DateCreated the timestamp when the Campaign was created.
	DateCreated string
	// DateScheduled the timestamp when the Campaign will be sent.
	DateScheduled string
	// ScheduledTimeZone schedule timezone.
	ScheduledTimeZone string
}

ScheduledCampaign represents a raw scheduled campaign.

func (*ScheduledCampaign) ToScheduledCampaign added in v0.0.2

func (c *ScheduledCampaign) ToScheduledCampaign() (*clients.ScheduledCampaign, error)

ToScheduledCampaign converts the raw model to a new createsend model.

type SentCampaign added in v0.0.2

type SentCampaign struct {
	Campaign
	SentDate        string
	TotalRecipients int64
}

SentCampaign represent a raw sent campaign.

func (*SentCampaign) ToSendCampaign added in v0.0.2

func (c *SentCampaign) ToSendCampaign() (*clients.SentCampaign, error)

ToSendCampaign converts the raw model to a new createsend model.

type SubscriberList added in v0.0.2

type SubscriberList struct {
	// ListID list ID.
	ListID string
	// ListName list name.
	ListName string
	// SubscriberState subscriber status.
	SubscriberState string
	// DateSubscriberAdded date the subscriber was added to the list.
	DateSubscriberAdded string
}

SubscriberList represents a raw subscriber list.

func (*SubscriberList) ToSubscriberList added in v0.0.2

func (s *SubscriberList) ToSubscriberList() (*clients.SubscriberList, error)

ToSubscriberList converts the raw model to a new createsend model.

type SuppressionDetails added in v0.0.2

type SuppressionDetails struct {
	// SuppressionReason reason for suppression.
	SuppressionReason string
	// EmailAddress the suppressed email address.
	EmailAddress string
	// Date the date when the email address has been added to the suppression list.
	Date string
	// State the state of the suppressed email address.
	State string
}

SuppressionDetails represents a suppression list item.

type SuppressionList added in v0.0.2

type SuppressionList struct {
	// Entries the list of suppressed email addresses.
	Results []*SuppressionDetails
	// OrderedBy the field by which the result set was ordered (email/date).
	ResultsOrderedBy order.SuppressionListField
	// OrderDirection the order in which the results were sorted.
	OrderDirection order.Direction
	// PageNumber the current page number.
	PageNumber int
	// PageSize the page size.
	PageSize int
	// RecordsOnThisPage the number of records on this page.
	RecordsOnThisPage int
	// TotalNumberOfRecords the total number of records.
	TotalNumberOfRecords int
	// NumberOfPages the total number of pages.
	NumberOfPages int
}

SuppressionList represents client suppression list.

func (*SuppressionList) ToSuppressionList added in v0.0.2

func (s *SuppressionList) ToSuppressionList() (*clients.SuppressionList, error)

ToSuppressionList converts the raw model to a new createsend model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL