Skip to content

Commit 986eac4

Browse files
authored
Merge pull request #86 from sendinblue/feature_update-wrap_AP-408
New reseller route to update settings of reseller's child account
2 parents fa4d0f4 + 71d3d07 commit 986eac4

File tree

9 files changed

+835
-15
lines changed

9 files changed

+835
-15
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ Class | Method | HTTP request | Description
147147
*ResellerApi* | [**getChildDomains**](docs/Api/ResellerApi.md#getchilddomains) | **GET** /reseller/children/{childAuthKey}/domains | Gets all the sender domains of a specific child account
148148
*ResellerApi* | [**getChildInfo**](docs/Api/ResellerApi.md#getchildinfo) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account
149149
*ResellerApi* | [**getResellerChilds**](docs/Api/ResellerApi.md#getresellerchilds) | **GET** /reseller/children | Gets the list of all reseller's children accounts
150-
*ResellerApi* | [**getSsoToken**](docs/Api/ResellerApi.md#getssotoken) | **GET** /reseller/children/{childAuthKey}/auth | Generates a session token which will remain valid for a short period of time only.
150+
*ResellerApi* | [**getSsoToken**](docs/Api/ResellerApi.md#getssotoken) | **GET** /reseller/children/{childAuthKey}/auth | Get session token to access Sendinblue (SSO)
151151
*ResellerApi* | [**removeCredits**](docs/Api/ResellerApi.md#removecredits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account
152+
*ResellerApi* | [**updateChildAccountStatus**](docs/Api/ResellerApi.md#updatechildaccountstatus) | **PUT** /reseller/children/{childAuthKey}/accountStatus | Updates infos of reseller's child account status based on the childAuthKey supplied
152153
*ResellerApi* | [**updateChildDomain**](docs/Api/ResellerApi.md#updatechilddomain) | **PUT** /reseller/children/{childAuthKey}/domains/{domainName} | Updates the sender domain of reseller's child based on the childAuthKey and domainName passed
153154
*ResellerApi* | [**updateResellerChild**](docs/Api/ResellerApi.md#updateresellerchild) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied
154155
*SMSCampaignsApi* | [**createSmsCampaign**](docs/Api/SMSCampaignsApi.md#createsmscampaign) | **POST** /smsCampaigns | Creates an SMS campaign
@@ -327,6 +328,7 @@ Class | Method | HTTP request | Description
327328
- [UpdateAttributeEnumeration](docs/Model/UpdateAttributeEnumeration.md)
328329
- [UpdateCampaignStatus](docs/Model/UpdateCampaignStatus.md)
329330
- [UpdateChild](docs/Model/UpdateChild.md)
331+
- [UpdateChildAccountStatus](docs/Model/UpdateChildAccountStatus.md)
330332
- [UpdateChildDomain](docs/Model/UpdateChildDomain.md)
331333
- [UpdateContact](docs/Model/UpdateContact.md)
332334
- [UpdateEmailCampaign](docs/Model/UpdateEmailCampaign.md)

docs/Api/ContactsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ $apiInstance = new SendinBlue\Client\Api\ContactsApi(
626626
new GuzzleHttp\Client(),
627627
$config
628628
);
629-
$email = "email_example"; // string | Email (urlencoded) of the contact
629+
$email = "email_example"; // string | Email (urlencoded) of the contact OR its SMS attribute value
630630

631631
try {
632632
$result = $apiInstance->getContactInfo($email);
@@ -641,7 +641,7 @@ try {
641641

642642
Name | Type | Description | Notes
643643
------------- | ------------- | ------------- | -------------
644-
**email** | **string**| Email (urlencoded) of the contact |
644+
**email** | **string**| Email (urlencoded) of the contact OR its SMS attribute value |
645645

646646
### Return type
647647

docs/Api/ResellerApi.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ Method | HTTP request | Description
1414
[**getChildDomains**](ResellerApi.md#getChildDomains) | **GET** /reseller/children/{childAuthKey}/domains | Gets all the sender domains of a specific child account
1515
[**getChildInfo**](ResellerApi.md#getChildInfo) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account
1616
[**getResellerChilds**](ResellerApi.md#getResellerChilds) | **GET** /reseller/children | Gets the list of all reseller's children accounts
17-
[**getSsoToken**](ResellerApi.md#getSsoToken) | **GET** /reseller/children/{childAuthKey}/auth | Generates a session token which will remain valid for a short period of time only.
17+
[**getSsoToken**](ResellerApi.md#getSsoToken) | **GET** /reseller/children/{childAuthKey}/auth | Get session token to access Sendinblue (SSO)
1818
[**removeCredits**](ResellerApi.md#removeCredits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account
19+
[**updateChildAccountStatus**](ResellerApi.md#updateChildAccountStatus) | **PUT** /reseller/children/{childAuthKey}/accountStatus | Updates infos of reseller's child account status based on the childAuthKey supplied
1920
[**updateChildDomain**](ResellerApi.md#updateChildDomain) | **PUT** /reseller/children/{childAuthKey}/domains/{domainName} | Updates the sender domain of reseller's child based on the childAuthKey and domainName passed
2021
[**updateResellerChild**](ResellerApi.md#updateResellerChild) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied
2122

@@ -594,7 +595,9 @@ This endpoint does not need any parameter.
594595
# **getSsoToken**
595596
> \SendinBlue\Client\Model\GetSsoToken getSsoToken($childAuthKey)
596597
597-
Generates a session token which will remain valid for a short period of time only.
598+
Get session token to access Sendinblue (SSO)
599+
600+
It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token]
598601

599602
### Example
600603
```php
@@ -707,6 +710,64 @@ Name | Type | Description | Notes
707710

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

713+
# **updateChildAccountStatus**
714+
> updateChildAccountStatus($childAuthKey, $updateChildAccountStatus)
715+
716+
Updates infos of reseller's child account status based on the childAuthKey supplied
717+
718+
### Example
719+
```php
720+
<?php
721+
require_once(__DIR__ . '/vendor/autoload.php');
722+
723+
// Configure API key authorization: api-key
724+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
725+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
726+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
727+
// Configure API key authorization: partner-key
728+
$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
729+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
730+
// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
731+
732+
$apiInstance = new SendinBlue\Client\Api\ResellerApi(
733+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
734+
// This is optional, `GuzzleHttp\Client` will be used as default.
735+
new GuzzleHttp\Client(),
736+
$config
737+
);
738+
$childAuthKey = "childAuthKey_example"; // string | auth key of reseller's child
739+
$updateChildAccountStatus = new \SendinBlue\Client\Model\UpdateChildAccountStatus(); // \SendinBlue\Client\Model\UpdateChildAccountStatus | values to update in child account status
740+
741+
try {
742+
$apiInstance->updateChildAccountStatus($childAuthKey, $updateChildAccountStatus);
743+
} catch (Exception $e) {
744+
echo 'Exception when calling ResellerApi->updateChildAccountStatus: ', $e->getMessage(), PHP_EOL;
745+
}
746+
?>
747+
```
748+
749+
### Parameters
750+
751+
Name | Type | Description | Notes
752+
------------- | ------------- | ------------- | -------------
753+
**childAuthKey** | **string**| auth key of reseller&#39;s child |
754+
**updateChildAccountStatus** | [**\SendinBlue\Client\Model\UpdateChildAccountStatus**](../Model/UpdateChildAccountStatus.md)| values to update in child account status |
755+
756+
### Return type
757+
758+
void (empty response body)
759+
760+
### Authorization
761+
762+
[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
763+
764+
### HTTP request headers
765+
766+
- **Content-Type**: application/json
767+
- **Accept**: application/json
768+
769+
[[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)
770+
710771
# **updateChildDomain**
711772
> updateChildDomain($childAuthKey, $domainName, $updateChildDomain)
712773
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UpdateChildAccountStatus
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**transactionalEmail** | **bool** | Status of Transactional Email (SMTP) Platform activation for your account (true&#x3D;enabled, false&#x3D;disabled) | [optional]
7+
**transactionalSms** | **bool** | Status of Transactional SMS Platform activation for your account (true&#x3D;enabled, false&#x3D;disabled) | [optional]
8+
**marketingAutomation** | **bool** | Status of Marketing Automation Platform activation for your account (true&#x3D;enabled, false&#x3D;disabled) | [optional]
9+
10+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
11+
12+

lib/Api/ContactsApi.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ protected function getAttributesRequest()
27822782
*
27832783
* Retrieves contact informations
27842784
*
2785-
* @param string $email Email (urlencoded) of the contact (required)
2785+
* @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required)
27862786
*
27872787
* @throws \SendinBlue\Client\ApiException on non-2xx response
27882788
* @throws \InvalidArgumentException
@@ -2799,7 +2799,7 @@ public function getContactInfo($email)
27992799
*
28002800
* Retrieves contact informations
28012801
*
2802-
* @param string $email Email (urlencoded) of the contact (required)
2802+
* @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required)
28032803
*
28042804
* @throws \SendinBlue\Client\ApiException on non-2xx response
28052805
* @throws \InvalidArgumentException
@@ -2890,7 +2890,7 @@ public function getContactInfoWithHttpInfo($email)
28902890
*
28912891
* Retrieves contact informations
28922892
*
2893-
* @param string $email Email (urlencoded) of the contact (required)
2893+
* @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required)
28942894
*
28952895
* @throws \InvalidArgumentException
28962896
* @return \GuzzleHttp\Promise\PromiseInterface
@@ -2910,7 +2910,7 @@ function ($response) {
29102910
*
29112911
* Retrieves contact informations
29122912
*
2913-
* @param string $email Email (urlencoded) of the contact (required)
2913+
* @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required)
29142914
*
29152915
* @throws \InvalidArgumentException
29162916
* @return \GuzzleHttp\Promise\PromiseInterface
@@ -2960,7 +2960,7 @@ function ($exception) {
29602960
/**
29612961
* Create request for operation 'getContactInfo'
29622962
*
2963-
* @param string $email Email (urlencoded) of the contact (required)
2963+
* @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required)
29642964
*
29652965
* @throws \InvalidArgumentException
29662966
* @return \GuzzleHttp\Psr7\Request

0 commit comments

Comments
 (0)