Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 SendinBlue
Copyright (c) 2018 SendinBlue

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Class | Method | HTTP request | Description
*ContactsApi* | [**getList**](docs/Api/ContactsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get the details of a list
*ContactsApi* | [**getLists**](docs/Api/ContactsApi.md#getlists) | **GET** /contacts/lists | Get all the lists
*ContactsApi* | [**importContacts**](docs/Api/ContactsApi.md#importcontacts) | **POST** /contacts/import | Import contacts
*ContactsApi* | [**removeContactToList**](docs/Api/ContactsApi.md#removecontacttolist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
*ContactsApi* | [**removeContactFromList**](docs/Api/ContactsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
*ContactsApi* | [**requestContactExport**](docs/Api/ContactsApi.md#requestcontactexport) | **POST** /contacts/export | Export contacts
*ContactsApi* | [**updateAttribute**](docs/Api/ContactsApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
*ContactsApi* | [**updateContact**](docs/Api/ContactsApi.md#updatecontact) | **PUT** /contacts/{email} | Updates a contact
Expand Down Expand Up @@ -138,7 +138,7 @@ Class | Method | HTTP request | Description
*ListsApi* | [**getFolderLists**](docs/Api/ListsApi.md#getfolderlists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
*ListsApi* | [**getList**](docs/Api/ListsApi.md#getlist) | **GET** /contacts/lists/{listId} | Get the details of a list
*ListsApi* | [**getLists**](docs/Api/ListsApi.md#getlists) | **GET** /contacts/lists | Get all the lists
*ListsApi* | [**removeContactToList**](docs/Api/ListsApi.md#removecontacttolist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
*ListsApi* | [**removeContactFromList**](docs/Api/ListsApi.md#removecontactfromlist) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
*ListsApi* | [**updateList**](docs/Api/ListsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list
*ProcessApi* | [**getProcess**](docs/Api/ProcessApi.md#getprocess) | **GET** /processes/{processId} | Return the informations for a process
*ProcessApi* | [**getProcesses**](docs/Api/ProcessApi.md#getprocesses) | **GET** /processes | Return all the processes for your account
Expand Down Expand Up @@ -192,8 +192,8 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AddContactToList](docs/Model/AddContactToList.md)
- [AddCredits](docs/Model/AddCredits.md)
- [AddRemoveContactToList](docs/Model/AddRemoveContactToList.md)
- [CreateAttribute](docs/Model/CreateAttribute.md)
- [CreateAttributeEnumeration](docs/Model/CreateAttributeEnumeration.md)
- [CreateChild](docs/Model/CreateChild.md)
Expand Down Expand Up @@ -295,6 +295,7 @@ Class | Method | HTTP request | Description
- [RemainingCreditModel](docs/Model/RemainingCreditModel.md)
- [RemainingCreditModelChild](docs/Model/RemainingCreditModelChild.md)
- [RemainingCreditModelReseller](docs/Model/RemainingCreditModelReseller.md)
- [RemoveContactFromList](docs/Model/RemoveContactFromList.md)
- [RemoveCredits](docs/Model/RemoveCredits.md)
- [RequestContactExport](docs/Model/RequestContactExport.md)
- [RequestContactImport](docs/Model/RequestContactImport.md)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.1.x-dev"
"dev-master": "4.0.x-dev"
}
}
}
18 changes: 9 additions & 9 deletions docs/Api/ContactsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Method | HTTP request | Description
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
[**removeContactToList**](ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
Expand All @@ -48,7 +48,7 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',

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

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

### Return type

Expand Down Expand Up @@ -963,8 +963,8 @@ Name | Type | Description | Notes

[[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)

# **removeContactToList**
> \SendinBlue\Client\Model\PostContactInfo removeContactToList($listId, $contactEmails)
# **removeContactFromList**
> \SendinBlue\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails)

Remove existing contacts from a list

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

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

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

### Return type

Expand Down
18 changes: 9 additions & 9 deletions docs/Api/ListsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Method | HTTP request | Description
[**getFolderLists**](ListsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
[**getList**](ListsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
[**getLists**](ListsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
[**removeContactToList**](ListsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
[**removeContactFromList**](ListsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
[**updateList**](ListsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list


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

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

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

### Return type

Expand Down Expand Up @@ -364,8 +364,8 @@ Name | Type | Description | Notes

[[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)

# **removeContactToList**
> \SendinBlue\Client\Model\PostContactInfo removeContactToList($listId, $contactEmails)
# **removeContactFromList**
> \SendinBlue\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails)

Remove existing contacts from a list

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

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

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

### Return type

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# AddRemoveContactToList
# AddContactToList

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**emails** | **string[]** | Emails to add or remove from a list | [optional]
**emails** | **string[]** | Emails to add to a list | [optional]

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

Expand Down
2 changes: 1 addition & 1 deletion docs/Model/CreateEmailCampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**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]
**subject** | **string** | Subject of the campaign |
**replyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional]
**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]
**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]
**recipients** | [**\SendinBlue\Client\Model\CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional]
**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]
**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]
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/CreateSmtpTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
**subject** | **string** | Subject of the template |
**replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional]
**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]
**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]
**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]
**isActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional]

Expand Down
11 changes: 11 additions & 0 deletions docs/Model/RemoveContactFromList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# RemoveContactFromList

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**emails** | **string[]** | Required if 'all' is false. Emails to remove from a list | [optional]
**all** | **bool** | Required if 'emails' is empty. Remove all existing contacts from a list | [optional]

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


22 changes: 11 additions & 11 deletions lib/Api/ContactsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function setApiClient(\SendinBlue\Client\ApiClient $apiClient)
* Add existing contacts to a list
*
* @param int $listId Id of the list (required)
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails addresses of the contacts (required)
* @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses of the contacts (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return \SendinBlue\Client\Model\PostContactInfo
*/
Expand All @@ -109,7 +109,7 @@ public function addContactToList($listId, $contactEmails)
* Add existing contacts to a list
*
* @param int $listId Id of the list (required)
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails addresses of the contacts (required)
* @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses of the contacts (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings)
*/
Expand Down Expand Up @@ -1919,40 +1919,40 @@ public function importContactsWithHttpInfo($requestContactImport)
}

/**
* Operation removeContactToList
* Operation removeContactFromList
*
* Remove existing contacts from a list
*
* @param int $listId Id of the list (required)
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails adresses of the contact (required)
* @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails adresses of the contact (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return \SendinBlue\Client\Model\PostContactInfo
*/
public function removeContactToList($listId, $contactEmails)
public function removeContactFromList($listId, $contactEmails)
{
list($response) = $this->removeContactToListWithHttpInfo($listId, $contactEmails);
list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails);
return $response;
}

/**
* Operation removeContactToListWithHttpInfo
* Operation removeContactFromListWithHttpInfo
*
* Remove existing contacts from a list
*
* @param int $listId Id of the list (required)
* @param \SendinBlue\Client\Model\AddRemoveContactToList $contactEmails Emails adresses of the contact (required)
* @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails adresses of the contact (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings)
*/
public function removeContactToListWithHttpInfo($listId, $contactEmails)
public function removeContactFromListWithHttpInfo($listId, $contactEmails)
{
// verify the required parameter 'listId' is set
if ($listId === null) {
throw new \InvalidArgumentException('Missing the required parameter $listId when calling removeContactToList');
throw new \InvalidArgumentException('Missing the required parameter $listId when calling removeContactFromList');
}
// verify the required parameter 'contactEmails' is set
if ($contactEmails === null) {
throw new \InvalidArgumentException('Missing the required parameter $contactEmails when calling removeContactToList');
throw new \InvalidArgumentException('Missing the required parameter $contactEmails when calling removeContactFromList');
}
// parse inputs
$resourcePath = "/contacts/lists/{listId}/contacts/remove";
Expand Down
Loading