Skip to content

Commit 5f57580

Browse files
authored
Merge pull request #198 from sendinblue/feature_AP-2031
AP-2031 PHP wrapper update
2 parents 41ad459 + 15e02ce commit 5f57580

15 files changed

+1144
-93
lines changed

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,19 @@ Class | Method | HTTP request | Description
8484
*AttributesApi* | [**deleteAttribute**](docs/Api/AttributesApi.md#deleteattribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
8585
*AttributesApi* | [**getAttributes**](docs/Api/AttributesApi.md#getattributes) | **GET** /contacts/attributes | List all attributes
8686
*AttributesApi* | [**updateAttribute**](docs/Api/AttributesApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
87-
*CRMApi* | [**crmFilesIdDataGet**](docs/Api/CRMApi.md#crmfilesiddataget) | **GET** /crm/files/{id}/data | Get file data by id.
88-
*CRMApi* | [**crmFilesIdDelete**](docs/Api/CRMApi.md#crmfilesiddelete) | **DELETE** /crm/files/{id} | Delete file.
89-
*CRMApi* | [**crmFilesIdGet**](docs/Api/CRMApi.md#crmfilesidget) | **GET** /crm/files/{id} | Download file by id.
90-
*CRMApi* | [**crmFilesPost**](docs/Api/CRMApi.md#crmfilespost) | **POST** /crm/files | Upload and create file.
91-
*CRMApi* | [**crmNotesIdDelete**](docs/Api/CRMApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete Note by ID
92-
*CRMApi* | [**crmNotesIdGet**](docs/Api/CRMApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get one Note by ID
87+
*CRMApi* | [**crmFilesIdDataGet**](docs/Api/CRMApi.md#crmfilesiddataget) | **GET** /crm/files/{id}/data | Get file details
88+
*CRMApi* | [**crmFilesIdDelete**](docs/Api/CRMApi.md#crmfilesiddelete) | **DELETE** /crm/files/{id} | Delete a file
89+
*CRMApi* | [**crmFilesIdGet**](docs/Api/CRMApi.md#crmfilesidget) | **GET** /crm/files/{id} | Download a file
90+
*CRMApi* | [**crmFilesPost**](docs/Api/CRMApi.md#crmfilespost) | **POST** /crm/files | Upload a file
91+
*CRMApi* | [**crmNotesIdDelete**](docs/Api/CRMApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete a note
92+
*CRMApi* | [**crmNotesIdGet**](docs/Api/CRMApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get a note
9393
*CRMApi* | [**crmNotesIdPatch**](docs/Api/CRMApi.md#crmnotesidpatch) | **PATCH** /crm/notes/{id} | Update a note
94-
*CRMApi* | [**crmNotesPost**](docs/Api/CRMApi.md#crmnotespost) | **POST** /crm/notes | Create a new Note
95-
*CRMApi* | [**crmTasksIdDelete**](docs/Api/CRMApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete Task by id
96-
*CRMApi* | [**crmTasksIdGet**](docs/Api/CRMApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get one Task by ID
97-
*CRMApi* | [**crmTasksIdPatch**](docs/Api/CRMApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update partial existing task
98-
*CRMApi* | [**crmTasksPost**](docs/Api/CRMApi.md#crmtaskspost) | **POST** /crm/tasks | Create a new Task
94+
*CRMApi* | [**crmNotesPost**](docs/Api/CRMApi.md#crmnotespost) | **POST** /crm/notes | Create a note
95+
*CRMApi* | [**crmTasksIdDelete**](docs/Api/CRMApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete a task
96+
*CRMApi* | [**crmTasksIdGet**](docs/Api/CRMApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get a task
97+
*CRMApi* | [**crmTasksIdPatch**](docs/Api/CRMApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update a task
98+
*CRMApi* | [**crmTasksPost**](docs/Api/CRMApi.md#crmtaskspost) | **POST** /crm/tasks | Create a task
99+
*CRMApi* | [**crmTasktypesGet**](docs/Api/CRMApi.md#crmtasktypesget) | **GET** /crm/tasktypes | Get all task types
99100
*ContactsApi* | [**addContactToList**](docs/Api/ContactsApi.md#addcontacttolist) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
100101
*ContactsApi* | [**createAttribute**](docs/Api/ContactsApi.md#createattribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
101102
*ContactsApi* | [**createContact**](docs/Api/ContactsApi.md#createcontact) | **POST** /contacts | Create a contact
@@ -156,6 +157,7 @@ Class | Method | HTTP request | Description
156157
*ListsApi* | [**updateList**](docs/Api/ListsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list
157158
*MasterAccountApi* | [**corporateMasterAccountGet**](docs/Api/MasterAccountApi.md#corporatemasteraccountget) | **GET** /corporate/masterAccount | Get the details of requested master account
158159
*MasterAccountApi* | [**corporateSubAccountGet**](docs/Api/MasterAccountApi.md#corporatesubaccountget) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account.
160+
*MasterAccountApi* | [**corporateSubAccountIdDelete**](docs/Api/MasterAccountApi.md#corporatesubaccountiddelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account
159161
*MasterAccountApi* | [**corporateSubAccountIdGet**](docs/Api/MasterAccountApi.md#corporatesubaccountidget) | **GET** /corporate/subAccount/{id} | Get sub-account details
160162
*MasterAccountApi* | [**corporateSubAccountIdPlanPut**](docs/Api/MasterAccountApi.md#corporatesubaccountidplanput) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan
161163
*MasterAccountApi* | [**corporateSubAccountPost**](docs/Api/MasterAccountApi.md#corporatesubaccountpost) | **POST** /corporate/subAccount | Create a new sub-account under a master account.
@@ -414,6 +416,7 @@ Class | Method | HTTP request | Description
414416
- [SubAccountsResponseSubAccounts](docs/Model/SubAccountsResponseSubAccounts.md)
415417
- [Task](docs/Model/Task.md)
416418
- [TaskReminder](docs/Model/TaskReminder.md)
419+
- [TaskTypes](docs/Model/TaskTypes.md)
417420
- [UpdateAttribute](docs/Model/UpdateAttribute.md)
418421
- [UpdateAttributeEnumeration](docs/Model/UpdateAttributeEnumeration.md)
419422
- [UpdateBatchContacts](docs/Model/UpdateBatchContacts.md)

docs/Api/CRMApi.md

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

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**crmFilesIdDataGet**](CRMApi.md#crmFilesIdDataGet) | **GET** /crm/files/{id}/data | Get file data by id.
8-
[**crmFilesIdDelete**](CRMApi.md#crmFilesIdDelete) | **DELETE** /crm/files/{id} | Delete file.
9-
[**crmFilesIdGet**](CRMApi.md#crmFilesIdGet) | **GET** /crm/files/{id} | Download file by id.
10-
[**crmFilesPost**](CRMApi.md#crmFilesPost) | **POST** /crm/files | Upload and create file.
11-
[**crmNotesIdDelete**](CRMApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete Note by ID
12-
[**crmNotesIdGet**](CRMApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get one Note by ID
7+
[**crmFilesIdDataGet**](CRMApi.md#crmFilesIdDataGet) | **GET** /crm/files/{id}/data | Get file details
8+
[**crmFilesIdDelete**](CRMApi.md#crmFilesIdDelete) | **DELETE** /crm/files/{id} | Delete a file
9+
[**crmFilesIdGet**](CRMApi.md#crmFilesIdGet) | **GET** /crm/files/{id} | Download a file
10+
[**crmFilesPost**](CRMApi.md#crmFilesPost) | **POST** /crm/files | Upload a file
11+
[**crmNotesIdDelete**](CRMApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete a note
12+
[**crmNotesIdGet**](CRMApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get a note
1313
[**crmNotesIdPatch**](CRMApi.md#crmNotesIdPatch) | **PATCH** /crm/notes/{id} | Update a note
14-
[**crmNotesPost**](CRMApi.md#crmNotesPost) | **POST** /crm/notes | Create a new Note
15-
[**crmTasksIdDelete**](CRMApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete Task by id
16-
[**crmTasksIdGet**](CRMApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get one Task by ID
17-
[**crmTasksIdPatch**](CRMApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update partial existing task
18-
[**crmTasksPost**](CRMApi.md#crmTasksPost) | **POST** /crm/tasks | Create a new Task
14+
[**crmNotesPost**](CRMApi.md#crmNotesPost) | **POST** /crm/notes | Create a note
15+
[**crmTasksIdDelete**](CRMApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete a task
16+
[**crmTasksIdGet**](CRMApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get a task
17+
[**crmTasksIdPatch**](CRMApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update a task
18+
[**crmTasksPost**](CRMApi.md#crmTasksPost) | **POST** /crm/tasks | Create a task
19+
[**crmTasktypesGet**](CRMApi.md#crmTasktypesGet) | **GET** /crm/tasktypes | Get all task types
1920

2021

2122
# **crmFilesIdDataGet**
2223
> \SendinBlue\Client\Model\FileData crmFilesIdDataGet($id)
2324
24-
Get file data by id.
25+
Get file details
2526

2627
### Example
2728
```php
@@ -78,7 +79,7 @@ Name | Type | Description | Notes
7879
# **crmFilesIdDelete**
7980
> crmFilesIdDelete($id)
8081
81-
Delete file.
82+
Delete a file
8283

8384
### Example
8485
```php
@@ -134,7 +135,7 @@ void (empty response body)
134135
# **crmFilesIdGet**
135136
> crmFilesIdGet($id)
136137
137-
Download file by id.
138+
Download a file
138139

139140
### Example
140141
```php
@@ -190,7 +191,7 @@ void (empty response body)
190191
# **crmFilesPost**
191192
> \SendinBlue\Client\Model\FileData crmFilesPost($file, $dealsIds)
192193
193-
Upload and create file.
194+
Upload a file
194195

195196
### Example
196197
```php
@@ -249,7 +250,7 @@ Name | Type | Description | Notes
249250
# **crmNotesIdDelete**
250251
> crmNotesIdDelete($id)
251252
252-
Delete Note by ID
253+
Delete a note
253254

254255
### Example
255256
```php
@@ -305,7 +306,7 @@ void (empty response body)
305306
# **crmNotesIdGet**
306307
> \SendinBlue\Client\Model\Note crmNotesIdGet($id)
307308
308-
Get one Note by ID
309+
Get a note
309310

310311
### Example
311312
```php
@@ -421,7 +422,7 @@ Name | Type | Description | Notes
421422
# **crmNotesPost**
422423
> \SendinBlue\Client\Model\Note crmNotesPost($body)
423424
424-
Create a new Note
425+
Create a note
425426

426427
### Example
427428
```php
@@ -478,7 +479,7 @@ Name | Type | Description | Notes
478479
# **crmTasksIdDelete**
479480
> crmTasksIdDelete($id)
480481
481-
Delete Task by id
482+
Delete a task
482483

483484
### Example
484485
```php
@@ -534,7 +535,7 @@ void (empty response body)
534535
# **crmTasksIdGet**
535536
> \SendinBlue\Client\Model\Task crmTasksIdGet($id)
536537
537-
Get one Task by ID
538+
Get a task
538539

539540
### Example
540541
```php
@@ -591,7 +592,7 @@ Name | Type | Description | Notes
591592
# **crmTasksIdPatch**
592593
> \SendinBlue\Client\Model\Task crmTasksIdPatch($id, $body)
593594
594-
Update partial existing task
595+
Update a task
595596

596597
### Example
597598
```php
@@ -650,7 +651,7 @@ Name | Type | Description | Notes
650651
# **crmTasksPost**
651652
> \SendinBlue\Client\Model\Task crmTasksPost($body)
652653
653-
Create a new Task
654+
Create a task
654655

655656
### Example
656657
```php
@@ -704,3 +705,56 @@ Name | Type | Description | Notes
704705

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

708+
# **crmTasktypesGet**
709+
> \SendinBlue\Client\Model\TaskTypes crmTasktypesGet()
710+
711+
Get all task types
712+
713+
### Example
714+
```php
715+
<?php
716+
require_once(__DIR__ . '/vendor/autoload.php');
717+
718+
// Configure API key authorization: api-key
719+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
720+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
721+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
722+
// Configure API key authorization: partner-key
723+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
724+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
725+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
726+
727+
$apiInstance = new SendinBlue\Client\Api\CRMApi(
728+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
729+
// This is optional, `GuzzleHttp\Client` will be used as default.
730+
new GuzzleHttp\Client(),
731+
$config
732+
);
733+
734+
try {
735+
$result = $apiInstance->crmTasktypesGet();
736+
print_r($result);
737+
} catch (Exception $e) {
738+
echo 'Exception when calling CRMApi->crmTasktypesGet: ', $e->getMessage(), PHP_EOL;
739+
}
740+
?>
741+
```
742+
743+
### Parameters
744+
This endpoint does not need any parameter.
745+
746+
### Return type
747+
748+
[**\SendinBlue\Client\Model\TaskTypes**](../Model/TaskTypes.md)
749+
750+
### Authorization
751+
752+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
753+
754+
### HTTP request headers
755+
756+
- **Content-Type**: application/json
757+
- **Accept**: application/json
758+
759+
[[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)
760+

docs/Api/MasterAccountApi.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**corporateMasterAccountGet**](MasterAccountApi.md#corporateMasterAccountGet) | **GET** /corporate/masterAccount | Get the details of requested master account
88
[**corporateSubAccountGet**](MasterAccountApi.md#corporateSubAccountGet) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account.
9+
[**corporateSubAccountIdDelete**](MasterAccountApi.md#corporateSubAccountIdDelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account
910
[**corporateSubAccountIdGet**](MasterAccountApi.md#corporateSubAccountIdGet) | **GET** /corporate/subAccount/{id} | Get sub-account details
1011
[**corporateSubAccountIdPlanPut**](MasterAccountApi.md#corporateSubAccountIdPlanPut) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan
1112
[**corporateSubAccountPost**](MasterAccountApi.md#corporateSubAccountPost) | **POST** /corporate/subAccount | Create a new sub-account under a master account.
@@ -128,6 +129,62 @@ Name | Type | Description | Notes
128129

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

132+
# **corporateSubAccountIdDelete**
133+
> corporateSubAccountIdDelete($id)
134+
135+
Delete a sub-account
136+
137+
### Example
138+
```php
139+
<?php
140+
require_once(__DIR__ . '/vendor/autoload.php');
141+
142+
// Configure API key authorization: api-key
143+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
144+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
145+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
146+
// Configure API key authorization: partner-key
147+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
148+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
149+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
150+
151+
$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
152+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
153+
// This is optional, `GuzzleHttp\Client` will be used as default.
154+
new GuzzleHttp\Client(),
155+
$config
156+
);
157+
$id = 789; // int | Id of the sub-account organization to be deleted
158+
159+
try {
160+
$apiInstance->corporateSubAccountIdDelete($id);
161+
} catch (Exception $e) {
162+
echo 'Exception when calling MasterAccountApi->corporateSubAccountIdDelete: ', $e->getMessage(), PHP_EOL;
163+
}
164+
?>
165+
```
166+
167+
### Parameters
168+
169+
Name | Type | Description | Notes
170+
------------- | ------------- | ------------- | -------------
171+
**id** | **int**| Id of the sub-account organization to be deleted |
172+
173+
### Return type
174+
175+
void (empty response body)
176+
177+
### Authorization
178+
179+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
180+
181+
### HTTP request headers
182+
183+
- **Content-Type**: application/json
184+
- **Accept**: application/json
185+
186+
[[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)
187+
131188
# **corporateSubAccountIdGet**
132189
> \SendinBlue\Client\Model\SubAccountDetailsResponse corporateSubAccountIdGet($id)
133190

docs/Model/CreateSubAccount.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**companyName** | **string** | Name of the organization |
7+
**email** | **string** | Email address for the organization |
78
**language** | **string** | Language for identifying localization information | [optional]
89
**timezone** | **string** | Request timezone of the client | [optional]
910

docs/Model/RequestContactImport.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**fileUrl** | **string** | Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv | [optional]
7-
**fileBody** | **string** | Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional]
6+
**fileUrl** | **string** | Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json | [optional]
7+
**fileBody** | **string** | Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional]
8+
**jsonBody** | [**map[string,object][]**](map.md) | **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. | [optional]
89
**listIds** | **int[]** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional]
910
**notifyUrl** | **string** | URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 | [optional]
1011
**newList** | [**\SendinBlue\Client\Model\RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional]

docs/Model/TaskTypes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# TaskTypes
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **string** | Id of task type | [optional]
7+
**icon** | **string** | Icon of task type | [optional]
8+
**title** | **string** | Title of task type | [optional]
9+
10+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
11+
12+

0 commit comments

Comments
 (0)