Skip to content

Commit 43ad995

Browse files
committed
V22.10.1 - 2022-10-21
1 parent 29cb41b commit 43ad995

File tree

4 files changed

+1313
-22
lines changed

4 files changed

+1313
-22
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 string $error_key Identifies the type of error.
9+
* @property string $error_message Description of the error.
10+
*/
11+
class AuthorizationErrorSchema extends \PHPFUI\ConstantContact\Definition\Base
12+
{
13+
protected static array $fields = [
14+
'error_key' => 'string',
15+
'error_message' => 'string',
16+
17+
];
18+
}

src/ConstantContact/Definition/ContactList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @property bool $favorite Identifies whether or not the account has favorited the contact list.
1212
* @property \PHPFUI\ConstantContact\DateTime $created_at System generated date and time that the resource was created, in ISO-8601 format.
1313
* @property \PHPFUI\ConstantContact\DateTime $updated_at Date and time that the list was last updated, in ISO-8601 format. System generated.
14+
* @property \PHPFUI\ConstantContact\DateTime $deleted_at If the list was deleted, this property shows the date and time it was deleted, in ISO-8601 format. System generated.
1415
* @property int $membership_count The number of contacts in the contact list.
1516
*/
1617
class ContactList extends \PHPFUI\ConstantContact\Definition\Base
@@ -22,6 +23,7 @@ class ContactList extends \PHPFUI\ConstantContact\Definition\Base
2223
'favorite' => 'bool',
2324
'created_at' => '\PHPFUI\ConstantContact\DateTime',
2425
'updated_at' => '\PHPFUI\ConstantContact\DateTime',
26+
'deleted_at' => '\PHPFUI\ConstantContact\DateTime',
2527
'membership_count' => 'int',
2628

2729
];

src/ConstantContact/V3/ContactLists.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ public function __construct(\PHPFUI\ConstantContact\Client $client)
2424
* @param int $limit Use to specify the number of results displayed per page of output, from 1 - 500, default = 50.
2525
* @param bool $include_count Set `include_count` to `true` to return the total number of contact lists that meet your selection criteria.
2626
* @param string $include_membership_count Use to include the number of contact members per list by setting the `include_membership_count` to either `active`, to count only active contacts, or `all` to include all contacts in the count.
27+
* @param string $name Use to get a single list by entering the full name of the list.
28+
* @param string $status Use to get lists by status. Accepts comma-separated status values.
2729
*/
28-
public function get(?int $limit = null, ?bool $include_count = null, ?string $include_membership_count = null) : array
30+
public function get(?int $limit = null, ?bool $include_count = null, ?string $include_membership_count = null, ?string $name = null, ?string $status = null) : array
2931
{
3032

3133
if (null !== $include_membership_count)
@@ -38,7 +40,17 @@ public function get(?int $limit = null, ?bool $include_count = null, ?string $in
3840
}
3941
}
4042

41-
return $this->doGet(['limit' => $limit, 'include_count' => $include_count, 'include_membership_count' => $include_membership_count, ]);
43+
if (null !== $status)
44+
{
45+
$validValues = ['all', 'active', 'deleted'];
46+
47+
if (! \in_array($status, $validValues))
48+
{
49+
throw new \PHPFUI\ConstantContact\Exception\InvalidValue("Parameter status with value '{$status}' is not one of (" . \implode(', ', $validValues) . ') in ' . __METHOD__);
50+
}
51+
}
52+
53+
return $this->doGet(['limit' => $limit, 'include_count' => $include_count, 'include_membership_count' => $include_membership_count, 'name' => $name, 'status' => $status, ]);
4254
}
4355

4456
/**

0 commit comments

Comments
 (0)