summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-06-08 15:20:56 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-06-08 15:20:56 -0700
commit31456578078736ebd4383d00d6e6749b84faf04c (patch)
tree01ece6351be121a6cc71fdc0cce75dbade70a436
parentd99a837f6ba2545fa7138b66db890247a510e4c2 (diff)
downloadsendgrid-php-31456578078736ebd4383d00d6e6749b84faf04c.zip
sendgrid-php-31456578078736ebd4383d00d6e6749b84faf04c.tar.gz
sendgrid-php-31456578078736ebd4383d00d6e6749b84faf04c.tar.bz2
Updated /mail/helpers and formatting
-rw-r--r--USAGE.md216
-rw-r--r--examples/accesssettings/accesssettings.php36
-rw-r--r--examples/apikeys/apikeys.php36
-rw-r--r--examples/asm/asm.php80
-rw-r--r--examples/browsers/browsers.php6
-rw-r--r--examples/campaigns/campaigns.php66
-rw-r--r--examples/categories/categories.php18
-rw-r--r--examples/clients/clients.php12
-rw-r--r--examples/contactdb/contactdb.php190
-rw-r--r--examples/devices/devices.php6
-rw-r--r--examples/geo/geo.php6
-rw-r--r--examples/ips/ips.php86
-rw-r--r--examples/mail/mail.php19
-rw-r--r--examples/mailboxproviders/mailboxproviders.php6
-rw-r--r--examples/mailsettings/mailsettings.php114
-rw-r--r--examples/partnersettings/partnersettings.php18
-rw-r--r--examples/scopes/scopes.php6
-rw-r--r--examples/stats/stats.php6
-rw-r--r--examples/subusers/subusers.php84
-rw-r--r--examples/suppression/suppression.php102
-rw-r--r--examples/templates/templates.php68
-rw-r--r--examples/trackingsettings/trackingsettings.php54
-rw-r--r--examples/user/user.php126
-rw-r--r--examples/whitelabel/whitelabel.php164
24 files changed, 871 insertions, 654 deletions
diff --git a/USAGE.md b/USAGE.md
index c1a542b..9771e32 100644
--- a/USAGE.md
+++ b/USAGE.md
@@ -51,6 +51,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/activity
+
```php
$query_params = json_decode('{"limit": 1}');
$response = $sg->client->access_settings()->activity()->get(null, $query_params);
@@ -70,6 +71,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### POST /access_settings/whitelist
+
```php
$request_body = json_decode('{
"ips": [
@@ -99,6 +101,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/whitelist
+
```php
$response = $sg->client->access_settings()->whitelist()->get();
echo $response->statusCode();
@@ -117,6 +120,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### DELETE /access_settings/whitelist
+
```php
$response = $sg->client->access_settings()->whitelist()->delete($request_body);
echo $response->statusCode();
@@ -135,6 +139,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### GET /access_settings/whitelist/{rule_id}
+
```php
$rule_id = "test_url_param";
$response = $sg->client->access_settings()->whitelist()->_($rule_id)->get();
@@ -154,6 +159,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
### DELETE /access_settings/whitelist/{rule_id}
+
```php
$rule_id = "test_url_param";
$response = $sg->client->access_settings()->whitelist()->_($rule_id)->delete($request_body);
@@ -178,6 +184,7 @@ See the [API Key Permissions List](https://sendgrid.com/docs/API_Reference/Web_A
### POST /api_keys
+
```php
$request_body = json_decode('{
"name": "My API Key",
@@ -200,6 +207,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### GET /api_keys
+
```php
$response = $sg->client->api_keys()->get();
echo $response->statusCode();
@@ -218,6 +226,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### PUT /api_keys/{api_key_id}
+
```php
$request_body = json_decode('{
"name": "A New Hope",
@@ -248,6 +257,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### PATCH /api_keys/{api_key_id}
+
```php
$request_body = json_decode('{
"name": "A New Hope"
@@ -266,6 +276,7 @@ If the API Key ID does not exist an HTTP 404 will be returned.
### GET /api_keys/{api_key_id}
+
```php
$api_key_id = "test_url_param";
$response = $sg->client->api_keys()->_($api_key_id)->get();
@@ -289,6 +300,7 @@ The API Keys feature allows customers to be able to generate an API Key credenti
### DELETE /api_keys/{api_key_id}
+
```php
$api_key_id = "test_url_param";
$response = $sg->client->api_keys()->_($api_key_id)->delete($request_body);
@@ -311,6 +323,7 @@ Each user can create up to 25 different suppression groups.
### POST /asm/groups
+
```php
$request_body = json_decode('{
"description": "Suggestions for products our users might like.",
@@ -330,6 +343,7 @@ This endpoint will return information for each group ID that you include in your
### GET /asm/groups
+
```php
$query_params = json_decode('{"id": 1}');
$response = $sg->client->asm()->groups()->get(null, $query_params);
@@ -349,6 +363,7 @@ Each user can create up to 25 different suppression groups.
### PATCH /asm/groups/{group_id}
+
```php
$request_body = json_decode('{
"description": "Suggestions for items our users might like.",
@@ -373,6 +388,7 @@ Each user can create up to 25 different suppression groups.
### GET /asm/groups/{group_id}
+
```php
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->get();
@@ -394,6 +410,7 @@ Each user can create up to 25 different suppression groups.
### DELETE /asm/groups/{group_id}
+
```php
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->delete($request_body);
@@ -411,6 +428,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### POST /asm/groups/{group_id}/suppressions
+
```php
$request_body = json_decode('{
"recipient_emails": [
@@ -432,6 +450,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### GET /asm/groups/{group_id}/suppressions
+
```php
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->suppressions()->get();
@@ -447,6 +466,7 @@ Suppressions are recipient email addresses that are added to [unsubscribe groups
### DELETE /asm/groups/{group_id}/suppressions/{email}
+
```php
$group_id = "test_url_param";
$email = "test_url_param";
@@ -463,6 +483,7 @@ Suppressions are email addresses that can be added to [groups](https://sendgrid.
### GET /asm/suppressions
+
```php
$response = $sg->client->asm()->suppressions()->get();
echo $response->statusCode();
@@ -477,6 +498,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### POST /asm/suppressions/global
+
```php
$request_body = json_decode('{
"recipient_emails": [
@@ -499,6 +521,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### GET /asm/suppressions/global/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->global()->_($email)->get();
@@ -514,6 +537,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### DELETE /asm/suppressions/global/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->global()->_($email)->delete($request_body);
@@ -529,6 +553,7 @@ Suppressions are email addresses that can be added to [groups](https://sendgrid.
### GET /asm/suppressions/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->_($email)->get();
@@ -549,6 +574,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /browsers/stats
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "browsers": "test_string", "limit": "test_string", "offset": "test_string", "start_date": "2016-01-01"}');
$response = $sg->client->browsers()->stats()->get(null, $query_params);
@@ -573,6 +599,7 @@ For more information:
### POST /campaigns
+
```php
$request_body = json_decode('{
"categories": [
@@ -613,6 +640,7 @@ For more information:
### GET /campaigns
+
```php
$query_params = json_decode('{"limit": 0, "offset": 0}');
$response = $sg->client->campaigns()->get(null, $query_params);
@@ -630,6 +658,7 @@ For more information:
### PATCH /campaigns/{campaign_id}
+
```php
$request_body = json_decode('{
"categories": [
@@ -658,6 +687,7 @@ For more information:
### GET /campaigns/{campaign_id}
+
```php
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->get();
@@ -677,6 +707,7 @@ For more information:
### DELETE /campaigns/{campaign_id}
+
```php
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->delete($request_body);
@@ -694,6 +725,7 @@ For more information:
### PATCH /campaigns/{campaign_id}/schedules
+
```php
$request_body = json_decode('{
"send_at": 1489451436
@@ -714,6 +746,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules
+
```php
$request_body = json_decode('{
"send_at": 1489771528
@@ -734,6 +767,7 @@ For more information:
### GET /campaigns/{campaign_id}/schedules
+
```php
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->schedules()->get();
@@ -754,6 +788,7 @@ For more information:
### DELETE /campaigns/{campaign_id}/schedules
+
```php
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->schedules()->delete($request_body);
@@ -773,6 +808,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules/now
+
```php
$request_body = json_decode('null');
$campaign_id = "test_url_param";
@@ -793,6 +829,7 @@ For more information:
### POST /campaigns/{campaign_id}/schedules/test
+
```php
$request_body = json_decode('{
"to": "your.email@example.com"
@@ -814,6 +851,7 @@ Categories can help organize your email analytics by enabling you to tag emails
### GET /categories
+
```php
$query_params = json_decode('{"category": "test_string", "limit": 1, "offset": 1}');
$response = $sg->client->categories()->get(null, $query_params);
@@ -831,6 +869,7 @@ Categories allow you to group your emails together according to broad topics tha
### GET /categories/stats
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01", "categories": "test_string"}');
$response = $sg->client->categories()->stats()->get(null, $query_params);
@@ -848,6 +887,7 @@ Categories allow you to group your emails together according to broad topics tha
### GET /categories/stats/sums
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "start_date": "2016-01-01", "sort_by_direction": "asc"}');
$response = $sg->client->categories()->stats()->sums()->get(null, $query_params);
@@ -868,6 +908,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /clients/stats
+
```php
$query_params = json_decode('{"aggregated_by": "day", "start_date": "2016-01-01", "end_date": "2016-04-01"}');
$response = $sg->client->clients()->stats()->get(null, $query_params);
@@ -891,6 +932,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /clients/{client_type}/stats
+
```php
$query_params = json_decode('{"aggregated_by": "day", "start_date": "2016-01-01", "end_date": "2016-04-01"}');
$client_type = "test_url_param";
@@ -910,6 +952,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### POST /contactdb/custom_fields
+
```php
$request_body = json_decode('{
"name": "pet",
@@ -928,6 +971,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/custom_fields
+
```php
$response = $sg->client->contactdb()->custom_fields()->get();
echo $response->statusCode();
@@ -942,6 +986,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/custom_fields/{custom_field_id}
+
```php
$custom_field_id = "test_url_param";
$response = $sg->client->contactdb()->custom_fields()->_($custom_field_id)->get();
@@ -957,6 +1002,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### DELETE /contactdb/custom_fields/{custom_field_id}
+
```php
$custom_field_id = "test_url_param";
$response = $sg->client->contactdb()->custom_fields()->_($custom_field_id)->delete($request_body);
@@ -972,6 +1018,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists
+
```php
$request_body = json_decode('{
"name": "your list name"
@@ -989,6 +1036,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists
+
```php
$response = $sg->client->contactdb()->lists()->get();
echo $response->statusCode();
@@ -1003,6 +1051,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists
+
```php
$response = $sg->client->contactdb()->lists()->delete($request_body);
echo $response->statusCode();
@@ -1018,6 +1067,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### PATCH /contactdb/lists/{list_id}
+
```php
$request_body = json_decode('{
"name": "newlistname"
@@ -1037,6 +1087,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists/{list_id}
+
```php
$query_params = json_decode('{"list_id": 0}');
$list_id = "test_url_param";
@@ -1053,6 +1104,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists/{list_id}
+
```php
$query_params = json_decode('{"delete_contacts": "true"}');
$list_id = "test_url_param";
@@ -1071,6 +1123,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists/{list_id}/recipients
+
```php
$request_body = json_decode('[
"recipient_id1",
@@ -1090,6 +1143,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/lists/{list_id}/recipients
+
```php
$query_params = json_decode('{"page": 1, "page_size": 1, "list_id": 0}');
$list_id = "test_url_param";
@@ -1106,6 +1160,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/lists/{list_id}/recipients/{recipient_id}
+
```php
$request_body = json_decode('null');
$list_id = "test_url_param";
@@ -1123,6 +1178,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/lists/{list_id}/recipients/{recipient_id}
+
```php
$query_params = json_decode('{"recipient_id": 0, "list_id": 0}');
$list_id = "test_url_param";
@@ -1144,6 +1200,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### PATCH /contactdb/recipients
+
```php
$request_body = json_decode('[
{
@@ -1167,6 +1224,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### POST /contactdb/recipients
+
```php
$request_body = json_decode('[
{
@@ -1198,6 +1256,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients
+
```php
$query_params = json_decode('{"page": 1, "page_size": 1}');
$response = $sg->client->contactdb()->recipients()->get(null, $query_params);
@@ -1215,6 +1274,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### DELETE /contactdb/recipients
+
```php
$response = $sg->client->contactdb()->recipients()->delete($request_body);
echo $response->statusCode();
@@ -1231,6 +1291,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/billable_count
+
```php
$response = $sg->client->contactdb()->recipients()->billable_count()->get();
echo $response->statusCode();
@@ -1245,6 +1306,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/recipients/count
+
```php
$response = $sg->client->contactdb()->recipients()->count()->get();
echo $response->statusCode();
@@ -1268,6 +1330,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/recipients/search
+
```php
$query_params = json_decode('{"{field_name}": "test_string"}');
$response = $sg->client->contactdb()->recipients()->search()->get(null, $query_params);
@@ -1283,6 +1346,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/{recipient_id}
+
```php
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->get();
@@ -1298,6 +1362,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### DELETE /contactdb/recipients/{recipient_id}
+
```php
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->delete($request_body);
@@ -1315,6 +1380,7 @@ The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.co
### GET /contactdb/recipients/{recipient_id}/lists
+
```php
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->lists()->get();
@@ -1330,6 +1396,7 @@ The contactdb is a database of your contacts for [SendGrid Marketing Campaigns](
### GET /contactdb/reserved_fields
+
```php
$response = $sg->client->contactdb()->reserved_fields()->get();
echo $response->statusCode();
@@ -1364,6 +1431,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### POST /contactdb/segments
+
```php
$request_body = json_decode('{
"conditions": [
@@ -1404,6 +1472,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments
+
```php
$response = $sg->client->contactdb()->segments()->get();
echo $response->statusCode();
@@ -1420,6 +1489,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### PATCH /contactdb/segments/{segment_id}
+
```php
$request_body = json_decode('{
"conditions": [
@@ -1450,6 +1520,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments/{segment_id}
+
```php
$query_params = json_decode('{"segment_id": 0}');
$segment_id = "test_url_param";
@@ -1470,6 +1541,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### DELETE /contactdb/segments/{segment_id}
+
```php
$query_params = json_decode('{"delete_contacts": "true"}');
$segment_id = "test_url_param";
@@ -1488,6 +1560,7 @@ For more information about segments in Marketing Campaigns, please see our [User
### GET /contactdb/segments/{segment_id}/recipients
+
```php
$query_params = json_decode('{"page": 1, "page_size": 1}');
$segment_id = "test_url_param";
@@ -1518,6 +1591,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /devices/stats
+
```php
$query_params = json_decode('{"aggregated_by": "day", "limit": 1, "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": 1}');
$response = $sg->client->devices()->stats()->get(null, $query_params);
@@ -1538,6 +1612,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /geo/stats
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "country": "US", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01"}');
$response = $sg->client->geo()->stats()->get(null, $query_params);
@@ -1558,6 +1633,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips
+
```php
$query_params = json_decode('{"subuser": "test_string", "ip": "test_string", "limit": 1, "exclude_whitelabels": "true", "offset": 1}');
$response = $sg->client->ips()->get(null, $query_params);
@@ -1573,6 +1649,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips/assigned
+
```php
$response = $sg->client->ips()->assigned()->get();
echo $response->statusCode();
@@ -1593,6 +1670,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### POST /ips/pools
+
```php
$request_body = json_decode('{
"name": "marketing"
@@ -1614,6 +1692,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### GET /ips/pools
+
```php
$response = $sg->client->ips()->pools()->get();
echo $response->statusCode();
@@ -1632,6 +1711,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### PUT /ips/pools/{pool_name}
+
```php
$request_body = json_decode('{
"name": "new_pool_name"
@@ -1654,6 +1734,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### GET /ips/pools/{pool_name}
+
```php
$pool_name = "test_url_param";
$response = $sg->client->ips()->pools()->_($pool_name)->get();
@@ -1673,6 +1754,7 @@ If an IP pool is NOT specified for an email, it will use any IP available, inclu
### DELETE /ips/pools/{pool_name}
+
```php
$pool_name = "test_url_param";
$response = $sg->client->ips()->pools()->_($pool_name)->delete($request_body);
@@ -1690,6 +1772,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### POST /ips/pools/{pool_name}/ips
+
```php
$request_body = json_decode('{
"ip": "0.0.0.0"
@@ -1710,6 +1793,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### DELETE /ips/pools/{pool_name}/ips/{ip}
+
```php
$pool_name = "test_url_param";
$ip = "test_url_param";
@@ -1728,6 +1812,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### POST /ips/warmup
+
```php
$request_body = json_decode('{
"ip": "0.0.0.0"
@@ -1747,6 +1832,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### GET /ips/warmup
+
```php
$response = $sg->client->ips()->warmup()->get();
echo $response->statusCode();
@@ -1763,6 +1849,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### GET /ips/warmup/{ip_address}
+
```php
$ip_address = "test_url_param";
$response = $sg->client->ips()->warmup()->_($ip_address)->get();
@@ -1780,6 +1867,7 @@ For more general information about warming up IPs, please see our [Classroom](ht
### DELETE /ips/warmup/{ip_address}
+
```php
$ip_address = "test_url_param";
$response = $sg->client->ips()->warmup()->_($ip_address)->delete($request_body);
@@ -1797,6 +1885,7 @@ A single IP address or a range of IP addresses may be dedicated to an account in
### GET /ips/{ip_address}
+
```php
$ip_address = "test_url_param";
$response = $sg->client->ips()->_($ip_address)->get();
@@ -1819,6 +1908,7 @@ More Information:
### POST /mail/batch
+
```php
$request_body = json_decode('null');
$response = $sg->client->mail()->batch()->post($request_body);
@@ -1838,6 +1928,7 @@ More Information:
### GET /mail/batch/{batch_id}
+
```php
$batch_id = "test_url_param";
$response = $sg->client->mail()->batch()->_($batch_id)->get();
@@ -1858,6 +1949,8 @@ For more detailed information about how to use the v3 Mail Send endpoint, please
### POST /mail/send/beta
+This endpoint has a helper, check it out [here](https://github.com/sendgrid/sendgrid-php/blob/v3beta/lib/helpers/mail/README.md).
+
```php
$request_body = json_decode('{
"asm": {
@@ -2018,6 +2111,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings
+
```php
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->mail_settings()->get(null, $query_params);
@@ -2035,6 +2129,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/address_whitelist
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -2058,6 +2153,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/address_whitelist
+
```php
$response = $sg->client->mail_settings()->address_whitelist()->get();
echo $response->statusCode();
@@ -2074,6 +2170,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/bcc
+
```php
$request_body = json_decode('{
"email": "email@example.com",
@@ -2094,6 +2191,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/bcc
+
```php
$response = $sg->client->mail_settings()->bcc()->get();
echo $response->statusCode();
@@ -2110,6 +2208,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/bounce_purge
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -2131,6 +2230,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/bounce_purge
+
```php
$response = $sg->client->mail_settings()->bounce_purge()->get();
echo $response->statusCode();
@@ -2147,6 +2247,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/footer
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -2168,6 +2269,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/footer
+
```php
$response = $sg->client->mail_settings()->footer()->get();
echo $response->statusCode();
@@ -2184,6 +2286,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/forward_bounce
+
```php
$request_body = json_decode('{
"email": "example@example.com",
@@ -2204,6 +2307,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/forward_bounce
+
```php
$response = $sg->client->mail_settings()->forward_bounce()->get();
echo $response->statusCode();
@@ -2220,6 +2324,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/forward_spam
+
```php
$request_body = json_decode('{
"email": "",
@@ -2240,6 +2345,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/forward_spam
+
```php
$response = $sg->client->mail_settings()->forward_spam()->get();
echo $response->statusCode();
@@ -2256,6 +2362,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/plain_content
+
```php
$request_body = json_decode('{
"enabled": false
@@ -2275,6 +2382,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/plain_content
+
```php
$response = $sg->client->mail_settings()->plain_content()->get();
echo $response->statusCode();
@@ -2291,6 +2399,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/spam_check
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -2312,6 +2421,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/spam_check
+
```php
$response = $sg->client->mail_settings()->spam_check()->get();
echo $response->statusCode();
@@ -2330,6 +2440,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### PATCH /mail_settings/template
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -2352,6 +2463,7 @@ Mail settings allow you to tell SendGrid specific things to do to every email th
### GET /mail_settings/template
+
```php
$response = $sg->client->mail_settings()->template()->get();
echo $response->statusCode();
@@ -2371,6 +2483,7 @@ Advanced Stats provide a more in-depth view of your email statistics and the act
### GET /mailbox_providers/stats
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "mailbox_providers": "test_string", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01"}');
$response = $sg->client->mailbox_providers()->stats()->get(null, $query_params);
@@ -2389,6 +2502,7 @@ Our partner settings allow you to integrate your SendGrid account with our partn
### GET /partner_settings
+
```php
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->partner_settings()->get(null, $query_params);
@@ -2406,6 +2520,7 @@ By integrating with New Relic, you can send your SendGrid email statistics to yo
### PATCH /partner_settings/new_relic
+
```php
$request_body = json_decode('{
"enable_subuser_statistics": true,
@@ -2427,6 +2542,7 @@ By integrating with New Relic, you can send your SendGrid email statistics to yo
### GET /partner_settings/new_relic
+
```php
$response = $sg->client->partner_settings()->new_relic()->get();
echo $response->statusCode();
@@ -2444,6 +2560,7 @@ API Keys can be used to authenticate the use of [SendGrids v3 Web API](https://s
### GET /scopes
+
```php
$response = $sg->client->scopes()->get();
echo $response->statusCode();
@@ -2461,6 +2578,7 @@ Parent accounts will see aggregated stats for their account and all subuser acco
### GET /stats
+
```php
$query_params = json_decode('{"aggregated_by": "day", "limit": 1, "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": 1}');
$response = $sg->client->stats()->get(null, $query_params);
@@ -2482,6 +2600,7 @@ For more information about Subusers:
### POST /subusers
+
```php
$request_body = json_decode('{
"email": "John@example.com",
@@ -2508,6 +2627,7 @@ For more information about Subusers:
### GET /subusers
+
```php
$query_params = json_decode('{"username": "test_string", "limit": 0, "offset": 0}');
$response = $sg->client->subusers()->get(null, $query_params);
@@ -2523,6 +2643,7 @@ This endpoint allows you to request the reputations for your subusers.
### GET /subusers/reputations
+
```php
$query_params = json_decode('{"usernames": "test_string"}');
$response = $sg->client->subusers()->reputations()->get(null, $query_params);
@@ -2542,6 +2663,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01", "subusers": "test_string"}');
$response = $sg->client->subusers()->stats()->get(null, $query_params);
@@ -2562,6 +2684,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats/monthly
+
```php
$query_params = json_decode('{"subuser": "test_string", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "date": "test_string", "sort_by_direction": "asc"}');
$response = $sg->client->subusers()->stats()->monthly()->get(null, $query_params);
@@ -2580,6 +2703,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/stats/sums
+
```php
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "start_date": "2016-01-01", "sort_by_direction": "asc"}');
$response = $sg->client->subusers()->stats()->sums()->get(null, $query_params);
@@ -2598,6 +2722,7 @@ For more information about Subusers:
### PATCH /subusers/{subuser_name}
+
```php
$request_body = json_decode('{
"disabled": false
@@ -2619,6 +2744,7 @@ For more information about Subusers:
### DELETE /subusers/{subuser_name}
+
```php
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->delete($request_body);
@@ -2637,6 +2763,7 @@ More information:
### PUT /subusers/{subuser_name}/ips
+
```php
$request_body = json_decode('[
"127.0.0.1"
@@ -2653,6 +2780,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### PUT /subusers/{subuser_name}/monitor
+
```php
$request_body = json_decode('{
"email": "example@example.com",
@@ -2670,6 +2798,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### POST /subusers/{subuser_name}/monitor
+
```php
$request_body = json_decode('{
"email": "example@example.com",
@@ -2687,6 +2816,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### GET /subusers/{subuser_name}/monitor
+
```php
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->monitor()->get();
@@ -2700,6 +2830,7 @@ Subuser monitor settings allow you to receive a sample of an outgoing message by
### DELETE /subusers/{subuser_name}/monitor
+
```php
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->monitor()->delete($request_body);
@@ -2720,6 +2851,7 @@ For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/
### GET /subusers/{subuser_name}/stats/monthly
+
```php
$query_params = json_decode('{"date": "test_string", "sort_by_direction": "asc", "limit": 0, "sort_by_metric": "test_string", "offset": 1}');
$subuser_name = "test_url_param";
@@ -2741,6 +2873,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/blocks
+
```php
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->blocks()->get(null, $query_params);
@@ -2763,6 +2896,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/blocks
+
```php
$response = $sg->client->suppression()->blocks()->delete($request_body);
echo $response->statusCode();
@@ -2779,6 +2913,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/blocks/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->blocks()->_($email)->get();
@@ -2796,6 +2931,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/blocks/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->blocks()->_($email)->delete($request_body);
@@ -2816,6 +2952,7 @@ For more information see:
### GET /suppression/bounces
+
```php
$query_params = json_decode('{"start_time": 0, "end_time": 0}');
$response = $sg->client->suppression()->bounces()->get(null, $query_params);
@@ -2839,6 +2976,7 @@ Note: the `delete_all` and `emails` parameters should be used independently of e
### DELETE /suppression/bounces
+
```php
$response = $sg->client->suppression()->bounces()->delete($request_body);
echo $response->statusCode();
@@ -2859,6 +2997,7 @@ For more information see:
### GET /suppression/bounces/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->bounces()->_($email)->get();
@@ -2880,6 +3019,7 @@ For more information see:
### DELETE /suppression/bounces/{email}
+
```php
$query_params = json_decode('{"email_address": "example@example.com"}');
$email = "test_url_param";
@@ -2900,6 +3040,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/invalid_emails
+
```php
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->invalid_emails()->get(null, $query_params);
@@ -2924,6 +3065,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/invalid_emails
+
```php
$response = $sg->client->suppression()->invalid_emails()->delete($request_body);
echo $response->statusCode();
@@ -2942,6 +3084,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/invalid_emails/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->invalid_emails()->_($email)->get();
@@ -2961,6 +3104,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/invalid_emails/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->invalid_emails()->_($email)->delete($request_body);
@@ -2978,6 +3122,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/spam_report/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->spam_report()->_($email)->get();
@@ -2995,6 +3140,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/spam_report/{email}
+
```php
$email = "test_url_param";
$response = $sg->client->suppression()->spam_report()->_($email)->delete($request_body);
@@ -3012,6 +3158,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### GET /suppression/spam_reports
+
```php
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->spam_reports()->get(null, $query_params);
@@ -3034,6 +3181,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/User
### DELETE /suppression/spam_reports
+
```php
$response = $sg->client->suppression()->spam_reports()->delete($request_body);
echo $response->statusCode();
@@ -3048,6 +3196,7 @@ A global suppression (or global unsubscribe) is an email address of a recipient
### GET /suppression/unsubscribes
+
```php
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->unsubscribes()->get(null, $query_params);
@@ -3068,6 +3217,7 @@ Transactional templates are templates created specifically for transactional ema
### POST /templates
+
```php
$request_body = json_decode('{
"name": "example_name"
@@ -3087,6 +3237,7 @@ Transactional templates are templates created specifically for transactional ema
### GET /templates
+
```php
$response = $sg->client->templates()->get();
echo $response->statusCode();
@@ -3104,6 +3255,7 @@ Transactional templates are templates created specifically for transactional ema
### PATCH /templates/{template_id}
+
```php
$request_body = json_decode('{
"name": "new_example_name"
@@ -3125,6 +3277,7 @@ Transactional templates are templates created specifically for transactional ema
### GET /templates/{template_id}
+
```php
$template_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->get();
@@ -3143,6 +3296,7 @@ Transactional templates are templates created specifically for transactional ema
### DELETE /templates/{template_id}
+
```php
$template_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->delete($request_body);
@@ -3161,6 +3315,7 @@ For more information about transactional templates, please see our [User Guide](
### POST /templates/{template_id}/versions
+
```php
$request_body = json_decode('{
"active": 1,
@@ -3192,6 +3347,7 @@ For more information about transactional templates, please see our [User Guide](
### PATCH /templates/{template_id}/versions/{version_id}
+
```php
$request_body = json_decode('{
"active": 1,
@@ -3223,6 +3379,7 @@ For more information about transactional templates, please see our [User Guide](
### GET /templates/{template_id}/versions/{version_id}
+
```php
$template_id = "test_url_param";
$version_id = "test_url_param";
@@ -3247,6 +3404,7 @@ For more information about transactional templates, please see our [User Guide](
### DELETE /templates/{template_id}/versions/{version_id}
+
```php
$template_id = "test_url_param";
$version_id = "test_url_param";
@@ -3272,6 +3430,7 @@ For more information about transactional templates, please see our [User Guide](
### POST /templates/{template_id}/versions/{version_id}/activate
+
```php
$request_body = json_decode('null');
$template_id = "test_url_param";
@@ -3294,6 +3453,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings
+
```php
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->tracking_settings()->get(null, $query_params);
@@ -3311,6 +3471,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/click
+
```php
$request_body = json_decode('{
"enabled": true
@@ -3330,6 +3491,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/click
+
```php
$response = $sg->client->tracking_settings()->click()->get();
echo $response->statusCode();
@@ -3350,6 +3512,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/google_analytics
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -3378,6 +3541,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/google_analytics
+
```php
$response = $sg->client->tracking_settings()->google_analytics()->get();
echo $response->statusCode();
@@ -3396,6 +3560,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/open
+
```php
$request_body = json_decode('{
"enabled": true
@@ -3417,6 +3582,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/open
+
```php
$response = $sg->client->tracking_settings()->open()->get();
echo $response->statusCode();
@@ -3435,6 +3601,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### PATCH /tracking_settings/subscription
+
```php
$request_body = json_decode('{
"enabled": true,
@@ -3461,6 +3628,7 @@ For more information about tracking, please see our [User Guide](https://sendgri
### GET /tracking_settings/subscription
+
```php
$response = $sg->client->tracking_settings()->subscription()->get();
echo $response->statusCode();
@@ -3484,6 +3652,7 @@ For more information about your user profile:
### GET /user/account
+
```php
$response = $sg->client->user()->account()->get();
echo $response->statusCode();
@@ -3498,6 +3667,7 @@ Your monthly credit allotment limits the number of emails you may send before in
### GET /user/credits
+
```php
$response = $sg->client->user()->credits()->get();
echo $response->statusCode();
@@ -3516,6 +3686,7 @@ For more information about your user profile:
### PUT /user/email
+
```php
$request_body = json_decode('{
"email": "example@example.com"
@@ -3537,6 +3708,7 @@ For more information about your user profile:
### GET /user/email
+
```php
$response = $sg->client->user()->email()->get();
echo $response->statusCode();
@@ -3555,6 +3727,7 @@ For more information about your user profile:
### PUT /user/password
+
```php
$request_body = json_decode('{
"new_password": "new_password",
@@ -3579,6 +3752,7 @@ It should be noted that any one or more of the parameters can be updated via the
### PATCH /user/profile
+
```php
$request_body = json_decode('{
"city": "Orange",
@@ -3600,6 +3774,7 @@ For more information about your user profile:
### GET /user/profile
+
```php
$response = $sg->client->user()->profile()->get();
echo $response->statusCode();
@@ -3617,6 +3792,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### POST /user/scheduled_sends
+
```php
$request_body = json_decode('{
"batch_id": "YOUR_BATCH_ID",
@@ -3635,6 +3811,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### GET /user/scheduled_sends
+
```php
$response = $sg->client->user()->scheduled_sends()->get();
echo $response->statusCode();
@@ -3649,6 +3826,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### PATCH /user/scheduled_sends/{batch_id}
+
```php
$request_body = json_decode('{
"status": "pause"
@@ -3667,6 +3845,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### GET /user/scheduled_sends/{batch_id}
+
```php
$batch_id = "test_url_param";
$response = $sg->client->user()->scheduled_sends()->_($batch_id)->get();
@@ -3682,6 +3861,7 @@ The Cancel Scheduled Sends feature allows the customer to cancel a scheduled sen
### DELETE /user/scheduled_sends/{batch_id}
+
```php
$batch_id = "test_url_param";
$response = $sg->client->user()->scheduled_sends()->_($batch_id)->delete($request_body);
@@ -3699,6 +3879,7 @@ The Enforced TLS settings specify whether or not the recipient is required to su
### PATCH /user/settings/enforced_tls
+
```php
$request_body = json_decode('{
"require_tls": true,
@@ -3719,6 +3900,7 @@ The Enforced TLS settings specify whether or not the recipient is required to su
### GET /user/settings/enforced_tls
+
```php
$response = $sg->client->user()->settings()->enforced_tls()->get();
echo $response->statusCode();
@@ -3737,6 +3919,7 @@ For more information about your user profile:
### PUT /user/username
+
```php
$request_body = json_decode('{
"username": "test_username"
@@ -3758,6 +3941,7 @@ For more information about your user profile:
### GET /user/username
+
```php
$response = $sg->client->user()->username()->get();
echo $response->statusCode();
@@ -3776,6 +3960,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### PATCH /user/webhooks/event/settings
+
```php
$request_body = json_decode('{
"bounce": true,
@@ -3809,6 +3994,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### GET /user/webhooks/event/settings
+
```php
$response = $sg->client->user()->webhooks()->event()->settings()->get();
echo $response->statusCode();
@@ -3825,6 +4011,7 @@ Common uses of this data are to remove unsubscribes, react to spam reports, dete
### POST /user/webhooks/event/test
+
```php
$request_body = json_decode('{
"url": "url"
@@ -3842,6 +4029,7 @@ SendGrid can parse the attachments and contents of incoming emails. The Parse AP
### GET /user/webhooks/parse/settings
+
```php
$response = $sg->client->user()->webhooks()->parse()->settings()->get();
echo $response->statusCode();
@@ -3858,6 +4046,7 @@ There are a number of pre-made integrations for the SendGrid Parse Webhook which
### GET /user/webhooks/parse/stats
+
```php
$query_params = json_decode('{"aggregated_by": "day", "limit": "test_string", "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": "test_string"}');
$response = $sg->client->user()->webhooks()->parse()->stats()->get(null, $query_params);
@@ -3882,6 +4071,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains
+
```php
$request_body = json_decode('{
"automatic_security": false,
@@ -3911,6 +4101,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains
+
```php
$query_params = json_decode('{"username": "test_string", "domain": "test_string", "exclude_subusers": "true", "limit": 1, "offset": 1}');
$response = $sg->client->whitelabel()->domains()->get(null, $query_params);
@@ -3933,6 +4124,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/default
+
```php
$response = $sg->client->whitelabel()->domains()->default()->get();
echo $response->statusCode();
@@ -3956,6 +4148,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/subuser
+
```php
$response = $sg->client->whitelabel()->domains()->subuser()->get();
echo $response->statusCode();
@@ -3979,6 +4172,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/subuser
+
```php
$response = $sg->client->whitelabel()->domains()->subuser()->delete($request_body);
echo $response->statusCode();
@@ -3995,6 +4189,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### PATCH /whitelabel/domains/{domain_id}
+
```php
$request_body = json_decode('{
"custom_spf": true,
@@ -4017,6 +4212,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### GET /whitelabel/domains/{domain_id}
+
```php
$domain_id = "test_url_param";
$response = $sg->client->whitelabel()->domains()->_($domain_id)->get();
@@ -4034,6 +4230,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/{domain_id}
+
```php
$domain_id = "test_url_param";
$response = $sg->client->whitelabel()->domains()->_($domain_id)->delete($request_body);
@@ -4058,6 +4255,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{domain_id}/subuser
+
```php
$request_body = json_decode('{
"username": "jane@example.com"
@@ -4083,6 +4281,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{id}/ips
+
```php
$request_body = json_decode('{
"ip": "192.168.0.1"
@@ -4109,6 +4308,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### DELETE /whitelabel/domains/{id}/ips/{ip}
+
```php
$id = "test_url_param";
$ip = "test_url_param";
@@ -4132,6 +4332,7 @@ For more information on whitelabeling, please see our [User Guide](https://sendg
### POST /whitelabel/domains/{id}/validate
+
```php
$request_body = json_decode('null');
$id = "test_url_param";
@@ -4152,6 +4353,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/ips
+
```php
$request_body = json_decode('{
"domain": "example.com",
@@ -4175,6 +4377,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/ips
+
```php
$query_params = json_decode('{"ip": "test_string", "limit": 1, "offset": 1}');
$response = $sg->client->whitelabel()->ips()->get(null, $query_params);
@@ -4192,6 +4395,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/ips/{id}
+
```php
$id = "test_url_param";
$response = $sg->client->whitelabel()->ips()->_($id)->get();
@@ -4209,6 +4413,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/ips/{id}
+
```php
$id = "test_url_param";
$response = $sg->client->whitelabel()->ips()->_($id)->delete($request_body);
@@ -4226,6 +4431,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/ips/{id}/validate
+
```php
$request_body = json_decode('null');
$id = "test_url_param";
@@ -4244,6 +4450,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links
+
```php
$request_body = json_decode('{
"default": true,
@@ -4266,6 +4473,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links
+
```php
$query_params = json_decode('{"limit": 1}');
$response = $sg->client->whitelabel()->links()->get(null, $query_params);
@@ -4290,6 +4498,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/default
+
```php
$query_params = json_decode('{"domain": "test_string"}');
$response = $sg->client->whitelabel()->links()->default()->get(null, $query_params);
@@ -4311,6 +4520,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/subuser
+
```php
$query_params = json_decode('{"username": "test_string"}');
$response = $sg->client->whitelabel()->links()->subuser()->get(null, $query_params);
@@ -4332,6 +4542,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/links/subuser
+
```php
$query_params = json_decode('{"username": "test_string"}');
$response = $sg->client->whitelabel()->links()->subuser()->delete($request_body, $query_params);
@@ -4349,6 +4560,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### PATCH /whitelabel/links/{id}
+
```php
$request_body = json_decode('{
"default": true
@@ -4369,6 +4581,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### GET /whitelabel/links/{id}
+
```php
$id = "test_url_param";
$response = $sg->client->whitelabel()->links()->_($id)->get();
@@ -4386,6 +4599,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### DELETE /whitelabel/links/{id}
+
```php
$id = "test_url_param";
$response = $sg->client->whitelabel()->links()->_($id)->delete($request_body);
@@ -4403,6 +4617,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links/{id}/validate
+
```php
$request_body = json_decode('null');
$id = "test_url_param";
@@ -4425,6 +4640,7 @@ For more information, please see our [User Guide](https://sendgrid.com/docs/API_
### POST /whitelabel/links/{link_id}/subuser
+
```php
$request_body = json_decode('{
"username": "jane@example.com"
diff --git a/examples/accesssettings/accesssettings.php b/examples/accesssettings/accesssettings.php
index 8199195..13c12ac 100644
--- a/examples/accesssettings/accesssettings.php
+++ b/examples/accesssettings/accesssettings.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve all recent access attempts #
-# GET /access_settings/activity #
+////////////////////////////////////////////////////
+// Retrieve all recent access attempts #
+// GET /access_settings/activity #
$query_params = json_decode('{"limit": 1}');
$response = $sg->client->access_settings()->activity()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add one or more IPs to the whitelist #
-# POST /access_settings/whitelist #
+////////////////////////////////////////////////////
+// Add one or more IPs to the whitelist #
+// POST /access_settings/whitelist #
$request_body = json_decode('{
"ips": [
@@ -38,27 +38,27 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a list of currently whitelisted IPs #
-# GET /access_settings/whitelist #
+////////////////////////////////////////////////////
+// Retrieve a list of currently whitelisted IPs #
+// GET /access_settings/whitelist #
$response = $sg->client->access_settings()->whitelist()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Remove one or more IPs from the whitelist #
-# DELETE /access_settings/whitelist #
+////////////////////////////////////////////////////
+// Remove one or more IPs from the whitelist #
+// DELETE /access_settings/whitelist #
$response = $sg->client->access_settings()->whitelist()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a specific whitelisted IP #
-# GET /access_settings/whitelist/{rule_id} #
+////////////////////////////////////////////////////
+// Retrieve a specific whitelisted IP #
+// GET /access_settings/whitelist/{rule_id} #
$rule_id = "test_url_param";
$response = $sg->client->access_settings()->whitelist()->_($rule_id)->get();
@@ -66,9 +66,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Remove a specific IP from the whitelist #
-# DELETE /access_settings/whitelist/{rule_id} #
+////////////////////////////////////////////////////
+// Remove a specific IP from the whitelist #
+// DELETE /access_settings/whitelist/{rule_id} #
$rule_id = "test_url_param";
$response = $sg->client->access_settings()->whitelist()->_($rule_id)->delete($request_body);
diff --git a/examples/apikeys/apikeys.php b/examples/apikeys/apikeys.php
index ec26642..2e02c5d 100644
--- a/examples/apikeys/apikeys.php
+++ b/examples/apikeys/apikeys.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create API keys #
-# POST /api_keys #
+////////////////////////////////////////////////////
+// Create API keys #
+// POST /api_keys #
$request_body = json_decode('{
"name": "My API Key",
@@ -23,18 +23,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all API Keys belonging to the authenticated user #
-# GET /api_keys #
+////////////////////////////////////////////////////
+// Retrieve all API Keys belonging to the authenticated user #
+// GET /api_keys #
$response = $sg->client->api_keys()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update the name & scopes of an API Key #
-# PUT /api_keys/{api_key_id} #
+////////////////////////////////////////////////////
+// Update the name & scopes of an API Key #
+// PUT /api_keys/{api_key_id} #
$request_body = json_decode('{
"name": "A New Hope",
@@ -49,9 +49,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update API keys #
-# PATCH /api_keys/{api_key_id} #
+////////////////////////////////////////////////////
+// Update API keys #
+// PATCH /api_keys/{api_key_id} #
$request_body = json_decode('{
"name": "A New Hope"
@@ -62,9 +62,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve an existing API Key #
-# GET /api_keys/{api_key_id} #
+////////////////////////////////////////////////////
+// Retrieve an existing API Key #
+// GET /api_keys/{api_key_id} #
$api_key_id = "test_url_param";
$response = $sg->client->api_keys()->_($api_key_id)->get();
@@ -72,9 +72,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete API keys #
-# DELETE /api_keys/{api_key_id} #
+////////////////////////////////////////////////////
+// Delete API keys #
+// DELETE /api_keys/{api_key_id} #
$api_key_id = "test_url_param";
$response = $sg->client->api_keys()->_($api_key_id)->delete($request_body);
diff --git a/examples/asm/asm.php b/examples/asm/asm.php
index 233d968..e175509 100644
--- a/examples/asm/asm.php
+++ b/examples/asm/asm.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a new suppression group #
-# POST /asm/groups #
+////////////////////////////////////////////////////
+// Create a new suppression group #
+// POST /asm/groups #
$request_body = json_decode('{
"description": "Suggestions for products our users might like.",
@@ -20,9 +20,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve information about multiple suppression groups #
-# GET /asm/groups #
+////////////////////////////////////////////////////
+// Retrieve information about multiple suppression groups #
+// GET /asm/groups #
$query_params = json_decode('{"id": 1}');
$response = $sg->client->asm()->groups()->get(null, $query_params);
@@ -30,9 +30,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a suppression group. #
-# PATCH /asm/groups/{group_id} #
+////////////////////////////////////////////////////
+// Update a suppression group. #
+// PATCH /asm/groups/{group_id} #
$request_body = json_decode('{
"description": "Suggestions for items our users might like.",
@@ -45,9 +45,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Get information on a single suppression group. #
-# GET /asm/groups/{group_id} #
+////////////////////////////////////////////////////
+// Get information on a single suppression group. #
+// GET /asm/groups/{group_id} #
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->get();
@@ -55,9 +55,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a suppression group. #
-# DELETE /asm/groups/{group_id} #
+////////////////////////////////////////////////////
+// Delete a suppression group. #
+// DELETE /asm/groups/{group_id} #
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->delete($request_body);
@@ -65,9 +65,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add suppressions to a suppression group #
-# POST /asm/groups/{group_id}/suppressions #
+////////////////////////////////////////////////////
+// Add suppressions to a suppression group #
+// POST /asm/groups/{group_id}/suppressions #
$request_body = json_decode('{
"recipient_emails": [
@@ -81,9 +81,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all suppressions for a suppression group #
-# GET /asm/groups/{group_id}/suppressions #
+////////////////////////////////////////////////////
+// Retrieve all suppressions for a suppression group #
+// GET /asm/groups/{group_id}/suppressions #
$group_id = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->suppressions()->get();
@@ -91,29 +91,29 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a suppression from a suppression group #
-# DELETE /asm/groups/{group_id}/suppressions/{email} #
+////////////////////////////////////////////////////
+// Delete a suppression from a suppression group #
+// DELETE /asm/groups/{group_id}/suppressions/{email} #
$group_id = "test_url_param";
- $email = "test_url_param";
+$email = "test_url_param";
$response = $sg->client->asm()->groups()->_($group_id)->suppressions()->_($email)->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all suppressions #
-# GET /asm/suppressions #
+////////////////////////////////////////////////////
+// Retrieve all suppressions #
+// GET /asm/suppressions #
$response = $sg->client->asm()->suppressions()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add recipient addresses to the global suppression group. #
-# POST /asm/suppressions/global #
+////////////////////////////////////////////////////
+// Add recipient addresses to the global suppression group. #
+// POST /asm/suppressions/global #
$request_body = json_decode('{
"recipient_emails": [
@@ -126,9 +126,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Global Suppression #
-# GET /asm/suppressions/global/{email} #
+////////////////////////////////////////////////////
+// Retrieve a Global Suppression #
+// GET /asm/suppressions/global/{email} #
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->global()->_($email)->get();
@@ -136,9 +136,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Global Suppression #
-# DELETE /asm/suppressions/global/{email} #
+////////////////////////////////////////////////////
+// Delete a Global Suppression #
+// DELETE /asm/suppressions/global/{email} #
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->global()->_($email)->delete($request_body);
@@ -146,9 +146,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all suppression groups for an email address #
-# GET /asm/suppressions/{email} #
+////////////////////////////////////////////////////
+// Retrieve all suppression groups for an email address #
+// GET /asm/suppressions/{email} #
$email = "test_url_param";
$response = $sg->client->asm()->suppressions()->_($email)->get();
diff --git a/examples/browsers/browsers.php b/examples/browsers/browsers.php
index 0568dfc..c412160 100644
--- a/examples/browsers/browsers.php
+++ b/examples/browsers/browsers.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve email statistics by browser. #
-# GET /browsers/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics by browser. #
+// GET /browsers/stats #
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "browsers": "test_string", "limit": "test_string", "offset": "test_string", "start_date": "2016-01-01"}');
$response = $sg->client->browsers()->stats()->get(null, $query_params);
diff --git a/examples/campaigns/campaigns.php b/examples/campaigns/campaigns.php
index 0cfcdfb..184e850 100644
--- a/examples/campaigns/campaigns.php
+++ b/examples/campaigns/campaigns.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a Campaign #
-# POST /campaigns #
+////////////////////////////////////////////////////
+// Create a Campaign #
+// POST /campaigns #
$request_body = json_decode('{
"categories": [
@@ -35,9 +35,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all Campaigns #
-# GET /campaigns #
+////////////////////////////////////////////////////
+// Retrieve all Campaigns #
+// GET /campaigns #
$query_params = json_decode('{"limit": 0, "offset": 0}');
$response = $sg->client->campaigns()->get(null, $query_params);
@@ -45,9 +45,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a Campaign #
-# PATCH /campaigns/{campaign_id} #
+////////////////////////////////////////////////////
+// Update a Campaign #
+// PATCH /campaigns/{campaign_id} #
$request_body = json_decode('{
"categories": [
@@ -64,9 +64,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a single campaign #
-# GET /campaigns/{campaign_id} #
+////////////////////////////////////////////////////
+// Retrieve a single campaign #
+// GET /campaigns/{campaign_id} #
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->get();
@@ -74,9 +74,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Campaign #
-# DELETE /campaigns/{campaign_id} #
+////////////////////////////////////////////////////
+// Delete a Campaign #
+// DELETE /campaigns/{campaign_id} #
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->delete($request_body);
@@ -84,9 +84,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a Scheduled Campaign #
-# PATCH /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////
+// Update a Scheduled Campaign #
+// PATCH /campaigns/{campaign_id}/schedules #
$request_body = json_decode('{
"send_at": 1489451436
@@ -97,9 +97,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Schedule a Campaign #
-# POST /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////
+// Schedule a Campaign #
+// POST /campaigns/{campaign_id}/schedules #
$request_body = json_decode('{
"send_at": 1489771528
@@ -110,9 +110,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# View Scheduled Time of a Campaign #
-# GET /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////
+// View Scheduled Time of a Campaign #
+// GET /campaigns/{campaign_id}/schedules #
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->schedules()->get();
@@ -120,9 +120,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Unschedule a Scheduled Campaign #
-# DELETE /campaigns/{campaign_id}/schedules #
+////////////////////////////////////////////////////
+// Unschedule a Scheduled Campaign #
+// DELETE /campaigns/{campaign_id}/schedules #
$campaign_id = "test_url_param";
$response = $sg->client->campaigns()->_($campaign_id)->schedules()->delete($request_body);
@@ -130,9 +130,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Send a Campaign #
-# POST /campaigns/{campaign_id}/schedules/now #
+////////////////////////////////////////////////////
+// Send a Campaign #
+// POST /campaigns/{campaign_id}/schedules/now #
$request_body = json_decode('null');
$campaign_id = "test_url_param";
@@ -141,9 +141,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Send a Test Campaign #
-# POST /campaigns/{campaign_id}/schedules/test #
+////////////////////////////////////////////////////
+// Send a Test Campaign #
+// POST /campaigns/{campaign_id}/schedules/test #
$request_body = json_decode('{
"to": "your.email@example.com"
diff --git a/examples/categories/categories.php b/examples/categories/categories.php
index cf24a77..7fa9b1e 100644
--- a/examples/categories/categories.php
+++ b/examples/categories/categories.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve all categories #
-# GET /categories #
+////////////////////////////////////////////////////
+// Retrieve all categories #
+// GET /categories #
$query_params = json_decode('{"category": "test_string", "limit": 1, "offset": 1}');
$response = $sg->client->categories()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Email Statistics for Categories #
-# GET /categories/stats #
+////////////////////////////////////////////////////
+// Retrieve Email Statistics for Categories #
+// GET /categories/stats #
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01", "categories": "test_string"}');
$response = $sg->client->categories()->stats()->get(null, $query_params);
@@ -26,9 +26,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] #
-# GET /categories/stats/sums #
+////////////////////////////////////////////////////
+// Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] #
+// GET /categories/stats/sums #
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "start_date": "2016-01-01", "sort_by_direction": "asc"}');
$response = $sg->client->categories()->stats()->sums()->get(null, $query_params);
diff --git a/examples/clients/clients.php b/examples/clients/clients.php
index 08c9cd2..ae09b7b 100644
--- a/examples/clients/clients.php
+++ b/examples/clients/clients.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve email statistics by client type. #
-# GET /clients/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics by client type. #
+// GET /clients/stats #
$query_params = json_decode('{"aggregated_by": "day", "start_date": "2016-01-01", "end_date": "2016-04-01"}');
$response = $sg->client->clients()->stats()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve stats by a specific client type. #
-# GET /clients/{client_type}/stats #
+////////////////////////////////////////////////////
+// Retrieve stats by a specific client type. #
+// GET /clients/{client_type}/stats #
$query_params = json_decode('{"aggregated_by": "day", "start_date": "2016-01-01", "end_date": "2016-04-01"}');
$client_type = "test_url_param";
diff --git a/examples/contactdb/contactdb.php b/examples/contactdb/contactdb.php
index 38652f9..4d0eb4a 100644
--- a/examples/contactdb/contactdb.php
+++ b/examples/contactdb/contactdb.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a Custom Field #
-# POST /contactdb/custom_fields #
+////////////////////////////////////////////////////
+// Create a Custom Field #
+// POST /contactdb/custom_fields #
$request_body = json_decode('{
"name": "pet",
@@ -19,18 +19,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all custom fields #
-# GET /contactdb/custom_fields #
+////////////////////////////////////////////////////
+// Retrieve all custom fields #
+// GET /contactdb/custom_fields #
$response = $sg->client->contactdb()->custom_fields()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Custom Field #
-# GET /contactdb/custom_fields/{custom_field_id} #
+////////////////////////////////////////////////////
+// Retrieve a Custom Field #
+// GET /contactdb/custom_fields/{custom_field_id} #
$custom_field_id = "test_url_param";
$response = $sg->client->contactdb()->custom_fields()->_($custom_field_id)->get();
@@ -38,9 +38,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Custom Field #
-# DELETE /contactdb/custom_fields/{custom_field_id} #
+////////////////////////////////////////////////////
+// Delete a Custom Field #
+// DELETE /contactdb/custom_fields/{custom_field_id} #
$custom_field_id = "test_url_param";
$response = $sg->client->contactdb()->custom_fields()->_($custom_field_id)->delete($request_body);
@@ -48,9 +48,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create a List #
-# POST /contactdb/lists #
+////////////////////////////////////////////////////
+// Create a List #
+// POST /contactdb/lists #
$request_body = json_decode('{
"name": "your list name"
@@ -60,27 +60,27 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all lists #
-# GET /contactdb/lists #
+////////////////////////////////////////////////////
+// Retrieve all lists #
+// GET /contactdb/lists #
$response = $sg->client->contactdb()->lists()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete Multiple lists #
-# DELETE /contactdb/lists #
+////////////////////////////////////////////////////
+// Delete Multiple lists #
+// DELETE /contactdb/lists #
$response = $sg->client->contactdb()->lists()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a List #
-# PATCH /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////
+// Update a List #
+// PATCH /contactdb/lists/{list_id} #
$request_body = json_decode('{
"name": "newlistname"
@@ -92,9 +92,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a single list #
-# GET /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////
+// Retrieve a single list #
+// GET /contactdb/lists/{list_id} #
$query_params = json_decode('{"list_id": 0}');
$list_id = "test_url_param";
@@ -103,9 +103,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a List #
-# DELETE /contactdb/lists/{list_id} #
+////////////////////////////////////////////////////
+// Delete a List #
+// DELETE /contactdb/lists/{list_id} #
$query_params = json_decode('{"delete_contacts": "true"}');
$list_id = "test_url_param";
@@ -114,9 +114,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add Multiple Recipients to a List #
-# POST /contactdb/lists/{list_id}/recipients #
+////////////////////////////////////////////////////
+// Add Multiple Recipients to a List #
+// POST /contactdb/lists/{list_id}/recipients #
$request_body = json_decode('[
"recipient_id1",
@@ -128,9 +128,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all recipients on a List #
-# GET /contactdb/lists/{list_id}/recipients #
+////////////////////////////////////////////////////
+// Retrieve all recipients on a List #
+// GET /contactdb/lists/{list_id}/recipients #
$query_params = json_decode('{"page": 1, "page_size": 1, "list_id": 0}');
$list_id = "test_url_param";
@@ -139,33 +139,33 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add a Single Recipient to a List #
-# POST /contactdb/lists/{list_id}/recipients/{recipient_id} #
+////////////////////////////////////////////////////
+// Add a Single Recipient to a List #
+// POST /contactdb/lists/{list_id}/recipients/{recipient_id} #
$request_body = json_decode('null');
$list_id = "test_url_param";
- $recipient_id = "test_url_param";
+$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->lists()->_($list_id)->recipients()->_($recipient_id)->post($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Single Recipient from a Single List #
-# DELETE /contactdb/lists/{list_id}/recipients/{recipient_id} #
+////////////////////////////////////////////////////
+// Delete a Single Recipient from a Single List #
+// DELETE /contactdb/lists/{list_id}/recipients/{recipient_id} #
$query_params = json_decode('{"recipient_id": 0, "list_id": 0}');
$list_id = "test_url_param";
- $recipient_id = "test_url_param";
+$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->lists()->_($list_id)->recipients()->_($recipient_id)->delete($request_body, $query_params);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Recipient #
-# PATCH /contactdb/recipients #
+////////////////////////////////////////////////////
+// Update Recipient #
+// PATCH /contactdb/recipients #
$request_body = json_decode('[
{
@@ -179,9 +179,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add recipients #
-# POST /contactdb/recipients #
+////////////////////////////////////////////////////
+// Add recipients #
+// POST /contactdb/recipients #
$request_body = json_decode('[
{
@@ -202,9 +202,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve recipients #
-# GET /contactdb/recipients #
+////////////////////////////////////////////////////
+// Retrieve recipients #
+// GET /contactdb/recipients #
$query_params = json_decode('{"page": 1, "page_size": 1}');
$response = $sg->client->contactdb()->recipients()->get(null, $query_params);
@@ -212,36 +212,36 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete Recipient #
-# DELETE /contactdb/recipients #
+////////////////////////////////////////////////////
+// Delete Recipient #
+// DELETE /contactdb/recipients #
$response = $sg->client->contactdb()->recipients()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve the count of billable recipients #
-# GET /contactdb/recipients/billable_count #
+////////////////////////////////////////////////////
+// Retrieve the count of billable recipients #
+// GET /contactdb/recipients/billable_count #
$response = $sg->client->contactdb()->recipients()->billable_count()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Count of Recipients #
-# GET /contactdb/recipients/count #
+////////////////////////////////////////////////////
+// Retrieve a Count of Recipients #
+// GET /contactdb/recipients/count #
$response = $sg->client->contactdb()->recipients()->count()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve recipients matching search criteria #
-# GET /contactdb/recipients/search #
+////////////////////////////////////////////////////
+// Retrieve recipients matching search criteria #
+// GET /contactdb/recipients/search #
$query_params = json_decode('{"{field_name}": "test_string"}');
$response = $sg->client->contactdb()->recipients()->search()->get(null, $query_params);
@@ -249,9 +249,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a single recipient #
-# GET /contactdb/recipients/{recipient_id} #
+////////////////////////////////////////////////////
+// Retrieve a single recipient #
+// GET /contactdb/recipients/{recipient_id} #
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->get();
@@ -259,9 +259,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Recipient #
-# DELETE /contactdb/recipients/{recipient_id} #
+////////////////////////////////////////////////////
+// Delete a Recipient #
+// DELETE /contactdb/recipients/{recipient_id} #
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->delete($request_body);
@@ -269,9 +269,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve the lists that a recipient is on #
-# GET /contactdb/recipients/{recipient_id}/lists #
+////////////////////////////////////////////////////
+// Retrieve the lists that a recipient is on #
+// GET /contactdb/recipients/{recipient_id}/lists #
$recipient_id = "test_url_param";
$response = $sg->client->contactdb()->recipients()->_($recipient_id)->lists()->get();
@@ -279,18 +279,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve reserved fields #
-# GET /contactdb/reserved_fields #
+////////////////////////////////////////////////////
+// Retrieve reserved fields #
+// GET /contactdb/reserved_fields #
$response = $sg->client->contactdb()->reserved_fields()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create a Segment #
-# POST /contactdb/segments #
+////////////////////////////////////////////////////
+// Create a Segment #
+// POST /contactdb/segments #
$request_body = json_decode('{
"conditions": [
@@ -321,18 +321,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all segments #
-# GET /contactdb/segments #
+////////////////////////////////////////////////////
+// Retrieve all segments #
+// GET /contactdb/segments #
$response = $sg->client->contactdb()->segments()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a segment #
-# PATCH /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////
+// Update a segment #
+// PATCH /contactdb/segments/{segment_id} #
$request_body = json_decode('{
"conditions": [
@@ -353,9 +353,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a segment #
-# GET /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////
+// Retrieve a segment #
+// GET /contactdb/segments/{segment_id} #
$query_params = json_decode('{"segment_id": 0}');
$segment_id = "test_url_param";
@@ -364,9 +364,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a segment #
-# DELETE /contactdb/segments/{segment_id} #
+////////////////////////////////////////////////////
+// Delete a segment #
+// DELETE /contactdb/segments/{segment_id} #
$query_params = json_decode('{"delete_contacts": "true"}');
$segment_id = "test_url_param";
@@ -375,9 +375,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve recipients on a segment #
-# GET /contactdb/segments/{segment_id}/recipients #
+////////////////////////////////////////////////////
+// Retrieve recipients on a segment #
+// GET /contactdb/segments/{segment_id}/recipients #
$query_params = json_decode('{"page": 1, "page_size": 1}');
$segment_id = "test_url_param";
diff --git a/examples/devices/devices.php b/examples/devices/devices.php
index 6d474eb..308684f 100644
--- a/examples/devices/devices.php
+++ b/examples/devices/devices.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve email statistics by device type. #
-# GET /devices/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics by device type. #
+// GET /devices/stats #
$query_params = json_decode('{"aggregated_by": "day", "limit": 1, "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": 1}');
$response = $sg->client->devices()->stats()->get(null, $query_params);
diff --git a/examples/geo/geo.php b/examples/geo/geo.php
index 67b9c2c..ab4c470 100644
--- a/examples/geo/geo.php
+++ b/examples/geo/geo.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve email statistics by country and state/province. #
-# GET /geo/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics by country and state/province. #
+// GET /geo/stats #
$query_params = json_decode('{"end_date": "2016-04-01", "country": "US", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01"}');
$response = $sg->client->geo()->stats()->get(null, $query_params);
diff --git a/examples/ips/ips.php b/examples/ips/ips.php
index d35efb9..19957d8 100644
--- a/examples/ips/ips.php
+++ b/examples/ips/ips.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve all IP addresses #
-# GET /ips #
+////////////////////////////////////////////////////
+// Retrieve all IP addresses #
+// GET /ips #
$query_params = json_decode('{"subuser": "test_string", "ip": "test_string", "limit": 1, "exclude_whitelabels": "true", "offset": 1}');
$response = $sg->client->ips()->get(null, $query_params);
@@ -16,18 +16,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all assigned IPs #
-# GET /ips/assigned #
+////////////////////////////////////////////////////
+// Retrieve all assigned IPs #
+// GET /ips/assigned #
$response = $sg->client->ips()->assigned()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create an IP pool. #
-# POST /ips/pools #
+////////////////////////////////////////////////////
+// Create an IP pool. #
+// POST /ips/pools #
$request_body = json_decode('{
"name": "marketing"
@@ -37,18 +37,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all IP pools. #
-# GET /ips/pools #
+////////////////////////////////////////////////////
+// Retrieve all IP pools. #
+// GET /ips/pools #
$response = $sg->client->ips()->pools()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update an IP pools name. #
-# PUT /ips/pools/{pool_name} #
+////////////////////////////////////////////////////
+// Update an IP pools name. #
+// PUT /ips/pools/{pool_name} #
$request_body = json_decode('{
"name": "new_pool_name"
@@ -59,9 +59,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all IPs in a specified pool. #
-# GET /ips/pools/{pool_name} #
+////////////////////////////////////////////////////
+// Retrieve all IPs in a specified pool. #
+// GET /ips/pools/{pool_name} #
$pool_name = "test_url_param";
$response = $sg->client->ips()->pools()->_($pool_name)->get();
@@ -69,9 +69,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete an IP pool. #
-# DELETE /ips/pools/{pool_name} #
+////////////////////////////////////////////////////
+// Delete an IP pool. #
+// DELETE /ips/pools/{pool_name} #
$pool_name = "test_url_param";
$response = $sg->client->ips()->pools()->_($pool_name)->delete($request_body);
@@ -79,9 +79,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add an IP address to a pool #
-# POST /ips/pools/{pool_name}/ips #
+////////////////////////////////////////////////////
+// Add an IP address to a pool #
+// POST /ips/pools/{pool_name}/ips #
$request_body = json_decode('{
"ip": "0.0.0.0"
@@ -92,20 +92,20 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Remove an IP address from a pool. #
-# DELETE /ips/pools/{pool_name}/ips/{ip} #
+////////////////////////////////////////////////////
+// Remove an IP address from a pool. #
+// DELETE /ips/pools/{pool_name}/ips/{ip} #
$pool_name = "test_url_param";
- $ip = "test_url_param";
+$ip = "test_url_param";
$response = $sg->client->ips()->pools()->_($pool_name)->ips()->_($ip)->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add an IP to warmup #
-# POST /ips/warmup #
+////////////////////////////////////////////////////
+// Add an IP to warmup #
+// POST /ips/warmup #
$request_body = json_decode('{
"ip": "0.0.0.0"
@@ -115,18 +115,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all IPs currently in warmup #
-# GET /ips/warmup #
+////////////////////////////////////////////////////
+// Retrieve all IPs currently in warmup #
+// GET /ips/warmup #
$response = $sg->client->ips()->warmup()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve warmup status for a specific IP address #
-# GET /ips/warmup/{ip_address} #
+////////////////////////////////////////////////////
+// Retrieve warmup status for a specific IP address #
+// GET /ips/warmup/{ip_address} #
$ip_address = "test_url_param";
$response = $sg->client->ips()->warmup()->_($ip_address)->get();
@@ -134,9 +134,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Remove an IP from warmup #
-# DELETE /ips/warmup/{ip_address} #
+////////////////////////////////////////////////////
+// Remove an IP from warmup #
+// DELETE /ips/warmup/{ip_address} #
$ip_address = "test_url_param";
$response = $sg->client->ips()->warmup()->_($ip_address)->delete($request_body);
@@ -144,9 +144,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all IP pools an IP address belongs to #
-# GET /ips/{ip_address} #
+////////////////////////////////////////////////////
+// Retrieve all IP pools an IP address belongs to #
+// GET /ips/{ip_address} #
$ip_address = "test_url_param";
$response = $sg->client->ips()->_($ip_address)->get();
diff --git a/examples/mail/mail.php b/examples/mail/mail.php
index 7bb7d4e..ea57555 100644
--- a/examples/mail/mail.php
+++ b/examples/mail/mail.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a batch ID #
-# POST /mail/batch #
+////////////////////////////////////////////////////
+// Create a batch ID #
+// POST /mail/batch #
$request_body = json_decode('null');
$response = $sg->client->mail()->batch()->post($request_body);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Validate batch ID #
-# GET /mail/batch/{batch_id} #
+////////////////////////////////////////////////////
+// Validate batch ID #
+// GET /mail/batch/{batch_id} #
$batch_id = "test_url_param";
$response = $sg->client->mail()->batch()->_($batch_id)->get();
@@ -26,9 +26,10 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# v3 Mail Send Beta #
-# POST /mail/send/beta #
+////////////////////////////////////////////////////
+// v3 Mail Send Beta #
+// POST /mail/send/beta #
+// This endpoint has a helper, check it out [here](https://github.com/sendgrid/sendgrid-php/blob/v3beta/lib/helpers/mail/README.md).
$request_body = json_decode('{
"asm": {
diff --git a/examples/mailboxproviders/mailboxproviders.php b/examples/mailboxproviders/mailboxproviders.php
index 8c2fe59..5b1f3cc 100644
--- a/examples/mailboxproviders/mailboxproviders.php
+++ b/examples/mailboxproviders/mailboxproviders.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve email statistics by mailbox provider. #
-# GET /mailbox_providers/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics by mailbox provider. #
+// GET /mailbox_providers/stats #
$query_params = json_decode('{"end_date": "2016-04-01", "mailbox_providers": "test_string", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01"}');
$response = $sg->client->mailbox_providers()->stats()->get(null, $query_params);
diff --git a/examples/mailsettings/mailsettings.php b/examples/mailsettings/mailsettings.php
index 6660866..3e9f75b 100644
--- a/examples/mailsettings/mailsettings.php
+++ b/examples/mailsettings/mailsettings.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve all mail settings #
-# GET /mail_settings #
+////////////////////////////////////////////////////
+// Retrieve all mail settings #
+// GET /mail_settings #
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->mail_settings()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update address whitelist mail settings #
-# PATCH /mail_settings/address_whitelist #
+////////////////////////////////////////////////////
+// Update address whitelist mail settings #
+// PATCH /mail_settings/address_whitelist #
$request_body = json_decode('{
"enabled": true,
@@ -32,18 +32,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve address whitelist mail settings #
-# GET /mail_settings/address_whitelist #
+////////////////////////////////////////////////////
+// Retrieve address whitelist mail settings #
+// GET /mail_settings/address_whitelist #
$response = $sg->client->mail_settings()->address_whitelist()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update BCC mail settings #
-# PATCH /mail_settings/bcc #
+////////////////////////////////////////////////////
+// Update BCC mail settings #
+// PATCH /mail_settings/bcc #
$request_body = json_decode('{
"email": "email@example.com",
@@ -54,18 +54,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all BCC mail settings #
-# GET /mail_settings/bcc #
+////////////////////////////////////////////////////
+// Retrieve all BCC mail settings #
+// GET /mail_settings/bcc #
$response = $sg->client->mail_settings()->bcc()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update bounce purge mail settings #
-# PATCH /mail_settings/bounce_purge #
+////////////////////////////////////////////////////
+// Update bounce purge mail settings #
+// PATCH /mail_settings/bounce_purge #
$request_body = json_decode('{
"enabled": true,
@@ -77,18 +77,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve bounce purge mail settings #
-# GET /mail_settings/bounce_purge #
+////////////////////////////////////////////////////
+// Retrieve bounce purge mail settings #
+// GET /mail_settings/bounce_purge #
$response = $sg->client->mail_settings()->bounce_purge()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update footer mail settings #
-# PATCH /mail_settings/footer #
+////////////////////////////////////////////////////
+// Update footer mail settings #
+// PATCH /mail_settings/footer #
$request_body = json_decode('{
"enabled": true,
@@ -100,18 +100,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve footer mail settings #
-# GET /mail_settings/footer #
+////////////////////////////////////////////////////
+// Retrieve footer mail settings #
+// GET /mail_settings/footer #
$response = $sg->client->mail_settings()->footer()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update forward bounce mail settings #
-# PATCH /mail_settings/forward_bounce #
+////////////////////////////////////////////////////
+// Update forward bounce mail settings #
+// PATCH /mail_settings/forward_bounce #
$request_body = json_decode('{
"email": "example@example.com",
@@ -122,18 +122,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve forward bounce mail settings #
-# GET /mail_settings/forward_bounce #
+////////////////////////////////////////////////////
+// Retrieve forward bounce mail settings #
+// GET /mail_settings/forward_bounce #
$response = $sg->client->mail_settings()->forward_bounce()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update forward spam mail settings #
-# PATCH /mail_settings/forward_spam #
+////////////////////////////////////////////////////
+// Update forward spam mail settings #
+// PATCH /mail_settings/forward_spam #
$request_body = json_decode('{
"email": "",
@@ -144,18 +144,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve forward spam mail settings #
-# GET /mail_settings/forward_spam #
+////////////////////////////////////////////////////
+// Retrieve forward spam mail settings #
+// GET /mail_settings/forward_spam #
$response = $sg->client->mail_settings()->forward_spam()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update plain content mail settings #
-# PATCH /mail_settings/plain_content #
+////////////////////////////////////////////////////
+// Update plain content mail settings #
+// PATCH /mail_settings/plain_content #
$request_body = json_decode('{
"enabled": false
@@ -165,18 +165,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve plain content mail settings #
-# GET /mail_settings/plain_content #
+////////////////////////////////////////////////////
+// Retrieve plain content mail settings #
+// GET /mail_settings/plain_content #
$response = $sg->client->mail_settings()->plain_content()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update spam check mail settings #
-# PATCH /mail_settings/spam_check #
+////////////////////////////////////////////////////
+// Update spam check mail settings #
+// PATCH /mail_settings/spam_check #
$request_body = json_decode('{
"enabled": true,
@@ -188,18 +188,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve spam check mail settings #
-# GET /mail_settings/spam_check #
+////////////////////////////////////////////////////
+// Retrieve spam check mail settings #
+// GET /mail_settings/spam_check #
$response = $sg->client->mail_settings()->spam_check()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update template mail settings #
-# PATCH /mail_settings/template #
+////////////////////////////////////////////////////
+// Update template mail settings #
+// PATCH /mail_settings/template #
$request_body = json_decode('{
"enabled": true,
@@ -210,9 +210,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve legacy template mail settings #
-# GET /mail_settings/template #
+////////////////////////////////////////////////////
+// Retrieve legacy template mail settings #
+// GET /mail_settings/template #
$response = $sg->client->mail_settings()->template()->get();
echo $response->statusCode();
diff --git a/examples/partnersettings/partnersettings.php b/examples/partnersettings/partnersettings.php
index cb46fea..79a652e 100644
--- a/examples/partnersettings/partnersettings.php
+++ b/examples/partnersettings/partnersettings.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Returns a list of all partner settings. #
-# GET /partner_settings #
+////////////////////////////////////////////////////
+// Returns a list of all partner settings. #
+// GET /partner_settings #
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->partner_settings()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Updates New Relic partner settings. #
-# PATCH /partner_settings/new_relic #
+////////////////////////////////////////////////////
+// Updates New Relic partner settings. #
+// PATCH /partner_settings/new_relic #
$request_body = json_decode('{
"enable_subuser_statistics": true,
@@ -30,9 +30,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Returns all New Relic partner settings. #
-# GET /partner_settings/new_relic #
+////////////////////////////////////////////////////
+// Returns all New Relic partner settings. #
+// GET /partner_settings/new_relic #
$response = $sg->client->partner_settings()->new_relic()->get();
echo $response->statusCode();
diff --git a/examples/scopes/scopes.php b/examples/scopes/scopes.php
index 3f8f9d5..ff2c066 100644
--- a/examples/scopes/scopes.php
+++ b/examples/scopes/scopes.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve a list of scopes for which this user has access. #
-# GET /scopes #
+////////////////////////////////////////////////////
+// Retrieve a list of scopes for which this user has access. #
+// GET /scopes #
$response = $sg->client->scopes()->get();
echo $response->statusCode();
diff --git a/examples/stats/stats.php b/examples/stats/stats.php
index 5e146d8..a5bbf60 100644
--- a/examples/stats/stats.php
+++ b/examples/stats/stats.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve global email statistics #
-# GET /stats #
+////////////////////////////////////////////////////
+// Retrieve global email statistics #
+// GET /stats #
$query_params = json_decode('{"aggregated_by": "day", "limit": 1, "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": 1}');
$response = $sg->client->stats()->get(null, $query_params);
diff --git a/examples/subusers/subusers.php b/examples/subusers/subusers.php
index dd9de73..6ef2090 100644
--- a/examples/subusers/subusers.php
+++ b/examples/subusers/subusers.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create Subuser #
-# POST /subusers #
+////////////////////////////////////////////////////
+// Create Subuser #
+// POST /subusers #
$request_body = json_decode('{
"email": "John@example.com",
@@ -24,9 +24,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# List all Subusers #
-# GET /subusers #
+////////////////////////////////////////////////////
+// List all Subusers #
+// GET /subusers #
$query_params = json_decode('{"username": "test_string", "limit": 0, "offset": 0}');
$response = $sg->client->subusers()->get(null, $query_params);
@@ -34,9 +34,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Subuser Reputations #
-# GET /subusers/reputations #
+////////////////////////////////////////////////////
+// Retrieve Subuser Reputations #
+// GET /subusers/reputations #
$query_params = json_decode('{"usernames": "test_string"}');
$response = $sg->client->subusers()->reputations()->get(null, $query_params);
@@ -44,9 +44,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve email statistics for your subusers. #
-# GET /subusers/stats #
+////////////////////////////////////////////////////
+// Retrieve email statistics for your subusers. #
+// GET /subusers/stats #
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01", "subusers": "test_string"}');
$response = $sg->client->subusers()->stats()->get(null, $query_params);
@@ -54,9 +54,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve monthly stats for all subusers #
-# GET /subusers/stats/monthly #
+////////////////////////////////////////////////////
+// Retrieve monthly stats for all subusers #
+// GET /subusers/stats/monthly #
$query_params = json_decode('{"subuser": "test_string", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "date": "test_string", "sort_by_direction": "asc"}');
$response = $sg->client->subusers()->stats()->monthly()->get(null, $query_params);
@@ -64,9 +64,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve the totals for each email statistic metric for all subusers. #
-# GET /subusers/stats/sums #
+////////////////////////////////////////////////////
+// Retrieve the totals for each email statistic metric for all subusers. #
+// GET /subusers/stats/sums #
$query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "start_date": "2016-01-01", "sort_by_direction": "asc"}');
$response = $sg->client->subusers()->stats()->sums()->get(null, $query_params);
@@ -74,9 +74,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Enable/disable a subuser #
-# PATCH /subusers/{subuser_name} #
+////////////////////////////////////////////////////
+// Enable/disable a subuser #
+// PATCH /subusers/{subuser_name} #
$request_body = json_decode('{
"disabled": false
@@ -87,9 +87,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a subuser #
-# DELETE /subusers/{subuser_name} #
+////////////////////////////////////////////////////
+// Delete a subuser #
+// DELETE /subusers/{subuser_name} #
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->delete($request_body);
@@ -97,9 +97,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update IPs assigned to a subuser #
-# PUT /subusers/{subuser_name}/ips #
+////////////////////////////////////////////////////
+// Update IPs assigned to a subuser #
+// PUT /subusers/{subuser_name}/ips #
$request_body = json_decode('[
"127.0.0.1"
@@ -110,9 +110,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Monitor Settings for a subuser #
-# PUT /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////
+// Update Monitor Settings for a subuser #
+// PUT /subusers/{subuser_name}/monitor #
$request_body = json_decode('{
"email": "example@example.com",
@@ -124,9 +124,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create monitor settings #
-# POST /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////
+// Create monitor settings #
+// POST /subusers/{subuser_name}/monitor #
$request_body = json_decode('{
"email": "example@example.com",
@@ -138,9 +138,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve monitor settings for a subuser #
-# GET /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////
+// Retrieve monitor settings for a subuser #
+// GET /subusers/{subuser_name}/monitor #
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->monitor()->get();
@@ -148,9 +148,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete monitor settings #
-# DELETE /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////
+// Delete monitor settings #
+// DELETE /subusers/{subuser_name}/monitor #
$subuser_name = "test_url_param";
$response = $sg->client->subusers()->_($subuser_name)->monitor()->delete($request_body);
@@ -158,9 +158,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve the monthly email statistics for a single subuser #
-# GET /subusers/{subuser_name}/stats/monthly #
+////////////////////////////////////////////////////
+// Retrieve the monthly email statistics for a single subuser #
+// GET /subusers/{subuser_name}/stats/monthly #
$query_params = json_decode('{"date": "test_string", "sort_by_direction": "asc", "limit": 0, "sort_by_metric": "test_string", "offset": 1}');
$subuser_name = "test_url_param";
diff --git a/examples/suppression/suppression.php b/examples/suppression/suppression.php
index 1685826..16d1a38 100644
--- a/examples/suppression/suppression.php
+++ b/examples/suppression/suppression.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve all blocks #
-# GET /suppression/blocks #
+////////////////////////////////////////////////////
+// Retrieve all blocks #
+// GET /suppression/blocks #
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->blocks()->get(null, $query_params);
@@ -16,18 +16,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete blocks #
-# DELETE /suppression/blocks #
+////////////////////////////////////////////////////
+// Delete blocks #
+// DELETE /suppression/blocks #
$response = $sg->client->suppression()->blocks()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a specific block #
-# GET /suppression/blocks/{email} #
+////////////////////////////////////////////////////
+// Retrieve a specific block #
+// GET /suppression/blocks/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->blocks()->_($email)->get();
@@ -35,9 +35,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a specific block #
-# DELETE /suppression/blocks/{email} #
+////////////////////////////////////////////////////
+// Delete a specific block #
+// DELETE /suppression/blocks/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->blocks()->_($email)->delete($request_body);
@@ -45,9 +45,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all bounces #
-# GET /suppression/bounces #
+////////////////////////////////////////////////////
+// Retrieve all bounces #
+// GET /suppression/bounces #
$query_params = json_decode('{"start_time": 0, "end_time": 0}');
$response = $sg->client->suppression()->bounces()->get(null, $query_params);
@@ -55,18 +55,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete bounces #
-# DELETE /suppression/bounces #
+////////////////////////////////////////////////////
+// Delete bounces #
+// DELETE /suppression/bounces #
$response = $sg->client->suppression()->bounces()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Bounce #
-# GET /suppression/bounces/{email} #
+////////////////////////////////////////////////////
+// Retrieve a Bounce #
+// GET /suppression/bounces/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->bounces()->_($email)->get();
@@ -74,9 +74,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a bounce #
-# DELETE /suppression/bounces/{email} #
+////////////////////////////////////////////////////
+// Delete a bounce #
+// DELETE /suppression/bounces/{email} #
$query_params = json_decode('{"email_address": "example@example.com"}');
$email = "test_url_param";
@@ -85,9 +85,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all invalid emails #
-# GET /suppression/invalid_emails #
+////////////////////////////////////////////////////
+// Retrieve all invalid emails #
+// GET /suppression/invalid_emails #
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->invalid_emails()->get(null, $query_params);
@@ -95,18 +95,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete invalid emails #
-# DELETE /suppression/invalid_emails #
+////////////////////////////////////////////////////
+// Delete invalid emails #
+// DELETE /suppression/invalid_emails #
$response = $sg->client->suppression()->invalid_emails()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a specific invalid email #
-# GET /suppression/invalid_emails/{email} #
+////////////////////////////////////////////////////
+// Retrieve a specific invalid email #
+// GET /suppression/invalid_emails/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->invalid_emails()->_($email)->get();
@@ -114,9 +114,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a specific invalid email #
-# DELETE /suppression/invalid_emails/{email} #
+////////////////////////////////////////////////////
+// Delete a specific invalid email #
+// DELETE /suppression/invalid_emails/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->invalid_emails()->_($email)->delete($request_body);
@@ -124,9 +124,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a specific spam report #
-# GET /suppression/spam_report/{email} #
+////////////////////////////////////////////////////
+// Retrieve a specific spam report #
+// GET /suppression/spam_report/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->spam_report()->_($email)->get();
@@ -134,9 +134,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a specific spam report #
-# DELETE /suppression/spam_report/{email} #
+////////////////////////////////////////////////////
+// Delete a specific spam report #
+// DELETE /suppression/spam_report/{email} #
$email = "test_url_param";
$response = $sg->client->suppression()->spam_report()->_($email)->delete($request_body);
@@ -144,9 +144,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all spam reports #
-# GET /suppression/spam_reports #
+////////////////////////////////////////////////////
+// Retrieve all spam reports #
+// GET /suppression/spam_reports #
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->spam_reports()->get(null, $query_params);
@@ -154,18 +154,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete spam reports #
-# DELETE /suppression/spam_reports #
+////////////////////////////////////////////////////
+// Delete spam reports #
+// DELETE /suppression/spam_reports #
$response = $sg->client->suppression()->spam_reports()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all global suppressions #
-# GET /suppression/unsubscribes #
+////////////////////////////////////////////////////
+// Retrieve all global suppressions #
+// GET /suppression/unsubscribes #
$query_params = json_decode('{"start_time": 1, "limit": 1, "end_time": 1, "offset": 1}');
$response = $sg->client->suppression()->unsubscribes()->get(null, $query_params);
diff --git a/examples/templates/templates.php b/examples/templates/templates.php
index 93b9051..4a6e366 100644
--- a/examples/templates/templates.php
+++ b/examples/templates/templates.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a transactional template. #
-# POST /templates #
+////////////////////////////////////////////////////
+// Create a transactional template. #
+// POST /templates #
$request_body = json_decode('{
"name": "example_name"
@@ -18,18 +18,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all transactional templates. #
-# GET /templates #
+////////////////////////////////////////////////////
+// Retrieve all transactional templates. #
+// GET /templates #
$response = $sg->client->templates()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Edit a transactional template. #
-# PATCH /templates/{template_id} #
+////////////////////////////////////////////////////
+// Edit a transactional template. #
+// PATCH /templates/{template_id} #
$request_body = json_decode('{
"name": "new_example_name"
@@ -40,9 +40,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a single transactional template. #
-# GET /templates/{template_id} #
+////////////////////////////////////////////////////
+// Retrieve a single transactional template. #
+// GET /templates/{template_id} #
$template_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->get();
@@ -50,9 +50,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a template. #
-# DELETE /templates/{template_id} #
+////////////////////////////////////////////////////
+// Delete a template. #
+// DELETE /templates/{template_id} #
$template_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->delete($request_body);
@@ -60,9 +60,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create a new transactional template version. #
-# POST /templates/{template_id}/versions #
+////////////////////////////////////////////////////
+// Create a new transactional template version. #
+// POST /templates/{template_id}/versions #
$request_body = json_decode('{
"active": 1,
@@ -78,9 +78,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Edit a transactional template version. #
-# PATCH /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////
+// Edit a transactional template version. #
+// PATCH /templates/{template_id}/versions/{version_id} #
$request_body = json_decode('{
"active": 1,
@@ -90,41 +90,41 @@ $request_body = json_decode('{
"subject": "<%subject%>"
}');
$template_id = "test_url_param";
- $version_id = "test_url_param";
+$version_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->versions()->_($version_id)->patch($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a specific transactional template version. #
-# GET /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////
+// Retrieve a specific transactional template version. #
+// GET /templates/{template_id}/versions/{version_id} #
$template_id = "test_url_param";
- $version_id = "test_url_param";
+$version_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->versions()->_($version_id)->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a transactional template version. #
-# DELETE /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////
+// Delete a transactional template version. #
+// DELETE /templates/{template_id}/versions/{version_id} #
$template_id = "test_url_param";
- $version_id = "test_url_param";
+$version_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->versions()->_($version_id)->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Activate a transactional template version. #
-# POST /templates/{template_id}/versions/{version_id}/activate #
+////////////////////////////////////////////////////
+// Activate a transactional template version. #
+// POST /templates/{template_id}/versions/{version_id}/activate #
$request_body = json_decode('null');
$template_id = "test_url_param";
- $version_id = "test_url_param";
+$version_id = "test_url_param";
$response = $sg->client->templates()->_($template_id)->versions()->_($version_id)->activate()->post($request_body);
echo $response->statusCode();
echo $response->body();
diff --git a/examples/trackingsettings/trackingsettings.php b/examples/trackingsettings/trackingsettings.php
index 8e9fd55..f6e5605 100644
--- a/examples/trackingsettings/trackingsettings.php
+++ b/examples/trackingsettings/trackingsettings.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Retrieve Tracking Settings #
-# GET /tracking_settings #
+////////////////////////////////////////////////////
+// Retrieve Tracking Settings #
+// GET /tracking_settings #
$query_params = json_decode('{"limit": 1, "offset": 1}');
$response = $sg->client->tracking_settings()->get(null, $query_params);
@@ -16,9 +16,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Click Tracking Settings #
-# PATCH /tracking_settings/click #
+////////////////////////////////////////////////////
+// Update Click Tracking Settings #
+// PATCH /tracking_settings/click #
$request_body = json_decode('{
"enabled": true
@@ -28,18 +28,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Click Track Settings #
-# GET /tracking_settings/click #
+////////////////////////////////////////////////////
+// Retrieve Click Track Settings #
+// GET /tracking_settings/click #
$response = $sg->client->tracking_settings()->click()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Google Analytics Settings #
-# PATCH /tracking_settings/google_analytics #
+////////////////////////////////////////////////////
+// Update Google Analytics Settings #
+// PATCH /tracking_settings/google_analytics #
$request_body = json_decode('{
"enabled": true,
@@ -54,18 +54,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Google Analytics Settings #
-# GET /tracking_settings/google_analytics #
+////////////////////////////////////////////////////
+// Retrieve Google Analytics Settings #
+// GET /tracking_settings/google_analytics #
$response = $sg->client->tracking_settings()->google_analytics()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Open Tracking Settings #
-# PATCH /tracking_settings/open #
+////////////////////////////////////////////////////
+// Update Open Tracking Settings #
+// PATCH /tracking_settings/open #
$request_body = json_decode('{
"enabled": true
@@ -75,18 +75,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Get Open Tracking Settings #
-# GET /tracking_settings/open #
+////////////////////////////////////////////////////
+// Get Open Tracking Settings #
+// GET /tracking_settings/open #
$response = $sg->client->tracking_settings()->open()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Subscription Tracking Settings #
-# PATCH /tracking_settings/subscription #
+////////////////////////////////////////////////////
+// Update Subscription Tracking Settings #
+// PATCH /tracking_settings/subscription #
$request_body = json_decode('{
"enabled": true,
@@ -101,9 +101,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Subscription Tracking Settings #
-# GET /tracking_settings/subscription #
+////////////////////////////////////////////////////
+// Retrieve Subscription Tracking Settings #
+// GET /tracking_settings/subscription #
$response = $sg->client->tracking_settings()->subscription()->get();
echo $response->statusCode();
diff --git a/examples/user/user.php b/examples/user/user.php
index 82c4dac..a043fef 100644
--- a/examples/user/user.php
+++ b/examples/user/user.php
@@ -6,27 +6,27 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Get a user's account information. #
-# GET /user/account #
+////////////////////////////////////////////////////
+// Get a user's account information. #
+// GET /user/account #
$response = $sg->client->user()->account()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve your credit balance #
-# GET /user/credits #
+////////////////////////////////////////////////////
+// Retrieve your credit balance #
+// GET /user/credits #
$response = $sg->client->user()->credits()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update your account email address #
-# PUT /user/email #
+////////////////////////////////////////////////////
+// Update your account email address #
+// PUT /user/email #
$request_body = json_decode('{
"email": "example@example.com"
@@ -36,18 +36,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve your account email address #
-# GET /user/email #
+////////////////////////////////////////////////////
+// Retrieve your account email address #
+// GET /user/email #
$response = $sg->client->user()->email()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update your password #
-# PUT /user/password #
+////////////////////////////////////////////////////
+// Update your password #
+// PUT /user/password #
$request_body = json_decode('{
"new_password": "new_password",
@@ -58,9 +58,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a user's profile #
-# PATCH /user/profile #
+////////////////////////////////////////////////////
+// Update a user's profile #
+// PATCH /user/profile #
$request_body = json_decode('{
"city": "Orange",
@@ -72,18 +72,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Get a user's profile #
-# GET /user/profile #
+////////////////////////////////////////////////////
+// Get a user's profile #
+// GET /user/profile #
$response = $sg->client->user()->profile()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Cancel or pause a scheduled send #
-# POST /user/scheduled_sends #
+////////////////////////////////////////////////////
+// Cancel or pause a scheduled send #
+// POST /user/scheduled_sends #
$request_body = json_decode('{
"batch_id": "YOUR_BATCH_ID",
@@ -94,18 +94,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all scheduled sends #
-# GET /user/scheduled_sends #
+////////////////////////////////////////////////////
+// Retrieve all scheduled sends #
+// GET /user/scheduled_sends #
$response = $sg->client->user()->scheduled_sends()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update user scheduled send information #
-# PATCH /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////
+// Update user scheduled send information #
+// PATCH /user/scheduled_sends/{batch_id} #
$request_body = json_decode('{
"status": "pause"
@@ -116,9 +116,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve scheduled send #
-# GET /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////
+// Retrieve scheduled send #
+// GET /user/scheduled_sends/{batch_id} #
$batch_id = "test_url_param";
$response = $sg->client->user()->scheduled_sends()->_($batch_id)->get();
@@ -126,9 +126,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a cancellation or pause of a scheduled send #
-# DELETE /user/scheduled_sends/{batch_id} #
+////////////////////////////////////////////////////
+// Delete a cancellation or pause of a scheduled send #
+// DELETE /user/scheduled_sends/{batch_id} #
$batch_id = "test_url_param";
$response = $sg->client->user()->scheduled_sends()->_($batch_id)->delete($request_body);
@@ -136,9 +136,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Enforced TLS settings #
-# PATCH /user/settings/enforced_tls #
+////////////////////////////////////////////////////
+// Update Enforced TLS settings #
+// PATCH /user/settings/enforced_tls #
$request_body = json_decode('{
"require_tls": true,
@@ -149,18 +149,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve current Enforced TLS settings. #
-# GET /user/settings/enforced_tls #
+////////////////////////////////////////////////////
+// Retrieve current Enforced TLS settings. #
+// GET /user/settings/enforced_tls #
$response = $sg->client->user()->settings()->enforced_tls()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update your username #
-# PUT /user/username #
+////////////////////////////////////////////////////
+// Update your username #
+// PUT /user/username #
$request_body = json_decode('{
"username": "test_username"
@@ -170,18 +170,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve your username #
-# GET /user/username #
+////////////////////////////////////////////////////
+// Retrieve your username #
+// GET /user/username #
$response = $sg->client->user()->username()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update Event Notification Settings #
-# PATCH /user/webhooks/event/settings #
+////////////////////////////////////////////////////
+// Update Event Notification Settings #
+// PATCH /user/webhooks/event/settings #
$request_body = json_decode('{
"bounce": true,
@@ -203,18 +203,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Event Webhook settings #
-# GET /user/webhooks/event/settings #
+////////////////////////////////////////////////////
+// Retrieve Event Webhook settings #
+// GET /user/webhooks/event/settings #
$response = $sg->client->user()->webhooks()->event()->settings()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Test Event Notification Settings #
-# POST /user/webhooks/event/test #
+////////////////////////////////////////////////////
+// Test Event Notification Settings #
+// POST /user/webhooks/event/test #
$request_body = json_decode('{
"url": "url"
@@ -224,18 +224,18 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Parse Webhook settings #
-# GET /user/webhooks/parse/settings #
+////////////////////////////////////////////////////
+// Retrieve Parse Webhook settings #
+// GET /user/webhooks/parse/settings #
$response = $sg->client->user()->webhooks()->parse()->settings()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieves Inbound Parse Webhook statistics. #
-# GET /user/webhooks/parse/stats #
+////////////////////////////////////////////////////
+// Retrieves Inbound Parse Webhook statistics. #
+// GET /user/webhooks/parse/stats #
$query_params = json_decode('{"aggregated_by": "day", "limit": "test_string", "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": "test_string"}');
$response = $sg->client->user()->webhooks()->parse()->stats()->get(null, $query_params);
diff --git a/examples/whitelabel/whitelabel.php b/examples/whitelabel/whitelabel.php
index 8adac3a..c0ab694 100644
--- a/examples/whitelabel/whitelabel.php
+++ b/examples/whitelabel/whitelabel.php
@@ -6,9 +6,9 @@ require 'vendor/autoload.php';
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
-##################################################
-# Create a domain whitelabel. #
-# POST /whitelabel/domains #
+////////////////////////////////////////////////////
+// Create a domain whitelabel. #
+// POST /whitelabel/domains #
$request_body = json_decode('{
"automatic_security": false,
@@ -27,9 +27,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# List all domain whitelabels. #
-# GET /whitelabel/domains #
+////////////////////////////////////////////////////
+// List all domain whitelabels. #
+// GET /whitelabel/domains #
$query_params = json_decode('{"username": "test_string", "domain": "test_string", "exclude_subusers": "true", "limit": 1, "offset": 1}');
$response = $sg->client->whitelabel()->domains()->get(null, $query_params);
@@ -37,36 +37,36 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Get the default domain whitelabel. #
-# GET /whitelabel/domains/default #
+////////////////////////////////////////////////////
+// Get the default domain whitelabel. #
+// GET /whitelabel/domains/default #
$response = $sg->client->whitelabel()->domains()->default()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# List the domain whitelabel associated with the given user. #
-# GET /whitelabel/domains/subuser #
+////////////////////////////////////////////////////
+// List the domain whitelabel associated with the given user. #
+// GET /whitelabel/domains/subuser #
$response = $sg->client->whitelabel()->domains()->subuser()->get();
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Disassociate a domain whitelabel from a given user. #
-# DELETE /whitelabel/domains/subuser #
+////////////////////////////////////////////////////
+// Disassociate a domain whitelabel from a given user. #
+// DELETE /whitelabel/domains/subuser #
$response = $sg->client->whitelabel()->domains()->subuser()->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a domain whitelabel. #
-# PATCH /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////
+// Update a domain whitelabel. #
+// PATCH /whitelabel/domains/{domain_id} #
$request_body = json_decode('{
"custom_spf": true,
@@ -78,9 +78,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a domain whitelabel. #
-# GET /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////
+// Retrieve a domain whitelabel. #
+// GET /whitelabel/domains/{domain_id} #
$domain_id = "test_url_param";
$response = $sg->client->whitelabel()->domains()->_($domain_id)->get();
@@ -88,9 +88,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a domain whitelabel. #
-# DELETE /whitelabel/domains/{domain_id} #
+////////////////////////////////////////////////////
+// Delete a domain whitelabel. #
+// DELETE /whitelabel/domains/{domain_id} #
$domain_id = "test_url_param";
$response = $sg->client->whitelabel()->domains()->_($domain_id)->delete($request_body);
@@ -98,9 +98,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Associate a domain whitelabel with a given user. #
-# POST /whitelabel/domains/{domain_id}/subuser #
+////////////////////////////////////////////////////
+// Associate a domain whitelabel with a given user. #
+// POST /whitelabel/domains/{domain_id}/subuser #
$request_body = json_decode('{
"username": "jane@example.com"
@@ -111,9 +111,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Add an IP to a domain whitelabel. #
-# POST /whitelabel/domains/{id}/ips #
+////////////////////////////////////////////////////
+// Add an IP to a domain whitelabel. #
+// POST /whitelabel/domains/{id}/ips #
$request_body = json_decode('{
"ip": "192.168.0.1"
@@ -124,20 +124,20 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Remove an IP from a domain whitelabel. #
-# DELETE /whitelabel/domains/{id}/ips/{ip} #
+////////////////////////////////////////////////////
+// Remove an IP from a domain whitelabel. #
+// DELETE /whitelabel/domains/{id}/ips/{ip} #
$id = "test_url_param";
- $ip = "test_url_param";
+$ip = "test_url_param";
$response = $sg->client->whitelabel()->domains()->_($id)->ips()->_($ip)->delete($request_body);
echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Validate a domain whitelabel. #
-# POST /whitelabel/domains/{id}/validate #
+////////////////////////////////////////////////////
+// Validate a domain whitelabel. #
+// POST /whitelabel/domains/{id}/validate #
$request_body = json_decode('null');
$id = "test_url_param";
@@ -146,9 +146,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create an IP whitelabel #
-# POST /whitelabel/ips #
+////////////////////////////////////////////////////
+// Create an IP whitelabel #
+// POST /whitelabel/ips #
$request_body = json_decode('{
"domain": "example.com",
@@ -160,9 +160,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all IP whitelabels #
-# GET /whitelabel/ips #
+////////////////////////////////////////////////////
+// Retrieve all IP whitelabels #
+// GET /whitelabel/ips #
$query_params = json_decode('{"ip": "test_string", "limit": 1, "offset": 1}');
$response = $sg->client->whitelabel()->ips()->get(null, $query_params);
@@ -170,9 +170,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve an IP whitelabel #
-# GET /whitelabel/ips/{id} #
+////////////////////////////////////////////////////
+// Retrieve an IP whitelabel #
+// GET /whitelabel/ips/{id} #
$id = "test_url_param";
$response = $sg->client->whitelabel()->ips()->_($id)->get();
@@ -180,9 +180,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete an IP whitelabel #
-# DELETE /whitelabel/ips/{id} #
+////////////////////////////////////////////////////
+// Delete an IP whitelabel #
+// DELETE /whitelabel/ips/{id} #
$id = "test_url_param";
$response = $sg->client->whitelabel()->ips()->_($id)->delete($request_body);
@@ -190,9 +190,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Validate an IP whitelabel #
-# POST /whitelabel/ips/{id}/validate #
+////////////////////////////////////////////////////
+// Validate an IP whitelabel #
+// POST /whitelabel/ips/{id}/validate #
$request_body = json_decode('null');
$id = "test_url_param";
@@ -201,9 +201,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Create a Link Whitelabel #
-# POST /whitelabel/links #
+////////////////////////////////////////////////////
+// Create a Link Whitelabel #
+// POST /whitelabel/links #
$request_body = json_decode('{
"default": true,
@@ -216,9 +216,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve all link whitelabels #
-# GET /whitelabel/links #
+////////////////////////////////////////////////////
+// Retrieve all link whitelabels #
+// GET /whitelabel/links #
$query_params = json_decode('{"limit": 1}');
$response = $sg->client->whitelabel()->links()->get(null, $query_params);
@@ -226,9 +226,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Default Link Whitelabel #
-# GET /whitelabel/links/default #
+////////////////////////////////////////////////////
+// Retrieve a Default Link Whitelabel #
+// GET /whitelabel/links/default #
$query_params = json_decode('{"domain": "test_string"}');
$response = $sg->client->whitelabel()->links()->default()->get(null, $query_params);
@@ -236,9 +236,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve Associated Link Whitelabel #
-# GET /whitelabel/links/subuser #
+////////////////////////////////////////////////////
+// Retrieve Associated Link Whitelabel #
+// GET /whitelabel/links/subuser #
$query_params = json_decode('{"username": "test_string"}');
$response = $sg->client->whitelabel()->links()->subuser()->get(null, $query_params);
@@ -246,9 +246,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Disassociate a Link Whitelabel #
-# DELETE /whitelabel/links/subuser #
+////////////////////////////////////////////////////
+// Disassociate a Link Whitelabel #
+// DELETE /whitelabel/links/subuser #
$query_params = json_decode('{"username": "test_string"}');
$response = $sg->client->whitelabel()->links()->subuser()->delete($request_body, $query_params);
@@ -256,9 +256,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Update a Link Whitelabel #
-# PATCH /whitelabel/links/{id} #
+////////////////////////////////////////////////////
+// Update a Link Whitelabel #
+// PATCH /whitelabel/links/{id} #
$request_body = json_decode('{
"default": true
@@ -269,9 +269,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Retrieve a Link Whitelabel #
-# GET /whitelabel/links/{id} #
+////////////////////////////////////////////////////
+// Retrieve a Link Whitelabel #
+// GET /whitelabel/links/{id} #
$id = "test_url_param";
$response = $sg->client->whitelabel()->links()->_($id)->get();
@@ -279,9 +279,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Delete a Link Whitelabel #
-# DELETE /whitelabel/links/{id} #
+////////////////////////////////////////////////////
+// Delete a Link Whitelabel #
+// DELETE /whitelabel/links/{id} #
$id = "test_url_param";
$response = $sg->client->whitelabel()->links()->_($id)->delete($request_body);
@@ -289,9 +289,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Validate a Link Whitelabel #
-# POST /whitelabel/links/{id}/validate #
+////////////////////////////////////////////////////
+// Validate a Link Whitelabel #
+// POST /whitelabel/links/{id}/validate #
$request_body = json_decode('null');
$id = "test_url_param";
@@ -300,9 +300,9 @@ echo $response->statusCode();
echo $response->body();
echo $response->headers();
-##################################################
-# Associate a Link Whitelabel #
-# POST /whitelabel/links/{link_id}/subuser #
+////////////////////////////////////////////////////
+// Associate a Link Whitelabel #
+// POST /whitelabel/links/{link_id}/subuser #
$request_body = json_decode('{
"username": "jane@example.com"