Skip to content

Commit

Permalink
V24.11.3 - 2024-11-06
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfui committed Nov 6, 2024
1 parent e4b2581 commit 87dd954
Show file tree
Hide file tree
Showing 11 changed files with 428 additions and 50 deletions.
24 changes: 24 additions & 0 deletions src/ConstantContact/Definition/BulkCampaignSummary.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property \PHPFUI\ConstantContact\UUID $campaign_id The ID that uniquely identifies the campaign.
* @property string $campaign_name The name to associate with this campaign.
* @property \PHPFUI\ConstantContact\DateTime $last_sent_date The date that the campaign was last sent.
* @property \PHPFUI\ConstantContact\Definition\UniqueSmsCounts $unique_counts The total number of times each unique contact interacted with a tracked SMS campaign activity.
* @property string $campaign_type The campaign type.
*/
class BulkCampaignSummary extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'campaign_id' => '\PHPFUI\ConstantContact\UUID',
'campaign_name' => 'string',
'last_sent_date' => '\PHPFUI\ConstantContact\DateTime',
'unique_counts' => '\PHPFUI\ConstantContact\Definition\UniqueSmsCounts',
'campaign_type' => 'string',

];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property int $deliver The aggregated SMS delivery rate for all campaigns on the current results page.
* @property int $click The aggregated click rate for all campaigns on the current results page.
* @property int $bounce The aggregated bounce rate for all campaigns on the current results page.
* @property int $unsubscribe The aggregated unsubscribe (opt-out) rate for all campaigns on the current results page.
*/
class BulkSmsCampaignSummariesPercents extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'deliver' => 'int',
'click' => 'int',
'bounce' => 'int',
'unsubscribe' => 'int',

];
}
17 changes: 12 additions & 5 deletions src/ConstantContact/Definition/ContactsExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,33 @@
namespace PHPFUI\ConstantContact\Definition;

/**
* @property array<\PHPFUI\ConstantContact\UUID> $contact_ids Exports up to 500 specific contacts. This property is mutually exclusive with <code>list_ids</code>.
* @property array<\PHPFUI\ConstantContact\UUID> $list_ids Exports all of the contacts inside of up to 50 contact lists. This property is mutually exclusive with <code>contact_ids</code>.
* @property int $segment_id Specify the <code>segment_id</code> from which you want to export all contacts that meet the specified <code>segment_criteria</code>. This property is mutually exclusive with <code>contact_ids</code> and <code>list_ids</code>. You can only specify one <code>segment_id</code>.
* @property array $fields Use this array to export specific contact fields. You must export <code>email_address</code> to successfully export <code>email_optin_source</code>, <code>email_optin_date</code>, <code>email_optout_source</code>, <code>email_optout_date</code>, or <code>email_optout_reason</code>.
* @property string $status Allows you to export only contacts that have a specific status value. Possible values are <code>active</code> (billable), <code>unsubscribed</code>, or <code>removed</code>. Applicable with either `contact_ids` or `list_ids` as the source.
* @property array<\PHPFUI\ConstantContact\UUID> $contact_ids Exports up to 500 specific contacts. This property is mutually exclusive with all other filtering criteria except with<code>status</code>.
* @property array<\PHPFUI\ConstantContact\UUID> $list_ids Exports all of the contacts inside of up to 50 contact lists. This property is mutually exclusive with all other filtering criteria except with either <code>status</code> or <code>exclude</code>.
* @property array<\PHPFUI\ConstantContact\UUID> $tag_ids Exports contacts assigned one or more of the tags (<code>tag_id</code>) specified. This property is mutually exclusive with all other filtering criteria.
* @property bool $new_subscriber Set to <code>true</code> to only export contacts that subscribed within the last 30 days. Default setting is <code>false</code>. This property is mutually exclusive with all other filtering criteria except with either <code>list_ids</code> or <code>exclude</code>.
* @property int $segment_id Specify the <code>segment_id</code> from which you want to export all contacts that meet the specified <code>segment_criteria</code>. You can only specify one <code>segment_id</code>. This property is mutually exclusive with all other filtering criteria.
* @property array $fields By default , all fields are returned. Use this array to only export specific contact fields. You must export <code>email_address</code> to successfully export <code>email_optin_source</code>, <code>email_optin_date</code>, <code>email_optout_source</code>, <code>email_optout_date</code>, or <code>email_optout_reason</code>.
* @property string $status Allows you to export only contacts that have a specific status value. This property is mutually exclusive with all other filtering criteria except with either <code>contact_ids</code> or <code>list_ids</code>.
* @property \PHPFUI\ConstantContact\Definition\Exclude $exclude
*/
class ContactsExport extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'contact_ids' => 'array<\PHPFUI\ConstantContact\UUID>',
'list_ids' => 'array<\PHPFUI\ConstantContact\UUID>',
'tag_ids' => 'array<\PHPFUI\ConstantContact\UUID>',
'new_subscriber' => 'bool',
'segment_id' => 'int',
'fields' => 'array',
'status' => 'string',
'exclude' => '\PHPFUI\ConstantContact\Definition\Exclude',

];

protected static array $maxLength = [
'contact_ids' => 500,
'list_ids' => 50,
'tag_ids' => 50,

];
}
16 changes: 16 additions & 0 deletions src/ConstantContact/Definition/ReportingsmsLinks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property \PHPFUI\ConstantContact\Definition\ReportingsmsNext $next Contains the next link if it is available.
*/
class ReportingsmsLinks extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'next' => '\PHPFUI\ConstantContact\Definition\ReportingsmsNext',

];
}
16 changes: 16 additions & 0 deletions src/ConstantContact/Definition/ReportingsmsNext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property string $href The next link in the page or null if there are no additional pages.
*/
class ReportingsmsNext extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'href' => 'string',

];
}
20 changes: 20 additions & 0 deletions src/ConstantContact/Definition/SmsCampaignSummariesPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property array<\PHPFUI\ConstantContact\Definition\BulkCampaignSummary> $bulk_sms_campaign_summaries Provides details about each SMS campaign, including the total unique counts for each tracked campaign activity.
* @property \PHPFUI\ConstantContact\Definition\BulkSmsCampaignSummariesPercents $aggregate_percents Campaign activity aggregate percents, including <code>click</code>, <code> deliver</code>, <code> bounce</code>, and <code>unsubscribe</code>, for all SMS campaigns returned on a page of results.
* @property \PHPFUI\ConstantContact\Definition\ReportingsmsLinks $_links HAL property that contains next link if applicable
*/
class SmsCampaignSummariesPage extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'bulk_sms_campaign_summaries' => 'array<\PHPFUI\ConstantContact\Definition\BulkCampaignSummary>',
'aggregate_percents' => '\PHPFUI\ConstantContact\Definition\BulkSmsCampaignSummariesPercents',
'_links' => '\PHPFUI\ConstantContact\Definition\ReportingsmsLinks',

];
}
24 changes: 24 additions & 0 deletions src/ConstantContact/Definition/UniqueSmsCounts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\Definition;

/**
* @property int $sends The total number of unique sends.
* @property int $delivers The total number of SMS delivered.
* @property int $opens The total number of unique opens.
* @property int $clicks The total number of unique clicks.
* @property int $optouts The total number of unique opt-outs (unsubscribes).
*/
class UniqueSmsCounts extends \PHPFUI\ConstantContact\Definition\Base
{
protected static array $fields = [
'sends' => 'int',
'delivers' => 'int',
'opens' => 'int',
'clicks' => 'int',
'optouts' => 'int',

];
}
2 changes: 1 addition & 1 deletion src/ConstantContact/V3/Account/Summary/PhysicalAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getTyped() : ?\PHPFUI\ConstantContact\Definition\AccountPhysical
* United States (<code>US</code>) and Canada (<code>CA</code>) addresses,
* or use the <code>state_name</code> to specify all other countries.
*
* @param \PHPFUI\ConstantContact\Definition\AccountPhysicalAddress $body Include all `AccountPhysicalAddress` properties required for the specified `country_code` and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.
* @param \PHPFUI\ConstantContact\Definition\AccountPhysicalAddress $body Include all `AccountPhysicalAddress` properties required for the specified `country_code`. If a required property is not included or incorrectly formatted, a 400 error message is returned. If the address already exists, a 409 error message is returned.
*/
public function post(\PHPFUI\ConstantContact\Definition\AccountPhysicalAddress $body) : ?array
{
Expand Down
14 changes: 5 additions & 9 deletions src/ConstantContact/V3/Activities/ContactExports.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ public function __construct(\PHPFUI\ConstantContact\Client $client)
* Export Contacts to a File
*
* Use this method to create an activity that exports contacts and contact
* details to a CSV file. By default, all contacts are exported. To filter
* contacts to export, specify the source to use, `contact_id`, `list_id`,
* or `segment_id` (all mutually exclusive).
* By default, all contact related fields are exported. Use the fields
* array to only export specific contact fields. You must export `email_address`
* to successfully export `email_optin_source`, `email_optin_date`, `email_optout_source`,
* `email_optout_date`, or `email_optout_reason`.
* After Constant Contact finishes processing the activity, use the `results`
* link in the response body to retrieve the CSV file.
* details to a CSV file. You can choose to export all contacts in your
* account (default) or you can use parameters to filter on which contacts
* to export. After Constant Contact finishes processing the activity,
* use the `results` link in the response body to retrieve the CSV file.
*
*
* @param \PHPFUI\ConstantContact\Definition\ContactsExport $body A JSON payload that specifies the contacts (rows in the CSV file) and contact properties (columns in the CSV file) you want to export.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

// Generated file. Do not edit by hand. Use update.php in project root.

namespace PHPFUI\ConstantContact\V3\Reports\SummaryReports;

class SmsCampaignSummaries extends \PHPFUI\ConstantContact\Base
{
public function __construct(\PHPFUI\ConstantContact\Client $client)
{
parent::__construct($client, '/v3/reports/summary_reports/sms_campaign_summaries');
}

/**
* GET an SMS Campaigns Summary Report
*
* Use this method to get SMS campaign summary details, including the total
* number of times that each contact uniquely interacted with each tracked
* campaign activity and aggregate tracking statistics. Results are sorted
* in descending order by the date the SMS was last sent (`last_sent_date`).
*
* The `start_at` date is required. Use both the `start_at` and `end_at`
* date query parameters to return only SMS campaign summary details that
* occurred within a specified date range.
* Use the `limit` query parameter to limit the number of results returned
* per page.
*
* @param string $limit Use to limit the number of results to return on a single page (from 1 to 50). The default setting is 50.
* @param string $start_at Use to limit the results to include SMS campaign summary details for SMS campaigns sent on or after the required `start_at` date you specify. ISO 8601 format.
* @param string $end_at Use to limit the results to include SMS campaign summary details for SMS campaigns sent on or before the `end_at` date you specify. ISO 8601 format.
*/
public function get(?string $limit = null, string $start_at, ?string $end_at = null) : ?array
{

return $this->doGet(['limit' => $limit, 'start_at' => $start_at, 'end_at' => $end_at, ]);
}

public function getTyped(?string $limit = null, string $start_at, ?string $end_at = null) : ?\PHPFUI\ConstantContact\Definition\SmsCampaignSummariesPage
{
$data = $this->get($limit, $start_at, $end_at);

return $data ? new \PHPFUI\ConstantContact\Definition\SmsCampaignSummariesPage($data) : null;
}

}
Loading

0 comments on commit 87dd954

Please sign in to comment.