Documentation
¶
Index ¶
- type AggregatedBy
- type ApiService
- func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, error)
- func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, error)
- func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{}, error)
- func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, error)
- func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, error)
- func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error)
- func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error)
- func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error)
- func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) (interface{}, error)
- func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, error)
- func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (interface{}, error)
- func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, error)
- func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemainingCreditParam) (interface{}, error)
- func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAccessParam) (interface{}, error)
- type CategoryStats
- type CategoryStatsStatsInner
- type CategoryStatsStatsInnerMetrics
- type CreateSubuserParam
- type CreateSubuserRequest
- type DeleteSubuserParam
- type ErrorResponse
- type ErrorResponseErrorsInner
- type GetSubuserCreditParam
- type ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetDate(Date string) *ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetLimit(Limit int32) *ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetOffset(Offset int32) *ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection1) *ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetSortByMetric(SortByMetric SortByMetric) *ListMonthlyStatParam
- func (params *ListMonthlyStatParam) SetSubuser(Subuser string) *ListMonthlyStatParam
- type ListReputation200ResponseInner
- type ListReputationParam
- type ListStatParam
- func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListStatParam
- func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam
- func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam
- func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam
- func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam
- func (params *ListStatParam) SetSubusers(Subusers string) *ListStatParam
- type ListStatSumParam
- func (params *ListStatSumParam) SetAggregatedBy(AggregatedBy string) *ListStatSumParam
- func (params *ListStatSumParam) SetEndDate(EndDate string) *ListStatSumParam
- func (params *ListStatSumParam) SetLimit(Limit int32) *ListStatSumParam
- func (params *ListStatSumParam) SetOffset(Offset int32) *ListStatSumParam
- func (params *ListStatSumParam) SetSortByDirection(SortByDirection SortByDirection2) *ListStatSumParam
- func (params *ListStatSumParam) SetSortByMetric(SortByMetric string) *ListStatSumParam
- func (params *ListStatSumParam) SetStartDate(StartDate string) *ListStatSumParam
- type ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetDate(Date string) *ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetLimit(Limit int32) *ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetOffset(Offset int32) *ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection) *ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetSortByMetric(SortByMetric string) *ListSubuserMonthlyStatParam
- func (params *ListSubuserMonthlyStatParam) SetSubuserName(SubuserName string) *ListSubuserMonthlyStatParam
- type ListSubuserParam
- func (params *ListSubuserParam) SetIncludeRegion(IncludeRegion bool) *ListSubuserParam
- func (params *ListSubuserParam) SetLimit(Limit int32) *ListSubuserParam
- func (params *ListSubuserParam) SetOffset(Offset int32) *ListSubuserParam
- func (params *ListSubuserParam) SetRegion(Region Region) *ListSubuserParam
- func (params *ListSubuserParam) SetUsername(Username string) *ListSubuserParam
- type Region
- type Region1
- type Region2
- type Region3
- type ResetFrequency
- type ResetFrequency1
- type SortByDirection
- type SortByDirection1
- type SortByDirection2
- type SortByMetric
- type Subuser
- type SubuserCredits
- type SubuserCreditsRequest
- type SubuserPost
- type SubuserPostCreditAllocation
- type SubuserStats
- type SubuserStatsStatsInner
- type SubuserStatsStatsInnerMetrics
- type Type
- type Type1
- type UpdateSubuserCreditParam
- type UpdateSubuserIp200Response
- type UpdateSubuserIpParam
- type UpdateSubuserParam
- type UpdateSubuserRemainingCreditParam
- func (params *UpdateSubuserRemainingCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserRemainingCreditParam
- func (params *UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest(UpdateSubuserRemainingCreditRequest UpdateSubuserRemainingCreditRequest) *UpdateSubuserRemainingCreditParam
- type UpdateSubuserRemainingCreditRequest
- type UpdateSubuserRequest
- type UpdateSubuserWebsiteAccessParam
- func (params *UpdateSubuserWebsiteAccessParam) SetSubuserName(SubuserName string) *UpdateSubuserWebsiteAccessParam
- func (params *UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest(UpdateSubuserWebsiteAccessRequest UpdateSubuserWebsiteAccessRequest) *UpdateSubuserWebsiteAccessParam
- type UpdateSubuserWebsiteAccessRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedBy ¶
type AggregatedBy string
AggregatedBy the model 'AggregatedBy'
const ( AGGREGATEDBY_DAY AggregatedBy = "day" AGGREGATEDBY_WEEK AggregatedBy = "week" AGGREGATEDBY_MONTH AggregatedBy = "month" )
List of AggregatedBy
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService
func (*ApiService) CreateSubuser ¶
func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, error)
**This endpoint allows you to create a new subuser.**
func (*ApiService) DeleteSubuser ¶
func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, error)
**This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved.
func (*ApiService) GetSubuserCredit ¶
func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{}, error)
**This endpoint allows you to retrieve a Credits overview for a Subuser.**
func (*ApiService) ListMonthlyStat ¶
func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, error)
**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.
func (*ApiService) ListReputation ¶
func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, error)
**This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating.
func (*ApiService) ListStat ¶
func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error)
**This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser.
func (*ApiService) ListStatSum ¶
func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error)
**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.**
func (*ApiService) ListSubuser ¶
func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error)
**This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.
func (*ApiService) ListSubuserMonthlyStat ¶
func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) (interface{}, error)
**This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.
func (*ApiService) UpdateSubuser ¶
func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, error)
**This endpoint allows you to enable or disable a subuser.**
func (*ApiService) UpdateSubuserCredit ¶
func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (interface{}, error)
**This endpoint allows you to update the Credits for a Subuser.**
func (*ApiService) UpdateSubuserIp ¶
func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, error)
**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/)
func (*ApiService) UpdateSubuserRemainingCredit ¶
func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemainingCreditParam) (interface{}, error)
**This endpoint allows you to update the remaining credits for a Subuser.**
func (*ApiService) UpdateSubuserWebsiteAccess ¶
func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAccessParam) (interface{}, error)
Enable/Disable website access for a Subuser, while still preserving email send functionality.
type CategoryStats ¶
type CategoryStats struct { // The date the statistics were gathered. Date string `json:"date"` Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` }
CategoryStats struct for CategoryStats
type CategoryStatsStatsInner ¶
type CategoryStatsStatsInner struct { Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` // The name of the category. Name *string `json:"name,omitempty"` // How you are segmenting your statistics. Type string `json:"type"` }
CategoryStatsStatsInner struct for CategoryStatsStatsInner
type CategoryStatsStatsInnerMetrics ¶
type CategoryStatsStatsInnerMetrics struct { // The number of emails that were not allowed to be delivered by ISPs. Blocks int32 `json:"blocks"` // The number of emails that were dropped because of a bounce. BounceDrops int32 `json:"bounce_drops"` // The number of emails that bounced instead of being delivered. Bounces int32 `json:"bounces"` // The number of links that were clicked. Clicks int32 `json:"clicks"` // The number of emails that temporarily could not be delivered. Deferred int32 `json:"deferred"` // The number of emails SendGrid was able to confirm were actually delivered to a recipient. Delivered int32 `json:"delivered"` // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. InvalidEmails int32 `json:"invalid_emails"` // The total number of times your emails were opened by recipients. Opens int32 `json:"opens"` // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. Processed int32 `json:"processed"` // The number of emails that were requested to be delivered. Requests int32 `json:"requests"` // The number of emails that were dropped due to a recipient previously marking your emails as spam. SpamReportDrops int32 `json:"spam_report_drops"` // The number of recipients who marked your email as spam. SpamReports int32 `json:"spam_reports"` // The number of unique recipients who clicked links in your emails. UniqueClicks int32 `json:"unique_clicks"` // The number of unique recipients who opened your emails. UniqueOpens int32 `json:"unique_opens"` // The number of emails dropped due to a recipient unsubscribing from your emails. UnsubscribeDrops int32 `json:"unsubscribe_drops"` // The number of recipients who unsubscribed from your emails. Unsubscribes int32 `json:"unsubscribes"` }
CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics
type CreateSubuserParam ¶
type CreateSubuserParam struct { // CreateSubuserRequest *CreateSubuserRequest `json:"CreateSubuserRequest,omitempty"` }
func (*CreateSubuserParam) SetCreateSubuserRequest ¶
func (params *CreateSubuserParam) SetCreateSubuserRequest(CreateSubuserRequest CreateSubuserRequest) *CreateSubuserParam
type CreateSubuserRequest ¶
type CreateSubuserRequest struct { // The username for this subuser. Username string `json:"username"` // The email address of the subuser. Email string `json:"email"` // The password this subuser will use when logging into SendGrid. Password string `json:"password"` // The IP addresses that should be assigned to this subuser. Ips []string `json:"ips"` // The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). Region *Region1 `json:"region,omitempty"` // A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) IncludeRegion *bool `json:"include_region,omitempty"` }
CreateSubuserRequest struct for CreateSubuserRequest
type DeleteSubuserParam ¶
type DeleteSubuserParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` }
func (*DeleteSubuserParam) SetSubuserName ¶
func (params *DeleteSubuserParam) SetSubuserName(SubuserName string) *DeleteSubuserParam
type ErrorResponse ¶
type ErrorResponse struct { Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` // When applicable, this property value will be an error ID. Id *string `json:"id,omitempty"` }
ErrorResponse struct for ErrorResponse
type ErrorResponseErrorsInner ¶
type ErrorResponseErrorsInner struct { // An error message. Message *string `json:"message,omitempty"` // When applicable, this property value will be the field that generated the error. Field *string `json:"field,omitempty"` // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. Help *map[string]interface{} `json:"help,omitempty"` }
ErrorResponseErrorsInner struct for ErrorResponseErrorsInner
type GetSubuserCreditParam ¶
type GetSubuserCreditParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` }
func (*GetSubuserCreditParam) SetSubuserName ¶
func (params *GetSubuserCreditParam) SetSubuserName(SubuserName string) *GetSubuserCreditParam
type ListMonthlyStatParam ¶
type ListMonthlyStatParam struct { // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD Date *string `json:"date"` // A substring search of your subusers. Subuser *string `json:"subuser,omitempty"` // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' SortByMetric *SortByMetric `json:"sort_by_metric,omitempty"` // The direction you want to sort. SortByDirection *SortByDirection1 `json:"sort_by_direction,omitempty"` // Optional field to limit the number of results returned. Limit *int32 `json:"limit,omitempty"` // Optional beginning point in the list to retrieve from. Offset *int32 `json:"offset,omitempty"` }
func (*ListMonthlyStatParam) SetDate ¶
func (params *ListMonthlyStatParam) SetDate(Date string) *ListMonthlyStatParam
func (*ListMonthlyStatParam) SetLimit ¶
func (params *ListMonthlyStatParam) SetLimit(Limit int32) *ListMonthlyStatParam
func (*ListMonthlyStatParam) SetOffset ¶
func (params *ListMonthlyStatParam) SetOffset(Offset int32) *ListMonthlyStatParam
func (*ListMonthlyStatParam) SetSortByDirection ¶
func (params *ListMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection1) *ListMonthlyStatParam
func (*ListMonthlyStatParam) SetSortByMetric ¶
func (params *ListMonthlyStatParam) SetSortByMetric(SortByMetric SortByMetric) *ListMonthlyStatParam
func (*ListMonthlyStatParam) SetSubuser ¶
func (params *ListMonthlyStatParam) SetSubuser(Subuser string) *ListMonthlyStatParam
type ListReputation200ResponseInner ¶
type ListReputation200ResponseInner struct { // The sender reputation this subuser has attained. Reputation float32 `json:"reputation"` // The subuser that has this reputation. Username string `json:"username"` }
ListReputation200ResponseInner struct for ListReputation200ResponseInner
type ListReputationParam ¶
type ListReputationParam struct { // Usernames *string `json:"usernames,omitempty"` }
func (*ListReputationParam) SetUsernames ¶
func (params *ListReputationParam) SetUsernames(Usernames string) *ListReputationParam
type ListStatParam ¶
type ListStatParam struct { // The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers. Subusers *string `json:"subusers"` // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. StartDate *string `json:"start_date"` // Limits the number of results returned per page. Limit *int32 `json:"limit,omitempty"` // The point in the list to begin retrieving results from. Offset *int32 `json:"offset,omitempty"` // How to group the statistics. Must be either \"day\", \"week\", or \"month\". AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` // The end date of the statistics to retrieve. Defaults to today. EndDate *string `json:"end_date,omitempty"` }
func (*ListStatParam) SetAggregatedBy ¶
func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListStatParam
func (*ListStatParam) SetEndDate ¶
func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam
func (*ListStatParam) SetLimit ¶
func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam
func (*ListStatParam) SetOffset ¶
func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam
func (*ListStatParam) SetStartDate ¶
func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam
func (*ListStatParam) SetSubusers ¶
func (params *ListStatParam) SetSubusers(Subusers string) *ListStatParam
type ListStatSumParam ¶
type ListStatSumParam struct { // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. StartDate *string `json:"start_date"` // The direction you want to sort. SortByDirection *SortByDirection2 `json:"sort_by_direction,omitempty"` // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. EndDate *string `json:"end_date,omitempty"` // Limits the number of results returned per page. Limit *int32 `json:"limit,omitempty"` // The point in the list to begin retrieving results from. Offset *int32 `json:"offset,omitempty"` // How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. AggregatedBy *string `json:"aggregated_by,omitempty"` // The metric that you want to sort by. Must be a single metric. SortByMetric *string `json:"sort_by_metric,omitempty"` }
func (*ListStatSumParam) SetAggregatedBy ¶
func (params *ListStatSumParam) SetAggregatedBy(AggregatedBy string) *ListStatSumParam
func (*ListStatSumParam) SetEndDate ¶
func (params *ListStatSumParam) SetEndDate(EndDate string) *ListStatSumParam
func (*ListStatSumParam) SetLimit ¶
func (params *ListStatSumParam) SetLimit(Limit int32) *ListStatSumParam
func (*ListStatSumParam) SetOffset ¶
func (params *ListStatSumParam) SetOffset(Offset int32) *ListStatSumParam
func (*ListStatSumParam) SetSortByDirection ¶
func (params *ListStatSumParam) SetSortByDirection(SortByDirection SortByDirection2) *ListStatSumParam
func (*ListStatSumParam) SetSortByMetric ¶
func (params *ListStatSumParam) SetSortByMetric(SortByMetric string) *ListStatSumParam
func (*ListStatSumParam) SetStartDate ¶
func (params *ListStatSumParam) SetStartDate(StartDate string) *ListStatSumParam
type ListSubuserMonthlyStatParam ¶
type ListSubuserMonthlyStatParam struct { // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD Date *string `json:"date"` // The username of the Subuser. SubuserName *string `json:"subuser_name"` // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' SortByMetric *string `json:"sort_by_metric,omitempty"` // The direction you want to sort. SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` // Optional field to limit the number of results returned. Limit *int32 `json:"limit,omitempty"` // Optional beginning point in the list to retrieve from. Offset *int32 `json:"offset,omitempty"` }
func (*ListSubuserMonthlyStatParam) SetDate ¶
func (params *ListSubuserMonthlyStatParam) SetDate(Date string) *ListSubuserMonthlyStatParam
func (*ListSubuserMonthlyStatParam) SetLimit ¶
func (params *ListSubuserMonthlyStatParam) SetLimit(Limit int32) *ListSubuserMonthlyStatParam
func (*ListSubuserMonthlyStatParam) SetOffset ¶
func (params *ListSubuserMonthlyStatParam) SetOffset(Offset int32) *ListSubuserMonthlyStatParam
func (*ListSubuserMonthlyStatParam) SetSortByDirection ¶
func (params *ListSubuserMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection) *ListSubuserMonthlyStatParam
func (*ListSubuserMonthlyStatParam) SetSortByMetric ¶
func (params *ListSubuserMonthlyStatParam) SetSortByMetric(SortByMetric string) *ListSubuserMonthlyStatParam
func (*ListSubuserMonthlyStatParam) SetSubuserName ¶
func (params *ListSubuserMonthlyStatParam) SetSubuserName(SubuserName string) *ListSubuserMonthlyStatParam
type ListSubuserParam ¶
type ListSubuserParam struct { // The username of this subuser. Username *string `json:"username,omitempty"` // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. Limit *int32 `json:"limit,omitempty"` // Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. Region *Region `json:"region,omitempty"` // Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. IncludeRegion *bool `json:"include_region,omitempty"` // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. Offset *int32 `json:"offset,omitempty"` }
func (*ListSubuserParam) SetIncludeRegion ¶
func (params *ListSubuserParam) SetIncludeRegion(IncludeRegion bool) *ListSubuserParam
func (*ListSubuserParam) SetLimit ¶
func (params *ListSubuserParam) SetLimit(Limit int32) *ListSubuserParam
func (*ListSubuserParam) SetOffset ¶
func (params *ListSubuserParam) SetOffset(Offset int32) *ListSubuserParam
func (*ListSubuserParam) SetRegion ¶
func (params *ListSubuserParam) SetRegion(Region Region) *ListSubuserParam
func (*ListSubuserParam) SetUsername ¶
func (params *ListSubuserParam) SetUsername(Username string) *ListSubuserParam
type ResetFrequency ¶
type ResetFrequency string
ResetFrequency the model 'ResetFrequency'
const ( RESETFREQUENCY_MONTHLY ResetFrequency = "monthly" RESETFREQUENCY_WEEKLY ResetFrequency = "weekly" RESETFREQUENCY_DAILY ResetFrequency = "daily" )
List of ResetFrequency
type ResetFrequency1 ¶
type ResetFrequency1 string
ResetFrequency1 the model 'ResetFrequency1'
const ( RESETFREQUENCY1_MONTHLY ResetFrequency1 = "monthly" RESETFREQUENCY1_WEEKLY ResetFrequency1 = "weekly" RESETFREQUENCY1_DAILY ResetFrequency1 = "daily" )
List of ResetFrequency1
type SortByDirection ¶
type SortByDirection string
SortByDirection the model 'SortByDirection'
const ( SORTBYDIRECTION_DESC SortByDirection = "desc" SORTBYDIRECTION_ASC SortByDirection = "asc" )
List of SortByDirection
type SortByDirection1 ¶
type SortByDirection1 string
SortByDirection1 the model 'SortByDirection1'
const ( SORTBYDIRECTION1_DESC SortByDirection1 = "desc" SORTBYDIRECTION1_ASC SortByDirection1 = "asc" )
List of SortByDirection1
type SortByDirection2 ¶
type SortByDirection2 string
SortByDirection2 the model 'SortByDirection2'
const ( SORTBYDIRECTION2_DESC SortByDirection2 = "desc" SORTBYDIRECTION2_ASC SortByDirection2 = "asc" )
List of SortByDirection2
type SortByMetric ¶
type SortByMetric string
SortByMetric the model 'SortByMetric'
const ( SORTBYMETRIC_BLOCKS SortByMetric = "blocks" SORTBYMETRIC_BOUNCES SortByMetric = "bounces" SORTBYMETRIC_CLICKS SortByMetric = "clicks" SORTBYMETRIC_DELIVERED SortByMetric = "delivered" SORTBYMETRIC_OPENS SortByMetric = "opens" SORTBYMETRIC_REQUESTS SortByMetric = "requests" SORTBYMETRIC_UNIQUE_CLICKS SortByMetric = "unique_clicks" SORTBYMETRIC_UNIQUE_OPENS SortByMetric = "unique_opens" SORTBYMETRIC_UNSUBSCRIBES SortByMetric = "unsubscribes" )
List of SortByMetric
type Subuser ¶
type Subuser struct { // Whether or not the user is enabled or disabled. Disabled bool `json:"disabled"` // The ID of this subuser. Id float32 `json:"id"` // The name by which this subuser will be referred. Username string `json:"username"` // The email address to contact this subuser. Email string `json:"email"` // The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. Region *Region2 `json:"region,omitempty"` }
Subuser struct for Subuser
type SubuserCredits ¶
type SubuserCredits struct { // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. Type Type `json:"type"` // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. ResetFrequency ResetFrequency `json:"reset_frequency"` // Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. Remain int32 `json:"remain"` // Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. Total int32 `json:"total"` // Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. Used int32 `json:"used"` }
SubuserCredits struct for SubuserCredits
type SubuserCreditsRequest ¶
type SubuserCreditsRequest struct { // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. Type Type1 `json:"type"` // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. ResetFrequency *ResetFrequency1 `json:"reset_frequency,omitempty"` // Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. Total *int32 `json:"total,omitempty"` }
SubuserCreditsRequest struct for SubuserCreditsRequest
type SubuserPost ¶
type SubuserPost struct { // The username of the subuser. Username string `json:"username"` // The user ID for this subuser. UserId float32 `json:"user_id"` // The email address for this subuser. Email string `json:"email"` CreditAllocation *SubuserPostCreditAllocation `json:"credit_allocation,omitempty"` // The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. Region *Region3 `json:"region,omitempty"` }
SubuserPost struct for SubuserPost
type SubuserPostCreditAllocation ¶
type SubuserPostCreditAllocation struct {
Type *string `json:"type,omitempty"`
}
SubuserPostCreditAllocation struct for SubuserPostCreditAllocation
type SubuserStats ¶
type SubuserStats struct { // The date the statistics were gathered. Date *string `json:"date,omitempty"` // The list of statistics. Stats *[]SubuserStatsStatsInner `json:"stats,omitempty"` }
SubuserStats struct for SubuserStats
type SubuserStatsStatsInner ¶
type SubuserStatsStatsInner struct { // The first name of the subuser. FirstName *string `json:"first_name,omitempty"` // The last name of the subuser. LastName *string `json:"last_name,omitempty"` Metrics *SubuserStatsStatsInnerMetrics `json:"metrics,omitempty"` // The username of the subuser. Name *string `json:"name,omitempty"` // The type of account. Type *string `json:"type,omitempty"` }
SubuserStatsStatsInner struct for SubuserStatsStatsInner
type SubuserStatsStatsInnerMetrics ¶
type SubuserStatsStatsInnerMetrics struct { // The number of emails that were not allowed to be delivered by ISPs. Blocks *int32 `json:"blocks,omitempty"` // The number of emails that were dropped because of a bounce. BounceDrops *int32 `json:"bounce_drops,omitempty"` // The number of emails that bounced instead of being delivered. Bounces *int32 `json:"bounces,omitempty"` // The number of links that were clicked in your emails. Clicks *int32 `json:"clicks,omitempty"` // The number of emails that temporarily could not be delivered. Deferred *int32 `json:"deferred,omitempty"` // The number of emails SendGrid was able to confirm were actually delivered to a recipient. Delivered *int32 `json:"delivered,omitempty"` // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. InvalidEmails *int32 `json:"invalid_emails,omitempty"` // The total number of times your emails were opened by recipients. Opens *int32 `json:"opens,omitempty"` // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. Processed *int32 `json:"processed,omitempty"` // The number of emails that were requested to be delivered. Requests *int32 `json:"requests,omitempty"` // The number of emails that were dropped due to a recipient previously marking your emails as spam. SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` // The number of recipients who marked your email as spam. SpamReports *int32 `json:"spam_reports,omitempty"` // The number of unique recipients who clicked links in your emails. UniqueClicks *int32 `json:"unique_clicks,omitempty"` // The number of unique recipients who opened your emails. UniqueOpens *int32 `json:"unique_opens,omitempty"` // The number of emails dropped due to a recipient unsubscribing from your emails. UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` // The number of recipients who unsubscribed from your emails. Unsubscribes *int32 `json:"unsubscribes,omitempty"` }
SubuserStatsStatsInnerMetrics struct for SubuserStatsStatsInnerMetrics
type UpdateSubuserCreditParam ¶
type UpdateSubuserCreditParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` // SubuserCreditsRequest *SubuserCreditsRequest `json:"SubuserCreditsRequest"` }
func (*UpdateSubuserCreditParam) SetSubuserCreditsRequest ¶
func (params *UpdateSubuserCreditParam) SetSubuserCreditsRequest(SubuserCreditsRequest SubuserCreditsRequest) *UpdateSubuserCreditParam
func (*UpdateSubuserCreditParam) SetSubuserName ¶
func (params *UpdateSubuserCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserCreditParam
type UpdateSubuserIp200Response ¶
type UpdateSubuserIp200Response struct { // The IP addresses that are assigned to the subuser. Ips *[]string `json:"ips,omitempty"` }
UpdateSubuserIp200Response struct for UpdateSubuserIp200Response
type UpdateSubuserIpParam ¶
type UpdateSubuserIpParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` // RequestBody *[]string `json:"request_body,omitempty"` }
func (*UpdateSubuserIpParam) SetRequestBody ¶
func (params *UpdateSubuserIpParam) SetRequestBody(RequestBody []string) *UpdateSubuserIpParam
func (*UpdateSubuserIpParam) SetSubuserName ¶
func (params *UpdateSubuserIpParam) SetSubuserName(SubuserName string) *UpdateSubuserIpParam
type UpdateSubuserParam ¶
type UpdateSubuserParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` // UpdateSubuserRequest *UpdateSubuserRequest `json:"UpdateSubuserRequest,omitempty"` }
func (*UpdateSubuserParam) SetSubuserName ¶
func (params *UpdateSubuserParam) SetSubuserName(SubuserName string) *UpdateSubuserParam
func (*UpdateSubuserParam) SetUpdateSubuserRequest ¶
func (params *UpdateSubuserParam) SetUpdateSubuserRequest(UpdateSubuserRequest UpdateSubuserRequest) *UpdateSubuserParam
type UpdateSubuserRemainingCreditParam ¶
type UpdateSubuserRemainingCreditParam struct { // The username of the Subuser. SubuserName *string `json:"subuser_name"` // UpdateSubuserRemainingCreditRequest *UpdateSubuserRemainingCreditRequest `json:"UpdateSubuserRemainingCreditRequest"` }
func (*UpdateSubuserRemainingCreditParam) SetSubuserName ¶
func (params *UpdateSubuserRemainingCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserRemainingCreditParam
func (*UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest ¶
func (params *UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest(UpdateSubuserRemainingCreditRequest UpdateSubuserRemainingCreditRequest) *UpdateSubuserRemainingCreditParam
type UpdateSubuserRemainingCreditRequest ¶
type UpdateSubuserRemainingCreditRequest struct { // The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. AllocationUpdate int32 `json:"allocation_update"` }
UpdateSubuserRemainingCreditRequest struct for UpdateSubuserRemainingCreditRequest
type UpdateSubuserRequest ¶
type UpdateSubuserRequest struct { // Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. Disabled *bool `json:"disabled,omitempty"` }
UpdateSubuserRequest struct for UpdateSubuserRequest
type UpdateSubuserWebsiteAccessParam ¶
type UpdateSubuserWebsiteAccessParam struct { // SubuserName *string `json:"subuser_name"` // UpdateSubuserWebsiteAccessRequest *UpdateSubuserWebsiteAccessRequest `json:"UpdateSubuserWebsiteAccessRequest,omitempty"` }
func (*UpdateSubuserWebsiteAccessParam) SetSubuserName ¶
func (params *UpdateSubuserWebsiteAccessParam) SetSubuserName(SubuserName string) *UpdateSubuserWebsiteAccessParam
func (*UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest ¶
func (params *UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest(UpdateSubuserWebsiteAccessRequest UpdateSubuserWebsiteAccessRequest) *UpdateSubuserWebsiteAccessParam
type UpdateSubuserWebsiteAccessRequest ¶
type UpdateSubuserWebsiteAccessRequest struct { // Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. Disabled *bool `json:"disabled,omitempty"` }
UpdateSubuserWebsiteAccessRequest struct for UpdateSubuserWebsiteAccessRequest
Source Files
¶
- api_create_subuser.go
- api_delete_subuser.go
- api_get_subuser_credit.go
- api_list_monthly_stat.go
- api_list_reputation.go
- api_list_stat.go
- api_list_stat_sum.go
- api_list_subuser.go
- api_list_subuser_monthly_stat.go
- api_service.go
- api_update_subuser.go
- api_update_subuser_credit.go
- api_update_subuser_ip.go
- api_update_subuser_remaining_credit.go
- api_update_subuser_website_access.go
- model_aggregated_by.go
- model_category_stats.go
- model_category_stats_stats_inner.go
- model_category_stats_stats_inner_metrics.go
- model_create_subuser_request.go
- model_error_response.go
- model_error_response_errors_inner.go
- model_list_reputation_200_response_inner.go
- model_region.go
- model_region1.go
- model_region2.go
- model_region3.go
- model_reset_frequency.go
- model_reset_frequency1.go
- model_sort_by_direction.go
- model_sort_by_direction1.go
- model_sort_by_direction2.go
- model_sort_by_metric.go
- model_subuser.go
- model_subuser_credits.go
- model_subuser_credits_request.go
- model_subuser_post.go
- model_subuser_post_credit_allocation.go
- model_subuser_stats.go
- model_subuser_stats_stats_inner.go
- model_subuser_stats_stats_inner_metrics.go
- model_type.go
- model_type1.go
- model_update_subuser_ip_200_response.go
- model_update_subuser_remaining_credit_request.go
- model_update_subuser_request.go
- model_update_subuser_website_access_request.go