diff --git a/README.md b/README.md index e024abd7..ad0738f0 100644 --- a/README.md +++ b/README.md @@ -84,18 +84,19 @@ Class | Method | HTTP request | Description *AttributesApi* | [**deleteAttribute**](docs/Api/AttributesApi.md#deleteattribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute *AttributesApi* | [**getAttributes**](docs/Api/AttributesApi.md#getattributes) | **GET** /contacts/attributes | List all attributes *AttributesApi* | [**updateAttribute**](docs/Api/AttributesApi.md#updateattribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute -*CRMApi* | [**crmFilesIdDataGet**](docs/Api/CRMApi.md#crmfilesiddataget) | **GET** /crm/files/{id}/data | Get file data by id. -*CRMApi* | [**crmFilesIdDelete**](docs/Api/CRMApi.md#crmfilesiddelete) | **DELETE** /crm/files/{id} | Delete file. -*CRMApi* | [**crmFilesIdGet**](docs/Api/CRMApi.md#crmfilesidget) | **GET** /crm/files/{id} | Download file by id. -*CRMApi* | [**crmFilesPost**](docs/Api/CRMApi.md#crmfilespost) | **POST** /crm/files | Upload and create file. -*CRMApi* | [**crmNotesIdDelete**](docs/Api/CRMApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete Note by ID -*CRMApi* | [**crmNotesIdGet**](docs/Api/CRMApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get one Note by ID +*CRMApi* | [**crmFilesIdDataGet**](docs/Api/CRMApi.md#crmfilesiddataget) | **GET** /crm/files/{id}/data | Get file details +*CRMApi* | [**crmFilesIdDelete**](docs/Api/CRMApi.md#crmfilesiddelete) | **DELETE** /crm/files/{id} | Delete a file +*CRMApi* | [**crmFilesIdGet**](docs/Api/CRMApi.md#crmfilesidget) | **GET** /crm/files/{id} | Download a file +*CRMApi* | [**crmFilesPost**](docs/Api/CRMApi.md#crmfilespost) | **POST** /crm/files | Upload a file +*CRMApi* | [**crmNotesIdDelete**](docs/Api/CRMApi.md#crmnotesiddelete) | **DELETE** /crm/notes/{id} | Delete a note +*CRMApi* | [**crmNotesIdGet**](docs/Api/CRMApi.md#crmnotesidget) | **GET** /crm/notes/{id} | Get a note *CRMApi* | [**crmNotesIdPatch**](docs/Api/CRMApi.md#crmnotesidpatch) | **PATCH** /crm/notes/{id} | Update a note -*CRMApi* | [**crmNotesPost**](docs/Api/CRMApi.md#crmnotespost) | **POST** /crm/notes | Create a new Note -*CRMApi* | [**crmTasksIdDelete**](docs/Api/CRMApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete Task by id -*CRMApi* | [**crmTasksIdGet**](docs/Api/CRMApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get one Task by ID -*CRMApi* | [**crmTasksIdPatch**](docs/Api/CRMApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update partial existing task -*CRMApi* | [**crmTasksPost**](docs/Api/CRMApi.md#crmtaskspost) | **POST** /crm/tasks | Create a new Task +*CRMApi* | [**crmNotesPost**](docs/Api/CRMApi.md#crmnotespost) | **POST** /crm/notes | Create a note +*CRMApi* | [**crmTasksIdDelete**](docs/Api/CRMApi.md#crmtasksiddelete) | **DELETE** /crm/tasks/{id} | Delete a task +*CRMApi* | [**crmTasksIdGet**](docs/Api/CRMApi.md#crmtasksidget) | **GET** /crm/tasks/{id} | Get a task +*CRMApi* | [**crmTasksIdPatch**](docs/Api/CRMApi.md#crmtasksidpatch) | **PATCH** /crm/tasks/{id} | Update a task +*CRMApi* | [**crmTasksPost**](docs/Api/CRMApi.md#crmtaskspost) | **POST** /crm/tasks | Create a task +*CRMApi* | [**crmTasktypesGet**](docs/Api/CRMApi.md#crmtasktypesget) | **GET** /crm/tasktypes | Get all task types *ContactsApi* | [**addContactToList**](docs/Api/ContactsApi.md#addcontacttolist) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list *ContactsApi* | [**createAttribute**](docs/Api/ContactsApi.md#createattribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute *ContactsApi* | [**createContact**](docs/Api/ContactsApi.md#createcontact) | **POST** /contacts | Create a contact @@ -156,6 +157,7 @@ Class | Method | HTTP request | Description *ListsApi* | [**updateList**](docs/Api/ListsApi.md#updatelist) | **PUT** /contacts/lists/{listId} | Update a list *MasterAccountApi* | [**corporateMasterAccountGet**](docs/Api/MasterAccountApi.md#corporatemasteraccountget) | **GET** /corporate/masterAccount | Get the details of requested master account *MasterAccountApi* | [**corporateSubAccountGet**](docs/Api/MasterAccountApi.md#corporatesubaccountget) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +*MasterAccountApi* | [**corporateSubAccountIdDelete**](docs/Api/MasterAccountApi.md#corporatesubaccountiddelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account *MasterAccountApi* | [**corporateSubAccountIdGet**](docs/Api/MasterAccountApi.md#corporatesubaccountidget) | **GET** /corporate/subAccount/{id} | Get sub-account details *MasterAccountApi* | [**corporateSubAccountIdPlanPut**](docs/Api/MasterAccountApi.md#corporatesubaccountidplanput) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan *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 - [SubAccountsResponseSubAccounts](docs/Model/SubAccountsResponseSubAccounts.md) - [Task](docs/Model/Task.md) - [TaskReminder](docs/Model/TaskReminder.md) + - [TaskTypes](docs/Model/TaskTypes.md) - [UpdateAttribute](docs/Model/UpdateAttribute.md) - [UpdateAttributeEnumeration](docs/Model/UpdateAttributeEnumeration.md) - [UpdateBatchContacts](docs/Model/UpdateBatchContacts.md) diff --git a/docs/Api/CRMApi.md b/docs/Api/CRMApi.md index a3f3772e..13a47c59 100644 --- a/docs/Api/CRMApi.md +++ b/docs/Api/CRMApi.md @@ -4,24 +4,25 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**crmFilesIdDataGet**](CRMApi.md#crmFilesIdDataGet) | **GET** /crm/files/{id}/data | Get file data by id. -[**crmFilesIdDelete**](CRMApi.md#crmFilesIdDelete) | **DELETE** /crm/files/{id} | Delete file. -[**crmFilesIdGet**](CRMApi.md#crmFilesIdGet) | **GET** /crm/files/{id} | Download file by id. -[**crmFilesPost**](CRMApi.md#crmFilesPost) | **POST** /crm/files | Upload and create file. -[**crmNotesIdDelete**](CRMApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete Note by ID -[**crmNotesIdGet**](CRMApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get one Note by ID +[**crmFilesIdDataGet**](CRMApi.md#crmFilesIdDataGet) | **GET** /crm/files/{id}/data | Get file details +[**crmFilesIdDelete**](CRMApi.md#crmFilesIdDelete) | **DELETE** /crm/files/{id} | Delete a file +[**crmFilesIdGet**](CRMApi.md#crmFilesIdGet) | **GET** /crm/files/{id} | Download a file +[**crmFilesPost**](CRMApi.md#crmFilesPost) | **POST** /crm/files | Upload a file +[**crmNotesIdDelete**](CRMApi.md#crmNotesIdDelete) | **DELETE** /crm/notes/{id} | Delete a note +[**crmNotesIdGet**](CRMApi.md#crmNotesIdGet) | **GET** /crm/notes/{id} | Get a note [**crmNotesIdPatch**](CRMApi.md#crmNotesIdPatch) | **PATCH** /crm/notes/{id} | Update a note -[**crmNotesPost**](CRMApi.md#crmNotesPost) | **POST** /crm/notes | Create a new Note -[**crmTasksIdDelete**](CRMApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete Task by id -[**crmTasksIdGet**](CRMApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get one Task by ID -[**crmTasksIdPatch**](CRMApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update partial existing task -[**crmTasksPost**](CRMApi.md#crmTasksPost) | **POST** /crm/tasks | Create a new Task +[**crmNotesPost**](CRMApi.md#crmNotesPost) | **POST** /crm/notes | Create a note +[**crmTasksIdDelete**](CRMApi.md#crmTasksIdDelete) | **DELETE** /crm/tasks/{id} | Delete a task +[**crmTasksIdGet**](CRMApi.md#crmTasksIdGet) | **GET** /crm/tasks/{id} | Get a task +[**crmTasksIdPatch**](CRMApi.md#crmTasksIdPatch) | **PATCH** /crm/tasks/{id} | Update a task +[**crmTasksPost**](CRMApi.md#crmTasksPost) | **POST** /crm/tasks | Create a task +[**crmTasktypesGet**](CRMApi.md#crmTasktypesGet) | **GET** /crm/tasktypes | Get all task types # **crmFilesIdDataGet** > \SendinBlue\Client\Model\FileData crmFilesIdDataGet($id) -Get file data by id. +Get file details ### Example ```php @@ -78,7 +79,7 @@ Name | Type | Description | Notes # **crmFilesIdDelete** > crmFilesIdDelete($id) -Delete file. +Delete a file ### Example ```php @@ -134,7 +135,7 @@ void (empty response body) # **crmFilesIdGet** > crmFilesIdGet($id) -Download file by id. +Download a file ### Example ```php @@ -190,7 +191,7 @@ void (empty response body) # **crmFilesPost** > \SendinBlue\Client\Model\FileData crmFilesPost($file, $dealsIds) -Upload and create file. +Upload a file ### Example ```php @@ -249,7 +250,7 @@ Name | Type | Description | Notes # **crmNotesIdDelete** > crmNotesIdDelete($id) -Delete Note by ID +Delete a note ### Example ```php @@ -305,7 +306,7 @@ void (empty response body) # **crmNotesIdGet** > \SendinBlue\Client\Model\Note crmNotesIdGet($id) -Get one Note by ID +Get a note ### Example ```php @@ -421,7 +422,7 @@ Name | Type | Description | Notes # **crmNotesPost** > \SendinBlue\Client\Model\Note crmNotesPost($body) -Create a new Note +Create a note ### Example ```php @@ -478,7 +479,7 @@ Name | Type | Description | Notes # **crmTasksIdDelete** > crmTasksIdDelete($id) -Delete Task by id +Delete a task ### Example ```php @@ -534,7 +535,7 @@ void (empty response body) # **crmTasksIdGet** > \SendinBlue\Client\Model\Task crmTasksIdGet($id) -Get one Task by ID +Get a task ### Example ```php @@ -591,7 +592,7 @@ Name | Type | Description | Notes # **crmTasksIdPatch** > \SendinBlue\Client\Model\Task crmTasksIdPatch($id, $body) -Update partial existing task +Update a task ### Example ```php @@ -650,7 +651,7 @@ Name | Type | Description | Notes # **crmTasksPost** > \SendinBlue\Client\Model\Task crmTasksPost($body) -Create a new Task +Create a task ### Example ```php @@ -704,3 +705,56 @@ 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) +# **crmTasktypesGet** +> \SendinBlue\Client\Model\TaskTypes crmTasktypesGet() + +Get all task types + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\CRMApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->crmTasktypesGet(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CRMApi->crmTasktypesGet: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**\SendinBlue\Client\Model\TaskTypes**](../Model/TaskTypes.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/docs/Api/MasterAccountApi.md b/docs/Api/MasterAccountApi.md index 5410e014..8a67fa76 100644 --- a/docs/Api/MasterAccountApi.md +++ b/docs/Api/MasterAccountApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**corporateMasterAccountGet**](MasterAccountApi.md#corporateMasterAccountGet) | **GET** /corporate/masterAccount | Get the details of requested master account [**corporateSubAccountGet**](MasterAccountApi.md#corporateSubAccountGet) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +[**corporateSubAccountIdDelete**](MasterAccountApi.md#corporateSubAccountIdDelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account [**corporateSubAccountIdGet**](MasterAccountApi.md#corporateSubAccountIdGet) | **GET** /corporate/subAccount/{id} | Get sub-account details [**corporateSubAccountIdPlanPut**](MasterAccountApi.md#corporateSubAccountIdPlanPut) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan [**corporateSubAccountPost**](MasterAccountApi.md#corporateSubAccountPost) | **POST** /corporate/subAccount | Create a new sub-account under a master account. @@ -128,6 +129,62 @@ 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) +# **corporateSubAccountIdDelete** +> corporateSubAccountIdDelete($id) + +Delete a sub-account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 789; // int | Id of the sub-account organization to be deleted + +try { + $apiInstance->corporateSubAccountIdDelete($id); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountIdDelete: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Id of the sub-account organization to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **corporateSubAccountIdGet** > \SendinBlue\Client\Model\SubAccountDetailsResponse corporateSubAccountIdGet($id) diff --git a/docs/Model/CreateSubAccount.md b/docs/Model/CreateSubAccount.md index dcbe1aed..ba47729b 100644 --- a/docs/Model/CreateSubAccount.md +++ b/docs/Model/CreateSubAccount.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **companyName** | **string** | Name of the organization | +**email** | **string** | Email address for the organization | **language** | **string** | Language for identifying localization information | [optional] **timezone** | **string** | Request timezone of the client | [optional] diff --git a/docs/Model/RequestContactImport.md b/docs/Model/RequestContactImport.md index c4b0a53c..190060ba 100644 --- a/docs/Model/RequestContactImport.md +++ b/docs/Model/RequestContactImport.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fileUrl** | **string** | Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv | [optional] -**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] +**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] +**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] +**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] **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] **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] **newList** | [**\SendinBlue\Client\Model\RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] diff --git a/docs/Model/TaskTypes.md b/docs/Model/TaskTypes.md new file mode 100644 index 00000000..ccfc2bd7 --- /dev/null +++ b/docs/Model/TaskTypes.md @@ -0,0 +1,12 @@ +# TaskTypes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Id of task type | [optional] +**icon** | **string** | Icon of task type | [optional] +**title** | **string** | Title of task type | [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) + + diff --git a/lib/Api/CRMApi.php b/lib/Api/CRMApi.php index b4994dab..fa63f438 100644 --- a/lib/Api/CRMApi.php +++ b/lib/Api/CRMApi.php @@ -90,7 +90,7 @@ public function getConfig() /** * Operation crmFilesIdDataGet * - * Get file data by id. + * Get file details * * @param string $id File id to get file data. (required) * @@ -107,7 +107,7 @@ public function crmFilesIdDataGet($id) /** * Operation crmFilesIdDataGetWithHttpInfo * - * Get file data by id. + * Get file details * * @param string $id File id to get file data. (required) * @@ -198,7 +198,7 @@ public function crmFilesIdDataGetWithHttpInfo($id) /** * Operation crmFilesIdDataGetAsync * - * Get file data by id. + * Get file details * * @param string $id File id to get file data. (required) * @@ -218,7 +218,7 @@ function ($response) { /** * Operation crmFilesIdDataGetAsyncWithHttpInfo * - * Get file data by id. + * Get file details * * @param string $id File id to get file data. (required) * @@ -385,7 +385,7 @@ protected function crmFilesIdDataGetRequest($id) /** * Operation crmFilesIdDelete * - * Delete file. + * Delete a file * * @param string $id File id to delete. (required) * @@ -401,7 +401,7 @@ public function crmFilesIdDelete($id) /** * Operation crmFilesIdDeleteWithHttpInfo * - * Delete file. + * Delete a file * * @param string $id File id to delete. (required) * @@ -470,7 +470,7 @@ public function crmFilesIdDeleteWithHttpInfo($id) /** * Operation crmFilesIdDeleteAsync * - * Delete file. + * Delete a file * * @param string $id File id to delete. (required) * @@ -490,7 +490,7 @@ function ($response) { /** * Operation crmFilesIdDeleteAsyncWithHttpInfo * - * Delete file. + * Delete a file * * @param string $id File id to delete. (required) * @@ -643,7 +643,7 @@ protected function crmFilesIdDeleteRequest($id) /** * Operation crmFilesIdGet * - * Download file by id. + * Download a file * * @param string $id File id to download. (required) * @@ -659,7 +659,7 @@ public function crmFilesIdGet($id) /** * Operation crmFilesIdGetWithHttpInfo * - * Download file by id. + * Download a file * * @param string $id File id to download. (required) * @@ -728,7 +728,7 @@ public function crmFilesIdGetWithHttpInfo($id) /** * Operation crmFilesIdGetAsync * - * Download file by id. + * Download a file * * @param string $id File id to download. (required) * @@ -748,7 +748,7 @@ function ($response) { /** * Operation crmFilesIdGetAsyncWithHttpInfo * - * Download file by id. + * Download a file * * @param string $id File id to download. (required) * @@ -901,7 +901,7 @@ protected function crmFilesIdGetRequest($id) /** * Operation crmFilesPost * - * Upload and create file. + * Upload a file * * @param \SplFileObject $file File data to create a file. (required) * @param string[] $dealsIds Deal ids linked to a file (optional) @@ -919,7 +919,7 @@ public function crmFilesPost($file, $dealsIds = null) /** * Operation crmFilesPostWithHttpInfo * - * Upload and create file. + * Upload a file * * @param \SplFileObject $file File data to create a file. (required) * @param string[] $dealsIds Deal ids linked to a file (optional) @@ -1003,7 +1003,7 @@ public function crmFilesPostWithHttpInfo($file, $dealsIds = null) /** * Operation crmFilesPostAsync * - * Upload and create file. + * Upload a file * * @param \SplFileObject $file File data to create a file. (required) * @param string[] $dealsIds Deal ids linked to a file (optional) @@ -1024,7 +1024,7 @@ function ($response) { /** * Operation crmFilesPostAsyncWithHttpInfo * - * Upload and create file. + * Upload a file * * @param \SplFileObject $file File data to create a file. (required) * @param string[] $dealsIds Deal ids linked to a file (optional) @@ -1194,7 +1194,7 @@ protected function crmFilesPostRequest($file, $dealsIds = null) /** * Operation crmNotesIdDelete * - * Delete Note by ID + * Delete a note * * @param string $id Note ID to delete (required) * @@ -1210,7 +1210,7 @@ public function crmNotesIdDelete($id) /** * Operation crmNotesIdDeleteWithHttpInfo * - * Delete Note by ID + * Delete a note * * @param string $id Note ID to delete (required) * @@ -1279,7 +1279,7 @@ public function crmNotesIdDeleteWithHttpInfo($id) /** * Operation crmNotesIdDeleteAsync * - * Delete Note by ID + * Delete a note * * @param string $id Note ID to delete (required) * @@ -1299,7 +1299,7 @@ function ($response) { /** * Operation crmNotesIdDeleteAsyncWithHttpInfo * - * Delete Note by ID + * Delete a note * * @param string $id Note ID to delete (required) * @@ -1452,7 +1452,7 @@ protected function crmNotesIdDeleteRequest($id) /** * Operation crmNotesIdGet * - * Get one Note by ID + * Get a note * * @param string $id Note ID to get (required) * @@ -1469,7 +1469,7 @@ public function crmNotesIdGet($id) /** * Operation crmNotesIdGetWithHttpInfo * - * Get one Note by ID + * Get a note * * @param string $id Note ID to get (required) * @@ -1560,7 +1560,7 @@ public function crmNotesIdGetWithHttpInfo($id) /** * Operation crmNotesIdGetAsync * - * Get one Note by ID + * Get a note * * @param string $id Note ID to get (required) * @@ -1580,7 +1580,7 @@ function ($response) { /** * Operation crmNotesIdGetAsyncWithHttpInfo * - * Get one Note by ID + * Get a note * * @param string $id Note ID to get (required) * @@ -2064,7 +2064,7 @@ protected function crmNotesIdPatchRequest($id, $body) /** * Operation crmNotesPost * - * Create a new Note + * Create a note * * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) * @@ -2081,7 +2081,7 @@ public function crmNotesPost($body) /** * Operation crmNotesPostWithHttpInfo * - * Create a new Note + * Create a note * * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) * @@ -2172,7 +2172,7 @@ public function crmNotesPostWithHttpInfo($body) /** * Operation crmNotesPostAsync * - * Create a new Note + * Create a note * * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) * @@ -2192,7 +2192,7 @@ function ($response) { /** * Operation crmNotesPostAsyncWithHttpInfo * - * Create a new Note + * Create a note * * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) * @@ -2354,7 +2354,7 @@ protected function crmNotesPostRequest($body) /** * Operation crmTasksIdDelete * - * Delete Task by id + * Delete a task * * @param string $id id (required) * @@ -2370,7 +2370,7 @@ public function crmTasksIdDelete($id) /** * Operation crmTasksIdDeleteWithHttpInfo * - * Delete Task by id + * Delete a task * * @param string $id (required) * @@ -2439,7 +2439,7 @@ public function crmTasksIdDeleteWithHttpInfo($id) /** * Operation crmTasksIdDeleteAsync * - * Delete Task by id + * Delete a task * * @param string $id (required) * @@ -2459,7 +2459,7 @@ function ($response) { /** * Operation crmTasksIdDeleteAsyncWithHttpInfo * - * Delete Task by id + * Delete a task * * @param string $id (required) * @@ -2612,7 +2612,7 @@ protected function crmTasksIdDeleteRequest($id) /** * Operation crmTasksIdGet * - * Get one Task by ID + * Get a task * * @param string $id id (required) * @@ -2629,7 +2629,7 @@ public function crmTasksIdGet($id) /** * Operation crmTasksIdGetWithHttpInfo * - * Get one Task by ID + * Get a task * * @param string $id (required) * @@ -2720,7 +2720,7 @@ public function crmTasksIdGetWithHttpInfo($id) /** * Operation crmTasksIdGetAsync * - * Get one Task by ID + * Get a task * * @param string $id (required) * @@ -2740,7 +2740,7 @@ function ($response) { /** * Operation crmTasksIdGetAsyncWithHttpInfo * - * Get one Task by ID + * Get a task * * @param string $id (required) * @@ -2907,7 +2907,7 @@ protected function crmTasksIdGetRequest($id) /** * Operation crmTasksIdPatch * - * Update partial existing task + * Update a task * * @param string $id id (required) * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) @@ -2925,7 +2925,7 @@ public function crmTasksIdPatch($id, $body) /** * Operation crmTasksIdPatchWithHttpInfo * - * Update partial existing task + * Update a task * * @param string $id (required) * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) @@ -3017,7 +3017,7 @@ public function crmTasksIdPatchWithHttpInfo($id, $body) /** * Operation crmTasksIdPatchAsync * - * Update partial existing task + * Update a task * * @param string $id (required) * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) @@ -3038,7 +3038,7 @@ function ($response) { /** * Operation crmTasksIdPatchAsyncWithHttpInfo * - * Update partial existing task + * Update a task * * @param string $id (required) * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) @@ -3216,7 +3216,7 @@ protected function crmTasksIdPatchRequest($id, $body) /** * Operation crmTasksPost * - * Create a new Task + * Create a task * * @param \SendinBlue\Client\Model\Body $body Task name. (required) * @@ -3233,7 +3233,7 @@ public function crmTasksPost($body) /** * Operation crmTasksPostWithHttpInfo * - * Create a new Task + * Create a task * * @param \SendinBlue\Client\Model\Body $body Task name. (required) * @@ -3308,7 +3308,7 @@ public function crmTasksPostWithHttpInfo($body) /** * Operation crmTasksPostAsync * - * Create a new Task + * Create a task * * @param \SendinBlue\Client\Model\Body $body Task name. (required) * @@ -3328,7 +3328,7 @@ function ($response) { /** * Operation crmTasksPostAsyncWithHttpInfo * - * Create a new Task + * Create a task * * @param \SendinBlue\Client\Model\Body $body Task name. (required) * @@ -3487,6 +3487,266 @@ protected function crmTasksPostRequest($body) ); } + /** + * Operation crmTasktypesGet + * + * Get all task types + * + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\TaskTypes + */ + public function crmTasktypesGet() + { + list($response) = $this->crmTasktypesGetWithHttpInfo(); + return $response; + } + + /** + * Operation crmTasktypesGetWithHttpInfo + * + * Get all task types + * + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\TaskTypes, HTTP status code, HTTP response headers (array of strings) + */ + public function crmTasktypesGetWithHttpInfo() + { + $returnType = '\SendinBlue\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\TaskTypes', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation crmTasktypesGetAsync + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsync() + { + return $this->crmTasktypesGetAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation crmTasktypesGetAsyncWithHttpInfo + * + * Get all task types + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function crmTasktypesGetAsyncWithHttpInfo() + { + $returnType = '\SendinBlue\Client\Model\TaskTypes'; + $request = $this->crmTasktypesGetRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'crmTasktypesGet' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function crmTasktypesGetRequest() + { + + $resourcePath = '/crm/tasktypes'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/lib/Api/MasterAccountApi.php b/lib/Api/MasterAccountApi.php index adffd4e4..bea546cb 100644 --- a/lib/Api/MasterAccountApi.php +++ b/lib/Api/MasterAccountApi.php @@ -653,6 +653,248 @@ protected function corporateSubAccountGetRequest($offset, $limit) ); } + /** + * Operation corporateSubAccountIdDelete + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function corporateSubAccountIdDelete($id) + { + $this->corporateSubAccountIdDeleteWithHttpInfo($id); + } + + /** + * Operation corporateSubAccountIdDeleteWithHttpInfo + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountIdDeleteWithHttpInfo($id) + { + $returnType = ''; + $request = $this->corporateSubAccountIdDeleteRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation corporateSubAccountIdDeleteAsync + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdDeleteAsync($id) + { + return $this->corporateSubAccountIdDeleteAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountIdDeleteAsyncWithHttpInfo + * + * Delete a sub-account + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountIdDeleteAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->corporateSubAccountIdDeleteRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'corporateSubAccountIdDelete' + * + * @param int $id Id of the sub-account organization to be deleted (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountIdDeleteRequest($id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling corporateSubAccountIdDelete' + ); + } + + $resourcePath = '/corporate/subAccount/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation corporateSubAccountIdGet * diff --git a/lib/Configuration.php b/lib/Configuration.php index 3fd27bae..2f57029a 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -38,7 +38,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ -$GLOBALS['version'] = '8.0.0'; +$GLOBALS['version'] = '8.1.0'; class Configuration { diff --git a/lib/Model/GetEmailEventReportEvents.php b/lib/Model/GetEmailEventReportEvents.php index 4cdf9359..f3b2fed6 100644 --- a/lib/Model/GetEmailEventReportEvents.php +++ b/lib/Model/GetEmailEventReportEvents.php @@ -221,6 +221,7 @@ public function getModelName() const EVENT_BLOCKED = 'blocked'; const EVENT_UNSUBSCRIBED = 'unsubscribed'; const EVENT_ERROR = 'error'; + const EVENT_LOADED_BY_PROXY = 'loadedByProxy'; @@ -245,6 +246,7 @@ public function getEventAllowableValues() self::EVENT_BLOCKED, self::EVENT_UNSUBSCRIBED, self::EVENT_ERROR, + self::EVENT_LOADED_BY_PROXY, ]; } diff --git a/lib/Model/RequestContactImport.php b/lib/Model/RequestContactImport.php index bf53a39e..ba86bf9e 100644 --- a/lib/Model/RequestContactImport.php +++ b/lib/Model/RequestContactImport.php @@ -59,6 +59,7 @@ class RequestContactImport implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'fileUrl' => 'string', 'fileBody' => 'string', + 'jsonBody' => 'map[string,object][]', 'listIds' => 'int[]', 'notifyUrl' => 'string', 'newList' => '\SendinBlue\Client\Model\RequestContactImportNewList', @@ -76,6 +77,7 @@ class RequestContactImport implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'fileUrl' => 'url', 'fileBody' => null, + 'jsonBody' => null, 'listIds' => 'int64', 'notifyUrl' => 'url', 'newList' => null, @@ -114,6 +116,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'fileUrl' => 'fileUrl', 'fileBody' => 'fileBody', + 'jsonBody' => 'jsonBody', 'listIds' => 'listIds', 'notifyUrl' => 'notifyUrl', 'newList' => 'newList', @@ -131,6 +134,7 @@ public static function swaggerFormats() protected static $setters = [ 'fileUrl' => 'setFileUrl', 'fileBody' => 'setFileBody', + 'jsonBody' => 'setJsonBody', 'listIds' => 'setListIds', 'notifyUrl' => 'setNotifyUrl', 'newList' => 'setNewList', @@ -148,6 +152,7 @@ public static function swaggerFormats() protected static $getters = [ 'fileUrl' => 'getFileUrl', 'fileBody' => 'getFileBody', + 'jsonBody' => 'getJsonBody', 'listIds' => 'getListIds', 'notifyUrl' => 'getNotifyUrl', 'newList' => 'getNewList', @@ -219,6 +224,7 @@ public function __construct(array $data = null) { $this->container['fileUrl'] = isset($data['fileUrl']) ? $data['fileUrl'] : null; $this->container['fileBody'] = isset($data['fileBody']) ? $data['fileBody'] : null; + $this->container['jsonBody'] = isset($data['jsonBody']) ? $data['jsonBody'] : null; $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; $this->container['newList'] = isset($data['newList']) ? $data['newList'] : null; @@ -265,7 +271,7 @@ public function getFileUrl() /** * Sets fileUrl * - * @param string $fileUrl Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + * @param string $fileUrl Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json * * @return $this */ @@ -289,7 +295,7 @@ public function getFileBody() /** * Sets fileBody * - * @param string $fileBody 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. + * @param string $fileBody 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. * * @return $this */ @@ -300,6 +306,30 @@ public function setFileBody($fileBody) return $this; } + /** + * Gets jsonBody + * + * @return map[string,object][] + */ + public function getJsonBody() + { + return $this->container['jsonBody']; + } + + /** + * Sets jsonBody + * + * @param map[string,object][] $jsonBody **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. + * + * @return $this + */ + public function setJsonBody($jsonBody) + { + $this->container['jsonBody'] = $jsonBody; + + return $this; + } + /** * Gets listIds * diff --git a/lib/Model/TaskTypes.php b/lib/Model/TaskTypes.php new file mode 100644 index 00000000..2613ed97 --- /dev/null +++ b/lib/Model/TaskTypes.php @@ -0,0 +1,362 @@ + 'string', + 'icon' => 'string', + 'title' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'icon' => null, + 'title' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'icon' => 'icon', + 'title' => 'title' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'icon' => 'setIcon', + 'title' => 'setTitle' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'icon' => 'getIcon', + 'title' => 'getTitle' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['icon'] = isset($data['icon']) ? $data['icon'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Id of task type + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets icon + * + * @return string + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string $icon Icon of task type + * + * @return $this + */ + public function setIcon($icon) + { + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Title of task type + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/test/Api/CRMApiTest.php b/test/Api/CRMApiTest.php index f808016e..5fc8e79d 100644 --- a/test/Api/CRMApiTest.php +++ b/test/Api/CRMApiTest.php @@ -74,7 +74,7 @@ public static function tearDownAfterClass() /** * Test case for crmFilesIdDataGet * - * Get file data by id.. + * Get file details. * */ public function testCrmFilesIdDataGet() @@ -84,7 +84,7 @@ public function testCrmFilesIdDataGet() /** * Test case for crmFilesIdDelete * - * Delete file.. + * Delete a file. * */ public function testCrmFilesIdDelete() @@ -94,7 +94,7 @@ public function testCrmFilesIdDelete() /** * Test case for crmFilesIdGet * - * Download file by id.. + * Download a file. * */ public function testCrmFilesIdGet() @@ -104,7 +104,7 @@ public function testCrmFilesIdGet() /** * Test case for crmFilesPost * - * Upload and create file.. + * Upload a file. * */ public function testCrmFilesPost() @@ -114,7 +114,7 @@ public function testCrmFilesPost() /** * Test case for crmNotesIdDelete * - * Delete Note by ID. + * Delete a note. * */ public function testCrmNotesIdDelete() @@ -124,7 +124,7 @@ public function testCrmNotesIdDelete() /** * Test case for crmNotesIdGet * - * Get one Note by ID. + * Get a note. * */ public function testCrmNotesIdGet() @@ -144,7 +144,7 @@ public function testCrmNotesIdPatch() /** * Test case for crmNotesPost * - * Create a new Note. + * Create a note. * */ public function testCrmNotesPost() @@ -154,7 +154,7 @@ public function testCrmNotesPost() /** * Test case for crmTasksIdDelete * - * Delete Task by id. + * Delete a task. * */ public function testCrmTasksIdDelete() @@ -164,7 +164,7 @@ public function testCrmTasksIdDelete() /** * Test case for crmTasksIdGet * - * Get one Task by ID. + * Get a task. * */ public function testCrmTasksIdGet() @@ -174,7 +174,7 @@ public function testCrmTasksIdGet() /** * Test case for crmTasksIdPatch * - * Update partial existing task. + * Update a task. * */ public function testCrmTasksIdPatch() @@ -184,10 +184,20 @@ public function testCrmTasksIdPatch() /** * Test case for crmTasksPost * - * Create a new Task. + * Create a task. * */ public function testCrmTasksPost() { } + + /** + * Test case for crmTasktypesGet + * + * Get all task types. + * + */ + public function testCrmTasktypesGet() + { + } } diff --git a/test/Api/MasterAccountApiTest.php b/test/Api/MasterAccountApiTest.php index c8c8eb16..86d49d41 100644 --- a/test/Api/MasterAccountApiTest.php +++ b/test/Api/MasterAccountApiTest.php @@ -91,6 +91,16 @@ public function testCorporateSubAccountGet() { } + /** + * Test case for corporateSubAccountIdDelete + * + * Delete a sub-account. + * + */ + public function testCorporateSubAccountIdDelete() + { + } + /** * Test case for corporateSubAccountIdGet * diff --git a/test/Model/RequestContactImportTest.php b/test/Model/RequestContactImportTest.php index 62573d53..7583ff9e 100644 --- a/test/Model/RequestContactImportTest.php +++ b/test/Model/RequestContactImportTest.php @@ -90,6 +90,13 @@ public function testPropertyFileBody() { } + /** + * Test attribute "jsonBody" + */ + public function testPropertyJsonBody() + { + } + /** * Test attribute "listIds" */