DeleteGlobalUnsubscribe

public class DeleteGlobalUnsubscribe : Request<[String : String]>

The DeleteGlobalUnsubscribe class represents the API call to delete from the invalid email list.

You can specify an email address (as a string), or you can use a GlobalUnsubscribe instance (useful for if you just retrieved some from the RetrieveGlobalUnsubscribes class).

do {
    let request = DeleteGlobalUnsubscribe(email: "foo@example.none")
    try Session.shared.send(request: request) { result in
        switch result {
        case .success(let response):
            print(response.statusCode)
        case .failure(let err):
            print(err)
        }
    }
} catch {
    print(error)
}
  • Initializes the request with an email address to delete from the global unsubscribe list.

    Declaration

    Swift

    public init(email: String)

    Parameters

    email

    An email address to delete from the global unsubscribe list.

  • Initializes the request with a global unsubscribe event that should be removed from the global unsubscribe list.

    Declaration

    Swift

    public convenience init(event: GlobalUnsubscribe)

    Parameters

    event

    A global unsubscribe event containing the email addresses to remove from the global unsubscribe \ list.