Skip to content

Commit 2a2142b

Browse files
Merge pull request #204 from sendinblue/feature_AP-2076
AP-2076 : PHP wrapper update
2 parents 5f57580 + d0ed8c3 commit 2a2142b

File tree

71 files changed

+3734
-171
lines changed

Some content is hidden

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

71 files changed

+3734
-171
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ Class | Method | HTTP request | Description
204204
*TransactionalEmailsApi* | [**getAggregatedSmtpReport**](docs/Api/TransactionalEmailsApi.md#getaggregatedsmtpreport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time
205205
*TransactionalEmailsApi* | [**getBlockedDomains**](docs/Api/TransactionalEmailsApi.md#getblockeddomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains
206206
*TransactionalEmailsApi* | [**getEmailEventReport**](docs/Api/TransactionalEmailsApi.md#getemaileventreport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events)
207+
*TransactionalEmailsApi* | [**getScheduledEmailByBatchId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbybatchid) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId
208+
*TransactionalEmailsApi* | [**getScheduledEmailById**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbyid) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId
209+
*TransactionalEmailsApi* | [**getScheduledEmailByMessageId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbymessageid) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId
207210
*TransactionalEmailsApi* | [**getSmtpReport**](docs/Api/TransactionalEmailsApi.md#getsmtpreport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day
208211
*TransactionalEmailsApi* | [**getSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#getsmtptemplate) | **GET** /smtp/templates/{templateId} | Returns the template information
209212
*TransactionalEmailsApi* | [**getSmtpTemplates**](docs/Api/TransactionalEmailsApi.md#getsmtptemplates) | **GET** /smtp/templates | Get the list of email templates
@@ -261,6 +264,7 @@ Class | Method | HTTP request | Description
261264
- [CreateSmtpTemplate](docs/Model/CreateSmtpTemplate.md)
262265
- [CreateSmtpTemplateSender](docs/Model/CreateSmtpTemplateSender.md)
263266
- [CreateSubAccount](docs/Model/CreateSubAccount.md)
267+
- [CreateSubAccountResponse](docs/Model/CreateSubAccountResponse.md)
264268
- [CreateUpdateContactModel](docs/Model/CreateUpdateContactModel.md)
265269
- [CreateUpdateFolder](docs/Model/CreateUpdateFolder.md)
266270
- [CreateWebhook](docs/Model/CreateWebhook.md)
@@ -333,6 +337,9 @@ Class | Method | HTTP request | Description
333337
- [GetProcesses](docs/Model/GetProcesses.md)
334338
- [GetReports](docs/Model/GetReports.md)
335339
- [GetReportsReports](docs/Model/GetReportsReports.md)
340+
- [GetScheduledEmailByBatchId](docs/Model/GetScheduledEmailByBatchId.md)
341+
- [GetScheduledEmailByBatchIdBatches](docs/Model/GetScheduledEmailByBatchIdBatches.md)
342+
- [GetScheduledEmailByMessageId](docs/Model/GetScheduledEmailByMessageId.md)
336343
- [GetSendersList](docs/Model/GetSendersList.md)
337344
- [GetSendersListIps](docs/Model/GetSendersListIps.md)
338345
- [GetSendersListSenders](docs/Model/GetSendersListSenders.md)
@@ -361,6 +368,7 @@ Class | Method | HTTP request | Description
361368
- [GetTransacSmsReportReports](docs/Model/GetTransacSmsReportReports.md)
362369
- [GetWebhook](docs/Model/GetWebhook.md)
363370
- [GetWebhooks](docs/Model/GetWebhooks.md)
371+
- [InlineResponse201](docs/Model/InlineResponse201.md)
364372
- [ManageIp](docs/Model/ManageIp.md)
365373
- [MasterDetailsResponse](docs/Model/MasterDetailsResponse.md)
366374
- [MasterDetailsResponseBillingInfo](docs/Model/MasterDetailsResponseBillingInfo.md)

docs/Api/CRMApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ Name | Type | Description | Notes
649649
[[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)
650650

651651
# **crmTasksPost**
652-
> \SendinBlue\Client\Model\Task crmTasksPost($body)
652+
> \SendinBlue\Client\Model\InlineResponse201 crmTasksPost($body)
653653
654654
Create a task
655655

@@ -692,7 +692,7 @@ Name | Type | Description | Notes
692692

693693
### Return type
694694

695-
[**\SendinBlue\Client\Model\Task**](../Model/Task.md)
695+
[**\SendinBlue\Client\Model\InlineResponse201**](../Model/InlineResponse201.md)
696696

697697
### Authorization
698698

docs/Api/MasterAccountApi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
9595
new GuzzleHttp\Client(),
9696
$config
9797
);
98-
$offset = 56; // int | Page number of sub-accounts listing
98+
$offset = 56; // int | Index of the first sub-account in the page
9999
$limit = 56; // int | Number of sub-accounts to be displayed on each page
100100

101101
try {
@@ -111,7 +111,7 @@ try {
111111

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

117117
### Return type
@@ -190,7 +190,7 @@ void (empty response body)
190190
191191
Get sub-account details
192192

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

195195
### Example
196196
```php
@@ -305,7 +305,7 @@ void (empty response body)
305305
[[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)
306306

307307
# **corporateSubAccountPost**
308-
> \SendinBlue\Client\Model\CreateModel corporateSubAccountPost($subAccountCreate)
308+
> \SendinBlue\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate)
309309
310310
Create a new sub-account under a master account.
311311

@@ -350,7 +350,7 @@ Name | Type | Description | Notes
350350

351351
### Return type
352352

353-
[**\SendinBlue\Client\Model\CreateModel**](../Model/CreateModel.md)
353+
[**\SendinBlue\Client\Model\CreateSubAccountResponse**](../Model/CreateSubAccountResponse.md)
354354

355355
### Authorization
356356

@@ -368,7 +368,7 @@ Name | Type | Description | Notes
368368
369369
Generate SSO token to access Sendinblue
370370

371-
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.
371+
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.
372372

373373
### Example
374374
```php

docs/Api/TransactionalEmailsApi.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Method | HTTP request | Description
1212
[**getAggregatedSmtpReport**](TransactionalEmailsApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time
1313
[**getBlockedDomains**](TransactionalEmailsApi.md#getBlockedDomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains
1414
[**getEmailEventReport**](TransactionalEmailsApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events)
15+
[**getScheduledEmailByBatchId**](TransactionalEmailsApi.md#getScheduledEmailByBatchId) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId
16+
[**getScheduledEmailById**](TransactionalEmailsApi.md#getScheduledEmailById) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId
17+
[**getScheduledEmailByMessageId**](TransactionalEmailsApi.md#getScheduledEmailByMessageId) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId
1518
[**getSmtpReport**](TransactionalEmailsApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day
1619
[**getSmtpTemplate**](TransactionalEmailsApi.md#getSmtpTemplate) | **GET** /smtp/templates/{templateId} | Returns the template information
1720
[**getSmtpTemplates**](TransactionalEmailsApi.md#getSmtpTemplates) | **GET** /smtp/templates | Get the list of email templates
@@ -511,6 +514,198 @@ Name | Type | Description | Notes
511514

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

517+
# **getScheduledEmailByBatchId**
518+
> \SendinBlue\Client\Model\GetScheduledEmailByBatchId getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset)
519+
520+
Fetch scheduled emails by batchId
521+
522+
Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
523+
524+
### Example
525+
```php
526+
<?php
527+
require_once(__DIR__ . '/vendor/autoload.php');
528+
529+
// Configure API key authorization: api-key
530+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
531+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
532+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
533+
// Configure API key authorization: partner-key
534+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
535+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
536+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
537+
538+
$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi(
539+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
540+
// This is optional, `GuzzleHttp\Client` will be used as default.
541+
new GuzzleHttp\Client(),
542+
$config
543+
);
544+
$batchId = "batchId_example"; // string | The batchId of scheduled emails batch (Should be a valid UUIDv4)
545+
$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.
546+
$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.
547+
$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
548+
$status = "status_example"; // string | Filter the records by `status` of the scheduled email batch or message.
549+
$limit = 100; // int | Number of documents returned per page
550+
$offset = 0; // int | Index of the first document on the page
551+
552+
try {
553+
$result = $apiInstance->getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset);
554+
print_r($result);
555+
} catch (Exception $e) {
556+
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByBatchId: ', $e->getMessage(), PHP_EOL;
557+
}
558+
?>
559+
```
560+
561+
### Parameters
562+
563+
Name | Type | Description | Notes
564+
------------- | ------------- | ------------- | -------------
565+
**batchId** | **string**| The batchId of scheduled emails batch (Should be a valid UUIDv4) |
566+
**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]
567+
**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]
568+
**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]
569+
**status** | **string**| Filter the records by &#x60;status&#x60; of the scheduled email batch or message. | [optional]
570+
**limit** | **int**| Number of documents returned per page | [optional] [default to 100]
571+
**offset** | **int**| Index of the first document on the page | [optional] [default to 0]
572+
573+
### Return type
574+
575+
[**\SendinBlue\Client\Model\GetScheduledEmailByBatchId**](../Model/GetScheduledEmailByBatchId.md)
576+
577+
### Authorization
578+
579+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
580+
581+
### HTTP request headers
582+
583+
- **Content-Type**: application/json
584+
- **Accept**: application/json
585+
586+
[[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)
587+
588+
# **getScheduledEmailById**
589+
> getScheduledEmailById($identifier)
590+
591+
Delete scheduled emails by batchId or messageId
592+
593+
Delete scheduled batch of emails by batchId or single scheduled email by messageId
594+
595+
### Example
596+
```php
597+
<?php
598+
require_once(__DIR__ . '/vendor/autoload.php');
599+
600+
// Configure API key authorization: api-key
601+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
602+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
603+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
604+
// Configure API key authorization: partner-key
605+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
606+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
607+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
608+
609+
$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi(
610+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
611+
// This is optional, `GuzzleHttp\Client` will be used as default.
612+
new GuzzleHttp\Client(),
613+
$config
614+
);
615+
$identifier = "identifier_example"; // string | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
616+
617+
try {
618+
$apiInstance->getScheduledEmailById($identifier);
619+
} catch (Exception $e) {
620+
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailById: ', $e->getMessage(), PHP_EOL;
621+
}
622+
?>
623+
```
624+
625+
### Parameters
626+
627+
Name | Type | Description | Notes
628+
------------- | ------------- | ------------- | -------------
629+
**identifier** | **string**| The &#x60;batchId&#x60; of scheduled emails batch (Should be a valid UUIDv4) or the &#x60;messageId&#x60; of scheduled email. |
630+
631+
### Return type
632+
633+
void (empty response body)
634+
635+
### Authorization
636+
637+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
638+
639+
### HTTP request headers
640+
641+
- **Content-Type**: application/json
642+
- **Accept**: application/json
643+
644+
[[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)
645+
646+
# **getScheduledEmailByMessageId**
647+
> \SendinBlue\Client\Model\GetScheduledEmailByMessageId getScheduledEmailByMessageId($messageId, $startDate, $endDate)
648+
649+
Fetch scheduled email by messageId
650+
651+
Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
652+
653+
### Example
654+
```php
655+
<?php
656+
require_once(__DIR__ . '/vendor/autoload.php');
657+
658+
// Configure API key authorization: api-key
659+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
660+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
661+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
662+
// Configure API key authorization: partner-key
663+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
664+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
665+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
666+
667+
$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi(
668+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
669+
// This is optional, `GuzzleHttp\Client` will be used as default.
670+
new GuzzleHttp\Client(),
671+
$config
672+
);
673+
$messageId = "messageId_example"; // string | The messageId of scheduled email
674+
$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.
675+
$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.
676+
677+
try {
678+
$result = $apiInstance->getScheduledEmailByMessageId($messageId, $startDate, $endDate);
679+
print_r($result);
680+
} catch (Exception $e) {
681+
echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByMessageId: ', $e->getMessage(), PHP_EOL;
682+
}
683+
?>
684+
```
685+
686+
### Parameters
687+
688+
Name | Type | Description | Notes
689+
------------- | ------------- | ------------- | -------------
690+
**messageId** | **string**| The messageId of scheduled email |
691+
**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]
692+
**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]
693+
694+
### Return type
695+
696+
[**\SendinBlue\Client\Model\GetScheduledEmailByMessageId**](../Model/GetScheduledEmailByMessageId.md)
697+
698+
### Authorization
699+
700+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
701+
702+
### HTTP request headers
703+
704+
- **Content-Type**: application/json
705+
- **Accept**: application/json
706+
707+
[[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)
708+
514709
# **getSmtpReport**
515710
> \SendinBlue\Client\Model\GetReports getSmtpReport($limit, $offset, $startDate, $endDate, $days, $tag, $sort)
516711

docs/Model/AbTestCampaignResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**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]
6+
**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]
77
**winningCriteria** | **string** | Criteria choosen for winning version (Open/Click) | [optional]
88
**winningSubjectLine** | **string** | Subject Line of current winning version | [optional]
99
**openRate** | **string** | Open rate for current winning version | [optional]

docs/Model/Body.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**name** | **string** | Name of task |
7-
**duration** | **int** | Duration of task | [optional]
7+
**duration** | **int** | Duration of task in milliseconds [1 minute &#x3D; 60000 ms] | [optional]
88
**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. |
9-
**date** | [**\DateTime**] | Task date/time |
9+
**date** | [**\DateTime**] | Task due date and time |
1010
**notes** | **string** | Notes added to a task | [optional]
1111
**done** | **bool** | Task marked as done | [optional]
1212
**assignToId** | **string** | User id to whom task is assigned | [optional]

docs/Model/Body1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**name** | **string** | Name of task |
7-
**duration** | **int** | Duration of task | [optional]
7+
**duration** | **int** | Duration of task in milliseconds [1 minute &#x3D; 60000 ms] | [optional]
88
**taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. |
99
**date** | [**\DateTime**] | Task date/time |
1010
**notes** | **string** | Notes added to a task | [optional]

0 commit comments

Comments
 (0)