updated plugin WP Mail SMTP
version 2.0.0
This commit is contained in:
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class AccountApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -279,9 +284,16 @@ class AccountApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -238,19 +238,19 @@ class AttributesApi
|
||||
protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling createAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling createAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'createAttribute' is set
|
||||
if ($createAttribute === null) {
|
||||
if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createAttribute when calling createAttribute'
|
||||
);
|
||||
@ -302,9 +302,16 @@ class AttributesApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -517,13 +524,13 @@ class AttributesApi
|
||||
protected function deleteAttributeRequest($attributeCategory, $attributeName)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling deleteAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling deleteAttribute'
|
||||
);
|
||||
@ -572,9 +579,16 @@ class AttributesApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -825,9 +839,16 @@ class AttributesApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1045,19 +1066,19 @@ class AttributesApi
|
||||
protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling updateAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling updateAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateAttribute' is set
|
||||
if ($updateAttribute === null) {
|
||||
if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateAttribute when calling updateAttribute'
|
||||
);
|
||||
@ -1109,9 +1130,16 @@ class AttributesApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class ContactsApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -278,13 +283,13 @@ class ContactsApi
|
||||
protected function addContactToListRequest($listId, $contactEmails)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling addContactToList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'contactEmails' is set
|
||||
if ($contactEmails === null) {
|
||||
if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $contactEmails when calling addContactToList'
|
||||
);
|
||||
@ -328,9 +333,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -540,19 +552,19 @@ class ContactsApi
|
||||
protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling createAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling createAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'createAttribute' is set
|
||||
if ($createAttribute === null) {
|
||||
if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createAttribute when calling createAttribute'
|
||||
);
|
||||
@ -604,9 +616,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -851,7 +870,7 @@ class ContactsApi
|
||||
protected function createContactRequest($createContact)
|
||||
{
|
||||
// verify the required parameter 'createContact' is set
|
||||
if ($createContact === null) {
|
||||
if ($createContact === null || (is_array($createContact) && count($createContact) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createContact when calling createContact'
|
||||
);
|
||||
@ -887,9 +906,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1126,7 +1152,7 @@ class ContactsApi
|
||||
protected function createFolderRequest($createFolder)
|
||||
{
|
||||
// verify the required parameter 'createFolder' is set
|
||||
if ($createFolder === null) {
|
||||
if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createFolder when calling createFolder'
|
||||
);
|
||||
@ -1162,9 +1188,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1401,7 +1434,7 @@ class ContactsApi
|
||||
protected function createListRequest($createList)
|
||||
{
|
||||
// verify the required parameter 'createList' is set
|
||||
if ($createList === null) {
|
||||
if ($createList === null || (is_array($createList) && count($createList) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createList when calling createList'
|
||||
);
|
||||
@ -1437,9 +1470,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1652,13 +1692,13 @@ class ContactsApi
|
||||
protected function deleteAttributeRequest($attributeCategory, $attributeName)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling deleteAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling deleteAttribute'
|
||||
);
|
||||
@ -1707,9 +1747,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1925,7 +1972,7 @@ class ContactsApi
|
||||
protected function deleteContactRequest($email)
|
||||
{
|
||||
// verify the required parameter 'email' is set
|
||||
if ($email === null) {
|
||||
if ($email === null || (is_array($email) && count($email) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $email when calling deleteContact'
|
||||
);
|
||||
@ -1966,9 +2013,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2176,7 +2230,7 @@ class ContactsApi
|
||||
protected function deleteFolderRequest($folderId)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling deleteFolder'
|
||||
);
|
||||
@ -2217,9 +2271,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2427,7 +2488,7 @@ class ContactsApi
|
||||
protected function deleteListRequest($listId)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling deleteList'
|
||||
);
|
||||
@ -2468,9 +2529,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2721,9 +2789,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2968,7 +3043,7 @@ class ContactsApi
|
||||
protected function getContactInfoRequest($email)
|
||||
{
|
||||
// verify the required parameter 'email' is set
|
||||
if ($email === null) {
|
||||
if ($email === null || (is_array($email) && count($email) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $email when calling getContactInfo'
|
||||
);
|
||||
@ -3009,9 +3084,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3256,7 +3338,7 @@ class ContactsApi
|
||||
protected function getContactStatsRequest($email)
|
||||
{
|
||||
// verify the required parameter 'email' is set
|
||||
if ($email === null) {
|
||||
if ($email === null || (is_array($email) && count($email) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $email when calling getContactStats'
|
||||
);
|
||||
@ -3297,9 +3379,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3589,9 +3678,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3851,7 +3947,7 @@ class ContactsApi
|
||||
protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0')
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling getContactsFromList'
|
||||
);
|
||||
@ -3908,9 +4004,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -4155,7 +4258,7 @@ class ContactsApi
|
||||
protected function getFolderRequest($folderId)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling getFolder'
|
||||
);
|
||||
@ -4196,9 +4299,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -4453,7 +4563,7 @@ class ContactsApi
|
||||
protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0')
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling getFolderLists'
|
||||
);
|
||||
@ -4506,9 +4616,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -4750,7 +4867,7 @@ class ContactsApi
|
||||
protected function getFoldersRequest($limit, $offset)
|
||||
{
|
||||
// verify the required parameter 'limit' is set
|
||||
if ($limit === null) {
|
||||
if ($limit === null || (is_array($limit) && count($limit) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $limit when calling getFolders'
|
||||
);
|
||||
@ -4760,7 +4877,7 @@ class ContactsApi
|
||||
}
|
||||
|
||||
// verify the required parameter 'offset' is set
|
||||
if ($offset === null) {
|
||||
if ($offset === null || (is_array($offset) && count($offset) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $offset when calling getFolders'
|
||||
);
|
||||
@ -4801,9 +4918,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -5048,7 +5172,7 @@ class ContactsApi
|
||||
protected function getListRequest($listId)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling getList'
|
||||
);
|
||||
@ -5089,9 +5213,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -5372,9 +5503,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -5611,7 +5749,7 @@ class ContactsApi
|
||||
protected function importContactsRequest($requestContactImport)
|
||||
{
|
||||
// verify the required parameter 'requestContactImport' is set
|
||||
if ($requestContactImport === null) {
|
||||
if ($requestContactImport === null || (is_array($requestContactImport) && count($requestContactImport) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $requestContactImport when calling importContacts'
|
||||
);
|
||||
@ -5647,9 +5785,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -5899,13 +6044,13 @@ class ContactsApi
|
||||
protected function removeContactFromListRequest($listId, $contactEmails)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling removeContactFromList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'contactEmails' is set
|
||||
if ($contactEmails === null) {
|
||||
if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $contactEmails when calling removeContactFromList'
|
||||
);
|
||||
@ -5949,9 +6094,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -6188,7 +6340,7 @@ class ContactsApi
|
||||
protected function requestContactExportRequest($requestContactExport)
|
||||
{
|
||||
// verify the required parameter 'requestContactExport' is set
|
||||
if ($requestContactExport === null) {
|
||||
if ($requestContactExport === null || (is_array($requestContactExport) && count($requestContactExport) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $requestContactExport when calling requestContactExport'
|
||||
);
|
||||
@ -6224,9 +6376,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -6444,19 +6603,19 @@ class ContactsApi
|
||||
protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute)
|
||||
{
|
||||
// verify the required parameter 'attributeCategory' is set
|
||||
if ($attributeCategory === null) {
|
||||
if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeCategory when calling updateAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'attributeName' is set
|
||||
if ($attributeName === null) {
|
||||
if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $attributeName when calling updateAttribute'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateAttribute' is set
|
||||
if ($updateAttribute === null) {
|
||||
if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateAttribute when calling updateAttribute'
|
||||
);
|
||||
@ -6508,9 +6667,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -6723,13 +6889,13 @@ class ContactsApi
|
||||
protected function updateContactRequest($email, $updateContact)
|
||||
{
|
||||
// verify the required parameter 'email' is set
|
||||
if ($email === null) {
|
||||
if ($email === null || (is_array($email) && count($email) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $email when calling updateContact'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateContact' is set
|
||||
if ($updateContact === null) {
|
||||
if ($updateContact === null || (is_array($updateContact) && count($updateContact) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateContact when calling updateContact'
|
||||
);
|
||||
@ -6773,9 +6939,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -6988,13 +7161,13 @@ class ContactsApi
|
||||
protected function updateFolderRequest($folderId, $updateFolder)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling updateFolder'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateFolder' is set
|
||||
if ($updateFolder === null) {
|
||||
if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateFolder when calling updateFolder'
|
||||
);
|
||||
@ -7038,9 +7211,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -7253,13 +7433,13 @@ class ContactsApi
|
||||
protected function updateListRequest($listId, $updateList)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling updateList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateList' is set
|
||||
if ($updateList === null) {
|
||||
if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateList when calling updateList'
|
||||
);
|
||||
@ -7303,9 +7483,16 @@ class ContactsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class EmailCampaignsApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -265,7 +270,7 @@ class EmailCampaignsApi
|
||||
protected function createEmailCampaignRequest($emailCampaigns)
|
||||
{
|
||||
// verify the required parameter 'emailCampaigns' is set
|
||||
if ($emailCampaigns === null) {
|
||||
if ($emailCampaigns === null || (is_array($emailCampaigns) && count($emailCampaigns) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $emailCampaigns when calling createEmailCampaign'
|
||||
);
|
||||
@ -301,9 +306,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -511,7 +523,7 @@ class EmailCampaignsApi
|
||||
protected function deleteEmailCampaignRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling deleteEmailCampaign'
|
||||
);
|
||||
@ -552,9 +564,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -804,7 +823,7 @@ class EmailCampaignsApi
|
||||
protected function emailExportRecipientsRequest($campaignId, $recipientExport = null)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling emailExportRecipients'
|
||||
);
|
||||
@ -848,9 +867,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -904,6 +930,309 @@ class EmailCampaignsApi
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getAbTestCampaignResult
|
||||
*
|
||||
* Get A/B test email campaign result
|
||||
*
|
||||
* @param int $campaignId Id of the A/B test campaign (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \SendinBlue\Client\Model\AbTestCampaignResult
|
||||
*/
|
||||
public function getAbTestCampaignResult($campaignId)
|
||||
{
|
||||
list($response) = $this->getAbTestCampaignResultWithHttpInfo($campaignId);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getAbTestCampaignResultWithHttpInfo
|
||||
*
|
||||
* Get A/B test email campaign result
|
||||
*
|
||||
* @param int $campaignId Id of the A/B test campaign (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \SendinBlue\Client\Model\AbTestCampaignResult, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function getAbTestCampaignResultWithHttpInfo($campaignId)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\AbTestCampaignResult';
|
||||
$request = $this->getAbTestCampaignResultRequest($campaignId);
|
||||
|
||||
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\AbTestCampaignResult',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 400:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 404:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 405:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getAbTestCampaignResultAsync
|
||||
*
|
||||
* Get A/B test email campaign result
|
||||
*
|
||||
* @param int $campaignId Id of the A/B test campaign (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getAbTestCampaignResultAsync($campaignId)
|
||||
{
|
||||
return $this->getAbTestCampaignResultAsyncWithHttpInfo($campaignId)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getAbTestCampaignResultAsyncWithHttpInfo
|
||||
*
|
||||
* Get A/B test email campaign result
|
||||
*
|
||||
* @param int $campaignId Id of the A/B test campaign (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getAbTestCampaignResultAsyncWithHttpInfo($campaignId)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\AbTestCampaignResult';
|
||||
$request = $this->getAbTestCampaignResultRequest($campaignId);
|
||||
|
||||
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 'getAbTestCampaignResult'
|
||||
*
|
||||
* @param int $campaignId Id of the A/B test campaign (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function getAbTestCampaignResultRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling getAbTestCampaignResult'
|
||||
);
|
||||
}
|
||||
|
||||
$resourcePath = '/emailCampaigns/{campaignId}/abTestCampaignResult';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
// path params
|
||||
if ($campaignId !== null) {
|
||||
$resourcePath = str_replace(
|
||||
'{' . 'campaignId' . '}',
|
||||
ObjectSerializer::toPathValue($campaignId),
|
||||
$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\build_query($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\build_query($queryParams);
|
||||
return new Request(
|
||||
'GET',
|
||||
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getEmailCampaign
|
||||
*
|
||||
@ -1095,7 +1424,7 @@ class EmailCampaignsApi
|
||||
protected function getEmailCampaignRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling getEmailCampaign'
|
||||
);
|
||||
@ -1136,9 +1465,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1455,9 +1791,311 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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\build_query($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\build_query($queryParams);
|
||||
return new Request(
|
||||
'GET',
|
||||
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getSharedTemplateUrl
|
||||
*
|
||||
* Get a shared template url
|
||||
*
|
||||
* @param int $campaignId Id of the campaign or template (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \SendinBlue\Client\Model\GetSharedTemplateUrl
|
||||
*/
|
||||
public function getSharedTemplateUrl($campaignId)
|
||||
{
|
||||
list($response) = $this->getSharedTemplateUrlWithHttpInfo($campaignId);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getSharedTemplateUrlWithHttpInfo
|
||||
*
|
||||
* Get a shared template url
|
||||
*
|
||||
* @param int $campaignId Id of the campaign or template (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \SendinBlue\Client\Model\GetSharedTemplateUrl, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function getSharedTemplateUrlWithHttpInfo($campaignId)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetSharedTemplateUrl';
|
||||
$request = $this->getSharedTemplateUrlRequest($campaignId);
|
||||
|
||||
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\GetSharedTemplateUrl',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 400:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 404:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getSharedTemplateUrlAsync
|
||||
*
|
||||
* Get a shared template url
|
||||
*
|
||||
* @param int $campaignId Id of the campaign or template (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getSharedTemplateUrlAsync($campaignId)
|
||||
{
|
||||
return $this->getSharedTemplateUrlAsyncWithHttpInfo($campaignId)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getSharedTemplateUrlAsyncWithHttpInfo
|
||||
*
|
||||
* Get a shared template url
|
||||
*
|
||||
* @param int $campaignId Id of the campaign or template (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getSharedTemplateUrlAsyncWithHttpInfo($campaignId)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetSharedTemplateUrl';
|
||||
$request = $this->getSharedTemplateUrlRequest($campaignId);
|
||||
|
||||
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 'getSharedTemplateUrl'
|
||||
*
|
||||
* @param int $campaignId Id of the campaign or template (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function getSharedTemplateUrlRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling getSharedTemplateUrl'
|
||||
);
|
||||
}
|
||||
|
||||
$resourcePath = '/emailCampaigns/{campaignId}/sharedUrl';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
// path params
|
||||
if ($campaignId !== null) {
|
||||
$resourcePath = str_replace(
|
||||
'{' . 'campaignId' . '}',
|
||||
ObjectSerializer::toPathValue($campaignId),
|
||||
$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) {
|
||||
@ -1514,7 +2152,7 @@ class EmailCampaignsApi
|
||||
/**
|
||||
* Operation sendEmailCampaignNow
|
||||
*
|
||||
* Send an email campaign id of the campaign immediately
|
||||
* Send an email campaign immediately, based on campaignId
|
||||
*
|
||||
* @param int $campaignId Id of the campaign (required)
|
||||
*
|
||||
@ -1530,7 +2168,7 @@ class EmailCampaignsApi
|
||||
/**
|
||||
* Operation sendEmailCampaignNowWithHttpInfo
|
||||
*
|
||||
* Send an email campaign id of the campaign immediately
|
||||
* Send an email campaign immediately, based on campaignId
|
||||
*
|
||||
* @param int $campaignId Id of the campaign (required)
|
||||
*
|
||||
@ -1607,7 +2245,7 @@ class EmailCampaignsApi
|
||||
/**
|
||||
* Operation sendEmailCampaignNowAsync
|
||||
*
|
||||
* Send an email campaign id of the campaign immediately
|
||||
* Send an email campaign immediately, based on campaignId
|
||||
*
|
||||
* @param int $campaignId Id of the campaign (required)
|
||||
*
|
||||
@ -1627,7 +2265,7 @@ class EmailCampaignsApi
|
||||
/**
|
||||
* Operation sendEmailCampaignNowAsyncWithHttpInfo
|
||||
*
|
||||
* Send an email campaign id of the campaign immediately
|
||||
* Send an email campaign immediately, based on campaignId
|
||||
*
|
||||
* @param int $campaignId Id of the campaign (required)
|
||||
*
|
||||
@ -1673,7 +2311,7 @@ class EmailCampaignsApi
|
||||
protected function sendEmailCampaignNowRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendEmailCampaignNow'
|
||||
);
|
||||
@ -1714,9 +2352,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1929,13 +2574,13 @@ class EmailCampaignsApi
|
||||
protected function sendReportRequest($campaignId, $sendReport)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendReport'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'sendReport' is set
|
||||
if ($sendReport === null) {
|
||||
if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $sendReport when calling sendReport'
|
||||
);
|
||||
@ -1979,9 +2624,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2194,13 +2846,13 @@ class EmailCampaignsApi
|
||||
protected function sendTestEmailRequest($campaignId, $emailTo)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendTestEmail'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'emailTo' is set
|
||||
if ($emailTo === null) {
|
||||
if ($emailTo === null || (is_array($emailTo) && count($emailTo) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $emailTo when calling sendTestEmail'
|
||||
);
|
||||
@ -2244,9 +2896,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2459,13 +3118,13 @@ class EmailCampaignsApi
|
||||
protected function updateCampaignStatusRequest($campaignId, $status)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling updateCampaignStatus'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'status' is set
|
||||
if ($status === null) {
|
||||
if ($status === null || (is_array($status) && count($status) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $status when calling updateCampaignStatus'
|
||||
);
|
||||
@ -2509,9 +3168,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2724,13 +3390,13 @@ class EmailCampaignsApi
|
||||
protected function updateEmailCampaignRequest($campaignId, $emailCampaign)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling updateEmailCampaign'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'emailCampaign' is set
|
||||
if ($emailCampaign === null) {
|
||||
if ($emailCampaign === null || (is_array($emailCampaign) && count($emailCampaign) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $emailCampaign when calling updateEmailCampaign'
|
||||
);
|
||||
@ -2774,9 +3440,16 @@ class EmailCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class FoldersApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -265,7 +270,7 @@ class FoldersApi
|
||||
protected function createFolderRequest($createFolder)
|
||||
{
|
||||
// verify the required parameter 'createFolder' is set
|
||||
if ($createFolder === null) {
|
||||
if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createFolder when calling createFolder'
|
||||
);
|
||||
@ -301,9 +306,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -511,7 +523,7 @@ class FoldersApi
|
||||
protected function deleteFolderRequest($folderId)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling deleteFolder'
|
||||
);
|
||||
@ -552,9 +564,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -799,7 +818,7 @@ class FoldersApi
|
||||
protected function getFolderRequest($folderId)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling getFolder'
|
||||
);
|
||||
@ -840,9 +859,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1097,7 +1123,7 @@ class FoldersApi
|
||||
protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0')
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling getFolderLists'
|
||||
);
|
||||
@ -1150,9 +1176,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1394,7 +1427,7 @@ class FoldersApi
|
||||
protected function getFoldersRequest($limit, $offset)
|
||||
{
|
||||
// verify the required parameter 'limit' is set
|
||||
if ($limit === null) {
|
||||
if ($limit === null || (is_array($limit) && count($limit) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $limit when calling getFolders'
|
||||
);
|
||||
@ -1404,7 +1437,7 @@ class FoldersApi
|
||||
}
|
||||
|
||||
// verify the required parameter 'offset' is set
|
||||
if ($offset === null) {
|
||||
if ($offset === null || (is_array($offset) && count($offset) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $offset when calling getFolders'
|
||||
);
|
||||
@ -1445,9 +1478,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1660,13 +1700,13 @@ class FoldersApi
|
||||
protected function updateFolderRequest($folderId, $updateFolder)
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling updateFolder'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateFolder' is set
|
||||
if ($updateFolder === null) {
|
||||
if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateFolder when calling updateFolder'
|
||||
);
|
||||
@ -1710,9 +1750,16 @@ class FoldersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class ListsApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -278,13 +283,13 @@ class ListsApi
|
||||
protected function addContactToListRequest($listId, $contactEmails)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling addContactToList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'contactEmails' is set
|
||||
if ($contactEmails === null) {
|
||||
if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $contactEmails when calling addContactToList'
|
||||
);
|
||||
@ -328,9 +333,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -567,7 +579,7 @@ class ListsApi
|
||||
protected function createListRequest($createList)
|
||||
{
|
||||
// verify the required parameter 'createList' is set
|
||||
if ($createList === null) {
|
||||
if ($createList === null || (is_array($createList) && count($createList) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createList when calling createList'
|
||||
);
|
||||
@ -603,9 +615,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -813,7 +832,7 @@ class ListsApi
|
||||
protected function deleteListRequest($listId)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling deleteList'
|
||||
);
|
||||
@ -854,9 +873,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1116,7 +1142,7 @@ class ListsApi
|
||||
protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0')
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling getContactsFromList'
|
||||
);
|
||||
@ -1173,9 +1199,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1430,7 +1463,7 @@ class ListsApi
|
||||
protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0')
|
||||
{
|
||||
// verify the required parameter 'folderId' is set
|
||||
if ($folderId === null) {
|
||||
if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $folderId when calling getFolderLists'
|
||||
);
|
||||
@ -1483,9 +1516,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1730,7 +1770,7 @@ class ListsApi
|
||||
protected function getListRequest($listId)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling getList'
|
||||
);
|
||||
@ -1771,9 +1811,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2054,9 +2101,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2306,13 +2360,13 @@ class ListsApi
|
||||
protected function removeContactFromListRequest($listId, $contactEmails)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling removeContactFromList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'contactEmails' is set
|
||||
if ($contactEmails === null) {
|
||||
if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $contactEmails when calling removeContactFromList'
|
||||
);
|
||||
@ -2356,9 +2410,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2571,13 +2632,13 @@ class ListsApi
|
||||
protected function updateListRequest($listId, $updateList)
|
||||
{
|
||||
// verify the required parameter 'listId' is set
|
||||
if ($listId === null) {
|
||||
if ($listId === null || (is_array($listId) && count($listId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $listId when calling updateList'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateList' is set
|
||||
if ($updateList === null) {
|
||||
if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateList when calling updateList'
|
||||
);
|
||||
@ -2621,9 +2682,16 @@ class ListsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class ProcessApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -273,7 +278,7 @@ class ProcessApi
|
||||
protected function getProcessRequest($processId)
|
||||
{
|
||||
// verify the required parameter 'processId' is set
|
||||
if ($processId === null) {
|
||||
if ($processId === null || (is_array($processId) && count($processId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $processId when calling getProcess'
|
||||
);
|
||||
@ -314,9 +319,16 @@ class ProcessApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -597,9 +609,16 @@ class ProcessApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class ResellerApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -286,13 +291,13 @@ class ResellerApi
|
||||
protected function addCreditsRequest($childAuthKey, $addCredits)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling addCredits'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'addCredits' is set
|
||||
if ($addCredits === null) {
|
||||
if ($addCredits === null || (is_array($addCredits) && count($addCredits) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $addCredits when calling addCredits'
|
||||
);
|
||||
@ -336,9 +341,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -551,13 +563,13 @@ class ResellerApi
|
||||
protected function associateIpToChildRequest($childAuthKey, $ip)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling associateIpToChild'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'ip' is set
|
||||
if ($ip === null) {
|
||||
if ($ip === null || (is_array($ip) && count($ip) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $ip when calling associateIpToChild'
|
||||
);
|
||||
@ -601,9 +613,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -663,7 +682,7 @@ class ResellerApi
|
||||
* Creates a domain for a child account
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
@ -680,7 +699,7 @@ class ResellerApi
|
||||
* Creates a domain for a child account
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
@ -758,7 +777,7 @@ class ResellerApi
|
||||
* Creates a domain for a child account
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
@ -779,7 +798,7 @@ class ResellerApi
|
||||
* Creates a domain for a child account
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
@ -816,7 +835,7 @@ class ResellerApi
|
||||
* Create request for operation 'createChildDomain'
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account (required)
|
||||
* @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
@ -824,13 +843,13 @@ class ResellerApi
|
||||
protected function createChildDomainRequest($childAuthKey, $addChildDomain)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling createChildDomain'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'addChildDomain' is set
|
||||
if ($addChildDomain === null) {
|
||||
if ($addChildDomain === null || (is_array($addChildDomain) && count($addChildDomain) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $addChildDomain when calling createChildDomain'
|
||||
);
|
||||
@ -874,9 +893,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1151,9 +1177,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1374,13 +1407,13 @@ class ResellerApi
|
||||
protected function deleteChildDomainRequest($childAuthKey, $domainName)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling deleteChildDomain'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'domainName' is set
|
||||
if ($domainName === null) {
|
||||
if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $domainName when calling deleteChildDomain'
|
||||
);
|
||||
@ -1429,9 +1462,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1647,7 +1687,7 @@ class ResellerApi
|
||||
protected function deleteResellerChildRequest($childAuthKey)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling deleteResellerChild'
|
||||
);
|
||||
@ -1688,9 +1728,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1903,13 +1950,13 @@ class ResellerApi
|
||||
protected function dissociateIpFromChildRequest($childAuthKey, $ip)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling dissociateIpFromChild'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'ip' is set
|
||||
if ($ip === null) {
|
||||
if ($ip === null || (is_array($ip) && count($ip) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $ip when calling dissociateIpFromChild'
|
||||
);
|
||||
@ -1953,9 +2000,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2009,6 +2063,309 @@ class ResellerApi
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getChildAccountCreationStatus
|
||||
*
|
||||
* Returns the status of reseller's child account creation, whether it is successfully created (exists) or not based on the childAuthKey supplied
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \SendinBlue\Client\Model\GetChildAccountCreationStatus
|
||||
*/
|
||||
public function getChildAccountCreationStatus($childAuthKey)
|
||||
{
|
||||
list($response) = $this->getChildAccountCreationStatusWithHttpInfo($childAuthKey);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getChildAccountCreationStatusWithHttpInfo
|
||||
*
|
||||
* Returns the status of reseller's child account creation, whether it is successfully created (exists) or not based on the childAuthKey supplied
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \SendinBlue\Client\Model\GetChildAccountCreationStatus, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function getChildAccountCreationStatusWithHttpInfo($childAuthKey)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetChildAccountCreationStatus';
|
||||
$request = $this->getChildAccountCreationStatusRequest($childAuthKey);
|
||||
|
||||
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\GetChildAccountCreationStatus',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 400:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 403:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
case 404:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\SendinBlue\Client\Model\ErrorModel',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getChildAccountCreationStatusAsync
|
||||
*
|
||||
* Returns the status of reseller's child account creation, whether it is successfully created (exists) or not based on the childAuthKey supplied
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getChildAccountCreationStatusAsync($childAuthKey)
|
||||
{
|
||||
return $this->getChildAccountCreationStatusAsyncWithHttpInfo($childAuthKey)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getChildAccountCreationStatusAsyncWithHttpInfo
|
||||
*
|
||||
* Returns the status of reseller's child account creation, whether it is successfully created (exists) or not based on the childAuthKey supplied
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getChildAccountCreationStatusAsyncWithHttpInfo($childAuthKey)
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetChildAccountCreationStatus';
|
||||
$request = $this->getChildAccountCreationStatusRequest($childAuthKey);
|
||||
|
||||
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 'getChildAccountCreationStatus'
|
||||
*
|
||||
* @param string $childAuthKey auth key of reseller's child (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function getChildAccountCreationStatusRequest($childAuthKey)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling getChildAccountCreationStatus'
|
||||
);
|
||||
}
|
||||
|
||||
$resourcePath = '/reseller/children/{childAuthKey}/accountCreationStatus';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
// path params
|
||||
if ($childAuthKey !== null) {
|
||||
$resourcePath = str_replace(
|
||||
'{' . 'childAuthKey' . '}',
|
||||
ObjectSerializer::toPathValue($childAuthKey),
|
||||
$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\build_query($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\build_query($queryParams);
|
||||
return new Request(
|
||||
'GET',
|
||||
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation getChildDomains
|
||||
*
|
||||
@ -2208,7 +2565,7 @@ class ResellerApi
|
||||
protected function getChildDomainsRequest($childAuthKey)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling getChildDomains'
|
||||
);
|
||||
@ -2249,9 +2606,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2504,7 +2868,7 @@ class ResellerApi
|
||||
protected function getChildInfoRequest($childAuthKey)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling getChildInfo'
|
||||
);
|
||||
@ -2545,9 +2909,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2606,14 +2977,16 @@ class ResellerApi
|
||||
*
|
||||
* Gets the list of all reseller's children accounts
|
||||
*
|
||||
* @param int $limit Number of documents for child accounts information per page (optional, default to 10)
|
||||
* @param int $offset Index of the first document in the page (optional, default to 0)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \SendinBlue\Client\Model\GetChildrenList
|
||||
*/
|
||||
public function getResellerChilds()
|
||||
public function getResellerChilds($limit = '10', $offset = '0')
|
||||
{
|
||||
list($response) = $this->getResellerChildsWithHttpInfo();
|
||||
list($response) = $this->getResellerChildsWithHttpInfo($limit, $offset);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@ -2622,15 +2995,17 @@ class ResellerApi
|
||||
*
|
||||
* Gets the list of all reseller's children accounts
|
||||
*
|
||||
* @param int $limit Number of documents for child accounts information per page (optional, default to 10)
|
||||
* @param int $offset Index of the first document in the page (optional, default to 0)
|
||||
*
|
||||
* @throws \SendinBlue\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \SendinBlue\Client\Model\GetChildrenList, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function getResellerChildsWithHttpInfo()
|
||||
public function getResellerChildsWithHttpInfo($limit = '10', $offset = '0')
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetChildrenList';
|
||||
$request = $this->getResellerChildsRequest();
|
||||
$request = $this->getResellerChildsRequest($limit, $offset);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
@ -2704,13 +3079,15 @@ class ResellerApi
|
||||
*
|
||||
* Gets the list of all reseller's children accounts
|
||||
*
|
||||
* @param int $limit Number of documents for child accounts information per page (optional, default to 10)
|
||||
* @param int $offset Index of the first document in the page (optional, default to 0)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getResellerChildsAsync()
|
||||
public function getResellerChildsAsync($limit = '10', $offset = '0')
|
||||
{
|
||||
return $this->getResellerChildsAsyncWithHttpInfo()
|
||||
return $this->getResellerChildsAsyncWithHttpInfo($limit, $offset)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
@ -2723,14 +3100,16 @@ class ResellerApi
|
||||
*
|
||||
* Gets the list of all reseller's children accounts
|
||||
*
|
||||
* @param int $limit Number of documents for child accounts information per page (optional, default to 10)
|
||||
* @param int $offset Index of the first document in the page (optional, default to 0)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function getResellerChildsAsyncWithHttpInfo()
|
||||
public function getResellerChildsAsyncWithHttpInfo($limit = '10', $offset = '0')
|
||||
{
|
||||
$returnType = '\SendinBlue\Client\Model\GetChildrenList';
|
||||
$request = $this->getResellerChildsRequest();
|
||||
$request = $this->getResellerChildsRequest($limit, $offset);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
@ -2772,12 +3151,18 @@ class ResellerApi
|
||||
/**
|
||||
* Create request for operation 'getResellerChilds'
|
||||
*
|
||||
* @param int $limit Number of documents for child accounts information per page (optional, default to 10)
|
||||
* @param int $offset Index of the first document in the page (optional, default to 0)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function getResellerChildsRequest()
|
||||
protected function getResellerChildsRequest($limit = '10', $offset = '0')
|
||||
{
|
||||
if ($limit !== null && $limit > 20) {
|
||||
throw new \InvalidArgumentException('invalid value for "$limit" when calling ResellerApi.getResellerChilds, must be smaller than or equal to 20.');
|
||||
}
|
||||
|
||||
|
||||
$resourcePath = '/reseller/children';
|
||||
$formParams = [];
|
||||
@ -2786,6 +3171,14 @@ class ResellerApi
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
// query params
|
||||
if ($limit !== null) {
|
||||
$queryParams['limit'] = ObjectSerializer::toQueryValue($limit);
|
||||
}
|
||||
// query params
|
||||
if ($offset !== null) {
|
||||
$queryParams['offset'] = ObjectSerializer::toQueryValue($offset);
|
||||
}
|
||||
|
||||
|
||||
// body params
|
||||
@ -2806,9 +3199,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3061,7 +3461,7 @@ class ResellerApi
|
||||
protected function getSsoTokenRequest($childAuthKey)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling getSsoToken'
|
||||
);
|
||||
@ -3102,9 +3502,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3362,13 +3769,13 @@ class ResellerApi
|
||||
protected function removeCreditsRequest($childAuthKey, $removeCredits)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling removeCredits'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'removeCredits' is set
|
||||
if ($removeCredits === null) {
|
||||
if ($removeCredits === null || (is_array($removeCredits) && count($removeCredits) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $removeCredits when calling removeCredits'
|
||||
);
|
||||
@ -3412,9 +3819,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3635,13 +4049,13 @@ class ResellerApi
|
||||
protected function updateChildAccountStatusRequest($childAuthKey, $updateChildAccountStatus)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling updateChildAccountStatus'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateChildAccountStatus' is set
|
||||
if ($updateChildAccountStatus === null) {
|
||||
if ($updateChildAccountStatus === null || (is_array($updateChildAccountStatus) && count($updateChildAccountStatus) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateChildAccountStatus when calling updateChildAccountStatus'
|
||||
);
|
||||
@ -3685,9 +4099,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -3913,19 +4334,19 @@ class ResellerApi
|
||||
protected function updateChildDomainRequest($childAuthKey, $domainName, $updateChildDomain)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling updateChildDomain'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'domainName' is set
|
||||
if ($domainName === null) {
|
||||
if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $domainName when calling updateChildDomain'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateChildDomain' is set
|
||||
if ($updateChildDomain === null) {
|
||||
if ($updateChildDomain === null || (is_array($updateChildDomain) && count($updateChildDomain) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateChildDomain when calling updateChildDomain'
|
||||
);
|
||||
@ -3977,9 +4398,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -4200,13 +4628,13 @@ class ResellerApi
|
||||
protected function updateResellerChildRequest($childAuthKey, $resellerChild)
|
||||
{
|
||||
// verify the required parameter 'childAuthKey' is set
|
||||
if ($childAuthKey === null) {
|
||||
if ($childAuthKey === null || (is_array($childAuthKey) && count($childAuthKey) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $childAuthKey when calling updateResellerChild'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'resellerChild' is set
|
||||
if ($resellerChild === null) {
|
||||
if ($resellerChild === null || (is_array($resellerChild) && count($resellerChild) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $resellerChild when calling updateResellerChild'
|
||||
);
|
||||
@ -4250,9 +4678,16 @@ class ResellerApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class SMSCampaignsApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -265,7 +270,7 @@ class SMSCampaignsApi
|
||||
protected function createSmsCampaignRequest($createSmsCampaign)
|
||||
{
|
||||
// verify the required parameter 'createSmsCampaign' is set
|
||||
if ($createSmsCampaign === null) {
|
||||
if ($createSmsCampaign === null || (is_array($createSmsCampaign) && count($createSmsCampaign) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createSmsCampaign when calling createSmsCampaign'
|
||||
);
|
||||
@ -301,9 +306,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -511,7 +523,7 @@ class SMSCampaignsApi
|
||||
protected function deleteSmsCampaignRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling deleteSmsCampaign'
|
||||
);
|
||||
@ -552,9 +564,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -799,7 +818,7 @@ class SMSCampaignsApi
|
||||
protected function getSmsCampaignRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling getSmsCampaign'
|
||||
);
|
||||
@ -840,9 +859,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1150,9 +1176,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1402,7 +1435,7 @@ class SMSCampaignsApi
|
||||
protected function requestSmsRecipientExportRequest($campaignId, $recipientExport = null)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling requestSmsRecipientExport'
|
||||
);
|
||||
@ -1446,9 +1479,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1664,7 +1704,7 @@ class SMSCampaignsApi
|
||||
protected function sendSmsCampaignNowRequest($campaignId)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendSmsCampaignNow'
|
||||
);
|
||||
@ -1705,9 +1745,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1920,13 +1967,13 @@ class SMSCampaignsApi
|
||||
protected function sendSmsReportRequest($campaignId, $sendReport)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendSmsReport'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'sendReport' is set
|
||||
if ($sendReport === null) {
|
||||
if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $sendReport when calling sendSmsReport'
|
||||
);
|
||||
@ -1970,9 +2017,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2185,13 +2239,13 @@ class SMSCampaignsApi
|
||||
protected function sendTestSmsRequest($campaignId, $phoneNumber)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling sendTestSms'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'phoneNumber' is set
|
||||
if ($phoneNumber === null) {
|
||||
if ($phoneNumber === null || (is_array($phoneNumber) && count($phoneNumber) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $phoneNumber when calling sendTestSms'
|
||||
);
|
||||
@ -2235,9 +2289,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2450,13 +2511,13 @@ class SMSCampaignsApi
|
||||
protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling updateSmsCampaign'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateSmsCampaign' is set
|
||||
if ($updateSmsCampaign === null) {
|
||||
if ($updateSmsCampaign === null || (is_array($updateSmsCampaign) && count($updateSmsCampaign) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateSmsCampaign when calling updateSmsCampaign'
|
||||
);
|
||||
@ -2500,9 +2561,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -2715,13 +2783,13 @@ class SMSCampaignsApi
|
||||
protected function updateSmsCampaignStatusRequest($campaignId, $status)
|
||||
{
|
||||
// verify the required parameter 'campaignId' is set
|
||||
if ($campaignId === null) {
|
||||
if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $campaignId when calling updateSmsCampaignStatus'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'status' is set
|
||||
if ($status === null) {
|
||||
if ($status === null || (is_array($status) && count($status) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $status when calling updateSmsCampaignStatus'
|
||||
);
|
||||
@ -2765,9 +2833,16 @@ class SMSCampaignsApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class SendersApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -295,9 +300,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -505,7 +517,7 @@ class SendersApi
|
||||
protected function deleteSenderRequest($senderId)
|
||||
{
|
||||
// verify the required parameter 'senderId' is set
|
||||
if ($senderId === null) {
|
||||
if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $senderId when calling deleteSender'
|
||||
);
|
||||
@ -546,9 +558,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -799,9 +818,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1046,7 +1072,7 @@ class SendersApi
|
||||
protected function getIpsFromSenderRequest($senderId)
|
||||
{
|
||||
// verify the required parameter 'senderId' is set
|
||||
if ($senderId === null) {
|
||||
if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $senderId when calling getIpsFromSender'
|
||||
);
|
||||
@ -1087,9 +1113,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1366,9 +1399,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1581,7 +1621,7 @@ class SendersApi
|
||||
protected function updateSenderRequest($senderId, $sender = null)
|
||||
{
|
||||
// verify the required parameter 'senderId' is set
|
||||
if ($senderId === null) {
|
||||
if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $senderId when calling updateSender'
|
||||
);
|
||||
@ -1625,9 +1665,16 @@ class SendersApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class TransactionalSMSApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -363,9 +368,16 @@ class TransactionalSMSApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -660,9 +672,16 @@ class TransactionalSMSApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -957,9 +976,16 @@ class TransactionalSMSApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1204,7 +1230,7 @@ class TransactionalSMSApi
|
||||
protected function sendTransacSmsRequest($sendTransacSms)
|
||||
{
|
||||
// verify the required parameter 'sendTransacSms' is set
|
||||
if ($sendTransacSms === null) {
|
||||
if ($sendTransacSms === null || (is_array($sendTransacSms) && count($sendTransacSms) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $sendTransacSms when calling sendTransacSms'
|
||||
);
|
||||
@ -1240,9 +1266,16 @@ class TransactionalSMSApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
@ -12,12 +12,12 @@
|
||||
/**
|
||||
* SendinBlue API
|
||||
*
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
||||
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
||||
*
|
||||
* OpenAPI spec version: 3.0.0
|
||||
* Contact: contact@sendinblue.com
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 2.3.1
|
||||
* Swagger Codegen version: 2.4.12
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -59,6 +59,11 @@ class WebhooksApi
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var HeaderSelector
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
@ -265,7 +270,7 @@ class WebhooksApi
|
||||
protected function createWebhookRequest($createWebhook)
|
||||
{
|
||||
// verify the required parameter 'createWebhook' is set
|
||||
if ($createWebhook === null) {
|
||||
if ($createWebhook === null || (is_array($createWebhook) && count($createWebhook) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $createWebhook when calling createWebhook'
|
||||
);
|
||||
@ -301,9 +306,16 @@ class WebhooksApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -511,7 +523,7 @@ class WebhooksApi
|
||||
protected function deleteWebhookRequest($webhookId)
|
||||
{
|
||||
// verify the required parameter 'webhookId' is set
|
||||
if ($webhookId === null) {
|
||||
if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $webhookId when calling deleteWebhook'
|
||||
);
|
||||
@ -552,9 +564,16 @@ class WebhooksApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -799,7 +818,7 @@ class WebhooksApi
|
||||
protected function getWebhookRequest($webhookId)
|
||||
{
|
||||
// verify the required parameter 'webhookId' is set
|
||||
if ($webhookId === null) {
|
||||
if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $webhookId when calling getWebhook'
|
||||
);
|
||||
@ -840,9 +859,16 @@ class WebhooksApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1110,9 +1136,16 @@ class WebhooksApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
@ -1325,13 +1358,13 @@ class WebhooksApi
|
||||
protected function updateWebhookRequest($webhookId, $updateWebhook)
|
||||
{
|
||||
// verify the required parameter 'webhookId' is set
|
||||
if ($webhookId === null) {
|
||||
if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $webhookId when calling updateWebhook'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'updateWebhook' is set
|
||||
if ($updateWebhook === null) {
|
||||
if ($updateWebhook === null || (is_array($updateWebhook) && count($updateWebhook) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $updateWebhook when calling updateWebhook'
|
||||
);
|
||||
@ -1375,9 +1408,16 @@ class WebhooksApi
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user