Skip to content

Commit 91eceaf

Browse files
committed
V22.9.0 - 2022-09-16
1 parent bec71e2 commit 91eceaf

File tree

5 files changed

+189
-108
lines changed

5 files changed

+189
-108
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
// Generated file. Do not edit by hand. Use update.php in project root.
4+
5+
namespace PHPFUI\ConstantContact\Definition;
6+
7+
/**
8+
* @property int $total Total number of contacts for the account.
9+
* @property int $explicit Total number of contacts explicitly confirmed. Consent is obtained when you explicitly ask your potential contacts for permission to send the email (for example, using a sign-up form) and they agree. After you obtain express consent, it is good forever or until the contact opts out.
10+
* @property int $implicit Total number of contacts implicitly confirmed. Consent is inferred based on actions, such as having an existing business relationship (making a purchase or donation, for example). In order to maintain implied consent to comply with CASL a contact must take a business action with you at least once every two years. Under CAN-Spam there is no need to maintain implied consent, it is assumed until the receiver indicates they no longer wish to receive messages.
11+
* @property int $pending Total number of contacts pending confirmation. Consent is requested and pending confirmation from the contact.
12+
* @property int $unsubscribed Total number of unsubscribed contacts. Consent is revoked when a contact has unsubscribed.
13+
* @property int $new_subscriber Total number of newly subscribed contacts.
14+
*/
15+
class ContactsCounts extends \PHPFUI\ConstantContact\Definition\Base
16+
{
17+
protected static array $fields = [
18+
'total' => 'int',
19+
'explicit' => 'int',
20+
'implicit' => 'int',
21+
'pending' => 'int',
22+
'unsubscribed' => 'int',
23+
'new_subscriber' => 'int',
24+
25+
];
26+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
// Generated file. Do not edit by hand. Use update.php in project root.
4+
5+
namespace PHPFUI\ConstantContact\V3\Contacts;
6+
7+
class Counts extends \PHPFUI\ConstantContact\Base
8+
{
9+
public function __construct(\PHPFUI\ConstantContact\Client $client)
10+
{
11+
parent::__construct($client, '/v3/contacts/counts');
12+
}
13+
14+
/**
15+
* GET Contact Consent Counts
16+
*
17+
* Use to get the total contacts count for the account and the total contact-consent
18+
* counts for each consent state. Optionally, to include the total number
19+
* of new subscribers in the results, use `new_subscribers` in the `include`
20+
* query parameter. To optimize open rates, reduce spam reports, and help
21+
* grow your business, you must value your contact's consent to receive
22+
* or to not receive your emails.
23+
*
24+
* @param string $include Use to return the total number of new contact subscribers in the results.
25+
*/
26+
public function get(?string $include = null) : array
27+
{
28+
29+
if (null !== $include)
30+
{
31+
$validValues = ['new_subscriber'];
32+
33+
if (! \in_array($include, $validValues))
34+
{
35+
throw new \PHPFUI\ConstantContact\Exception\InvalidValue("Parameter include with value '{$include}' is not one of (" . \implode(', ', $validValues) . ') in ' . __METHOD__);
36+
}
37+
}
38+
39+
return $this->doGet(['include' => $include, ]);
40+
}
41+
}

src/ConstantContact/V3/Reports/EmailReports/Link.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@ public function __construct(\PHPFUI\ConstantContact\Client $client)
1414
/**
1515
* GET an Email Links Report
1616
*
17-
* Use this method to return the number of unique contacts that clicked
18-
* each link in an email campaign activity and the type of action associated
19-
* with clicking each link. You can return reporting data for `primary_email`
20-
* and `resend` role email campaign activities. For more use case information,
21-
* see [Get an Email Links Report](https://v3.developer.constantcontact.com/api_guide/email_links_report.html)
17+
* Use this method to return link details, including the number of unique
18+
* contacts that clicked each link in an email campaign activity, and the
19+
* type of action associated with clicking each link. To include link details
20+
* for links that were not clicked, set the `no_clicks` query parameter
21+
* to `true`.
22+
*
23+
* You can return reporting data for `primary_email` and `resend` role
24+
* email campaign activities. For more use case information, see [Get an
25+
* Email Links Report](https://v3.developer.constantcontact.com/api_guide/email_links_report.html)
2226
* in the API guide.
2327
*
2428
* @param string $campaign_activity_id The unique ID for an email campaign activity.
29+
* @param bool $no_clicks Set this query parameter to `true` to return details for links that were not clicked in the response results.
2530
*/
26-
public function get(string $campaign_activity_id) : array
31+
public function get(string $campaign_activity_id, ?bool $no_clicks = null) : array
2732
{
2833

29-
return $this->doGet(['campaign_activity_id' => $campaign_activity_id, ]);
34+
return $this->doGet(['campaign_activity_id' => $campaign_activity_id, 'no_clicks' => $no_clicks, ]);
3035
}
3136
}

src/ConstantContact/V3/TokenInfo.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

yaml/swagger.yaml

Lines changed: 110 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ swagger: "2.0"
33
info:
44
description: "The Constant Contact, Inc. V3 public API, for building integrations\
55
\ with Constant Contact, the leading small-business email marketing platform."
6-
version: "3.0.0"
6+
version: "3.0.1955"
77
title: "AppConnect V3"
88
contact:
99
name: "webservices@constantcontact.com"
@@ -2483,6 +2483,59 @@ paths:
24832483
- api_key: []
24842484
x-authorization-privileges:
24852485
- "contacts:lists:read"
2486+
/contacts/counts:
2487+
get:
2488+
tags:
2489+
- "Contacts"
2490+
summary: "GET Contact Consent Counts"
2491+
description: "Use to get the total contacts count for the account and the total\
2492+
\ contact-consent counts for each consent state. Optionally, to include the\
2493+
\ total number of new subscribers in the results, use `new_subscribers` in\
2494+
\ the `include` query parameter. To optimize open rates, reduce spam reports,\
2495+
\ and help grow your business, you must value your contact's consent to receive\
2496+
\ or to not receive your emails."
2497+
operationId: "countContact"
2498+
consumes:
2499+
- "application/json"
2500+
produces:
2501+
- "application/json"
2502+
parameters:
2503+
- name: "include"
2504+
in: "query"
2505+
description: "Use to return the total number of new contact subscribers in\
2506+
\ the results."
2507+
required: false
2508+
type: "string"
2509+
x-example: "new_subscriber"
2510+
enum:
2511+
- "new_subscriber"
2512+
responses:
2513+
"200":
2514+
description: "Request successful"
2515+
schema:
2516+
$ref: "#/definitions/ContactsCounts"
2517+
"400":
2518+
description: "Bad request. Either the JSON was malformed or there was a\
2519+
\ data validation error."
2520+
"401":
2521+
description: "The Access Token used is invalid."
2522+
"403":
2523+
description: "Forbidden request. You lack the necessary scopes, you lack\
2524+
\ the necessary user privileges, or the application is deactivated."
2525+
"404":
2526+
description: "The requested resource was not found."
2527+
"500":
2528+
description: "There was a problem with our internal service."
2529+
"503":
2530+
description: "Our internal service is temporarily unavailable."
2531+
security:
2532+
- oauth2_implicit:
2533+
- "contact_data"
2534+
- oauth2_access_code:
2535+
- "contact_data"
2536+
- api_key: []
2537+
x-authorization-privileges:
2538+
- "contacts:read"
24862539
/contact_tags/{tag_id}:
24872540
get:
24882541
tags:
@@ -4083,12 +4136,13 @@ paths:
40834136
tags:
40844137
- "Email Reporting"
40854138
summary: "GET an Email Links Report"
4086-
description: "Use this method to return the number of unique contacts that clicked\
4087-
\ each link in an email campaign activity and the type of action associated\
4088-
\ with clicking each link. You can return reporting data for `primary_email`\
4089-
\ and `resend` role email campaign activities. For more use case information,\
4090-
\ see [Get an Email Links Report](/api_guide/email_links_report.html) in the\
4091-
\ API guide."
4139+
description: "Use this method to return link details, including the number of\
4140+
\ unique contacts that clicked each link in an email campaign activity, and\
4141+
\ the type of action associated with clicking each link. To include link details\
4142+
\ for links that were not clicked, set the `no_clicks` query parameter to\
4143+
\ `true`.\n\nYou can return reporting data for `primary_email` and `resend`\
4144+
\ role email campaign activities. For more use case information, see [Get\
4145+
\ an Email Links Report](/api_guide/email_links_report.html) in the API guide."
40924146
operationId: "getCampaignActivityLinkStats"
40934147
consumes:
40944148
- "application/json"
@@ -4102,6 +4156,14 @@ paths:
41024156
type: "string"
41034157
format: "uuid"
41044158
x-example: "8892baf9-970a-4de6-8400-fa4ec461987c"
4159+
- name: "no_clicks"
4160+
in: "query"
4161+
description: "Set this query parameter to `true` to return details for links\
4162+
\ that were not clicked in the response results."
4163+
required: false
4164+
type: "boolean"
4165+
default: false
4166+
x-example: true
41054167
responses:
41064168
"200":
41074169
description: "Request was successful"
@@ -5373,47 +5435,6 @@ paths:
53735435
security:
53745436
- ctctPartnerAuthorizer: []
53755437
- api_key: []
5376-
/token_info:
5377-
post:
5378-
tags:
5379-
- "Access Token Information"
5380-
summary: "Access Token Information"
5381-
description: "IMPORTANT NOTE: As of March 31, 2022, this POST method is being\
5382-
\ depreciated. To view the scopes associated with an access token, parse the\
5383-
\ access token (JWT) claims.\n"
5384-
operationId: "postAuthCode"
5385-
consumes:
5386-
- "application/json"
5387-
produces:
5388-
- "application/json"
5389-
parameters:
5390-
- in: "body"
5391-
name: "auth_token"
5392-
description: "A JSON request payload containing a valid OAuth2.0 access token."
5393-
required: true
5394-
schema:
5395-
$ref: "#/definitions/AuthToken"
5396-
responses:
5397-
"200":
5398-
description: "Request Successful"
5399-
schema:
5400-
$ref: "#/definitions/AuthInfoResponse"
5401-
"400":
5402-
description: "Bad request. Either the JSON was malformed or there was a\
5403-
\ data validation error."
5404-
"401":
5405-
description: "The Access Token used is invalid."
5406-
"403":
5407-
description: "Forbidden request. You lack the necessary scopes, you lack\
5408-
\ the necessary user privileges, or the application is deactivated."
5409-
"415":
5410-
description: "Unsupported Media Type."
5411-
"500":
5412-
description: "There was a problem with our internal service."
5413-
security:
5414-
- oauth2_implicit: []
5415-
- oauth2_access_code: []
5416-
- api_key: []
54175438
/idfed:
54185439
get:
54195440
summary: "V3 Authorization service endpoint for OAuth 2.0 flows"
@@ -5455,7 +5476,7 @@ paths:
54555476
securityDefinitions:
54565477
oauth2_implicit:
54575478
type: "oauth2"
5458-
authorizationUrl: "https://api.cc.email/v3/idfed"
5479+
authorizationUrl: "https://authz.constantcontact.com/oauth2/default/v1/authorize"
54595480
flow: "implicit"
54605481
scopes:
54615482
contact_data: "Read or modify contact data."
@@ -5464,8 +5485,8 @@ securityDefinitions:
54645485
account_update: "Modify account data."
54655486
oauth2_access_code:
54665487
type: "oauth2"
5467-
authorizationUrl: "https://api.cc.email/v3/idfed"
5468-
tokenUrl: "https://idfed.constantcontact.com/as/token.oauth2"
5488+
authorizationUrl: "https://authz.constantcontact.com/oauth2/default/v1/authorize"
5489+
tokenUrl: "https://authz.constantcontact.com/oauth2/default/v1/token"
54695490
flow: "accessCode"
54705491
scopes:
54715492
contact_data: "Read or modify contact data."
@@ -8522,6 +8543,44 @@ definitions:
85228543
description: "The V3 API list unique identifier"
85238544
description: "The cross-referenced pair of V3 API <code>list_id</code> and V2\
85248545
\ API <code>sequence_id</code> for a list. Response is sorted ascending by <code>sequence_id</code>."
8546+
ContactsCounts:
8547+
type: "object"
8548+
properties:
8549+
total:
8550+
type: "integer"
8551+
example: 72
8552+
description: "Total number of contacts for the account."
8553+
explicit:
8554+
type: "integer"
8555+
example: 10
8556+
description: "Total number of contacts explicitly confirmed. Consent is obtained\
8557+
\ when you explicitly ask your potential contacts for permission to send\
8558+
\ the email (for example, using a sign-up form) and they agree. After you\
8559+
\ obtain express consent, it is good forever or until the contact opts out."
8560+
implicit:
8561+
type: "integer"
8562+
example: 20
8563+
description: "Total number of contacts implicitly confirmed. Consent is inferred\
8564+
\ based on actions, such as having an existing business relationship (making\
8565+
\ a purchase or donation, for example). In order to maintain implied consent\
8566+
\ to comply with CASL a contact must take a business action with you at\
8567+
\ least once every two years. Under CAN-Spam there is no need to maintain\
8568+
\ implied consent, it is assumed until the receiver indicates they no longer\
8569+
\ wish to receive messages."
8570+
pending:
8571+
type: "integer"
8572+
example: 30
8573+
description: "Total number of contacts pending confirmation. Consent is requested\
8574+
\ and pending confirmation from the contact."
8575+
unsubscribed:
8576+
type: "integer"
8577+
example: 12
8578+
description: "Total number of unsubscribed contacts. Consent is revoked when\
8579+
\ a contact has unsubscribed."
8580+
new_subscriber:
8581+
type: "integer"
8582+
example: 1
8583+
description: "Total number of newly subscribed contacts."
85258584
Tag:
85268585
type: "object"
85278586
properties:
@@ -11716,27 +11775,6 @@ definitions:
1171611775
file_id:
1171711776
type: "integer"
1171811777
description: "Identifies the file in MyLibrary."
11719-
AuthToken:
11720-
required:
11721-
- "token"
11722-
properties:
11723-
token:
11724-
type: "string"
11725-
example: "FCR3XvjhqjhGVftqkjkUhf66nhAn"
11726-
description: "A valid OAuth2.0 access token."
11727-
AuthInfoResponse:
11728-
properties:
11729-
scopes:
11730-
type: "array"
11731-
description: "The scopes associated with your access token as an array containing\
11732-
\ scope strings."
11733-
items:
11734-
type: "string"
11735-
enum:
11736-
- "account_read"
11737-
- "account_update"
11738-
- "contact_data"
11739-
- "campaign_data"
1174011778
responses:
1174111779
Activities429ErrorResponse:
1174211780
description: "Too many requests. You exceeded 1,000 queued activities for this\

0 commit comments

Comments
 (0)