Skip to content

Commit

Permalink
Merge pull request #204 from sendinblue/feature_AP-2076
Browse files Browse the repository at this point in the history
AP-2076 : PHP wrapper update
  • Loading branch information
preetishishodia7 authored Apr 5, 2022
2 parents 5f57580 + d0ed8c3 commit 2a2142b
Show file tree
Hide file tree
Showing 71 changed files with 3,734 additions and 171 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ Class | Method | HTTP request | Description
*TransactionalEmailsApi* | [**getAggregatedSmtpReport**](docs/Api/TransactionalEmailsApi.md#getaggregatedsmtpreport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time
*TransactionalEmailsApi* | [**getBlockedDomains**](docs/Api/TransactionalEmailsApi.md#getblockeddomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains
*TransactionalEmailsApi* | [**getEmailEventReport**](docs/Api/TransactionalEmailsApi.md#getemaileventreport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events)
*TransactionalEmailsApi* | [**getScheduledEmailByBatchId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbybatchid) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId
*TransactionalEmailsApi* | [**getScheduledEmailById**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbyid) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId
*TransactionalEmailsApi* | [**getScheduledEmailByMessageId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbymessageid) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId
*TransactionalEmailsApi* | [**getSmtpReport**](docs/Api/TransactionalEmailsApi.md#getsmtpreport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day
*TransactionalEmailsApi* | [**getSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#getsmtptemplate) | **GET** /smtp/templates/{templateId} | Returns the template information
*TransactionalEmailsApi* | [**getSmtpTemplates**](docs/Api/TransactionalEmailsApi.md#getsmtptemplates) | **GET** /smtp/templates | Get the list of email templates
Expand Down Expand Up @@ -261,6 +264,7 @@ Class | Method | HTTP request | Description
- [CreateSmtpTemplate](docs/Model/CreateSmtpTemplate.md)
- [CreateSmtpTemplateSender](docs/Model/CreateSmtpTemplateSender.md)
- [CreateSubAccount](docs/Model/CreateSubAccount.md)
- [CreateSubAccountResponse](docs/Model/CreateSubAccountResponse.md)
- [CreateUpdateContactModel](docs/Model/CreateUpdateContactModel.md)
- [CreateUpdateFolder](docs/Model/CreateUpdateFolder.md)
- [CreateWebhook](docs/Model/CreateWebhook.md)
Expand Down Expand Up @@ -333,6 +337,9 @@ Class | Method | HTTP request | Description
- [GetProcesses](docs/Model/GetProcesses.md)
- [GetReports](docs/Model/GetReports.md)
- [GetReportsReports](docs/Model/GetReportsReports.md)
- [GetScheduledEmailByBatchId](docs/Model/GetScheduledEmailByBatchId.md)
- [GetScheduledEmailByBatchIdBatches](docs/Model/GetScheduledEmailByBatchIdBatches.md)
- [GetScheduledEmailByMessageId](docs/Model/GetScheduledEmailByMessageId.md)
- [GetSendersList](docs/Model/GetSendersList.md)
- [GetSendersListIps](docs/Model/GetSendersListIps.md)
- [GetSendersListSenders](docs/Model/GetSendersListSenders.md)
Expand Down Expand Up @@ -361,6 +368,7 @@ Class | Method | HTTP request | Description
- [GetTransacSmsReportReports](docs/Model/GetTransacSmsReportReports.md)
- [GetWebhook](docs/Model/GetWebhook.md)
- [GetWebhooks](docs/Model/GetWebhooks.md)
- [InlineResponse201](docs/Model/InlineResponse201.md)
- [ManageIp](docs/Model/ManageIp.md)
- [MasterDetailsResponse](docs/Model/MasterDetailsResponse.md)
- [MasterDetailsResponseBillingInfo](docs/Model/MasterDetailsResponseBillingInfo.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/Api/CRMApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,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)

# **crmTasksPost**
> \SendinBlue\Client\Model\Task crmTasksPost($body)
> \SendinBlue\Client\Model\InlineResponse201 crmTasksPost($body)
Create a task

Expand Down Expand Up @@ -692,7 +692,7 @@ Name | Type | Description | Notes

### Return type

[**\SendinBlue\Client\Model\Task**](../Model/Task.md)
[**\SendinBlue\Client\Model\InlineResponse201**](../Model/InlineResponse201.md)

### Authorization

Expand Down
12 changes: 6 additions & 6 deletions docs/Api/MasterAccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
new GuzzleHttp\Client(),
$config
);
$offset = 56; // int | Page number of sub-accounts listing
$offset = 56; // int | Index of the first sub-account in the page
$limit = 56; // int | Number of sub-accounts to be displayed on each page

try {
Expand All @@ -111,7 +111,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**offset** | **int**| Page number of sub-accounts listing |
**offset** | **int**| Index of the first sub-account in the page |
**limit** | **int**| Number of sub-accounts to be displayed on each page |

### Return type
Expand Down Expand Up @@ -190,7 +190,7 @@ void (empty response body)
Get sub-account details

This endpoint will provide the details of specified sub-account organization
This endpoint will provide the details for the specified sub-account company

### Example
```php
Expand Down Expand Up @@ -305,7 +305,7 @@ 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)

# **corporateSubAccountPost**
> \SendinBlue\Client\Model\CreateModel corporateSubAccountPost($subAccountCreate)
> \SendinBlue\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate)
Create a new sub-account under a master account.

Expand Down Expand Up @@ -350,7 +350,7 @@ Name | Type | Description | Notes

### Return type

[**\SendinBlue\Client\Model\CreateModel**](../Model/CreateModel.md)
[**\SendinBlue\Client\Model\CreateSubAccountResponse**](../Model/CreateSubAccountResponse.md)

### Authorization

Expand All @@ -368,7 +368,7 @@ Name | Type | Description | Notes
Generate SSO token to access Sendinblue

This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token.
This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.

### Example
```php
Expand Down
195 changes: 195 additions & 0 deletions docs/Api/TransactionalEmailsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Method | HTTP request | Description
[**getAggregatedSmtpReport**](TransactionalEmailsApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time
[**getBlockedDomains**](TransactionalEmailsApi.md#getBlockedDomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains
[**getEmailEventReport**](TransactionalEmailsApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events)
[**getScheduledEmailByBatchId**](TransactionalEmailsApi.md#getScheduledEmailByBatchId) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId
[**getScheduledEmailById**](TransactionalEmailsApi.md#getScheduledEmailById) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId
[**getScheduledEmailByMessageId**](TransactionalEmailsApi.md#getScheduledEmailByMessageId) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId
[**getSmtpReport**](TransactionalEmailsApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day
[**getSmtpTemplate**](TransactionalEmailsApi.md#getSmtpTemplate) | **GET** /smtp/templates/{templateId} | Returns the template information
[**getSmtpTemplates**](TransactionalEmailsApi.md#getSmtpTemplates) | **GET** /smtp/templates | Get the list of email templates
Expand Down Expand Up @@ -511,6 +514,198 @@ 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)

# **getScheduledEmailByBatchId**
> \SendinBlue\Client\Model\GetScheduledEmailByBatchId getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset)
Fetch scheduled emails by batchId

Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)

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

// Configure API key authorization: api-key
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->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\TransactionalEmailsApi(
// 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
);
$batchId = "batchId_example"; // string | The batchId of scheduled emails batch (Should be a valid UUIDv4)
$startDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
$status = "status_example"; // string | Filter the records by `status` of the scheduled email batch or message.
$limit = 100; // int | Number of documents returned per page
$offset = 0; // int | Index of the first document on the page

try {
$result = $apiInstance->getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByBatchId: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**batchId** | **string**| The batchId of scheduled emails batch (Should be a valid UUIDv4) |
**startDate** | **\DateTime**| Mandatory if &#x60;endDate&#x60; is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional]
**endDate** | **\DateTime**| Mandatory if &#x60;startDate&#x60; is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional]
**sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed | [optional] [default to desc]
**status** | **string**| Filter the records by &#x60;status&#x60; of the scheduled email batch or message. | [optional]
**limit** | **int**| Number of documents returned per page | [optional] [default to 100]
**offset** | **int**| Index of the first document on the page | [optional] [default to 0]

### Return type

[**\SendinBlue\Client\Model\GetScheduledEmailByBatchId**](../Model/GetScheduledEmailByBatchId.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)

# **getScheduledEmailById**
> getScheduledEmailById($identifier)
Delete scheduled emails by batchId or messageId

Delete scheduled batch of emails by batchId or single scheduled email by messageId

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

// Configure API key authorization: api-key
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->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\TransactionalEmailsApi(
// 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
);
$identifier = "identifier_example"; // string | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.

try {
$apiInstance->getScheduledEmailById($identifier);
} catch (Exception $e) {
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailById: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**identifier** | **string**| The &#x60;batchId&#x60; of scheduled emails batch (Should be a valid UUIDv4) or the &#x60;messageId&#x60; of scheduled email. |

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

# **getScheduledEmailByMessageId**
> \SendinBlue\Client\Model\GetScheduledEmailByMessageId getScheduledEmailByMessageId($messageId, $startDate, $endDate)
Fetch scheduled email by messageId

Fetch scheduled email by messageId (Can retrieve data upto 30 days old)

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

// Configure API key authorization: api-key
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->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\TransactionalEmailsApi(
// 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
);
$messageId = "messageId_example"; // string | The messageId of scheduled email
$startDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
$endDate = new \DateTime("2013-10-20"); // \DateTime | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.

try {
$result = $apiInstance->getScheduledEmailByMessageId($messageId, $startDate, $endDate);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByMessageId: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**messageId** | **string**| The messageId of scheduled email |
**startDate** | **\DateTime**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional]
**endDate** | **\DateTime**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional]

### Return type

[**\SendinBlue\Client\Model\GetScheduledEmailByMessageId**](../Model/GetScheduledEmailByMessageId.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)

# **getSmtpReport**
> \SendinBlue\Client\Model\GetReports getSmtpReport($limit, $offset, $startDate, $endDate, $days, $tag, $sort)
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/AbTestCampaignResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**winningVersion** | **string** | Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. | [optional]
**winningVersion** | **string** | Winning Campaign Info. pending &#x3D; Campaign has been picked for sending and winning version is yet to be decided, tie &#x3D; A tie happened between both the versions, notAvailable &#x3D; Campaign has not yet been picked for sending. | [optional]
**winningCriteria** | **string** | Criteria choosen for winning version (Open/Click) | [optional]
**winningSubjectLine** | **string** | Subject Line of current winning version | [optional]
**openRate** | **string** | Open rate for current winning version | [optional]
Expand Down
4 changes: 2 additions & 2 deletions docs/Model/Body.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Name of task |
**duration** | **int** | Duration of task | [optional]
**duration** | **int** | Duration of task in milliseconds [1 minute &#x3D; 60000 ms] | [optional]
**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. |
**date** | [**\DateTime**] | Task date/time |
**date** | [**\DateTime**] | Task due date and time |
**notes** | **string** | Notes added to a task | [optional]
**done** | **bool** | Task marked as done | [optional]
**assignToId** | **string** | User id to whom task is assigned | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/Body1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Name of task |
**duration** | **int** | Duration of task | [optional]
**duration** | **int** | Duration of task in milliseconds [1 minute &#x3D; 60000 ms] | [optional]
**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. |
**date** | [**\DateTime**] | Task date/time |
**notes** | **string** | Notes added to a task | [optional]
Expand Down
Loading

0 comments on commit 2a2142b

Please sign in to comment.