Overview

Namespaces

  • None
  • PHP

Classes

  • Mandrill
  • Mandrill_Exports
  • Mandrill_Inbound
  • Mandrill_Internal
  • Mandrill_Ips
  • Mandrill_Messages
  • Mandrill_Metadata
  • Mandrill_Rejects
  • Mandrill_Senders
  • Mandrill_Subaccounts
  • Mandrill_Tags
  • Mandrill_Templates
  • Mandrill_Urls
  • Mandrill_Users
  • Mandrill_Webhooks
  • Mandrill_Whitelists

Exceptions

  • Mandrill_Error
  • Mandrill_HttpError
  • Mandrill_Invalid_CustomDNS
  • Mandrill_Invalid_CustomDNSPending
  • Mandrill_Invalid_DeleteDefaultPool
  • Mandrill_Invalid_DeleteNonEmptyPool
  • Mandrill_Invalid_EmptyDefaultPool
  • Mandrill_Invalid_Key
  • Mandrill_Invalid_Reject
  • Mandrill_Invalid_Tag_Name
  • Mandrill_Invalid_Template
  • Mandrill_IP_ProvisionLimit
  • Mandrill_Metadata_FieldLimit
  • Mandrill_NoSendingHistory
  • Mandrill_PaymentRequired
  • Mandrill_PoorReputation
  • Mandrill_ServiceUnavailable
  • Mandrill_Unknown_Export
  • Mandrill_Unknown_InboundDomain
  • Mandrill_Unknown_InboundRoute
  • Mandrill_Unknown_IP
  • Mandrill_Unknown_Message
  • Mandrill_Unknown_MetadataField
  • Mandrill_Unknown_Pool
  • Mandrill_Unknown_Sender
  • Mandrill_Unknown_Subaccount
  • Mandrill_Unknown_Template
  • Mandrill_Unknown_TrackingDomain
  • Mandrill_Unknown_Url
  • Mandrill_Unknown_Webhook
  • Mandrill_ValidationError
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: class Mandrill_Metadata {
 4:     public function __construct(Mandrill $master) {
 5:         $this->master = $master;
 6:     }
 7: 
 8:     /**
 9:      * Get the list of custom metadata fields indexed for the account.
10:      * @return array the custom metadata fields for the account
11:      *     - return[] struct the individual custom metadata field info
12:      *         - name string the unique identifier of the metadata field to update
13:      *         - state string the current state of the metadata field, one of "active", "delete", or "index"
14:      *         - view_template string Mustache template to control how the metadata is rendered in your activity log
15:      */
16:     public function getList() {
17:         $_params = array();
18:         return $this->master->call('metadata/list', $_params);
19:     }
20: 
21:     /**
22:      * Add a new custom metadata field to be indexed for the account.
23:      * @param string $name a unique identifier for the metadata field
24:      * @param string $view_template optional Mustache template to control how the metadata is rendered in your activity log
25:      * @return struct the information saved about the new metadata field
26:      *     - name string the unique identifier of the metadata field to update
27:      *     - state string the current state of the metadata field, one of "active", "delete", or "index"
28:      *     - view_template string Mustache template to control how the metadata is rendered in your activity log
29:      */
30:     public function add($name, $view_template=null) {
31:         $_params = array("name" => $name, "view_template" => $view_template);
32:         return $this->master->call('metadata/add', $_params);
33:     }
34: 
35:     /**
36:      * Update an existing custom metadata field.
37:      * @param string $name the unique identifier of the metadata field to update
38:      * @param string $view_template optional Mustache template to control how the metadata is rendered in your activity log
39:      * @return struct the information for the updated metadata field
40:      *     - name string the unique identifier of the metadata field to update
41:      *     - state string the current state of the metadata field, one of "active", "delete", or "index"
42:      *     - view_template string Mustache template to control how the metadata is rendered in your activity log
43:      */
44:     public function update($name, $view_template) {
45:         $_params = array("name" => $name, "view_template" => $view_template);
46:         return $this->master->call('metadata/update', $_params);
47:     }
48: 
49:     /**
50:      * Delete an existing custom metadata field. Deletion isn't instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete.
51:      * @param string $name the unique identifier of the metadata field to update
52:      * @return struct the information for the deleted metadata field
53:      *     - name string the unique identifier of the metadata field to update
54:      *     - state string the current state of the metadata field, one of "active", "delete", or "index"
55:      *     - view_template string Mustache template to control how the metadata is rendered in your activity log
56:      */
57:     public function delete($name) {
58:         $_params = array("name" => $name);
59:         return $this->master->call('metadata/delete', $_params);
60:     }
61: 
62: }
63: 
64: 
65: 
API documentation generated by ApiGen 2.8.0