Documentation ¶
Index ¶
- type ApiService
- func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error)
- func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error)
- func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error)
- func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error)
- func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error)
- func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error)
- func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error)
- func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error)
- func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error)
- type DeletePendingTeammateParam
- type DeleteTeammateParam
- type GetTeammate200Response
- type GetTeammateParam
- type InviteTeammate201Response
- type InviteTeammate400Response
- type InviteTeammate400ResponseErrorsInner
- type InviteTeammateParam
- type InviteTeammateRequest
- type ListPendingTeammate200Response
- type ListPendingTeammate200ResponseResultInner
- type ListPendingTeammateParam
- type ListSubuserByTemplate200Response
- type ListSubuserByTemplate200ResponseMetadata
- type ListSubuserByTemplate200ResponseMetadataNextParams
- type ListSubuserByTemplate200ResponseSubuserAccessInner
- type ListSubuserByTemplate400Response
- type ListSubuserByTemplate400ResponseErrorsInner
- type ListSubuserByTemplateParam
- func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam
- func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam
- func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam
- func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam
- type ListTeammate200Response
- type ListTeammate200ResponseResultInner
- type ListTeammateParam
- type PermissionType
- type ResendTeammateInvite200Response
- type ResendTeammateInviteParam
- type UpdateTeammate200Response
- type UpdateTeammateParam
- type UpdateTeammateRequest
- type UserType
- type UserType1
- type UserType2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) DeletePendingTeammate ¶
func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error)
**This endpoint allows you to delete a pending teammate invite.**
func (*ApiService) DeleteTeammate ¶
func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error)
**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.**
func (*ApiService) GetTeammate ¶
func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error)
**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint.
func (*ApiService) InviteTeammate ¶
func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error)
**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date.
func (*ApiService) ListPendingTeammate ¶
func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error)
**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date.
func (*ApiService) ListSubuserByTemplate ¶
func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error)
**This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned.
func (*ApiService) ListTeammate ¶
func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error)
**This endpoint allows you to retrieve a paginated list of all current Teammates.** 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) ResendTeammateInvite ¶
func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error)
**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date.
func (*ApiService) UpdateTeammate ¶
func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error)
**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.**
type DeletePendingTeammateParam ¶
type DeletePendingTeammateParam struct { // The token for the invite you want to delete. Token *string `json:"token"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*DeletePendingTeammateParam) SetOnbehalfof ¶
func (params *DeletePendingTeammateParam) SetOnbehalfof(Onbehalfof string) *DeletePendingTeammateParam
func (*DeletePendingTeammateParam) SetToken ¶
func (params *DeletePendingTeammateParam) SetToken(Token string) *DeletePendingTeammateParam
type DeleteTeammateParam ¶
type DeleteTeammateParam struct { // The username of the teammate that you want to retrieve. Username *string `json:"username"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*DeleteTeammateParam) SetOnbehalfof ¶
func (params *DeleteTeammateParam) SetOnbehalfof(Onbehalfof string) *DeleteTeammateParam
func (*DeleteTeammateParam) SetUsername ¶
func (params *DeleteTeammateParam) SetUsername(Username string) *DeleteTeammateParam
type GetTeammate200Response ¶
type GetTeammate200Response struct { // Teammate's username Username *string `json:"username,omitempty"` // Teammate's first name FirstName *string `json:"first_name,omitempty"` // Teammate's last name LastName *string `json:"last_name,omitempty"` // Teammate's email Email *string `json:"email,omitempty"` // Scopes associated to teammate Scopes *[]interface{} `json:"scopes,omitempty"` // Indicate the type of user: account owner, teammate admin user, or normal teammate UserType *UserType1 `json:"user_type,omitempty"` // Set to true if teammate has admin privileges IsAdmin *bool `json:"is_admin,omitempty"` // (optional) Teammate's phone number Phone *string `json:"phone,omitempty"` // (optional) Teammate's website Website *string `json:"website,omitempty"` // (optional) Teammate's address Address *string `json:"address,omitempty"` // (optional) Teammate's address Address2 *string `json:"address2,omitempty"` // (optional) Teammate's city City *string `json:"city,omitempty"` // (optional) Teammate's state State *string `json:"state,omitempty"` // (optional) Teammate's zip Zip *string `json:"zip,omitempty"` // (optional) Teammate's country Country *string `json:"country,omitempty"` }
GetTeammate200Response struct for GetTeammate200Response
type GetTeammateParam ¶
type GetTeammateParam struct { // The username of the teammate that you want to retrieve. Username *string `json:"username"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*GetTeammateParam) SetOnbehalfof ¶
func (params *GetTeammateParam) SetOnbehalfof(Onbehalfof string) *GetTeammateParam
func (*GetTeammateParam) SetUsername ¶
func (params *GetTeammateParam) SetUsername(Username string) *GetTeammateParam
type InviteTeammate201Response ¶
type InviteTeammate201Response struct { // Token to identify invite Token *string `json:"token,omitempty"` // Teammate's email address Email *string `json:"email,omitempty"` // Initial set of permissions to give to teammate if they accept the invite Scopes *[]interface{} `json:"scopes,omitempty"` // Set to true if teammate should have admin privileges IsAdmin *bool `json:"is_admin,omitempty"` }
InviteTeammate201Response struct for InviteTeammate201Response
type InviteTeammate400Response ¶
type InviteTeammate400Response struct {
Errors *[]InviteTeammate400ResponseErrorsInner `json:"errors,omitempty"`
}
InviteTeammate400Response struct for InviteTeammate400Response
type InviteTeammate400ResponseErrorsInner ¶
type InviteTeammate400ResponseErrorsInner struct { Message *string `json:"message,omitempty"` Field *string `json:"field,omitempty"` }
InviteTeammate400ResponseErrorsInner struct for InviteTeammate400ResponseErrorsInner
type InviteTeammateParam ¶
type InviteTeammateParam struct { // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` // InviteTeammateRequest *InviteTeammateRequest `json:"InviteTeammateRequest,omitempty"` }
func (*InviteTeammateParam) SetInviteTeammateRequest ¶
func (params *InviteTeammateParam) SetInviteTeammateRequest(InviteTeammateRequest InviteTeammateRequest) *InviteTeammateParam
func (*InviteTeammateParam) SetOnbehalfof ¶
func (params *InviteTeammateParam) SetOnbehalfof(Onbehalfof string) *InviteTeammateParam
type InviteTeammateRequest ¶
type InviteTeammateRequest struct { // New teammate's email Email string `json:"email"` // Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. Scopes []string `json:"scopes"` // Set to true if teammate should be an admin user IsAdmin bool `json:"is_admin"` }
InviteTeammateRequest struct for InviteTeammateRequest
type ListPendingTeammate200Response ¶
type ListPendingTeammate200Response struct {
Result *[]ListPendingTeammate200ResponseResultInner `json:"result,omitempty"`
}
ListPendingTeammate200Response struct for ListPendingTeammate200Response
type ListPendingTeammate200ResponseResultInner ¶
type ListPendingTeammate200ResponseResultInner struct { // Email address teammate invite will be sent to Email *string `json:"email,omitempty"` // List of permissions to give teammate if they accept Scopes *[]string `json:"scopes,omitempty"` // Set to true to indicate teammate should have the same set of permissions as parent user IsAdmin *bool `json:"is_admin,omitempty"` // Invitation token used to identify user Token *string `json:"token,omitempty"` // timestamp indicates when invite will expire. Expiration is 7 days after invite creation ExpirationDate *int32 `json:"expiration_date,omitempty"` }
ListPendingTeammate200ResponseResultInner struct for ListPendingTeammate200ResponseResultInner
type ListPendingTeammateParam ¶
type ListPendingTeammateParam struct { // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*ListPendingTeammateParam) SetOnbehalfof ¶
func (params *ListPendingTeammateParam) SetOnbehalfof(Onbehalfof string) *ListPendingTeammateParam
type ListSubuserByTemplate200Response ¶
type ListSubuserByTemplate200Response struct { // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. SubuserAccess *[]ListSubuserByTemplate200ResponseSubuserAccessInner `json:"subuser_access,omitempty"` Metadata *ListSubuserByTemplate200ResponseMetadata `json:"_metadata,omitempty"` }
ListSubuserByTemplate200Response struct for ListSubuserByTemplate200Response
type ListSubuserByTemplate200ResponseMetadata ¶
type ListSubuserByTemplate200ResponseMetadata struct {
NextParams *ListSubuserByTemplate200ResponseMetadataNextParams `json:"next_params,omitempty"`
}
ListSubuserByTemplate200ResponseMetadata This object contains response metadata. The presence of the `after_subuser_id` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_subuser_id` value to retrieve additional items with another request.
type ListSubuserByTemplate200ResponseMetadataNextParams ¶
type ListSubuserByTemplate200ResponseMetadataNextParams struct { // The limit specified in the `limit` query parameter to constrain the number of Subusers returned. Limit *int32 `json:"limit,omitempty"` // The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` // The username of a Subuser passed in the `name` query parameter to filter results by username. Username *string `json:"username,omitempty"` }
ListSubuserByTemplate200ResponseMetadataNextParams struct for ListSubuserByTemplate200ResponseMetadataNextParams
type ListSubuserByTemplate200ResponseSubuserAccessInner ¶
type ListSubuserByTemplate200ResponseSubuserAccessInner struct { // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). Id *int32 `json:"id,omitempty"` // The username of a Subuser to which the Teammate has access. Username *string `json:"username,omitempty"` // The email address of a Subuser to which the Teammate has access. Email *string `json:"email,omitempty"` // Indicates if the Subuser is active for the SendGrid account. Disabled *bool `json:"disabled,omitempty"` // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. PermissionType *PermissionType `json:"permission_type,omitempty"` // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. Scopes *[]string `json:"scopes,omitempty"` }
ListSubuserByTemplate200ResponseSubuserAccessInner An array of Subusers to which the Teammate has access.
type ListSubuserByTemplate400Response ¶
type ListSubuserByTemplate400Response struct {
Errors *[]ListSubuserByTemplate400ResponseErrorsInner `json:"errors,omitempty"`
}
ListSubuserByTemplate400Response An object containing an array of errors objects.
type ListSubuserByTemplate400ResponseErrorsInner ¶
type ListSubuserByTemplate400ResponseErrorsInner struct { // The message representing the error from the API. Message *string `json:"message,omitempty"` // The field associated with the error. Field *string `json:"field,omitempty"` }
ListSubuserByTemplate400ResponseErrorsInner struct for ListSubuserByTemplate400ResponseErrorsInner
type ListSubuserByTemplateParam ¶
type ListSubuserByTemplateParam struct { // The username of the Teammate for whom you want to retrieve Subuser access information. TeammateName *string `json:"teammate_name"` // The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` // Limit the number of Subusers to be returned. The default `limit` is `100` per request. Limit *int32 `json:"limit,omitempty"` // A Subuser's username that will be used to filter the returned result. Username *string `json:"username,omitempty"` }
func (*ListSubuserByTemplateParam) SetAfterSubuserId ¶
func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam
func (*ListSubuserByTemplateParam) SetLimit ¶
func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam
func (*ListSubuserByTemplateParam) SetTeammateName ¶
func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam
func (*ListSubuserByTemplateParam) SetUsername ¶
func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam
type ListTeammate200Response ¶
type ListTeammate200Response struct {
Result *[]ListTeammate200ResponseResultInner `json:"result,omitempty"`
}
ListTeammate200Response struct for ListTeammate200Response
type ListTeammate200ResponseResultInner ¶
type ListTeammate200ResponseResultInner struct { // Teammate's username Username *string `json:"username,omitempty"` // Teammate's email Email *string `json:"email,omitempty"` // Teammate's first name FirstName *string `json:"first_name,omitempty"` // Teammate's last name LastName *string `json:"last_name,omitempty"` // Indicate the type of user: owner user, teammate admin user, or normal teammate UserType *UserType `json:"user_type,omitempty"` // Set to true if teammate has admin privileges IsAdmin *bool `json:"is_admin,omitempty"` // (optional) Teammate's phone number Phone *string `json:"phone,omitempty"` // (optional) Teammate's website Website *string `json:"website,omitempty"` // (optional) Teammate's address Address *string `json:"address,omitempty"` // (optional) Teammate's address Address2 *string `json:"address2,omitempty"` // (optional) Teammate's city City *string `json:"city,omitempty"` // (optional) Teammate's state State *string `json:"state,omitempty"` // (optional) Teammate's zip Zip *string `json:"zip,omitempty"` // (optional) Teammate's country Country *string `json:"country,omitempty"` }
ListTeammate200ResponseResultInner struct for ListTeammate200ResponseResultInner
type ListTeammateParam ¶
type ListTeammateParam struct { // `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. The maximum page size for this endpoint is 500 items per page. Limit *int32 `json:"limit,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"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*ListTeammateParam) SetLimit ¶
func (params *ListTeammateParam) SetLimit(Limit int32) *ListTeammateParam
func (*ListTeammateParam) SetOffset ¶
func (params *ListTeammateParam) SetOffset(Offset int32) *ListTeammateParam
func (*ListTeammateParam) SetOnbehalfof ¶
func (params *ListTeammateParam) SetOnbehalfof(Onbehalfof string) *ListTeammateParam
type PermissionType ¶
type PermissionType string
PermissionType the model 'PermissionType'
const ( PERMISSIONTYPE_ADMIN PermissionType = "admin" PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" )
List of PermissionType
type ResendTeammateInvite200Response ¶
type ResendTeammateInvite200Response struct { // ID to identify invite Token *string `json:"token,omitempty"` // Teammate's email address Email *string `json:"email,omitempty"` // Initial set of permissions to give to teammate if they accept the invite Scopes *[]string `json:"scopes,omitempty"` // Set to true if teammate should have admin privileges IsAdmin *bool `json:"is_admin,omitempty"` }
ResendTeammateInvite200Response struct for ResendTeammateInvite200Response
type ResendTeammateInviteParam ¶
type ResendTeammateInviteParam struct { // The token for the invite that you want to resend. Token *string `json:"token"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` }
func (*ResendTeammateInviteParam) SetOnbehalfof ¶
func (params *ResendTeammateInviteParam) SetOnbehalfof(Onbehalfof string) *ResendTeammateInviteParam
func (*ResendTeammateInviteParam) SetToken ¶
func (params *ResendTeammateInviteParam) SetToken(Token string) *ResendTeammateInviteParam
type UpdateTeammate200Response ¶
type UpdateTeammate200Response struct { // Teammate's username Username *string `json:"username,omitempty"` // Teammate's first name FirstName *string `json:"first_name,omitempty"` // Teammate's last name LastName *string `json:"last_name,omitempty"` // Teammate's email address Email *string `json:"email,omitempty"` // Scopes given to teammate Scopes *[]string `json:"scopes,omitempty"` // Indicate the type of user: owner user, teammate admin user, or normal teammate UserType *UserType2 `json:"user_type,omitempty"` // Set to true if teammate has admin priveleges IsAdmin *bool `json:"is_admin,omitempty"` // (optional) Teammate's phone number Phone *string `json:"phone,omitempty"` // (optional) Teammate's website Website *string `json:"website,omitempty"` // (optional) Teammate's address Address *string `json:"address,omitempty"` // (optional) Teammate's address Address2 *string `json:"address2,omitempty"` // (optional) Teammate's city City *string `json:"city,omitempty"` // (optional) Teammate's state State *string `json:"state,omitempty"` // (optional) Teammate's zip Zip *string `json:"zip,omitempty"` // (optional) Teammate's country Country *string `json:"country,omitempty"` }
UpdateTeammate200Response struct for UpdateTeammate200Response
type UpdateTeammateParam ¶
type UpdateTeammateParam struct { // The username of the teammate that you want to retrieve. Username *string `json:"username"` // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. Onbehalfof *string `json:"on-behalf-of,omitempty"` // UpdateTeammateRequest *UpdateTeammateRequest `json:"UpdateTeammateRequest,omitempty"` }
func (*UpdateTeammateParam) SetOnbehalfof ¶
func (params *UpdateTeammateParam) SetOnbehalfof(Onbehalfof string) *UpdateTeammateParam
func (*UpdateTeammateParam) SetUpdateTeammateRequest ¶
func (params *UpdateTeammateParam) SetUpdateTeammateRequest(UpdateTeammateRequest UpdateTeammateRequest) *UpdateTeammateParam
func (*UpdateTeammateParam) SetUsername ¶
func (params *UpdateTeammateParam) SetUsername(Username string) *UpdateTeammateParam
type UpdateTeammateRequest ¶
type UpdateTeammateRequest struct { // Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. Scopes []string `json:"scopes"` // Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. IsAdmin bool `json:"is_admin"` }
UpdateTeammateRequest struct for UpdateTeammateRequest
Source Files ¶
- api_delete_pending_teammate.go
- api_delete_teammate.go
- api_get_teammate.go
- api_invite_teammate.go
- api_list_pending_teammate.go
- api_list_subuser_by_template.go
- api_list_teammate.go
- api_resend_teammate_invite.go
- api_service.go
- api_update_teammate.go
- model_get_teammate_200_response.go
- model_invite_teammate_201_response.go
- model_invite_teammate_400_response.go
- model_invite_teammate_400_response_errors_inner.go
- model_invite_teammate_request.go
- model_list_pending_teammate_200_response.go
- model_list_pending_teammate_200_response_result_inner.go
- model_list_subuser_by_template_200_response.go
- model_list_subuser_by_template_200_response__metadata.go
- model_list_subuser_by_template_200_response__metadata_next_params.go
- model_list_subuser_by_template_200_response_subuser_access_inner.go
- model_list_subuser_by_template_400_response.go
- model_list_subuser_by_template_400_response_errors_inner.go
- model_list_teammate_200_response.go
- model_list_teammate_200_response_result_inner.go
- model_permission_type.go
- model_resend_teammate_invite_200_response.go
- model_update_teammate_200_response.go
- model_update_teammate_request.go
- model_user_type.go
- model_user_type1.go
- model_user_type2.go