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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,19 @@ Class | Method | HTTP request | Description
*ResellerApi* | [**getResellerChilds**](docs/Api/ResellerApi.md#getresellerchilds) | **GET** /reseller/children | Gets the list of all reseller's children accounts
*ResellerApi* | [**removeCredits**](docs/Api/ResellerApi.md#removecredits) | **POST** /reseller/children/{childId}/credits/remove | Remove Email and/or SMS credits from a specific child account
*ResellerApi* | [**updateResellerChild**](docs/Api/ResellerApi.md#updateresellerchild) | **PUT** /reseller/children/{childId} | Updates infos of reseller's child based on the childId supplied
*SMSCampaignsApi* | [**createSMSCampaign**](docs/Api/SMSCampaignsApi.md#createsmscampaign) | **POST** /smsCampaigns | Creates a SMS campaign
*SMSCampaignsApi* | [**createSMSCampaign**](docs/Api/SMSCampaignsApi.md#createsmscampaign) | **POST** /smsCampaigns | Creates an SMS campaign
*SMSCampaignsApi* | [**deleteSMSCampaigns**](docs/Api/SMSCampaignsApi.md#deletesmscampaigns) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign
*SMSCampaignsApi* | [**getSMSCampaigns**](docs/Api/SMSCampaignsApi.md#getsmscampaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns
*SMSCampaignsApi* | [**getSmsCampaign**](docs/Api/SMSCampaignsApi.md#getsmscampaign) | **GET** /smsCampaigns/{campaignId} | Get a SMS campaign
*SMSCampaignsApi* | [**getSmsCampaign**](docs/Api/SMSCampaignsApi.md#getsmscampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign
*SMSCampaignsApi* | [**requestSMSRecipientExport**](docs/Api/SMSCampaignsApi.md#requestsmsrecipientexport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign.
*SMSCampaignsApi* | [**sendSMSCampaignNow**](docs/Api/SMSCampaignsApi.md#sendsmscampaignnow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately
*SMSCampaignsApi* | [**sendSMSReport**](docs/Api/SMSCampaignsApi.md#sendsmsreport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns
*SMSCampaignsApi* | [**sendTestSms**](docs/Api/SMSCampaignsApi.md#sendtestsms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS
*SMSCampaignsApi* | [**updateSMSCampaignStatus**](docs/Api/SMSCampaignsApi.md#updatesmscampaignstatus) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status
*SMSCampaignsApi* | [**updateSmsCampaign**](docs/Api/SMSCampaignsApi.md#updatesmscampaign) | **PUT** /smsCampaigns/{campaignId} | Updates a SMS campaign
*SMSCampaignsApi* | [**updateSmsCampaign**](docs/Api/SMSCampaignsApi.md#updatesmscampaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign
*SMTPApi* | [**createSmtpTemplate**](docs/Api/SMTPApi.md#createsmtptemplate) | **POST** /smtp/templates | Create an smtp template
*SMTPApi* | [**deleteHardbounces**](docs/Api/SMTPApi.md#deletehardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces
*SMTPApi* | [**deleteSmtpTemplate**](docs/Api/SMTPApi.md#deletesmtptemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template
*SMTPApi* | [**getAggregatedSmtpReport**](docs/Api/SMTPApi.md#getaggregatedsmtpreport) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time
*SMTPApi* | [**getEmailEventReport**](docs/Api/SMTPApi.md#getemaileventreport) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events)
*SMTPApi* | [**getSmtpReport**](docs/Api/SMTPApi.md#getsmtpreport) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day
Expand Down
6 changes: 4 additions & 2 deletions docs/Api/ContactsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ 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)

# **getContacts**
> \SendinBlue\Client\Model\GetContacts getContacts($limit, $offset)
> \SendinBlue\Client\Model\GetContacts getContacts($limit, $offset, $modifiedSince)

Get all the contacts

Expand All @@ -571,9 +571,10 @@ SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key',
$api_instance = new SendinBlue\Client\Api\ContactsApi();
$limit = 50; // int | Number of documents per page
$offset = 0; // int | Index of the first document of the page
$modifiedSince = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)

try {
$result = $api_instance->getContacts($limit, $offset);
$result = $api_instance->getContacts($limit, $offset, $modifiedSince);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactsApi->getContacts: ', $e->getMessage(), PHP_EOL;
Expand All @@ -587,6 +588,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **int**| Number of documents per page | [optional] [default to 50]
**offset** | **int**| Index of the first document of the page | [optional] [default to 0]
**modifiedSince** | **\DateTime**| Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional]

### Return type

Expand Down
12 changes: 6 additions & 6 deletions docs/Api/SMSCampaignsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ All URIs are relative to *https://api.sendinblue.com/v3*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createSMSCampaign**](SMSCampaignsApi.md#createSMSCampaign) | **POST** /smsCampaigns | Creates a SMS campaign
[**createSMSCampaign**](SMSCampaignsApi.md#createSMSCampaign) | **POST** /smsCampaigns | Creates an SMS campaign
[**deleteSMSCampaigns**](SMSCampaignsApi.md#deleteSMSCampaigns) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign
[**getSMSCampaigns**](SMSCampaignsApi.md#getSMSCampaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns
[**getSmsCampaign**](SMSCampaignsApi.md#getSmsCampaign) | **GET** /smsCampaigns/{campaignId} | Get a SMS campaign
[**getSmsCampaign**](SMSCampaignsApi.md#getSmsCampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign
[**requestSMSRecipientExport**](SMSCampaignsApi.md#requestSMSRecipientExport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign.
[**sendSMSCampaignNow**](SMSCampaignsApi.md#sendSMSCampaignNow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately
[**sendSMSReport**](SMSCampaignsApi.md#sendSMSReport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns
[**sendTestSms**](SMSCampaignsApi.md#sendTestSms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS
[**updateSMSCampaignStatus**](SMSCampaignsApi.md#updateSMSCampaignStatus) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status
[**updateSmsCampaign**](SMSCampaignsApi.md#updateSmsCampaign) | **PUT** /smsCampaigns/{campaignId} | Updates a SMS campaign
[**updateSmsCampaign**](SMSCampaignsApi.md#updateSmsCampaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign


# **createSMSCampaign**
> \SendinBlue\Client\Model\CreateModel createSMSCampaign($createSmsCampaign)
Creates a SMS campaign
Creates an SMS campaign

### Example
```php
Expand Down Expand Up @@ -166,7 +166,7 @@ Name | Type | Description | Notes
# **getSmsCampaign**
> \SendinBlue\Client\Model\GetSmsCampaign getSmsCampaign($campaignId, $getSmsCampaign)
Get a SMS campaign
Get an SMS campaign

### Example
```php
Expand Down Expand Up @@ -464,7 +464,7 @@ void (empty response body)
# **updateSmsCampaign**
> updateSmsCampaign($campaignId, $updateSmsCampaign)
Updates a SMS campaign
Updates an SMS campaign

### Example
```php
Expand Down
48 changes: 48 additions & 0 deletions docs/Api/SMTPApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**createSmtpTemplate**](SMTPApi.md#createSmtpTemplate) | **POST** /smtp/templates | Create an smtp template
[**deleteHardbounces**](SMTPApi.md#deleteHardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces
[**deleteSmtpTemplate**](SMTPApi.md#deleteSmtpTemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template
[**getAggregatedSmtpReport**](SMTPApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time
[**getEmailEventReport**](SMTPApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events)
[**getSmtpReport**](SMTPApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day
Expand Down Expand Up @@ -114,6 +115,53 @@ void (empty response body)

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

# **deleteSmtpTemplate**
> deleteSmtpTemplate($templateId)

Delete an inactive smtp template

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api-key
SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new SendinBlue\Client\Api\SMTPApi();
$templateId = 789; // int | id of the template

try {
$api_instance->deleteSmtpTemplate($templateId);
} catch (Exception $e) {
echo 'Exception when calling SMTPApi->deleteSmtpTemplate: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**templateId** | **int**| id of the template |

### Return type

void (empty response body)

### Authorization

[api-key](../../README.md#api-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)

# **getAggregatedSmtpReport**
> \SendinBlue\Client\Model\GetAggregatedReport getAggregatedSmtpReport($startDate, $endDate, $days, $tag)

Expand Down
1 change: 1 addition & 0 deletions docs/Model/CreateContact.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**emailBlacklisted** | **bool** | Blacklist the contact for emails (emailBlacklisted &#x3D; true) | [optional]
**smsBlacklisted** | **bool** | Blacklist the contact for SMS (smsBlacklisted &#x3D; true) | [optional]
**listIds** | **int[]** | Ids of the lists to add the contact to | [optional]
**updateEnabled** | **bool** | Facilitate to update existing contact in same request (updateEnabled &#x3D; true) | [optional] [default to false]

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

Expand Down
12 changes: 9 additions & 3 deletions lib/Api/ContactsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,12 +1088,13 @@ public function getContactStatsWithHttpInfo($email)
*
* @param int $limit Number of documents per page (optional, default to 50)
* @param int $offset Index of the first document of the page (optional, default to 0)
* @param \DateTime $modifiedSince Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) (optional)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return \SendinBlue\Client\Model\GetContacts
*/
public function getContacts($limit = '50', $offset = '0')
public function getContacts($limit = '50', $offset = '0', $modifiedSince = null)
{
list($response) = $this->getContactsWithHttpInfo($limit, $offset);
list($response) = $this->getContactsWithHttpInfo($limit, $offset, $modifiedSince);
return $response;
}

Expand All @@ -1104,10 +1105,11 @@ public function getContacts($limit = '50', $offset = '0')
*
* @param int $limit Number of documents per page (optional, default to 50)
* @param int $offset Index of the first document of the page (optional, default to 0)
* @param \DateTime $modifiedSince Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) (optional)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return array of \SendinBlue\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings)
*/
public function getContactsWithHttpInfo($limit = '50', $offset = '0')
public function getContactsWithHttpInfo($limit = '50', $offset = '0', $modifiedSince = null)
{
if (!is_null($limit) && ($limit > 1000)) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContacts, must be smaller than or equal to 1000.');
Expand All @@ -1133,6 +1135,10 @@ public function getContactsWithHttpInfo($limit = '50', $offset = '0')
if ($offset !== null) {
$queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset);
}
// query params
if ($modifiedSince !== null) {
$queryParams['modifiedSince'] = $this->apiClient->getSerializer()->toQueryValue($modifiedSince);
}

// for model (json/xml)
if (isset($_tempBody)) {
Expand Down
12 changes: 6 additions & 6 deletions lib/Api/SMSCampaignsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function setApiClient(\SendinBlue\Client\ApiClient $apiClient)
/**
* Operation createSMSCampaign
*
* Creates a SMS campaign
* Creates an SMS campaign
*
* @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
Expand All @@ -105,7 +105,7 @@ public function createSMSCampaign($createSmsCampaign)
/**
* Operation createSMSCampaignWithHttpInfo
*
* Creates a SMS campaign
* Creates an SMS campaign
*
* @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
Expand Down Expand Up @@ -368,7 +368,7 @@ public function getSMSCampaignsWithHttpInfo($status = null, $limit = '500', $off
/**
* Operation getSmsCampaign
*
* Get a SMS campaign
* Get an SMS campaign
*
* @param int $campaignId id of the SMS campaign (required)
* @param \SendinBlue\Client\Model\GetSmsCampaign $getSmsCampaign Values to update an SMS Campaign (required)
Expand All @@ -384,7 +384,7 @@ public function getSmsCampaign($campaignId, $getSmsCampaign)
/**
* Operation getSmsCampaignWithHttpInfo
*
* Get a SMS campaign
* Get an SMS campaign
*
* @param int $campaignId id of the SMS campaign (required)
* @param \SendinBlue\Client\Model\GetSmsCampaign $getSmsCampaign Values to update an SMS Campaign (required)
Expand Down Expand Up @@ -977,7 +977,7 @@ public function updateSMSCampaignStatusWithHttpInfo($campaignId, $status)
/**
* Operation updateSmsCampaign
*
* Updates a SMS campaign
* Updates an SMS campaign
*
* @param int $campaignId id of the SMS campaign (required)
* @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required)
Expand All @@ -993,7 +993,7 @@ public function updateSmsCampaign($campaignId, $updateSmsCampaign)
/**
* Operation updateSmsCampaignWithHttpInfo
*
* Updates a SMS campaign
* Updates an SMS campaign
*
* @param int $campaignId id of the SMS campaign (required)
* @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required)
Expand Down
91 changes: 91 additions & 0 deletions lib/Api/SMTPApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,97 @@ public function deleteHardbouncesWithHttpInfo($deleteHardbounces = null)
}
}

/**
* Operation deleteSmtpTemplate
*
* Delete an inactive smtp template
*
* @param int $templateId id of the template (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return void
*/
public function deleteSmtpTemplate($templateId)
{
list($response) = $this->deleteSmtpTemplateWithHttpInfo($templateId);
return $response;
}

/**
* Operation deleteSmtpTemplateWithHttpInfo
*
* Delete an inactive smtp template
*
* @param int $templateId id of the template (required)
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function deleteSmtpTemplateWithHttpInfo($templateId)
{
// verify the required parameter 'templateId' is set
if ($templateId === null) {
throw new \InvalidArgumentException('Missing the required parameter $templateId when calling deleteSmtpTemplate');
}
// parse inputs
$resourcePath = "/smtp/templates/{templateId}";
$httpBody = '';
$queryParams = [];
$headerParams = [];
$formParams = [];
$_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);

// path params
if ($templateId !== null) {
$resourcePath = str_replace(
"{" . "templateId" . "}",
$this->apiClient->getSerializer()->toPathValue($templateId),
$resourcePath
);
}

// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api-key');
if (strlen($apiKey) !== 0) {
$headerParams['api-key'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath,
'DELETE',
$queryParams,
$httpBody,
$headerParams,
null,
'/smtp/templates/{templateId}'
);

return [null, $statusCode, $httpHeader];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 400:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}

throw $e;
}
}

/**
* Operation getAggregatedSmtpReport
*
Expand Down
Loading