Structures

The following structures are available globally.

  • The Subuser struct represents a subuser on a parent account.

    See more

    Declaration

    Swift

    public struct Subuser : Codable
  • The Statistic struct represents the enclosing structure of statistics returning from the various stat API calls. It contains the date of the aggregated time period, along with the raw stats.

    See more

    Declaration

    Swift

    public struct Statistic : Codable
  • ASM

    The ASM class is used to specify an unsubscribe group to associate the email with.

    See more

    Declaration

    Swift

    public struct ASM : Encodable
  • The Address struct represents an email address and contains the email address along with an optional display name.

    See more

    Declaration

    Swift

    public struct Address : Encodable
  • The Content class represents a MIME part of the email message (i.e. the plain text and HTML parts of an email).

    See more

    Declaration

    Swift

    public struct Content : Encodable
  • This allows you to have a blind carbon copy automatically sent to the specified email address for every email that is sent.

    See more

    Declaration

    Swift

    public struct BCCSetting : Encodable
  • The BypassListManagement class allows you to bypass all unsubscribe groups and suppressions to ensure that the email is attempted to be delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. Ex: outage emails, or forgot password emails.

    See more

    Declaration

    Swift

    public struct BypassListManagement : Encodable
  • The Footer mail setting allows you to specify a footer that will be appended to the bottom of every email.

    See more

    Declaration

    Swift

    public struct Footer : Encodable
  • The MailSetting struct houses any mail settings an email should be configured with.

    See more

    Declaration

    Swift

    public struct MailSettings : Encodable
  • This allows you to send a test email to ensure that your request body is valid and formatted correctly. For more information, please see the SendGrid docs.

    See more

    Declaration

    Swift

    public struct SandboxMode : Encodable
  • The SpamChecker mail setting allows you to test the content of your email for spam.

    See more

    Declaration

    Swift

    public struct SpamChecker : Encodable
  • The ClickTracking class is used to adjust the click tracking setting.

    See more

    Declaration

    Swift

    public struct ClickTracking : Encodable
  • The GoogleAnalytics class is used to toggle the Google Analytics setting, which adds GA parameters to links in the email.

    See more

    Declaration

    Swift

    public struct GoogleAnalytics : Encodable
  • The OpenTracking class is used to toggle the open tracking setting for an email.

    See more

    Declaration

    Swift

    public struct OpenTracking : Encodable
  • The SubscriptionTracking class is used to modify the subscription tracking setting on an email.

    See more

    Declaration

    Swift

    public struct SubscriptionTracking : Encodable
  • The TrackingSettings struct houses any tracking settings an email should be configured with.

    See more

    Declaration

    Swift

    public struct TrackingSettings : Encodable
  • The SuppressionListDeleterParameters struct houses all the parameters that can be made for the suppression delete calls.

    See more

    Declaration

    Swift

    public struct SuppressionListDeleterParameters : Codable
  • The SuppressionListReaderParameters serves as the parameters used by the get suppressions API calls.

    See more

    Declaration

    Swift

    public struct SuppressionListReaderParameters : Codable
  • The Exception struct contains all the errors that the SendGrid-Swift library can throw.

    See more

    Declaration

    Swift

    public struct Exception
  • The Authentication struct is used to authenticate all the requests made by Session.

    See more

    Declaration

    Swift

    public struct Authentication : CustomStringConvertible
  • The Constants struct houses all the constant values used throughout the library.

    See more

    Declaration

    Swift

    public struct Constants
  • The ContentType struct represents the common types of Content Types used when sending through the SendGrid API.

    See more

    Declaration

    Swift

    public struct ContentType : CustomStringConvertible, Equatable
  • This struct houses both the date and data decoding strategies for a response.

    See more

    Declaration

    Swift

    public struct DecodingStrategy
  • This struct houses both the date and data encoding strategies for a request.

    See more

    Declaration

    Swift

    public struct EncodingStrategy
  • This struct is used to represent a page via the limit and offset parameters found in various API calls.

    See more

    Declaration

    Swift

    public struct Page : Equatable
  • The Pagination struct represents all the pagination info that can be returned via an API call, often containing a first, previous, next, and last page. This struct represents all those pages as Page instances.

    See more

    Declaration

    Swift

    public struct Pagination
  • The RateLimit struct abstracts any rate-limit information returned from an Response.

    See more

    Declaration

    Swift

    public struct RateLimit