Skip to content

Commit 0188504

Browse files
authored
Merge pull request #111 from sendinblue/feature_php_AP-754
wrapper update AP-754
2 parents b8d6d91 + 904579b commit 0188504

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2316
-554
lines changed

README.md

Lines changed: 66 additions & 63 deletions
Large diffs are not rendered by default.

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": "6.1.x-dev"
40+
"dev-master": "6.x.x-dev"
4141
}
4242
}
4343
}

docs/Api/AccountApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account informations, plans and credits details
7+
[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account information, plan and credits details
88

99

1010
# **getAccount**
1111
> \SendinBlue\Client\Model\GetAccount getAccount()
1212
13-
Get your account informations, plans and credits details
13+
Get your account information, plan and credits details
1414

1515
### Example
1616
```php

docs/Api/AttributesApi.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
8-
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
9-
[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
10-
[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
7+
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
8+
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
9+
[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes
10+
[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
1111

1212

1313
# **createAttribute**
1414
> createAttribute($attributeCategory, $attributeName, $createAttribute)
1515
16-
Creates contact attribute
16+
Create contact attribute
1717

1818
### Example
1919
```php
@@ -73,7 +73,7 @@ void (empty response body)
7373
# **deleteAttribute**
7474
> deleteAttribute($attributeCategory, $attributeName)
7575
76-
Deletes an attribute
76+
Delete an attribute
7777

7878
### Example
7979
```php
@@ -131,7 +131,7 @@ void (empty response body)
131131
# **getAttributes**
132132
> \SendinBlue\Client\Model\GetAttributes getAttributes()
133133
134-
Lists all attributes
134+
List all attributes
135135

136136
### Example
137137
```php
@@ -184,7 +184,7 @@ This endpoint does not need any parameter.
184184
# **updateAttribute**
185185
> updateAttribute($attributeCategory, $attributeName, $updateAttribute)
186186
187-
Updates contact attribute
187+
Update contact attribute
188188

189189
### Example
190190
```php

docs/Api/ContactsApi.md

Lines changed: 93 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@ All URIs are relative to *https://api.sendinblue.com/v3*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**addContactToList**](ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
8-
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
8+
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
99
[**createContact**](ContactsApi.md#createContact) | **POST** /contacts | Create a contact
10+
[**createDoiContact**](ContactsApi.md#createDoiContact) | **POST** /contacts/doubleOptinConfirmation | Create a contact to trigger the DOI workflow from a Landing Page form
1011
[**createFolder**](ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder
1112
[**createList**](ContactsApi.md#createList) | **POST** /contacts/lists | Create a list
12-
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
13-
[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts/{email} | Deletes a contact
13+
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
14+
[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts/{email} | Delete a contact
1415
[**deleteFolder**](ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
1516
[**deleteList**](ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list
16-
[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
17-
[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Retrieves contact informations
18-
[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get the campaigns statistics for a contact
17+
[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes
18+
[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Get a contact's details
19+
[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get email campaigns' statistics for a contact
1920
[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get all the contacts
20-
[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list
21-
[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details
22-
[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
23-
[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all the folders
24-
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
21+
[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list
22+
[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns a folder's details
23+
[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder
24+
[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all folders
25+
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get a list's details
2526
[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
2627
[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
27-
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
28+
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list
2829
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
29-
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
30-
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
31-
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
30+
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
31+
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Update a contact
32+
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a folder
3233
[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
3334

3435

@@ -94,7 +95,7 @@ Name | Type | Description | Notes
9495
# **createAttribute**
9596
> createAttribute($attributeCategory, $attributeName, $createAttribute)
9697
97-
Creates contact attribute
98+
Create contact attribute
9899

99100
### Example
100101
```php
@@ -208,6 +209,62 @@ Name | Type | Description | Notes
208209

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

212+
# **createDoiContact**
213+
> createDoiContact($createDoiContact)
214+
215+
Create a contact to trigger the DOI workflow from a Landing Page form
216+
217+
### Example
218+
```php
219+
<?php
220+
require_once(__DIR__ . '/vendor/autoload.php');
221+
222+
// Configure API key authorization: api-key
223+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
224+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
225+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
226+
// Configure API key authorization: partner-key
227+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
228+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
229+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
230+
231+
$apiInstance = new SendinBlue\Client\Api\ContactsApi(
232+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
233+
// This is optional, `GuzzleHttp\Client` will be used as default.
234+
new GuzzleHttp\Client(),
235+
$config
236+
);
237+
$createDoiContact = new \SendinBlue\Client\Model\CreateDoiContact(); // \SendinBlue\Client\Model\CreateDoiContact | Values to create the DOI contact
238+
239+
try {
240+
$apiInstance->createDoiContact($createDoiContact);
241+
} catch (Exception $e) {
242+
echo 'Exception when calling ContactsApi->createDoiContact: ', $e->getMessage(), PHP_EOL;
243+
}
244+
?>
245+
```
246+
247+
### Parameters
248+
249+
Name | Type | Description | Notes
250+
------------- | ------------- | ------------- | -------------
251+
**createDoiContact** | [**\SendinBlue\Client\Model\CreateDoiContact**](../Model/CreateDoiContact.md)| Values to create the DOI contact |
252+
253+
### Return type
254+
255+
void (empty response body)
256+
257+
### Authorization
258+
259+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
260+
261+
### HTTP request headers
262+
263+
- **Content-Type**: application/json
264+
- **Accept**: application/json
265+
266+
[[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)
267+
211268
# **createFolder**
212269
> \SendinBlue\Client\Model\CreateModel createFolder($createFolder)
213270
@@ -325,7 +382,7 @@ Name | Type | Description | Notes
325382
# **deleteAttribute**
326383
> deleteAttribute($attributeCategory, $attributeName)
327384
328-
Deletes an attribute
385+
Delete an attribute
329386

330387
### Example
331388
```php
@@ -383,7 +440,7 @@ void (empty response body)
383440
# **deleteContact**
384441
> deleteContact($email)
385442
386-
Deletes a contact
443+
Delete a contact
387444

388445
### Example
389446
```php
@@ -551,7 +608,7 @@ void (empty response body)
551608
# **getAttributes**
552609
> \SendinBlue\Client\Model\GetAttributes getAttributes()
553610
554-
Lists all attributes
611+
List all attributes
555612

556613
### Example
557614
```php
@@ -604,7 +661,7 @@ This endpoint does not need any parameter.
604661
# **getContactInfo**
605662
> \SendinBlue\Client\Model\GetExtendedContactDetails getContactInfo($email)
606663
607-
Retrieves contact informations
664+
Get a contact's details
608665

609666
### Example
610667
```php
@@ -659,9 +716,9 @@ Name | Type | Description | Notes
659716
[[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)
660717

661718
# **getContactStats**
662-
> \SendinBlue\Client\Model\GetContactCampaignStats getContactStats($email)
719+
> \SendinBlue\Client\Model\GetContactCampaignStats getContactStats($email, $startDate, $endDate)
663720
664-
Get the campaigns statistics for a contact
721+
Get email campaigns' statistics for a contact
665722

666723
### Example
667724
```php
@@ -684,9 +741,11 @@ $apiInstance = new SendinBlue\Client\Api\ContactsApi(
684741
$config
685742
);
686743
$email = "email_example"; // string | Email address (urlencoded) of the contact
744+
$startDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
745+
$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate
687746

688747
try {
689-
$result = $apiInstance->getContactStats($email);
748+
$result = $apiInstance->getContactStats($email, $startDate, $endDate);
690749
print_r($result);
691750
} catch (Exception $e) {
692751
echo 'Exception when calling ContactsApi->getContactStats: ', $e->getMessage(), PHP_EOL;
@@ -699,6 +758,8 @@ try {
699758
Name | Type | Description | Notes
700759
------------- | ------------- | ------------- | -------------
701760
**email** | **string**| Email address (urlencoded) of the contact |
761+
**startDate** | **\DateTime**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional]
762+
**endDate** | **\DateTime**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate | [optional]
702763

703764
### Return type
704765

@@ -779,7 +840,7 @@ Name | Type | Description | Notes
779840
# **getContactsFromList**
780841
> \SendinBlue\Client\Model\GetContacts getContactsFromList($listId, $modifiedSince, $limit, $offset)
781842
782-
Get the contacts in a list
843+
Get contacts in a list
783844

784845
### Example
785846
```php
@@ -842,7 +903,7 @@ Name | Type | Description | Notes
842903
# **getFolder**
843904
> \SendinBlue\Client\Model\GetFolder getFolder($folderId)
844905
845-
Returns folder details
906+
Returns a folder's details
846907

847908
### Example
848909
```php
@@ -899,7 +960,7 @@ Name | Type | Description | Notes
899960
# **getFolderLists**
900961
> \SendinBlue\Client\Model\GetFolderLists getFolderLists($folderId, $limit, $offset)
901962
902-
Get the lists in a folder
963+
Get lists in a folder
903964

904965
### Example
905966
```php
@@ -960,7 +1021,7 @@ Name | Type | Description | Notes
9601021
# **getFolders**
9611022
> \SendinBlue\Client\Model\GetFolders getFolders($limit, $offset)
9621023
963-
Get all the folders
1024+
Get all folders
9641025

9651026
### Example
9661027
```php
@@ -1019,7 +1080,7 @@ Name | Type | Description | Notes
10191080
# **getList**
10201081
> \SendinBlue\Client\Model\GetExtendedList getList($listId)
10211082
1022-
Get the details of a list
1083+
Get a list's details
10231084

10241085
### Example
10251086
```php
@@ -1194,7 +1255,7 @@ Name | Type | Description | Notes
11941255
# **removeContactFromList**
11951256
> \SendinBlue\Client\Model\PostContactInfo removeContactFromList($listId, $contactEmails)
11961257
1197-
Remove existing contacts from a list
1258+
Delete a contact from a list
11981259

11991260
### Example
12001261
```php
@@ -1312,7 +1373,7 @@ Name | Type | Description | Notes
13121373
# **updateAttribute**
13131374
> updateAttribute($attributeCategory, $attributeName, $updateAttribute)
13141375
1315-
Updates contact attribute
1376+
Update contact attribute
13161377

13171378
### Example
13181379
```php
@@ -1372,7 +1433,7 @@ void (empty response body)
13721433
# **updateContact**
13731434
> updateContact($email, $updateContact)
13741435
1375-
Updates a contact
1436+
Update a contact
13761437

13771438
### Example
13781439
```php
@@ -1430,7 +1491,7 @@ void (empty response body)
14301491
# **updateFolder**
14311492
> updateFolder($folderId, $updateFolder)
14321493
1433-
Update a contact folder
1494+
Update a folder
14341495

14351496
### Example
14361497
```php

0 commit comments

Comments
 (0)