Skip to content

Commit 3e20ba3

Browse files
committed
V24.8.0 - 2024-08-30
1 parent 5159924 commit 3e20ba3

File tree

7 files changed

+167
-58
lines changed

7 files changed

+167
-58
lines changed

src/ConstantContact/Definition/ContactsExport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @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>.
1010
* @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>.
1111
* @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>.
12-
* @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>
12+
* @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.
1313
*/
1414
class ContactsExport extends \PHPFUI\ConstantContact\Definition\Base
1515
{

src/ConstantContact/Definition/ContactsJsonImport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
/**
88
* @property array<\PHPFUI\ConstantContact\Definition\JsonImportContact> $import_data An array containing the contacts to import.
99
* @property array<\PHPFUI\ConstantContact\UUID> $list_ids Specify which contact lists you are adding all imported contacts to as an array of up to 50 contact <code>list_id</code> string values.
10+
* @property string $sms_permission_to_send Specifies if the contact gave <code>explicit</code> SMS permission or if the SMS permission was not set (<code>not_set</code>). If `explicit, the <code>sms_consent_date</code> must be provided.
1011
*/
1112
class ContactsJsonImport extends \PHPFUI\ConstantContact\Definition\Base
1213
{
1314
protected static array $fields = [
1415
'import_data' => 'array<\PHPFUI\ConstantContact\Definition\JsonImportContact>',
1516
'list_ids' => 'array<\PHPFUI\ConstantContact\UUID>',
17+
'sms_permission_to_send' => 'string',
1618

1719
];
1820

src/ConstantContact/Definition/JsonImportContact.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
* @property string $other_zip The zip or postal code associated with the contact's other address.
4444
* @property string $other_country The name of another country where the contact is located.
4545
* @property string $cf:custom_field_name The name of this property is dynamic based on the custom fields you want to import. Use a key-value pair where the key is an existing custom field name prefixed with <code>cf:</code>, and the value is a custom field string value. For example, if you have a custom field named <code>first_name</code> you can use <code>"cf:first_name":"Joe"</code>. Each contact can contain up to 25 different custom fields.
46+
* @property string $sms_number The US phone number to associate with the contact's SMS-enabled phone. The country code must be valid. Valid formats are <code>1231231234</code> or <code>123-123-1234</code>.
47+
* @property string $sms_consent_date Required if the SMS permission is set to `explict`. The date that the contact consented to receiving SMS messages. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY .
4648
*/
4749
class JsonImportContact extends \PHPFUI\ConstantContact\Definition\Base
4850
{
@@ -85,6 +87,8 @@ class JsonImportContact extends \PHPFUI\ConstantContact\Definition\Base
8587
'other_zip' => 'string',
8688
'other_country' => 'string',
8789
'cf:custom_field_name' => 'string',
90+
'sms_number' => 'string',
91+
'sms_consent_date' => 'string',
8892

8993
];
9094

@@ -124,6 +128,8 @@ class JsonImportContact extends \PHPFUI\ConstantContact\Definition\Base
124128
'other_zip' => 50,
125129
'other_country' => 50,
126130
'cf:custom_field_name' => 255,
131+
'sms_number' => 16,
132+
'sms_consent_date' => 16,
127133

128134
];
129135
}

src/ConstantContact/Definition/PlanInfo.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,21 @@
55
namespace PHPFUI\ConstantContact\Definition;
66

77
/**
8-
* @property string $plan_type The type of billing plan (<code>plan_type</code>) to associate with a client's Constant Contact account. The type of billing plan determines which Constant Contact product features that the client account can access. The billing plan type that you enter must already exist in your plan group or a 400 error message is returned. After changing the <code>plan_type</code> from <code>TRIAL</code> to any other billing plan type, you cannot change it back to <code>TRIAL</code>.
8+
* @property string $plan_type Use this property to update the client account billing plan to a different billing plan. After changing the <code>plan_type</code> from <code>TRIAL</code> to any other billing plan type, you cannot change it back to <code>TRIAL</code>.
99
* <ul>
1010
* <li><code>TRIAL</code>: A non-billable account with an expiration date that allows clients to try Constant Contact product features.</li>
1111
* <li><code>GOLD</code>: A billable client account plan.</li>
1212
* <li><code>SILVER</code>: A billable client account plan.</li>
1313
* <li><code>BRONZE</code>: A billable client account plan.</li>
1414
* </ul>
15+
* @property int $plan_group_id Updates an existing client account billing plan group to a new billing plan group. If you don't know the `plan_group_id` to use, contact our API support team.
1516
* @property int $billing_day_of_month This property is required if a client account is not set up to use single billing. You can choose to enter a specific day of the month or accept the default value, which is the day on which the <code>plan_type</code> value changes from a <code>TRIAL</code> plan to a different <code>plan_type</code>. For trial accounts, the value defaults to null. You can only change the <code>billing_day_of_month</code> when changing the <code>plan_type</code> value from <code>TRIAL</code> to a different <code>plan_type</code>, otherwise the value you enter is ignored.
1617
*/
1718
class PlanInfo extends \PHPFUI\ConstantContact\Definition\Base
1819
{
1920
protected static array $fields = [
2021
'plan_type' => 'string',
22+
'plan_group_id' => 'int',
2123
'billing_day_of_month' => 'int',
2224

2325
];

src/ConstantContact/V3/Account/Summary/PhysicalAddress.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ public function get() : array
2626
return $this->doGet([]);
2727
}
2828

29+
/**
30+
* POST the Physical Address for the Account
31+
*
32+
* Use this method to add the address where the account's organization
33+
* physically resides. The physical address is required to send emails
34+
* and displays on the footer of every email that is sent from the account.
35+
* The country (<code>country_code</code>) where the account organization
36+
* resides determines whether you use the <code>state_code</code> to specify
37+
* United States (<code>US</code>) and Canada (<code>CA</code>) addresses,
38+
* or use the <code>state_name</code> to specify all other countries.
39+
*
40+
* @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.
41+
*/
42+
public function post(\PHPFUI\ConstantContact\Definition\AccountPhysicalAddress $body) : array
43+
{
44+
45+
return $this->doPost(['body' => $body->getData(), ]);
46+
}
47+
2948
/**
3049
* PUT (update) the Physical Address for an Account
3150
*

src/ConstantContact/V3/Partner/Accounts/Plan.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public function get(string $encoded_account_id) : array
3939
* Use this PUT method to update the type of billing plan to assign to
4040
* the Constant Contact client account. The type of billing plan determines
4141
* which Constant Contact product features that the client account can
42-
* access. The billing plan type (`plan_type`) that you enter must already
43-
* exist in the plan group. Attempting to change to a plan that is currently
44-
* not available within your partner plan group results in a 400 error
45-
* response code.
42+
* access. The billing plan that you specify in the request body (`plan_type`)
43+
* must already exist in the plan group. Attempting to change to a plan
44+
* that is currently not available within your partner plan group results
45+
* in a 400 error response code.
4646
*
4747
* When you create a new client account, the `plan_type` defaults to `TRIAL`
4848
* and the `billing_day_of_month` defaults to `null`. The `billing_day_of_month`
@@ -67,16 +67,15 @@ public function get(string $encoded_account_id) : array
6767
* in the API guide.
6868
*
6969
* @param string $encoded_account_id Specify the client's unique `encoded_account_id`.
70-
* @param \PHPFUI\ConstantContact\Definition\PlanInfo $body Update the billing plan (`plan_type`) for an existing Constant Contact client account. Options include:
71-
- `TRIAL`: A non-billed account with an expiration date that allows clients to try Constant Contact product features.
70+
* @param \PHPFUI\ConstantContact\Definition\PlanInfo $body `plan_type`: Updates the billing plan assigned to a client account to a different `plan_type`.
7271
73-
- `GOLD`: A billable plan that provides all available product features.
72+
`plan_group_id`: To update an older `plan_type` to a current a `plan_type`, use the `plan_group_id` parameter to specify the older billing `plan_type` number.
7473
75-
- `SILVER`: A billable plan that provides all features available in the <code>BRONZE</code> plan, and adds some additional email campaign feature such as contact segmentation and social media advertisements.
74+
- If the specified `plan_group_id` does not exist under the account's current plan group, the default partner plan group is used.
75+
- If the specified `plan_group_id` exists but does not match the account's current plan group, an error is returned.
76+
- If the `plan_group_id` parameter is not included in the request, the accounts current plan group is used.
7677
77-
- `BRONZE`: A billable plan that provides basic email and marketing tools.
78-
79-
If updating from a `TRIAL` plan (`plan_type`) to another type of billing plan, you have the option to update the day of month (`billing_day_of_month`) in which to bill the client account. Valid values include `1` through to and including `31`. Any additional billing plan properties and values that you include in the request body are ignored. If you are not on the latest billing plan, contact the Constant Contact Partner Team. However, older billing plans and `plan_type` enum values will continue to be supported.
78+
`billing_day_of _month`: Updates the day of month in which to bill the client account. This property is required if a client account is not set up to use single billing.
8079
*/
8180
public function put(string $encoded_account_id, ?\PHPFUI\ConstantContact\Definition\PlanInfo $body = null) : array
8281
{

0 commit comments

Comments
 (0)