Skip to content

Commit 40a745d

Browse files
committed
Add/Remove contact to list spec update + email event report non-mandatory fields removed
1 parent 7730529 commit 40a745d

22 files changed

+443
-81
lines changed

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017 SendinBlue
3+
Copyright (c) 2018 SendinBlue
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
21+
THE SOFTWARE.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Class | Method | HTTP request | Description
109109
*ContactsApi* | [**getList**](docs/Api/ContactsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get the details of a list
110110
*ContactsApi* | [**getLists**](docs/Api/ContactsApi.md#getlists) | **GET** /contacts/lists | Get all the lists
111111
*ContactsApi* | [**importContacts**](docs/Api/ContactsApi.md#importcontacts) | **POST** /contacts/import | Import contacts
112-
*ContactsApi* | [**removeContactToList**](docs/Api/ContactsApi.md#removecontacttolist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
112+
*ContactsApi* | [**removeContactFromList**](docs/Api/ContactsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
113113
*ContactsApi* | [**requestContactExport**](docs/Api/ContactsApi.md#requestcontactexport) | **POST** /contacts/export | Export contacts
114114
*ContactsApi* | [**updateAttribute**](docs/Api/ContactsApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
115115
*ContactsApi* | [**updateContact**](docs/Api/ContactsApi.md#updatecontact) | **PUT** /contacts/{email} | Updates a contact
@@ -138,7 +138,7 @@ Class | Method | HTTP request | Description
138138
*ListsApi* | [**getFolderLists**](docs/Api/ListsApi.md#getfolderlists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
139139
*ListsApi* | [**getList**](docs/Api/ListsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get the details of a list
140140
*ListsApi* | [**getLists**](docs/Api/ListsApi.md#getlists) | **GET** /contacts/lists | Get all the lists
141-
*ListsApi* | [**removeContactToList**](docs/Api/ListsApi.md#removecontacttolist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
141+
*ListsApi* | [**removeContactFromList**](docs/Api/ListsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
142142
*ListsApi* | [**updateList**](docs/Api/ListsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list
143143
*ProcessApi* | [**getProcess**](docs/Api/ProcessApi.md#getprocess) | **GET** /processes/{processId} | Return the informations for a process
144144
*ProcessApi* | [**getProcesses**](docs/Api/ProcessApi.md#getprocesses) | **GET** /processes | Return all the processes for your account
@@ -192,8 +192,8 @@ Class | Method | HTTP request | Description
192192

193193
## Documentation For Models
194194

195+
- [AddContactToList](docs/Model/AddContactToList.md)
195196
- [AddCredits](docs/Model/AddCredits.md)
196-
- [AddRemoveContactToList](docs/Model/AddRemoveContactToList.md)
197197
- [CreateAttribute](docs/Model/CreateAttribute.md)
198198
- [CreateAttributeEnumeration](docs/Model/CreateAttributeEnumeration.md)
199199
- [CreateChild](docs/Model/CreateChild.md)
@@ -295,6 +295,7 @@ Class | Method | HTTP request | Description
295295
- [RemainingCreditModel](docs/Model/RemainingCreditModel.md)
296296
- [RemainingCreditModelChild](docs/Model/RemainingCreditModelChild.md)
297297
- [RemainingCreditModelReseller](docs/Model/RemainingCreditModelReseller.md)
298+
- [RemoveContactFromList](docs/Model/RemoveContactFromList.md)
298299
- [RemoveCredits](docs/Model/RemoveCredits.md)
299300
- [RequestContactExport](docs/Model/RequestContactExport.md)
300301
- [RequestContactImport](docs/Model/RequestContactImport.md)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"extra": {
3939
"branch-alias": {
40-
"dev-master": "2.1.x-dev"
40+
"dev-master": "4.0.x-dev"
4141
}
4242
}
4343
}

docs/Api/ContactsApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Method | HTTP request | Description
2323
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
2424
[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
2525
[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
26-
[**removeContactToList**](ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
26+
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
2727
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
2828
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
2929
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
@@ -48,7 +48,7 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',
4848

4949
$api_instance = new SendinBlue\Client\Api\ContactsApi();
5050
$listId = 789; // int | Id of the list
51-
$contactEmails = new \SendinBlue\Client\Model\AddRemoveContactToList(); // \SendinBlue\Client\Model\AddRemoveContactToList | Emails addresses of the contacts
51+
$contactEmails = new \SendinBlue\Client\Model\AddContactToList(); // \SendinBlue\Client\Model\AddContactToList | Emails addresses of the contacts
5252

5353
try {
5454
$result = $api_instance->addContactToList($listId, $contactEmails);
@@ -64,7 +64,7 @@ try {
6464
Name | Type | Description | Notes
6565
------------- | ------------- | ------------- | -------------
6666
**listId** | **int**| Id of the list |
67-
**contactEmails** | [**\SendinBlue\Client\Model\AddRemoveContactToList**](../Model/AddRemoveContactToList.md)| Emails addresses of the contacts |
67+
**contactEmails** | [**\SendinBlue\Client\Model\AddContactToList**](../Model/AddContactToList.md)| Emails addresses of the contacts |
6868

6969
### Return type
7070

@@ -963,8 +963,8 @@ Name | Type | Description | Notes
963963

964964
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
965965

966-
# **removeContactToList**
967-
> \SendinBlue\Client\Model\PostContactInfo removeContactToList($listId, $contactEmails)
966+
# **removeContactFromList**
967+
> \SendinBlue\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails)
968968
969969
Remove existing contacts from a list
970970

@@ -980,13 +980,13 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',
980980

981981
$api_instance = new SendinBlue\Client\Api\ContactsApi();
982982
$listId = 789; // int | Id of the list
983-
$contactEmails = new \SendinBlue\Client\Model\AddRemoveContactToList(); // \SendinBlue\Client\Model\AddRemoveContactToList | Emails adresses of the contact
983+
$contactEmails = new \SendinBlue\Client\Model\RemoveContactFromList(); // \SendinBlue\Client\Model\RemoveContactFromList | Emails adresses of the contact
984984

985985
try {
986-
$result = $api_instance->removeContactToList($listId, $contactEmails);
986+
$result = $api_instance->removeContactFromList($listId, $contactEmails);
987987
print_r($result);
988988
} catch (Exception $e) {
989-
echo 'Exception when calling ContactsApi->removeContactToList: ', $e->getMessage(), PHP_EOL;
989+
echo 'Exception when calling ContactsApi->removeContactFromList: ', $e->getMessage(), PHP_EOL;
990990
}
991991
?>
992992
```
@@ -996,7 +996,7 @@ try {
996996
Name | Type | Description | Notes
997997
------------- | ------------- | ------------- | -------------
998998
**listId** | **int**| Id of the list |
999-
**contactEmails** | [**\SendinBlue\Client\Model\AddRemoveContactToList**](../Model/AddRemoveContactToList.md)| Emails adresses of the contact |
999+
**contactEmails** | [**\SendinBlue\Client\Model\RemoveContactFromList**](../Model/RemoveContactFromList.md)| Emails adresses of the contact |
10001000

10011001
### Return type
10021002

docs/Api/ListsApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Method | HTTP request | Description
1111
[**getFolderLists**](ListsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
1212
[**getList**](ListsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
1313
[**getLists**](ListsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
14-
[**removeContactToList**](ListsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
14+
[**removeContactFromList**](ListsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
1515
[**updateList**](ListsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
1616

1717

@@ -32,7 +32,7 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',
3232

3333
$api_instance = new SendinBlue\Client\Api\ListsApi();
3434
$listId = 789; // int | Id of the list
35-
$contactEmails = new \SendinBlue\Client\Model\AddRemoveContactToList(); // \SendinBlue\Client\Model\AddRemoveContactToList | Emails addresses of the contacts
35+
$contactEmails = new \SendinBlue\Client\Model\AddContactToList(); // \SendinBlue\Client\Model\AddContactToList | Emails addresses of the contacts
3636

3737
try {
3838
$result = $api_instance->addContactToList($listId, $contactEmails);
@@ -48,7 +48,7 @@ try {
4848
Name | Type | Description | Notes
4949
------------- | ------------- | ------------- | -------------
5050
**listId** | **int**| Id of the list |
51-
**contactEmails** | [**\SendinBlue\Client\Model\AddRemoveContactToList**](../Model/AddRemoveContactToList.md)| Emails addresses of the contacts |
51+
**contactEmails** | [**\SendinBlue\Client\Model\AddContactToList**](../Model/AddContactToList.md)| Emails addresses of the contacts |
5252

5353
### Return type
5454

@@ -364,8 +364,8 @@ Name | Type | Description | Notes
364364

365365
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
366366

367-
# **removeContactToList**
368-
> \SendinBlue\Client\Model\PostContactInfo removeContactToList($listId, $contactEmails)
367+
# **removeContactFromList**
368+
> \SendinBlue\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails)
369369
370370
Remove existing contacts from a list
371371

@@ -381,13 +381,13 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',
381381

382382
$api_instance = new SendinBlue\Client\Api\ListsApi();
383383
$listId = 789; // int | Id of the list
384-
$contactEmails = new \SendinBlue\Client\Model\AddRemoveContactToList(); // \SendinBlue\Client\Model\AddRemoveContactToList | Emails adresses of the contact
384+
$contactEmails = new \SendinBlue\Client\Model\RemoveContactFromList(); // \SendinBlue\Client\Model\RemoveContactFromList | Emails adresses of the contact
385385

386386
try {
387-
$result = $api_instance->removeContactToList($listId, $contactEmails);
387+
$result = $api_instance->removeContactFromList($listId, $contactEmails);
388388
print_r($result);
389389
} catch (Exception $e) {
390-
echo 'Exception when calling ListsApi->removeContactToList: ', $e->getMessage(), PHP_EOL;
390+
echo 'Exception when calling ListsApi->removeContactFromList: ', $e->getMessage(), PHP_EOL;
391391
}
392392
?>
393393
```
@@ -397,7 +397,7 @@ try {
397397
Name | Type | Description | Notes
398398
------------- | ------------- | ------------- | -------------
399399
**listId** | **int**| Id of the list |
400-
**contactEmails** | [**\SendinBlue\Client\Model\AddRemoveContactToList**](../Model/AddRemoveContactToList.md)| Emails adresses of the contact |
400+
**contactEmails** | [**\SendinBlue\Client\Model\RemoveContactFromList**](../Model/RemoveContactFromList.md)| Emails adresses of the contact |
401401

402402
### Return type
403403

docs/Model/AddRemoveContactToList.md renamed to docs/Model/AddContactToList.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# AddRemoveContactToList
1+
# AddContactToList
22

33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**emails** | **string[]** | Emails to add or remove from a list | [optional]
6+
**emails** | **string[]** | Emails to add to a list | [optional]
77

88
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
99

docs/Model/CreateEmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**scheduledAt** | **\DateTime** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
1212
**subject** | **string** | Subject of the campaign |
1313
**replyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional]
14-
**toField** | **string** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use [FNAME] [LNAME]. These attributes must already exist in your contact database | [optional]
14+
**toField** | **string** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database | [optional]
1515
**recipients** | [**\SendinBlue\Client\Model\CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional]
1616
**attachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1717
**inlineImageActivation** | **bool** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false]

docs/Model/CreateSmtpTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
1111
**subject** | **string** | Subject of the template |
1212
**replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional]
13-
**toField** | **string** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [FNAME] [LNAME]. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
13+
**toField** | **string** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
1414
**attachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1515
**isActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional]
1616

docs/Model/RemoveContactFromList.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# RemoveContactFromList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**emails** | **string[]** | Required if 'all' is false. Emails to remove from a list | [optional]
7+
**all** | **bool** | Required if 'emails' is empty. Remove all existing contacts from a list | [optional]
8+
9+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
10+
11+

lib/Api/ContactsApi.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function setApiClient(\SendinBlue\Client\ApiClient $apiClient)
9393
* Add existing contacts to a list
9494
*
9595
* @param int $listId Id of the list (required)
96-
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails addresses of the contacts (required)
96+
* @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses of the contacts (required)
9797
* @throws \SendinBlue\Client\ApiException on non-2xx response
9898
* @return \SendinBlue\Client\Model\PostContactInfo
9999
*/
@@ -109,7 +109,7 @@ public function addContactToList($listId, $contactEmails)
109109
* Add existing contacts to a list
110110
*
111111
* @param int $listId Id of the list (required)
112-
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails addresses of the contacts (required)
112+
* @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses of the contacts (required)
113113
* @throws \SendinBlue\Client\ApiException on non-2xx response
114114
* @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings)
115115
*/
@@ -1919,40 +1919,40 @@ public function importContactsWithHttpInfo($requestContactImport)
19191919
}
19201920

19211921
/**
1922-
* Operation removeContactToList
1922+
* Operation removeContactFromList
19231923
*
19241924
* Remove existing contacts from a list
19251925
*
19261926
* @param int $listId Id of the list (required)
1927-
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails adresses of the contact (required)
1927+
* @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails adresses of the contact (required)
19281928
* @throws \SendinBlue\Client\ApiException on non-2xx response
19291929
* @return \SendinBlue\Client\Model\PostContactInfo
19301930
*/
1931-
public function removeContactToList($listId, $contactEmails)
1931+
public function removeContactFromList($listId, $contactEmails)
19321932
{
1933-
list($response) = $this->removeContactToListWithHttpInfo($listId, $contactEmails);
1933+
list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails);
19341934
return $response;
19351935
}
19361936

19371937
/**
1938-
* Operation removeContactToListWithHttpInfo
1938+
* Operation removeContactFromListWithHttpInfo
19391939
*
19401940
* Remove existing contacts from a list
19411941
*
19421942
* @param int $listId Id of the list (required)
1943-
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails adresses of the contact (required)
1943+
* @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails adresses of the contact (required)
19441944
* @throws \SendinBlue\Client\ApiException on non-2xx response
19451945
* @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings)
19461946
*/
1947-
public function removeContactToListWithHttpInfo($listId, $contactEmails)
1947+
public function removeContactFromListWithHttpInfo($listId, $contactEmails)
19481948
{
19491949
// verify the required parameter 'listId' is set
19501950
if ($listId === null) {
1951-
throw new \InvalidArgumentException('Missing the required parameter $listId when calling removeContactToList');
1951+
throw new \InvalidArgumentException('Missing the required parameter $listId when calling removeContactFromList');
19521952
}
19531953
// verify the required parameter 'contactEmails' is set
19541954
if ($contactEmails === null) {
1955-
throw new \InvalidArgumentException('Missing the required parameter $contactEmails when calling removeContactToList');
1955+
throw new \InvalidArgumentException('Missing the required parameter $contactEmails when calling removeContactFromList');
19561956
}
19571957
// parse inputs
19581958
$resourcePath = "/contacts/lists/{listId}/contacts/remove";

0 commit comments

Comments
 (0)