mail/Section.php

sendgrid-php · lib/mail/Section.php · php · MIT
email

Builds a key/value section for SendGrid /mail/send API calls.

// Source: https://github.com/sendgrid/sendgrid-php | License: MIT | Copyright 2023, Twilio SendGrid, Inc. <help@twilio.com>
// Provided via justclaw.it.com; keep this notice with the code.
<?php
/**
 * This helper builds the Section object for a /mail/send API call
 */

namespace SendGrid\Mail;

use SendGrid\Helper\Assert;

/**
 * This class is used to construct a Section object for the /mail/send API call
 *
 * An object of key/value pairs that define block sections of code to be used
 * as substitutions
 *
 * @package SendGrid\Mail
 */
class Section implements \JsonSerializable
{
    /** @var $key string Section key */
    private $key;
    /** @var $value string Section value */
    private $value;

    /**
     * Optional constructor
     *
     * @param string|null $key   Section key

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key