Skip to content

Commit 56332e8

Browse files
authored
Merge pull request #187 from sendinblue/feature_AP-1639
AP-1639 Update PHP wrapper
2 parents 229bfcd + 6062e63 commit 56332e8

File tree

158 files changed

+28714
-84
lines changed

Some content is hidden

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

158 files changed

+28714
-84
lines changed

README.md

Lines changed: 67 additions & 4 deletions
Large diffs are not rendered by default.

docs/Api/CRMApi.md

Lines changed: 706 additions & 0 deletions
Large diffs are not rendered by default.

docs/Api/ContactsApi.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Method | HTTP request | Description
2828
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list
2929
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
3030
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
31+
[**updateBatchContacts**](ContactsApi.md#updateBatchContacts) | **POST** /contacts/batch | Update multiple contacts
3132
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{identifier} | Update a contact
3233
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a folder
3334
[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
@@ -1442,6 +1443,62 @@ void (empty response body)
14421443

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

1446+
# **updateBatchContacts**
1447+
> updateBatchContacts($updateBatchContacts)
1448+
1449+
Update multiple contacts
1450+
1451+
### Example
1452+
```php
1453+
<?php
1454+
require_once(__DIR__ . '/vendor/autoload.php');
1455+
1456+
// Configure API key authorization: api-key
1457+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
1458+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1459+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
1460+
// Configure API key authorization: partner-key
1461+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
1462+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1463+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
1464+
1465+
$apiInstance = new SendinBlue\Client\Api\ContactsApi(
1466+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
1467+
// This is optional, `GuzzleHttp\Client` will be used as default.
1468+
new GuzzleHttp\Client(),
1469+
$config
1470+
);
1471+
$updateBatchContacts = new \SendinBlue\Client\Model\UpdateBatchContacts(); // \SendinBlue\Client\Model\UpdateBatchContacts | Values to update multiple contacts
1472+
1473+
try {
1474+
$apiInstance->updateBatchContacts($updateBatchContacts);
1475+
} catch (Exception $e) {
1476+
echo 'Exception when calling ContactsApi->updateBatchContacts: ', $e->getMessage(), PHP_EOL;
1477+
}
1478+
?>
1479+
```
1480+
1481+
### Parameters
1482+
1483+
Name | Type | Description | Notes
1484+
------------- | ------------- | ------------- | -------------
1485+
**updateBatchContacts** | [**\SendinBlue\Client\Model\UpdateBatchContacts**](../Model/UpdateBatchContacts.md)| Values to update multiple contacts |
1486+
1487+
### Return type
1488+
1489+
void (empty response body)
1490+
1491+
### Authorization
1492+
1493+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
1494+
1495+
### HTTP request headers
1496+
1497+
- **Content-Type**: application/json
1498+
- **Accept**: application/json
1499+
1500+
[[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)
1501+
14451502
# **updateContact**
14461503
> updateContact($identifier, $updateContact)
14471504

docs/Api/InboundParsingApi.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# SendinBlue\Client\InboundParsingApi
2+
3+
All URIs are relative to *https://api.sendinblue.com/v3*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getInboundEmailEvents**](InboundParsingApi.md#getInboundEmailEvents) | **GET** /inbound/events | Get the list of all the events for the received emails.
8+
[**getInboundEmailEventsByUuid**](InboundParsingApi.md#getInboundEmailEventsByUuid) | **GET** /inbound/events/{uuid} | Fetch all events history for one particular received email.
9+
10+
11+
# **getInboundEmailEvents**
12+
> \SendinBlue\Client\Model\GetInboundEmailEvents getInboundEmailEvents($sender, $startDate, $endDate, $limit, $offset, $sort)
13+
14+
Get the list of all the events for the received emails.
15+
16+
This endpoint will show the list of all the events for the received emails.
17+
18+
### Example
19+
```php
20+
<?php
21+
require_once(__DIR__ . '/vendor/autoload.php');
22+
23+
// Configure API key authorization: api-key
24+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
25+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
26+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
27+
// Configure API key authorization: partner-key
28+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
29+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
30+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
31+
32+
$apiInstance = new SendinBlue\Client\Api\InboundParsingApi(
33+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
34+
// This is optional, `GuzzleHttp\Client` will be used as default.
35+
new GuzzleHttp\Client(),
36+
$config
37+
);
38+
$sender = "sender_example"; // string | Email address of the sender.
39+
$startDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
40+
$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
41+
$limit = 100; // int | Number of documents returned per page
42+
$offset = 0; // int | Index of the first document on the page
43+
$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation
44+
45+
try {
46+
$result = $apiInstance->getInboundEmailEvents($sender, $startDate, $endDate, $limit, $offset, $sort);
47+
print_r($result);
48+
} catch (Exception $e) {
49+
echo 'Exception when calling InboundParsingApi->getInboundEmailEvents: ', $e->getMessage(), PHP_EOL;
50+
}
51+
?>
52+
```
53+
54+
### Parameters
55+
56+
Name | Type | Description | Notes
57+
------------- | ------------- | ------------- | -------------
58+
**sender** | **string**| Email address of the sender. | [optional]
59+
**startDate** | **\DateTime**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. | [optional]
60+
**endDate** | **\DateTime**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional]
61+
**limit** | **int**| Number of documents returned per page | [optional] [default to 100]
62+
**offset** | **int**| Index of the first document on the page | [optional] [default to 0]
63+
**sort** | **string**| Sort the results in the ascending/descending order of record creation | [optional] [default to desc]
64+
65+
### Return type
66+
67+
[**\SendinBlue\Client\Model\GetInboundEmailEvents**](../Model/GetInboundEmailEvents.md)
68+
69+
### Authorization
70+
71+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: application/json
76+
- **Accept**: application/json
77+
78+
[[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)
79+
80+
# **getInboundEmailEventsByUuid**
81+
> \SendinBlue\Client\Model\GetInboundEmailEventsByUuid getInboundEmailEventsByUuid($uuid)
82+
83+
Fetch all events history for one particular received email.
84+
85+
This endpoint will show the list of all events history for one particular received email.
86+
87+
### Example
88+
```php
89+
<?php
90+
require_once(__DIR__ . '/vendor/autoload.php');
91+
92+
// Configure API key authorization: api-key
93+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
94+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
95+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
96+
// Configure API key authorization: partner-key
97+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
98+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
99+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
100+
101+
$apiInstance = new SendinBlue\Client\Api\InboundParsingApi(
102+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
103+
// This is optional, `GuzzleHttp\Client` will be used as default.
104+
new GuzzleHttp\Client(),
105+
$config
106+
);
107+
$uuid = "uuid_example"; // string | UUID to fetch events specific to recieved email
108+
109+
try {
110+
$result = $apiInstance->getInboundEmailEventsByUuid($uuid);
111+
print_r($result);
112+
} catch (Exception $e) {
113+
echo 'Exception when calling InboundParsingApi->getInboundEmailEventsByUuid: ', $e->getMessage(), PHP_EOL;
114+
}
115+
?>
116+
```
117+
118+
### Parameters
119+
120+
Name | Type | Description | Notes
121+
------------- | ------------- | ------------- | -------------
122+
**uuid** | **string**| UUID to fetch events specific to recieved email |
123+
124+
### Return type
125+
126+
[**\SendinBlue\Client\Model\GetInboundEmailEventsByUuid**](../Model/GetInboundEmailEventsByUuid.md)
127+
128+
### Authorization
129+
130+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
131+
132+
### HTTP request headers
133+
134+
- **Content-Type**: application/json
135+
- **Accept**: application/json
136+
137+
[[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)
138+

0 commit comments

Comments
 (0)