openapi

package
v4.0.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 4 Imported by: 0

README

Go API client for

The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Build date: 2025-02-11T10:49:32.403691Z[Etc/UTC]
  • Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./"

Documentation for API Endpoints

All URIs are relative to https://api.sendgrid.com

Class Method HTTP request Description
EraseRecipientEmailData EraseRecipientEmailData Post /v3/recipients/erasejob Erase recipients' email data

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

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) EraseRecipientEmailData

func (c *ApiService) EraseRecipientEmailData(params *EraseRecipientEmailDataParam) (interface{}, error)

**This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header.

type EraseRecipientEmailDataParam

type EraseRecipientEmailDataParam struct {
	//
	RecipientsDataErasureEraseRecipientsRequest *RecipientsDataErasureEraseRecipientsRequest `json:"RecipientsDataErasureEraseRecipientsRequest"`
	// 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 (*EraseRecipientEmailDataParam) SetOnbehalfof

func (params *EraseRecipientEmailDataParam) SetOnbehalfof(Onbehalfof string) *EraseRecipientEmailDataParam

func (*EraseRecipientEmailDataParam) SetRecipientsDataErasureEraseRecipientsRequest

func (params *EraseRecipientEmailDataParam) SetRecipientsDataErasureEraseRecipientsRequest(RecipientsDataErasureEraseRecipientsRequest RecipientsDataErasureEraseRecipientsRequest) *EraseRecipientEmailDataParam

type RecipientsDataErasureEraseRecipientsRequest

type RecipientsDataErasureEraseRecipientsRequest struct {
	// List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first.
	EmailAddresses []string `json:"email_addresses"`
}

RecipientsDataErasureEraseRecipientsRequest struct for RecipientsDataErasureEraseRecipientsRequest

type RecipientsDataErasureErrorV1

type RecipientsDataErasureErrorV1 struct {
	// The message representing the error from the API
	Message string `json:"message"`
	// The field associated with the error
	Field string `json:"field"`
}

RecipientsDataErasureErrorV1 struct for RecipientsDataErasureErrorV1

type RecipientsDataErasureJobId

type RecipientsDataErasureJobId struct {
	// The job ID associated with the data erasure request.
	JobId string `json:"job_id"`
}

RecipientsDataErasureJobId struct for RecipientsDataErasureJobId

Jump to

Keyboard shortcuts

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