diff --git a/README.md b/README.md index 9df258b..c2af6fd 100644 --- a/README.md +++ b/README.md @@ -158,13 +158,13 @@ Class | Method | HTTP request | Description *DealsApi* | [**crmDealsLinkUnlinkIdPatch**](docs/Api/DealsApi.md#crmdealslinkunlinkidpatch) | **PATCH** /crm/deals/link-unlink/{id} | Link and Unlink a deal with contacts and companies *DealsApi* | [**crmDealsPost**](docs/Api/DealsApi.md#crmdealspost) | **POST** /crm/deals | Create a deal *DealsApi* | [**crmPipelineDetailsGet**](docs/Api/DealsApi.md#crmpipelinedetailsget) | **GET** /crm/pipeline/details | Get pipeline stages -*EcommerceApi* | [**createBatchOrder**](docs/Api/EcommerceApi.md#createbatchorder) | **POST** /orders/status/batch | Maintains a batch of orders -*EcommerceApi* | [**createOrder**](docs/Api/EcommerceApi.md#createorder) | **POST** /orders/status | Maintains every transactional status of the order -*EcommerceApi* | [**createUpdateBatchCategory**](docs/Api/EcommerceApi.md#createupdatebatchcategory) | **POST** /categories/batch | Create the categories in a batch -*EcommerceApi* | [**createUpdateBatchProducts**](docs/Api/EcommerceApi.md#createupdatebatchproducts) | **POST** /products/batch | Creates the products in a batch +*EcommerceApi* | [**createBatchOrder**](docs/Api/EcommerceApi.md#createbatchorder) | **POST** /orders/status/batch | Create orders in batch +*EcommerceApi* | [**createOrder**](docs/Api/EcommerceApi.md#createorder) | **POST** /orders/status | Managing the status of the order +*EcommerceApi* | [**createUpdateBatchCategory**](docs/Api/EcommerceApi.md#createupdatebatchcategory) | **POST** /categories/batch | Create categories in batch +*EcommerceApi* | [**createUpdateBatchProducts**](docs/Api/EcommerceApi.md#createupdatebatchproducts) | **POST** /products/batch | Create products in batch *EcommerceApi* | [**createUpdateCategory**](docs/Api/EcommerceApi.md#createupdatecategory) | **POST** /categories | Create/Update a category *EcommerceApi* | [**createUpdateProduct**](docs/Api/EcommerceApi.md#createupdateproduct) | **POST** /products | Create/Update a product -*EcommerceApi* | [**ecommerceActivatePost**](docs/Api/EcommerceApi.md#ecommerceactivatepost) | **POST** /ecommerce/activate | **Fulfills the eCommerce pre-requisites** +*EcommerceApi* | [**ecommerceActivatePost**](docs/Api/EcommerceApi.md#ecommerceactivatepost) | **POST** /ecommerce/activate | Activate the eCommerce app *EcommerceApi* | [**getCategories**](docs/Api/EcommerceApi.md#getcategories) | **GET** /categories | Return all your categories *EcommerceApi* | [**getCategoryInfo**](docs/Api/EcommerceApi.md#getcategoryinfo) | **GET** /categories/{id} | Get a category details *EcommerceApi* | [**getProductInfo**](docs/Api/EcommerceApi.md#getproductinfo) | **GET** /products/{id} | Get a product's details @@ -210,6 +210,7 @@ Class | Method | HTTP request | Description *MasterAccountApi* | [**corporateSubAccountIdDelete**](docs/Api/MasterAccountApi.md#corporatesubaccountiddelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account *MasterAccountApi* | [**corporateSubAccountIdGet**](docs/Api/MasterAccountApi.md#corporatesubaccountidget) | **GET** /corporate/subAccount/{id} | Get sub-account details *MasterAccountApi* | [**corporateSubAccountIdPlanPut**](docs/Api/MasterAccountApi.md#corporatesubaccountidplanput) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan +*MasterAccountApi* | [**corporateSubAccountKeyPost**](docs/Api/MasterAccountApi.md#corporatesubaccountkeypost) | **POST** /corporate/subAccount/key | Create an API key for a sub-account *MasterAccountApi* | [**corporateSubAccountPost**](docs/Api/MasterAccountApi.md#corporatesubaccountpost) | **POST** /corporate/subAccount | Create a new sub-account under a master account. *MasterAccountApi* | [**corporateSubAccountSsoTokenPost**](docs/Api/MasterAccountApi.md#corporatesubaccountssotokenpost) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue *NotesApi* | [**crmNotesGet**](docs/Api/NotesApi.md#crmnotesget) | **GET** /crm/notes | Get all notes @@ -284,11 +285,15 @@ Class | Method | HTTP request | Description *TransactionalSMSApi* | [**getTransacAggregatedSmsReport**](docs/Api/TransactionalSMSApi.md#gettransacaggregatedsmsreport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time *TransactionalSMSApi* | [**getTransacSmsReport**](docs/Api/TransactionalSMSApi.md#gettransacsmsreport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day *TransactionalSMSApi* | [**sendTransacSms**](docs/Api/TransactionalSMSApi.md#sendtransacsms) | **POST** /transactionalSMS/sms | Send SMS message to a mobile number +*TransactionalWhatsAppApi* | [**getWhatsappEventReport**](docs/Api/TransactionalWhatsAppApi.md#getwhatsappeventreport) | **GET** /whatsapp/statistics/events | Get all your WhatsApp activity (unaggregated events) +*TransactionalWhatsAppApi* | [**sendWhatsappMessage**](docs/Api/TransactionalWhatsAppApi.md#sendwhatsappmessage) | **POST** /whatsapp/sendMessage | Send a WhatsApp message *WebhooksApi* | [**createWebhook**](docs/Api/WebhooksApi.md#createwebhook) | **POST** /webhooks | Create a webhook *WebhooksApi* | [**deleteWebhook**](docs/Api/WebhooksApi.md#deletewebhook) | **DELETE** /webhooks/{webhookId} | Delete a webhook *WebhooksApi* | [**getWebhook**](docs/Api/WebhooksApi.md#getwebhook) | **GET** /webhooks/{webhookId} | Get a webhook details *WebhooksApi* | [**getWebhooks**](docs/Api/WebhooksApi.md#getwebhooks) | **GET** /webhooks | Get all webhooks *WebhooksApi* | [**updateWebhook**](docs/Api/WebhooksApi.md#updatewebhook) | **PUT** /webhooks/{webhookId} | Update a webhook +*WhatsappCampaignsApi* | [**deleteWhatsappCampaign**](docs/Api/WhatsappCampaignsApi.md#deletewhatsappcampaign) | **DELETE** /whatsappCampaigns/{campaignId} | Delete a whatsapp campaign +*WhatsappCampaignsApi* | [**getWhatsappCampaign**](docs/Api/WhatsappCampaignsApi.md#getwhatsappcampaign) | **GET** /whatsappCampaigns/{campaignId} | Get a whatsapp campaign ## Documentation For Models @@ -316,13 +321,17 @@ Class | Method | HTTP request | Description - [Body7](docs/Model/Body7.md) - [Body8](docs/Model/Body8.md) - [Body9](docs/Model/Body9.md) + - [BodyVariablesItems](docs/Model/BodyVariablesItems.md) - [CompaniesList](docs/Model/CompaniesList.md) - [Company](docs/Model/Company.md) - [CompanyAttributes](docs/Model/CompanyAttributes.md) - [CompanyAttributesInner](docs/Model/CompanyAttributesInner.md) + - [ComponentItems](docs/Model/ComponentItems.md) - [ConversationsMessage](docs/Model/ConversationsMessage.md) - [ConversationsMessageFile](docs/Model/ConversationsMessageFile.md) - [ConversationsMessageFileImageInfo](docs/Model/ConversationsMessageFileImageInfo.md) + - [CreateApiKeyRequest](docs/Model/CreateApiKeyRequest.md) + - [CreateApiKeyResponse](docs/Model/CreateApiKeyResponse.md) - [CreateAttribute](docs/Model/CreateAttribute.md) - [CreateAttributeEnumeration](docs/Model/CreateAttributeEnumeration.md) - [CreateCategoryModel](docs/Model/CreateCategoryModel.md) @@ -478,9 +487,13 @@ Class | Method | HTTP request | Description - [GetTransacSmsReportReports](docs/Model/GetTransacSmsReportReports.md) - [GetWebhook](docs/Model/GetWebhook.md) - [GetWebhooks](docs/Model/GetWebhooks.md) + - [GetWhatsappCampaignOverview](docs/Model/GetWhatsappCampaignOverview.md) + - [GetWhatsappEventReport](docs/Model/GetWhatsappEventReport.md) + - [GetWhatsappEventReportEvents](docs/Model/GetWhatsappEventReportEvents.md) - [InlineResponse200](docs/Model/InlineResponse200.md) - [InlineResponse201](docs/Model/InlineResponse201.md) - [InlineResponse2011](docs/Model/InlineResponse2011.md) + - [InlineResponse2012](docs/Model/InlineResponse2012.md) - [ManageIp](docs/Model/ManageIp.md) - [MasterDetailsResponse](docs/Model/MasterDetailsResponse.md) - [MasterDetailsResponseBillingInfo](docs/Model/MasterDetailsResponseBillingInfo.md) @@ -529,6 +542,7 @@ Class | Method | HTTP request | Description - [SendTestEmail](docs/Model/SendTestEmail.md) - [SendTestSms](docs/Model/SendTestSms.md) - [SendTransacSms](docs/Model/SendTransacSms.md) + - [SendWhatsappMessage](docs/Model/SendWhatsappMessage.md) - [SsoTokenRequest](docs/Model/SsoTokenRequest.md) - [SubAccountDetailsResponse](docs/Model/SubAccountDetailsResponse.md) - [SubAccountDetailsResponsePlanInfo](docs/Model/SubAccountDetailsResponsePlanInfo.md) @@ -576,6 +590,9 @@ Class | Method | HTTP request | Description - [GetSmsCampaign](docs/Model/GetSmsCampaign.md) - [GetAccount](docs/Model/GetAccount.md) - [GetEmailCampaign](docs/Model/GetEmailCampaign.md) + - [VariablesItems](docs/Model/VariablesItems.md) + - [WhatsappCampStats](docs/Model/WhatsappCampStats.md) + - [WhatsappCampTemplate](docs/Model/WhatsappCampTemplate.md) ## Documentation For Authorization diff --git a/docs/Api/ContactsApi.md b/docs/Api/ContactsApi.md index ee6de45..1c04111 100644 --- a/docs/Api/ContactsApi.md +++ b/docs/Api/ContactsApi.md @@ -687,8 +687,8 @@ $apiInstance = new SendinBlue\Client\Api\ContactsApi( $config ); $identifier = "identifier_example"; // string | Email (urlencoded) OR ID of the contact OR its SMS attribute value -$startDate = new \stdClass; // object | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate -$endDate = new \stdClass; // object | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. +$startDate = "startDate_example"; // string | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate +$endDate = "endDate_example"; // string | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. try { $result = $apiInstance->getContactInfo($identifier, $startDate, $endDate); @@ -704,8 +704,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | **string**| Email (urlencoded) OR ID of the contact OR its SMS attribute value | - **startDate** | [**object**](../Model/.md)| **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] - **endDate** | [**object**](../Model/.md)| **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] + **startDate** | **string**| **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] + **endDate** | **string**| **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] ### Return type diff --git a/docs/Api/EcommerceApi.md b/docs/Api/EcommerceApi.md index f03560a..69b689e 100644 --- a/docs/Api/EcommerceApi.md +++ b/docs/Api/EcommerceApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createBatchOrder**](EcommerceApi.md#createBatchOrder) | **POST** /orders/status/batch | Maintains a batch of orders -[**createOrder**](EcommerceApi.md#createOrder) | **POST** /orders/status | Maintains every transactional status of the order -[**createUpdateBatchCategory**](EcommerceApi.md#createUpdateBatchCategory) | **POST** /categories/batch | Create the categories in a batch -[**createUpdateBatchProducts**](EcommerceApi.md#createUpdateBatchProducts) | **POST** /products/batch | Creates the products in a batch +[**createBatchOrder**](EcommerceApi.md#createBatchOrder) | **POST** /orders/status/batch | Create orders in batch +[**createOrder**](EcommerceApi.md#createOrder) | **POST** /orders/status | Managing the status of the order +[**createUpdateBatchCategory**](EcommerceApi.md#createUpdateBatchCategory) | **POST** /categories/batch | Create categories in batch +[**createUpdateBatchProducts**](EcommerceApi.md#createUpdateBatchProducts) | **POST** /products/batch | Create products in batch [**createUpdateCategory**](EcommerceApi.md#createUpdateCategory) | **POST** /categories | Create/Update a category [**createUpdateProduct**](EcommerceApi.md#createUpdateProduct) | **POST** /products | Create/Update a product -[**ecommerceActivatePost**](EcommerceApi.md#ecommerceActivatePost) | **POST** /ecommerce/activate | **Fulfills the eCommerce pre-requisites** +[**ecommerceActivatePost**](EcommerceApi.md#ecommerceActivatePost) | **POST** /ecommerce/activate | Activate the eCommerce app [**getCategories**](EcommerceApi.md#getCategories) | **GET** /categories | Return all your categories [**getCategoryInfo**](EcommerceApi.md#getCategoryInfo) | **GET** /categories/{id} | Get a category details [**getProductInfo**](EcommerceApi.md#getProductInfo) | **GET** /products/{id} | Get a product's details @@ -20,7 +20,9 @@ Method | HTTP request | Description # **createBatchOrder** > createBatchOrder($orderBatch) -Maintains a batch of orders +Create orders in batch + +Create multiple orders at one time instead of one order at a time ### Example ```php @@ -76,7 +78,9 @@ void (empty response body) # **createOrder** > createOrder($order) -Maintains every transactional status of the order +Managing the status of the order + +Manages the transactional status of the order ### Example ```php @@ -132,7 +136,7 @@ void (empty response body) # **createUpdateBatchCategory** > \SendinBlue\Client\Model\CreateUpdateBatchCategoryModel createUpdateBatchCategory($createUpdateBatchCategory) -Create the categories in a batch +Create categories in batch ### Example ```php @@ -189,7 +193,7 @@ Name | Type | Description | Notes # **createUpdateBatchProducts** > \SendinBlue\Client\Model\CreateUpdateBatchProductsModel createUpdateBatchProducts($createUpdateBatchProducts) -Creates the products in a batch +Create products in batch ### Example ```php @@ -360,7 +364,9 @@ Name | Type | Description | Notes # **ecommerceActivatePost** > ecommerceActivatePost() -**Fulfills the eCommerce pre-requisites** +Activate the eCommerce app + +Getting access to Sendinblue eCommerce. ### Example ```php @@ -410,7 +416,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getCategories** -> \SendinBlue\Client\Model\GetCategories getCategories($limit, $offset, $sort, $ids) +> \SendinBlue\Client\Model\GetCategories getCategories($limit, $offset, $sort, $ids, $name) Return all your categories @@ -438,9 +444,10 @@ $limit = 50; // int | Number of documents per page $offset = 0; // int | Index of the first document in the page $sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed $ids = array("ids_example"); // string[] | Filter by category ids +$name = "name_example"; // string | Filter by category name try { - $result = $apiInstance->getCategories($limit, $offset, $sort, $ids); + $result = $apiInstance->getCategories($limit, $offset, $sort, $ids, $name); print_r($result); } catch (Exception $e) { echo 'Exception when calling EcommerceApi->getCategories: ', $e->getMessage(), PHP_EOL; @@ -456,6 +463,7 @@ Name | Type | Description | Notes **offset** | **int**| Index of the first document in the page | [optional] [default to 0] **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] **ids** | [**string[]**](../Model/string.md)| Filter by category ids | [optional] + **name** | **string**| Filter by category name | [optional] ### Return type @@ -587,7 +595,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getProducts** -> \SendinBlue\Client\Model\GetProducts getProducts($limit, $offset, $sort, $ids) +> \SendinBlue\Client\Model\GetProducts getProducts($limit, $offset, $sort, $ids, $name, $price, $categories) Return all your products @@ -615,9 +623,12 @@ $limit = 50; // int | Number of documents per page $offset = 0; // int | Index of the first document in the page $sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed $ids = array("ids_example"); // string[] | Filter by product ids +$name = "name_example"; // string | Filter by product name, minimum 3 characters should be present for search +$price = array("price_example"); // string[] | Filter by product price, like price[lte] +$categories = array("categories_example"); // string[] | Filter by category ids try { - $result = $apiInstance->getProducts($limit, $offset, $sort, $ids); + $result = $apiInstance->getProducts($limit, $offset, $sort, $ids, $name, $price, $categories); print_r($result); } catch (Exception $e) { echo 'Exception when calling EcommerceApi->getProducts: ', $e->getMessage(), PHP_EOL; @@ -633,6 +644,9 @@ Name | Type | Description | Notes **offset** | **int**| Index of the first document in the page | [optional] [default to 0] **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] **ids** | [**string[]**](../Model/string.md)| Filter by product ids | [optional] + **name** | **string**| Filter by product name, minimum 3 characters should be present for search | [optional] + **price** | [**string[]**](../Model/string.md)| Filter by product price, like price[lte] | [optional] + **categories** | [**string[]**](../Model/string.md)| Filter by category ids | [optional] ### Return type diff --git a/docs/Api/EmailCampaignsApi.md b/docs/Api/EmailCampaignsApi.md index 0189ed2..af274bb 100644 --- a/docs/Api/EmailCampaignsApi.md +++ b/docs/Api/EmailCampaignsApi.md @@ -251,7 +251,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getEmailCampaign** -> \SendinBlue\Client\Model\GetEmailCampaign getEmailCampaign($campaignId) +> \SendinBlue\Client\Model\GetEmailCampaign getEmailCampaign($campaignId, $statistics) Get an email campaign report @@ -276,9 +276,10 @@ $apiInstance = new SendinBlue\Client\Api\EmailCampaignsApi( $config ); $campaignId = 789; // int | Id of the campaign +$statistics = "statistics_example"; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. try { - $result = $apiInstance->getEmailCampaign($campaignId); + $result = $apiInstance->getEmailCampaign($campaignId, $statistics); print_r($result); } catch (Exception $e) { echo 'Exception when calling EmailCampaignsApi->getEmailCampaign: ', $e->getMessage(), PHP_EOL; @@ -291,6 +292,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **int**| Id of the campaign | + **statistics** | **string**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. | [optional] ### Return type @@ -308,7 +310,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getEmailCampaigns** -> \SendinBlue\Client\Model\GetEmailCampaigns getEmailCampaigns($type, $status, $startDate, $endDate, $limit, $offset, $sort) +> \SendinBlue\Client\Model\GetEmailCampaigns getEmailCampaigns($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort) Return all your created email campaigns @@ -334,6 +336,7 @@ $apiInstance = new SendinBlue\Client\Api\EmailCampaignsApi( ); $type = "type_example"; // string | Filter on the type of the campaigns $status = "status_example"; // string | Filter on the status of the campaign +$statistics = "statistics_example"; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. $startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) $endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) $limit = 50; // int | Number of documents per page @@ -341,7 +344,7 @@ $offset = 0; // int | Index of the first document in the page $sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed try { - $result = $apiInstance->getEmailCampaigns($type, $status, $startDate, $endDate, $limit, $offset, $sort); + $result = $apiInstance->getEmailCampaigns($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort); print_r($result); } catch (Exception $e) { echo 'Exception when calling EmailCampaignsApi->getEmailCampaigns: ', $e->getMessage(), PHP_EOL; @@ -355,6 +358,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type** | **string**| Filter on the type of the campaigns | [optional] **status** | **string**| Filter on the status of the campaign | [optional] + **statistics** | **string**| Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. | [optional] **startDate** | **string**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] **endDate** | **string**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] **limit** | **int**| Number of documents per page | [optional] [default to 50] diff --git a/docs/Api/MasterAccountApi.md b/docs/Api/MasterAccountApi.md index be176ea..646ead9 100644 --- a/docs/Api/MasterAccountApi.md +++ b/docs/Api/MasterAccountApi.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**corporateSubAccountIdDelete**](MasterAccountApi.md#corporateSubAccountIdDelete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account [**corporateSubAccountIdGet**](MasterAccountApi.md#corporateSubAccountIdGet) | **GET** /corporate/subAccount/{id} | Get sub-account details [**corporateSubAccountIdPlanPut**](MasterAccountApi.md#corporateSubAccountIdPlanPut) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan +[**corporateSubAccountKeyPost**](MasterAccountApi.md#corporateSubAccountKeyPost) | **POST** /corporate/subAccount/key | Create an API key for a sub-account [**corporateSubAccountPost**](MasterAccountApi.md#corporateSubAccountPost) | **POST** /corporate/subAccount | Create a new sub-account under a master account. [**corporateSubAccountSsoTokenPost**](MasterAccountApi.md#corporateSubAccountSsoTokenPost) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue @@ -304,6 +305,65 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **corporateSubAccountKeyPost** +> \SendinBlue\Client\Model\CreateApiKeyResponse corporateSubAccountKeyPost($createApiKeyRequest) + +Create an API key for a sub-account + +This endpoint will generate an API v3 key for a sub account + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\MasterAccountApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$createApiKeyRequest = new \SendinBlue\Client\Model\CreateApiKeyRequest(); // \SendinBlue\Client\Model\CreateApiKeyRequest | Values to generate API key for sub-account + +try { + $result = $apiInstance->corporateSubAccountKeyPost($createApiKeyRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MasterAccountApi->corporateSubAccountKeyPost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createApiKeyRequest** | [**\SendinBlue\Client\Model\CreateApiKeyRequest**](../Model/CreateApiKeyRequest.md)| Values to generate API key for sub-account | + +### Return type + +[**\SendinBlue\Client\Model\CreateApiKeyResponse**](../Model/CreateApiKeyResponse.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **corporateSubAccountPost** > \SendinBlue\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate) diff --git a/docs/Api/TransactionalWhatsAppApi.md b/docs/Api/TransactionalWhatsAppApi.md new file mode 100644 index 0000000..06430f2 --- /dev/null +++ b/docs/Api/TransactionalWhatsAppApi.md @@ -0,0 +1,142 @@ +# SendinBlue\Client\TransactionalWhatsAppApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getWhatsappEventReport**](TransactionalWhatsAppApi.md#getWhatsappEventReport) | **GET** /whatsapp/statistics/events | Get all your WhatsApp activity (unaggregated events) +[**sendWhatsappMessage**](TransactionalWhatsAppApi.md#sendWhatsappMessage) | **POST** /whatsapp/sendMessage | Send a WhatsApp message + + +# **getWhatsappEventReport** +> \SendinBlue\Client\Model\GetWhatsappEventReport getWhatsappEventReport($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort) + +Get all your WhatsApp activity (unaggregated events) + +This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\TransactionalWhatsAppApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$limit = 2500; // int | Number limitation for the result returned +$offset = 0; // int | Beginning point in the list to retrieve from +$startDate = "startDate_example"; // string | **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +$endDate = "endDate_example"; // string | **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +$days = 789; // int | Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ +$contactNumber = "contactNumber_example"; // string | Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) +$event = "event_example"; // string | Filter the report for a specific event type +$sort = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + +try { + $result = $apiInstance->getWhatsappEventReport($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalWhatsAppApi->getWhatsappEventReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| Number limitation for the result returned | [optional] [default to 2500] + **offset** | **int**| Beginning point in the list to retrieve from | [optional] [default to 0] + **startDate** | **string**| **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int**| Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ | [optional] + **contactNumber** | **string**| Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) | [optional] + **event** | **string**| Filter the report for a specific event type | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + +### Return type + +[**\SendinBlue\Client\Model\GetWhatsappEventReport**](../Model/GetWhatsappEventReport.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **sendWhatsappMessage** +> \SendinBlue\Client\Model\InlineResponse2012 sendWhatsappMessage($sendWhatsappMessage) + +Send a WhatsApp message + +This endpoint is used to send a WhatsApp message.
(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Sendinblue platform to fetch the Template ID.**) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\TransactionalWhatsAppApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$sendWhatsappMessage = new \SendinBlue\Client\Model\SendWhatsappMessage(); // \SendinBlue\Client\Model\SendWhatsappMessage | Values to send WhatsApp message + +try { + $result = $apiInstance->sendWhatsappMessage($sendWhatsappMessage); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalWhatsAppApi->sendWhatsappMessage: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendWhatsappMessage** | [**\SendinBlue\Client\Model\SendWhatsappMessage**](../Model/SendWhatsappMessage.md)| Values to send WhatsApp message | + +### Return type + +[**\SendinBlue\Client\Model\InlineResponse2012**](../Model/InlineResponse2012.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Api/WhatsappCampaignsApi.md b/docs/Api/WhatsappCampaignsApi.md new file mode 100644 index 0000000..38f3ce5 --- /dev/null +++ b/docs/Api/WhatsappCampaignsApi.md @@ -0,0 +1,123 @@ +# SendinBlue\Client\WhatsappCampaignsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteWhatsappCampaign**](WhatsappCampaignsApi.md#deleteWhatsappCampaign) | **DELETE** /whatsappCampaigns/{campaignId} | Delete a whatsapp campaign +[**getWhatsappCampaign**](WhatsappCampaignsApi.md#getWhatsappCampaign) | **GET** /whatsappCampaigns/{campaignId} | Get a whatsapp campaign + + +# **deleteWhatsappCampaign** +> deleteWhatsappCampaign($campaignId) + +Delete a whatsapp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\WhatsappCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = 789; // int | id of the campaign + +try { + $apiInstance->deleteWhatsappCampaign($campaignId); +} catch (Exception $e) { + echo 'Exception when calling WhatsappCampaignsApi->deleteWhatsappCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **int**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getWhatsappCampaign** +> \SendinBlue\Client\Model\GetWhatsappCampaignOverview getWhatsappCampaign($campaignId) + +Get a whatsapp campaign + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\WhatsappCampaignsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$campaignId = "campaignId_example"; // string | Id of the campaign + +try { + $result = $apiInstance->getWhatsappCampaign($campaignId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WhatsappCampaignsApi->getWhatsappCampaign: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **string**| Id of the campaign | + +### Return type + +[**\SendinBlue\Client\Model\GetWhatsappCampaignOverview**](../Model/GetWhatsappCampaignOverview.md) + +### Authorization + +[api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/docs/Model/BodyVariablesItems.md b/docs/Model/BodyVariablesItems.md new file mode 100644 index 0000000..71240ad --- /dev/null +++ b/docs/Model/BodyVariablesItems.md @@ -0,0 +1,9 @@ +# BodyVariablesItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/ComponentItems.md b/docs/Model/ComponentItems.md new file mode 100644 index 0000000..9b44af1 --- /dev/null +++ b/docs/Model/ComponentItems.md @@ -0,0 +1,11 @@ +# ComponentItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**text** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CreateApiKeyRequest.md b/docs/Model/CreateApiKeyRequest.md new file mode 100644 index 0000000..252d23e --- /dev/null +++ b/docs/Model/CreateApiKeyRequest.md @@ -0,0 +1,11 @@ +# CreateApiKeyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id of the sub-account organization | +**name** | **string** | Name of the API key | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CreateApiKeyResponse.md b/docs/Model/CreateApiKeyResponse.md new file mode 100644 index 0000000..3f3e3ea --- /dev/null +++ b/docs/Model/CreateApiKeyResponse.md @@ -0,0 +1,11 @@ +# CreateApiKeyResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | Status of the API operation. | [optional] +**key** | **string** | API Key | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CreateAttribute.md b/docs/Model/CreateAttribute.md index 9a13d8c..837ee9e 100644 --- a/docs/Model/CreateAttribute.md +++ b/docs/Model/CreateAttribute.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] -**isRecurring** | **bool** | Type of the calculated attribute. Use only if the attribute's category is 'calculated' | [optional] -**enumeration** | [**\SendinBlue\Client\Model\CreateAttributeEnumeration[]**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] +**isRecurring** | **bool** | Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] +**enumeration** | [**\SendinBlue\Client\Model\CreateAttributeEnumeration[]**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] **type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateUpdateCategories.md b/docs/Model/CreateUpdateCategories.md index 05955c1..b08d1be 100644 --- a/docs/Model/CreateUpdateCategories.md +++ b/docs/Model/CreateUpdateCategories.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **id** | **string** | Unique Category ID as saved in the shop | **name** | **string** | **Mandatory in case of creation**. Name of the Category, as displayed in the shop | [optional] **url** | **string** | URL to the category | [optional] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateUpdateCategory.md b/docs/Model/CreateUpdateCategory.md index c4dd91d..244ba34 100644 --- a/docs/Model/CreateUpdateCategory.md +++ b/docs/Model/CreateUpdateCategory.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **name** | **string** | **Mandatory in case of creation**. Name of the Category, as displayed in the shop | [optional] **url** | **string** | URL to the category | [optional] **updateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to false] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateUpdateProducts.md b/docs/Model/CreateUpdateProducts.md index eb674b2..49b848b 100644 --- a/docs/Model/CreateUpdateProducts.md +++ b/docs/Model/CreateUpdateProducts.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **price** | **float** | Price of the product | [optional] **categories** | **string[]** | Category ID-s of the product | [optional] **parentId** | **string** | Parent product id of the product | [optional] +**metaInfo** | **map[string,string]** | Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. | [optional] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateUpdateproduct.md b/docs/Model/CreateUpdateproduct.md index dc5bd40..8890bf3 100644 --- a/docs/Model/CreateUpdateproduct.md +++ b/docs/Model/CreateUpdateproduct.md @@ -11,7 +11,9 @@ Name | Type | Description | Notes **price** | **float** | Price of the product | [optional] **categories** | **string[]** | Category ID-s of the product | [optional] **parentId** | **string** | Parent product id of the product | [optional] +**metaInfo** | **map[string,string]** | Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. | [optional] **updateEnabled** | **bool** | Facilitate to update the existing category in the same request (updateEnabled = true) | [optional] [default to false] +**deletedAt** | **string** | UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetCategoryDetails.md b/docs/Model/GetCategoryDetails.md index 8a7a9f0..c9f2607 100644 --- a/docs/Model/GetCategoryDetails.md +++ b/docs/Model/GetCategoryDetails.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **createdAt** | **string** | Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) | **modifiedAt** | **string** | Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) | **url** | **string** | URL to the category | [optional] +**isDeleted** | **bool** | category deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetProductDetails.md b/docs/Model/GetProductDetails.md index 47a7530..16e5654 100644 --- a/docs/Model/GetProductDetails.md +++ b/docs/Model/GetProductDetails.md @@ -15,7 +15,9 @@ Name | Type | Description | Notes **parentId** | **string** | Parent product id of the product | [optional] **s3Original** | **string** | S3 url of original image | [optional] **s3ThumbAnalytics** | **string** | S3 thumbnail url of original image in 120x120 dimension for analytics section | +**metaInfo** | **object** | Meta data of product such as description, vendor, producer, stock level, etc. | [optional] **s3ThumbEditor** | **string** | S3 thumbnail url of original image in 600x400 dimension for editor section | +**isDeleted** | **bool** | product deleted from the shop's database | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetWebhook.md b/docs/Model/GetWebhook.md index 4014fb3..74d16bc 100644 --- a/docs/Model/GetWebhook.md +++ b/docs/Model/GetWebhook.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **int** | ID of the webhook | **description** | **string** | Description of the webhook | **events** | **string[]** | | -**type** | **string** | Type of webhook (marketing or transac) | +**type** | **string** | Type of webhook (marketing or transactional) | **createdAt** | **string** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | **modifiedAt** | **string** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | diff --git a/docs/Model/GetWhatsappCampaignOverview.md b/docs/Model/GetWhatsappCampaignOverview.md new file mode 100644 index 0000000..b128a28 --- /dev/null +++ b/docs/Model/GetWhatsappCampaignOverview.md @@ -0,0 +1,18 @@ +# GetWhatsappCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the Whatsapp Campaign | +**campaignName** | **string** | Name of the Whatsapp Campaign | +**campaignStatus** | **string** | Status of the Whatsapp Campaign | +**scheduledAt** | **string** | UTC date-time on which Whatsapp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | [optional] +**senderNumber** | **string** | Sender of the Whatsapp Campaign | +**stats** | [**\SendinBlue\Client\Model\WhatsappCampStats**](WhatsappCampStats.md) | | [optional] +**template** | [**\SendinBlue\Client\Model\WhatsappCampTemplate**](WhatsappCampTemplate.md) | | +**createdAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/GetWhatsappEventReport.md b/docs/Model/GetWhatsappEventReport.md new file mode 100644 index 0000000..d5677a7 --- /dev/null +++ b/docs/Model/GetWhatsappEventReport.md @@ -0,0 +1,10 @@ +# GetWhatsappEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**\SendinBlue\Client\Model\GetWhatsappEventReportEvents[]**](GetWhatsappEventReportEvents.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/GetWhatsappEventReportEvents.md b/docs/Model/GetWhatsappEventReportEvents.md new file mode 100644 index 0000000..5474772 --- /dev/null +++ b/docs/Model/GetWhatsappEventReportEvents.md @@ -0,0 +1,17 @@ +# GetWhatsappEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contactNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | +**date** | **string** | UTC date-time on which the event has been generated | +**messageId** | **string** | Message ID which generated the event | +**event** | **string** | Event which occurred | +**reason** | **string** | Reason for the event (will be there in case of `error` and `soft-bounce` events) | [optional] +**body** | **string** | Text of the reply (will be there only in case of `reply` event with text) | [optional] +**mediaUrl** | **string** | Url of the media reply (will be there only in case of `reply` event with media) | [optional] +**senderNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse2012.md b/docs/Model/InlineResponse2012.md new file mode 100644 index 0000000..5ee8e3f --- /dev/null +++ b/docs/Model/InlineResponse2012.md @@ -0,0 +1,10 @@ +# InlineResponse2012 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **string** | messageId of sent message | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/SendWhatsappMessage.md b/docs/Model/SendWhatsappMessage.md new file mode 100644 index 0000000..fb94989 --- /dev/null +++ b/docs/Model/SendWhatsappMessage.md @@ -0,0 +1,13 @@ +# SendWhatsappMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateId** | **int** | ID of the template to send | [optional] +**text** | **string** | Text to be sent as message body (will be overridden if templateId is passed in the same request) | [optional] +**senderNumber** | **string** | WhatsApp Number with country code. Example, 85264318721 | +**contactNumbers** | **string[]** | List of phone numbers of the contacts | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/SsoTokenRequest.md b/docs/Model/SsoTokenRequest.md index c9e8247..dbc6791 100644 --- a/docs/Model/SsoTokenRequest.md +++ b/docs/Model/SsoTokenRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Id of the sub-account organization | **email** | **string** | User email of sub-account organization | [optional] +**target** | **string** | Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VariablesItems.md b/docs/Model/VariablesItems.md new file mode 100644 index 0000000..1eca6db --- /dev/null +++ b/docs/Model/VariablesItems.md @@ -0,0 +1,12 @@ +# VariablesItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | [optional] +**default** | **string** | | [optional] +**datatype** | **string** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/WhatsappCampStats.md b/docs/Model/WhatsappCampStats.md new file mode 100644 index 0000000..b764ed2 --- /dev/null +++ b/docs/Model/WhatsappCampStats.md @@ -0,0 +1,14 @@ +# WhatsappCampStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sent** | **int** | | +**delivered** | **int** | | +**read** | **int** | | +**unsubscribe** | **int** | | +**notSent** | **int** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/WhatsappCampTemplate.md b/docs/Model/WhatsappCampTemplate.md new file mode 100644 index 0000000..312db1d --- /dev/null +++ b/docs/Model/WhatsappCampTemplate.md @@ -0,0 +1,20 @@ +# WhatsappCampTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | name of the template | [optional] +**category** | **string** | description of the template | [optional] +**language** | **string** | language of the template | [optional] +**containsButton** | **bool** | | [optional] +**displayHeader** | **bool** | | [optional] +**headerType** | **string** | type of header | [optional] +**components** | [**\SendinBlue\Client\Model\ComponentItems[]**](ComponentItems.md) | array of component item objects | [optional] +**headerVariables** | [**\SendinBlue\Client\Model\VariablesItems[]**](VariablesItems.md) | array of variables item object | [optional] +**bodyVariables** | [**\SendinBlue\Client\Model\VariablesItems[]**](VariablesItems.md) | array of variables item variables | [optional] +**buttonType** | **string** | | [optional] +**hideFooter** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/lib/Api/ContactsApi.php b/lib/Api/ContactsApi.php index 463da59..f1c9db2 100644 --- a/lib/Api/ContactsApi.php +++ b/lib/Api/ContactsApi.php @@ -3103,8 +3103,8 @@ protected function getAttributesRequest() * Get a contact's details * * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3122,8 +3122,8 @@ public function getContactInfo($identifier, $startDate = null, $endDate = null) * Get a contact's details * * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3215,8 +3215,8 @@ public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endD * Get a contact's details * * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3237,8 +3237,8 @@ function ($response) { * Get a contact's details * * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3289,8 +3289,8 @@ function ($exception) { * Create request for operation 'getContactInfo' * * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/EcommerceApi.php b/lib/Api/EcommerceApi.php index 51f880e..42e4604 100644 --- a/lib/Api/EcommerceApi.php +++ b/lib/Api/EcommerceApi.php @@ -90,7 +90,7 @@ public function getConfig() /** * Operation createBatchOrder * - * Maintains a batch of orders + * Create orders in batch * * @param \SendinBlue\Client\Model\OrderBatch $orderBatch orderBatch (required) * @@ -106,7 +106,7 @@ public function createBatchOrder($orderBatch) /** * Operation createBatchOrderWithHttpInfo * - * Maintains a batch of orders + * Create orders in batch * * @param \SendinBlue\Client\Model\OrderBatch $orderBatch (required) * @@ -167,7 +167,7 @@ public function createBatchOrderWithHttpInfo($orderBatch) /** * Operation createBatchOrderAsync * - * Maintains a batch of orders + * Create orders in batch * * @param \SendinBlue\Client\Model\OrderBatch $orderBatch (required) * @@ -187,7 +187,7 @@ function ($response) { /** * Operation createBatchOrderAsyncWithHttpInfo * - * Maintains a batch of orders + * Create orders in batch * * @param \SendinBlue\Client\Model\OrderBatch $orderBatch (required) * @@ -335,7 +335,7 @@ protected function createBatchOrderRequest($orderBatch) /** * Operation createOrder * - * Maintains every transactional status of the order + * Managing the status of the order * * @param \SendinBlue\Client\Model\Order $order order (required) * @@ -351,7 +351,7 @@ public function createOrder($order) /** * Operation createOrderWithHttpInfo * - * Maintains every transactional status of the order + * Managing the status of the order * * @param \SendinBlue\Client\Model\Order $order (required) * @@ -412,7 +412,7 @@ public function createOrderWithHttpInfo($order) /** * Operation createOrderAsync * - * Maintains every transactional status of the order + * Managing the status of the order * * @param \SendinBlue\Client\Model\Order $order (required) * @@ -432,7 +432,7 @@ function ($response) { /** * Operation createOrderAsyncWithHttpInfo * - * Maintains every transactional status of the order + * Managing the status of the order * * @param \SendinBlue\Client\Model\Order $order (required) * @@ -580,7 +580,7 @@ protected function createOrderRequest($order) /** * Operation createUpdateBatchCategory * - * Create the categories in a batch + * Create categories in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) * @@ -597,7 +597,7 @@ public function createUpdateBatchCategory($createUpdateBatchCategory) /** * Operation createUpdateBatchCategoryWithHttpInfo * - * Create the categories in a batch + * Create categories in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) * @@ -680,7 +680,7 @@ public function createUpdateBatchCategoryWithHttpInfo($createUpdateBatchCategory /** * Operation createUpdateBatchCategoryAsync * - * Create the categories in a batch + * Create categories in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) * @@ -700,7 +700,7 @@ function ($response) { /** * Operation createUpdateBatchCategoryAsyncWithHttpInfo * - * Create the categories in a batch + * Create categories in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchCategory $createUpdateBatchCategory Values to create a batch of categories (required) * @@ -862,7 +862,7 @@ protected function createUpdateBatchCategoryRequest($createUpdateBatchCategory) /** * Operation createUpdateBatchProducts * - * Creates the products in a batch + * Create products in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) * @@ -879,7 +879,7 @@ public function createUpdateBatchProducts($createUpdateBatchProducts) /** * Operation createUpdateBatchProductsWithHttpInfo * - * Creates the products in a batch + * Create products in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) * @@ -946,6 +946,14 @@ public function createUpdateBatchProductsWithHttpInfo($createUpdateBatchProducts ); $e->setResponseObject($data); break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -954,7 +962,7 @@ public function createUpdateBatchProductsWithHttpInfo($createUpdateBatchProducts /** * Operation createUpdateBatchProductsAsync * - * Creates the products in a batch + * Create products in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) * @@ -974,7 +982,7 @@ function ($response) { /** * Operation createUpdateBatchProductsAsyncWithHttpInfo * - * Creates the products in a batch + * Create products in batch * * @param \SendinBlue\Client\Model\CreateUpdateBatchProducts $createUpdateBatchProducts Values to create a batch of products (required) * @@ -1220,6 +1228,14 @@ public function createUpdateCategoryWithHttpInfo($createUpdateCategory) ); $e->setResponseObject($data); break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -1494,6 +1510,14 @@ public function createUpdateProductWithHttpInfo($createUpdateProduct) ); $e->setResponseObject($data); break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -1684,7 +1708,7 @@ protected function createUpdateProductRequest($createUpdateProduct) /** * Operation ecommerceActivatePost * - * **Fulfills the eCommerce pre-requisites** + * Activate the eCommerce app * * * @throws \SendinBlue\Client\ApiException on non-2xx response @@ -1699,7 +1723,7 @@ public function ecommerceActivatePost() /** * Operation ecommerceActivatePostWithHttpInfo * - * **Fulfills the eCommerce pre-requisites** + * Activate the eCommerce app * * * @throws \SendinBlue\Client\ApiException on non-2xx response @@ -1751,6 +1775,14 @@ public function ecommerceActivatePostWithHttpInfo() ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -1759,7 +1791,7 @@ public function ecommerceActivatePostWithHttpInfo() /** * Operation ecommerceActivatePostAsync * - * **Fulfills the eCommerce pre-requisites** + * Activate the eCommerce app * * * @throws \InvalidArgumentException @@ -1778,7 +1810,7 @@ function ($response) { /** * Operation ecommerceActivatePostAsyncWithHttpInfo * - * **Fulfills the eCommerce pre-requisites** + * Activate the eCommerce app * * * @throws \InvalidArgumentException @@ -1921,14 +1953,15 @@ protected function ecommerceActivatePostRequest() * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetCategories */ - public function getCategories($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getCategories($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null) { - list($response) = $this->getCategoriesWithHttpInfo($limit, $offset, $sort, $ids); + list($response) = $this->getCategoriesWithHttpInfo($limit, $offset, $sort, $ids, $name); return $response; } @@ -1941,15 +1974,16 @@ public function getCategories($limit = '50', $offset = '0', $sort = 'desc', $ids * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetCategories, HTTP status code, HTTP response headers (array of strings) */ - public function getCategoriesWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getCategoriesWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null) { $returnType = '\SendinBlue\Client\Model\GetCategories'; - $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids); + $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids, $name); try { $options = $this->createHttpClientOption(); @@ -2027,13 +2061,14 @@ public function getCategoriesWithHttpInfo($limit = '50', $offset = '0', $sort = * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCategoriesAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getCategoriesAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null) { - return $this->getCategoriesAsyncWithHttpInfo($limit, $offset, $sort, $ids) + return $this->getCategoriesAsyncWithHttpInfo($limit, $offset, $sort, $ids, $name) ->then( function ($response) { return $response[0]; @@ -2050,14 +2085,15 @@ function ($response) { * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCategoriesAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getCategoriesAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null) { $returnType = '\SendinBlue\Client\Model\GetCategories'; - $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids); + $request = $this->getCategoriesRequest($limit, $offset, $sort, $ids, $name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2103,11 +2139,12 @@ function ($exception) { * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by category ids (optional) + * @param string $name Filter by category name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCategoriesRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + protected function getCategoriesRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null) { if ($limit !== null && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling EcommerceApi.getCategories, must be smaller than or equal to 100.'); @@ -2140,6 +2177,10 @@ protected function getCategoriesRequest($limit = '50', $offset = '0', $sort = 'd if ($ids !== null) { $queryParams['ids'] = ObjectSerializer::toQueryValue($ids); } + // query params + if ($name !== null) { + $queryParams['name'] = ObjectSerializer::toQueryValue($name); + } // body params @@ -2822,14 +2863,17 @@ protected function getProductInfoRequest($id) * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param string[] $price Filter by product price, like price[lte] (optional) + * @param string[] $categories Filter by category ids (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetProducts */ - public function getProducts($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getProducts($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $price = null, $categories = null) { - list($response) = $this->getProductsWithHttpInfo($limit, $offset, $sort, $ids); + list($response) = $this->getProductsWithHttpInfo($limit, $offset, $sort, $ids, $name, $price, $categories); return $response; } @@ -2842,15 +2886,18 @@ public function getProducts($limit = '50', $offset = '0', $sort = 'desc', $ids = * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param string[] $price Filter by product price, like price[lte] (optional) + * @param string[] $categories Filter by category ids (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetProducts, HTTP status code, HTTP response headers (array of strings) */ - public function getProductsWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getProductsWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $price = null, $categories = null) { $returnType = '\SendinBlue\Client\Model\GetProducts'; - $request = $this->getProductsRequest($limit, $offset, $sort, $ids); + $request = $this->getProductsRequest($limit, $offset, $sort, $ids, $name, $price, $categories); try { $options = $this->createHttpClientOption(); @@ -2928,13 +2975,16 @@ public function getProductsWithHttpInfo($limit = '50', $offset = '0', $sort = 'd * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param string[] $price Filter by product price, like price[lte] (optional) + * @param string[] $categories Filter by category ids (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProductsAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getProductsAsync($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $price = null, $categories = null) { - return $this->getProductsAsyncWithHttpInfo($limit, $offset, $sort, $ids) + return $this->getProductsAsyncWithHttpInfo($limit, $offset, $sort, $ids, $name, $price, $categories) ->then( function ($response) { return $response[0]; @@ -2951,14 +3001,17 @@ function ($response) { * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param string[] $price Filter by product price, like price[lte] (optional) + * @param string[] $categories Filter by category ids (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProductsAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + public function getProductsAsyncWithHttpInfo($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $price = null, $categories = null) { $returnType = '\SendinBlue\Client\Model\GetProducts'; - $request = $this->getProductsRequest($limit, $offset, $sort, $ids); + $request = $this->getProductsRequest($limit, $offset, $sort, $ids, $name, $price, $categories); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3004,11 +3057,14 @@ function ($exception) { * @param int $offset Index of the first document in the page (optional, default to 0) * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * @param string[] $ids Filter by product ids (optional) + * @param string $name Filter by product name, minimum 3 characters should be present for search (optional) + * @param string[] $price Filter by product price, like price[lte] (optional) + * @param string[] $categories Filter by category ids (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getProductsRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null) + protected function getProductsRequest($limit = '50', $offset = '0', $sort = 'desc', $ids = null, $name = null, $price = null, $categories = null) { if ($limit !== null && $limit > 1000) { throw new \InvalidArgumentException('invalid value for "$limit" when calling EcommerceApi.getProducts, must be smaller than or equal to 1000.'); @@ -3041,6 +3097,24 @@ protected function getProductsRequest($limit = '50', $offset = '0', $sort = 'des if ($ids !== null) { $queryParams['ids'] = ObjectSerializer::toQueryValue($ids); } + // query params + if ($name !== null) { + $queryParams['name'] = ObjectSerializer::toQueryValue($name); + } + // query params + if (is_array($price)) { + $queryParams['price'] = $price; + } else + if ($price !== null) { + $queryParams['price'] = ObjectSerializer::toQueryValue($price); + } + // query params + if (is_array($categories)) { + $queryParams['categories'] = $categories; + } else + if ($categories !== null) { + $queryParams['categories'] = ObjectSerializer::toQueryValue($categories); + } // body params diff --git a/lib/Api/EmailCampaignsApi.php b/lib/Api/EmailCampaignsApi.php index 02dc177..eb41d41 100644 --- a/lib/Api/EmailCampaignsApi.php +++ b/lib/Api/EmailCampaignsApi.php @@ -1239,14 +1239,15 @@ protected function getAbTestCampaignResultRequest($campaignId) * Get an email campaign report * * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailCampaign */ - public function getEmailCampaign($campaignId) + public function getEmailCampaign($campaignId, $statistics = null) { - list($response) = $this->getEmailCampaignWithHttpInfo($campaignId); + list($response) = $this->getEmailCampaignWithHttpInfo($campaignId, $statistics); return $response; } @@ -1256,15 +1257,16 @@ public function getEmailCampaign($campaignId) * Get an email campaign report * * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailCampaign, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailCampaignWithHttpInfo($campaignId) + public function getEmailCampaignWithHttpInfo($campaignId, $statistics = null) { $returnType = '\SendinBlue\Client\Model\GetEmailCampaign'; - $request = $this->getEmailCampaignRequest($campaignId); + $request = $this->getEmailCampaignRequest($campaignId, $statistics); try { $options = $this->createHttpClientOption(); @@ -1347,13 +1349,14 @@ public function getEmailCampaignWithHttpInfo($campaignId) * Get an email campaign report * * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignAsync($campaignId) + public function getEmailCampaignAsync($campaignId, $statistics = null) { - return $this->getEmailCampaignAsyncWithHttpInfo($campaignId) + return $this->getEmailCampaignAsyncWithHttpInfo($campaignId, $statistics) ->then( function ($response) { return $response[0]; @@ -1367,14 +1370,15 @@ function ($response) { * Get an email campaign report * * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignAsyncWithHttpInfo($campaignId) + public function getEmailCampaignAsyncWithHttpInfo($campaignId, $statistics = null) { $returnType = '\SendinBlue\Client\Model\GetEmailCampaign'; - $request = $this->getEmailCampaignRequest($campaignId); + $request = $this->getEmailCampaignRequest($campaignId, $statistics); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1417,11 +1421,12 @@ function ($exception) { * Create request for operation 'getEmailCampaign' * * @param int $campaignId Id of the campaign (required) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailCampaignRequest($campaignId) + protected function getEmailCampaignRequest($campaignId, $statistics = null) { // verify the required parameter 'campaignId' is set if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { @@ -1437,6 +1442,10 @@ protected function getEmailCampaignRequest($campaignId) $httpBody = ''; $multipart = false; + // query params + if ($statistics !== null) { + $queryParams['statistics'] = ObjectSerializer::toQueryValue($statistics); + } // path params if ($campaignId !== null) { @@ -1535,6 +1544,7 @@ protected function getEmailCampaignRequest($campaignId) * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 50) @@ -1545,9 +1555,9 @@ protected function getEmailCampaignRequest($campaignId) * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailCampaigns */ - public function getEmailCampaigns($type = null, $status = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getEmailCampaigns($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') { - list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset, $sort); + list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort); return $response; } @@ -1558,6 +1568,7 @@ public function getEmailCampaigns($type = null, $status = null, $startDate = nul * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 50) @@ -1568,10 +1579,10 @@ public function getEmailCampaigns($type = null, $status = null, $startDate = nul * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailCampaigns, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getEmailCampaignsRequest($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -1647,6 +1658,7 @@ public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $sta * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 50) @@ -1656,9 +1668,9 @@ public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $sta * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsync($type = null, $status = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getEmailCampaignsAsync($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') { - return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset, $sort) + return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -1673,6 +1685,7 @@ function ($response) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 50) @@ -1682,10 +1695,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getEmailCampaignsRequest($type, $status, $statistics, $startDate, $endDate, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1729,6 +1742,7 @@ function ($exception) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param string $statistics Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional) * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 50) @@ -1738,7 +1752,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailCampaignsRequest($type = null, $status = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') + protected function getEmailCampaignsRequest($type = null, $status = null, $statistics = null, $startDate = null, $endDate = null, $limit = '50', $offset = '0', $sort = 'desc') { if ($limit !== null && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling EmailCampaignsApi.getEmailCampaigns, must be smaller than or equal to 100.'); @@ -1764,6 +1778,10 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $start $queryParams['status'] = ObjectSerializer::toQueryValue($status); } // query params + if ($statistics !== null) { + $queryParams['statistics'] = ObjectSerializer::toQueryValue($statistics); + } + // query params if ($startDate !== null) { $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); } diff --git a/lib/Api/MasterAccountApi.php b/lib/Api/MasterAccountApi.php index 362a7b2..e9be58b 100644 --- a/lib/Api/MasterAccountApi.php +++ b/lib/Api/MasterAccountApi.php @@ -1446,6 +1446,288 @@ protected function corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails) ); } + /** + * Operation corporateSubAccountKeyPost + * + * Create an API key for a sub-account + * + * @param \SendinBlue\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\CreateApiKeyResponse + */ + public function corporateSubAccountKeyPost($createApiKeyRequest) + { + list($response) = $this->corporateSubAccountKeyPostWithHttpInfo($createApiKeyRequest); + return $response; + } + + /** + * Operation corporateSubAccountKeyPostWithHttpInfo + * + * Create an API key for a sub-account + * + * @param \SendinBlue\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\CreateApiKeyResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function corporateSubAccountKeyPostWithHttpInfo($createApiKeyRequest) + { + $returnType = '\SendinBlue\Client\Model\CreateApiKeyResponse'; + $request = $this->corporateSubAccountKeyPostRequest($createApiKeyRequest); + + 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 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\CreateApiKeyResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation corporateSubAccountKeyPostAsync + * + * Create an API key for a sub-account + * + * @param \SendinBlue\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountKeyPostAsync($createApiKeyRequest) + { + return $this->corporateSubAccountKeyPostAsyncWithHttpInfo($createApiKeyRequest) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation corporateSubAccountKeyPostAsyncWithHttpInfo + * + * Create an API key for a sub-account + * + * @param \SendinBlue\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function corporateSubAccountKeyPostAsyncWithHttpInfo($createApiKeyRequest) + { + $returnType = '\SendinBlue\Client\Model\CreateApiKeyResponse'; + $request = $this->corporateSubAccountKeyPostRequest($createApiKeyRequest); + + 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 'corporateSubAccountKeyPost' + * + * @param \SendinBlue\Client\Model\CreateApiKeyRequest $createApiKeyRequest Values to generate API key for sub-account (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function corporateSubAccountKeyPostRequest($createApiKeyRequest) + { + // verify the required parameter 'createApiKeyRequest' is set + if ($createApiKeyRequest === null || (is_array($createApiKeyRequest) && count($createApiKeyRequest) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $createApiKeyRequest when calling corporateSubAccountKeyPost' + ); + } + + $resourcePath = '/corporate/subAccount/key'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($createApiKeyRequest)) { + $_tempBody = $createApiKeyRequest; + } + + 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\Query::build($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\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation corporateSubAccountPost * diff --git a/lib/Api/TransactionalWhatsAppApi.php b/lib/Api/TransactionalWhatsAppApi.php new file mode 100644 index 0000000..231bb60 --- /dev/null +++ b/lib/Api/TransactionalWhatsAppApi.php @@ -0,0 +1,737 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getWhatsappEventReport + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\GetWhatsappEventReport + */ + public function getWhatsappEventReport($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + list($response) = $this->getWhatsappEventReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + return $response; + } + + /** + * Operation getWhatsappEventReportWithHttpInfo + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\GetWhatsappEventReport, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsappEventReportWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + $returnType = '\SendinBlue\Client\Model\GetWhatsappEventReport'; + $request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + + 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\GetWhatsappEventReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getWhatsappEventReportAsync + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappEventReportAsync($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + return $this->getWhatsappEventReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsappEventReportAsyncWithHttpInfo + * + * Get all your WhatsApp activity (unaggregated events) + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappEventReportAsyncWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + $returnType = '\SendinBlue\Client\Model\GetWhatsappEventReport'; + $request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort); + + 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 'getWhatsappEventReport' + * + * @param int $limit Number limitation for the result returned (optional, default to 2500) + * @param int $offset Beginning point in the list to retrieve from (optional, default to 0) + * @param string $startDate **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $endDate **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param int $days Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional) + * @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional) + * @param string $event Filter the report for a specific event type (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsappEventReportRequest($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc') + { + if ($limit !== null && $limit > 5000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be smaller than or equal to 5000.'); + } + if ($limit !== null && $limit < 0) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be bigger than or equal to 0.'); + } + + + $resourcePath = '/whatsapp/statistics/events'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); + } + // query params + if ($contactNumber !== null) { + $queryParams['contactNumber'] = ObjectSerializer::toQueryValue($contactNumber); + } + // query params + if ($event !== null) { + $queryParams['event'] = ObjectSerializer::toQueryValue($event); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + + + // 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\Query::build($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\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation sendWhatsappMessage + * + * Send a WhatsApp message + * + * @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\InlineResponse2012 + */ + public function sendWhatsappMessage($sendWhatsappMessage) + { + list($response) = $this->sendWhatsappMessageWithHttpInfo($sendWhatsappMessage); + return $response; + } + + /** + * Operation sendWhatsappMessageWithHttpInfo + * + * Send a WhatsApp message + * + * @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\InlineResponse2012, HTTP status code, HTTP response headers (array of strings) + */ + public function sendWhatsappMessageWithHttpInfo($sendWhatsappMessage) + { + $returnType = '\SendinBlue\Client\Model\InlineResponse2012'; + $request = $this->sendWhatsappMessageRequest($sendWhatsappMessage); + + 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 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\InlineResponse2012', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation sendWhatsappMessageAsync + * + * Send a WhatsApp message + * + * @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsappMessageAsync($sendWhatsappMessage) + { + return $this->sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation sendWhatsappMessageAsyncWithHttpInfo + * + * Send a WhatsApp message + * + * @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage) + { + $returnType = '\SendinBlue\Client\Model\InlineResponse2012'; + $request = $this->sendWhatsappMessageRequest($sendWhatsappMessage); + + 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 'sendWhatsappMessage' + * + * @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function sendWhatsappMessageRequest($sendWhatsappMessage) + { + // verify the required parameter 'sendWhatsappMessage' is set + if ($sendWhatsappMessage === null || (is_array($sendWhatsappMessage) && count($sendWhatsappMessage) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $sendWhatsappMessage when calling sendWhatsappMessage' + ); + } + + $resourcePath = '/whatsapp/sendMessage'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + if (isset($sendWhatsappMessage)) { + $_tempBody = $sendWhatsappMessage; + } + + 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\Query::build($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\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/WhatsappCampaignsApi.php b/lib/Api/WhatsappCampaignsApi.php new file mode 100644 index 0000000..93b1acb --- /dev/null +++ b/lib/Api/WhatsappCampaignsApi.php @@ -0,0 +1,661 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation deleteWhatsappCampaign + * + * Delete a whatsapp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteWhatsappCampaign($campaignId) + { + $this->deleteWhatsappCampaignWithHttpInfo($campaignId); + } + + /** + * Operation deleteWhatsappCampaignWithHttpInfo + * + * Delete a whatsapp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteWhatsappCampaignWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteWhatsappCampaignRequest($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() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + 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 deleteWhatsappCampaignAsync + * + * Delete a whatsapp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWhatsappCampaignAsync($campaignId) + { + return $this->deleteWhatsappCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteWhatsappCampaignAsyncWithHttpInfo + * + * Delete a whatsapp campaign + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteWhatsappCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = ''; + $request = $this->deleteWhatsappCampaignRequest($campaignId); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $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 'deleteWhatsappCampaign' + * + * @param int $campaignId id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function deleteWhatsappCampaignRequest($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 deleteWhatsappCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns/{campaignId}'; + $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\Query::build($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\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getWhatsappCampaign + * + * Get a whatsapp campaign + * + * @param string $campaignId Id of the campaign (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\GetWhatsappCampaignOverview + */ + public function getWhatsappCampaign($campaignId) + { + list($response) = $this->getWhatsappCampaignWithHttpInfo($campaignId); + return $response; + } + + /** + * Operation getWhatsappCampaignWithHttpInfo + * + * Get a whatsapp campaign + * + * @param string $campaignId Id of the campaign (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\GetWhatsappCampaignOverview, HTTP status code, HTTP response headers (array of strings) + */ + public function getWhatsappCampaignWithHttpInfo($campaignId) + { + $returnType = '\SendinBlue\Client\Model\GetWhatsappCampaignOverview'; + $request = $this->getWhatsappCampaignRequest($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\GetWhatsappCampaignOverview', + $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 getWhatsappCampaignAsync + * + * Get a whatsapp campaign + * + * @param string $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappCampaignAsync($campaignId) + { + return $this->getWhatsappCampaignAsyncWithHttpInfo($campaignId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getWhatsappCampaignAsyncWithHttpInfo + * + * Get a whatsapp campaign + * + * @param string $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getWhatsappCampaignAsyncWithHttpInfo($campaignId) + { + $returnType = '\SendinBlue\Client\Model\GetWhatsappCampaignOverview'; + $request = $this->getWhatsappCampaignRequest($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 'getWhatsappCampaign' + * + * @param string $campaignId Id of the campaign (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getWhatsappCampaignRequest($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 getWhatsappCampaign' + ); + } + + $resourcePath = '/whatsappCampaigns/{campaignId}'; + $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\Query::build($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\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Configuration.php b/lib/Configuration.php index 0e6b399..e47d25b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -38,7 +38,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ -$GLOBALS['version'] = '8.4.1'; +$GLOBALS['version'] = '8.4.2'; class Configuration { diff --git a/lib/Model/BodyVariablesItems.php b/lib/Model/BodyVariablesItems.php new file mode 100644 index 0000000..bbea25c --- /dev/null +++ b/lib/Model/BodyVariablesItems.php @@ -0,0 +1,280 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ComponentItems.php b/lib/Model/ComponentItems.php new file mode 100644 index 0000000..a454997 --- /dev/null +++ b/lib/Model/ComponentItems.php @@ -0,0 +1,335 @@ + 'string', + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'text' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'text' => 'getText' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ConversationsMessageFileImageInfo.php b/lib/Model/ConversationsMessageFileImageInfo.php index 4131d85..5e528ad 100644 --- a/lib/Model/ConversationsMessageFileImageInfo.php +++ b/lib/Model/ConversationsMessageFileImageInfo.php @@ -382,4 +382,3 @@ public function __toString() } - diff --git a/lib/Model/CreateApiKeyRequest.php b/lib/Model/CreateApiKeyRequest.php new file mode 100644 index 0000000..45240b6 --- /dev/null +++ b/lib/Model/CreateApiKeyRequest.php @@ -0,0 +1,338 @@ + 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Id of the sub-account organization + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the API key + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CreateApiKeyResponse.php b/lib/Model/CreateApiKeyResponse.php new file mode 100644 index 0000000..66014cc --- /dev/null +++ b/lib/Model/CreateApiKeyResponse.php @@ -0,0 +1,335 @@ + 'string', + 'key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'status' => null, + 'key' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'key' => 'key' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'key' => 'setKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'key' => 'getKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + $this->container['key'] = isset($data['key']) ? $data['key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status of the API operation. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key API Key + * + * @return $this + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CreateAttribute.php b/lib/Model/CreateAttribute.php index 9e45090..2f5b046 100644 --- a/lib/Model/CreateAttribute.php +++ b/lib/Model/CreateAttribute.php @@ -290,7 +290,7 @@ public function getIsRecurring() /** * Sets isRecurring * - * @param bool $isRecurring Type of the calculated attribute. Use only if the attribute's category is 'calculated' + * @param bool $isRecurring Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' * * @return $this */ diff --git a/lib/Model/CreateUpdateCategories.php b/lib/Model/CreateUpdateCategories.php index f2a63d3..e43a8ba 100644 --- a/lib/Model/CreateUpdateCategories.php +++ b/lib/Model/CreateUpdateCategories.php @@ -59,7 +59,8 @@ class CreateUpdateCategories implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'string', 'name' => 'string', - 'url' => 'string' + 'url' => 'string', + 'deletedAt' => 'string' ]; /** @@ -70,7 +71,8 @@ class CreateUpdateCategories implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'id' => 'email', 'name' => null, - 'url' => null + 'url' => null, + 'deletedAt' => null ]; /** @@ -102,7 +104,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'url' => 'url' + 'url' => 'url', + 'deletedAt' => 'deletedAt' ]; /** @@ -113,7 +116,8 @@ public static function swaggerFormats() protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'url' => 'setUrl' + 'url' => 'setUrl', + 'deletedAt' => 'setDeletedAt' ]; /** @@ -124,7 +128,8 @@ public static function swaggerFormats() protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'url' => 'getUrl' + 'url' => 'getUrl', + 'deletedAt' => 'getDeletedAt' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; } /** @@ -290,6 +296,30 @@ public function setUrl($url) return $this; } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateUpdateCategory.php b/lib/Model/CreateUpdateCategory.php index cc76b4b..2a1f070 100644 --- a/lib/Model/CreateUpdateCategory.php +++ b/lib/Model/CreateUpdateCategory.php @@ -60,7 +60,8 @@ class CreateUpdateCategory implements ModelInterface, ArrayAccess 'id' => 'string', 'name' => 'string', 'url' => 'string', - 'updateEnabled' => 'bool' + 'updateEnabled' => 'bool', + 'deletedAt' => 'string' ]; /** @@ -72,7 +73,8 @@ class CreateUpdateCategory implements ModelInterface, ArrayAccess 'id' => 'email', 'name' => null, 'url' => null, - 'updateEnabled' => null + 'updateEnabled' => null, + 'deletedAt' => null ]; /** @@ -105,7 +107,8 @@ public static function swaggerFormats() 'id' => 'id', 'name' => 'name', 'url' => 'url', - 'updateEnabled' => 'updateEnabled' + 'updateEnabled' => 'updateEnabled', + 'deletedAt' => 'deletedAt' ]; /** @@ -117,7 +120,8 @@ public static function swaggerFormats() 'id' => 'setId', 'name' => 'setName', 'url' => 'setUrl', - 'updateEnabled' => 'setUpdateEnabled' + 'updateEnabled' => 'setUpdateEnabled', + 'deletedAt' => 'setDeletedAt' ]; /** @@ -129,7 +133,8 @@ public static function swaggerFormats() 'id' => 'getId', 'name' => 'getName', 'url' => 'getUrl', - 'updateEnabled' => 'getUpdateEnabled' + 'updateEnabled' => 'getUpdateEnabled', + 'deletedAt' => 'getDeletedAt' ]; /** @@ -196,6 +201,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; } /** @@ -320,6 +326,30 @@ public function setUpdateEnabled($updateEnabled) return $this; } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateUpdateProduct.php b/lib/Model/CreateUpdateProduct.php index 42d2d58..cd45cca 100644 --- a/lib/Model/CreateUpdateProduct.php +++ b/lib/Model/CreateUpdateProduct.php @@ -65,7 +65,9 @@ class CreateUpdateProduct implements ModelInterface, ArrayAccess 'price' => 'float', 'categories' => 'string[]', 'parentId' => 'string', - 'updateEnabled' => 'bool' + 'metaInfo' => 'map[string,string]', + 'updateEnabled' => 'bool', + 'deletedAt' => 'string' ]; /** @@ -82,7 +84,9 @@ class CreateUpdateProduct implements ModelInterface, ArrayAccess 'price' => 'float', 'categories' => null, 'parentId' => 'string', - 'updateEnabled' => null + 'metaInfo' => null, + 'updateEnabled' => null, + 'deletedAt' => null ]; /** @@ -120,7 +124,9 @@ public static function swaggerFormats() 'price' => 'price', 'categories' => 'categories', 'parentId' => 'parentId', - 'updateEnabled' => 'updateEnabled' + 'metaInfo' => 'metaInfo', + 'updateEnabled' => 'updateEnabled', + 'deletedAt' => 'deletedAt' ]; /** @@ -137,7 +143,9 @@ public static function swaggerFormats() 'price' => 'setPrice', 'categories' => 'setCategories', 'parentId' => 'setParentId', - 'updateEnabled' => 'setUpdateEnabled' + 'metaInfo' => 'setMetaInfo', + 'updateEnabled' => 'setUpdateEnabled', + 'deletedAt' => 'setDeletedAt' ]; /** @@ -154,7 +162,9 @@ public static function swaggerFormats() 'price' => 'getPrice', 'categories' => 'getCategories', 'parentId' => 'getParentId', - 'updateEnabled' => 'getUpdateEnabled' + 'metaInfo' => 'getMetaInfo', + 'updateEnabled' => 'getUpdateEnabled', + 'deletedAt' => 'getDeletedAt' ]; /** @@ -225,7 +235,9 @@ public function __construct(array $data = null) $this->container['price'] = isset($data['price']) ? $data['price'] : null; $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; } /** @@ -450,6 +462,30 @@ public function setParentId($parentId) return $this; } + /** + * Gets metaInfo + * + * @return map[string,string] + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + /** * Gets updateEnabled * @@ -473,6 +509,30 @@ public function setUpdateEnabled($updateEnabled) return $this; } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @@ -549,4 +609,3 @@ public function __toString() } - diff --git a/lib/Model/CreateUpdateProducts.php b/lib/Model/CreateUpdateProducts.php index b3f5f23..23c182c 100644 --- a/lib/Model/CreateUpdateProducts.php +++ b/lib/Model/CreateUpdateProducts.php @@ -64,7 +64,9 @@ class CreateUpdateProducts implements ModelInterface, ArrayAccess 'sku' => 'string', 'price' => 'float', 'categories' => 'string[]', - 'parentId' => 'string' + 'parentId' => 'string', + 'metaInfo' => 'map[string,string]', + 'deletedAt' => 'string' ]; /** @@ -80,7 +82,9 @@ class CreateUpdateProducts implements ModelInterface, ArrayAccess 'sku' => 'string', 'price' => 'float', 'categories' => null, - 'parentId' => 'string' + 'parentId' => 'string', + 'metaInfo' => null, + 'deletedAt' => null ]; /** @@ -117,7 +121,9 @@ public static function swaggerFormats() 'sku' => 'sku', 'price' => 'price', 'categories' => 'categories', - 'parentId' => 'parentId' + 'parentId' => 'parentId', + 'metaInfo' => 'metaInfo', + 'deletedAt' => 'deletedAt' ]; /** @@ -133,7 +139,9 @@ public static function swaggerFormats() 'sku' => 'setSku', 'price' => 'setPrice', 'categories' => 'setCategories', - 'parentId' => 'setParentId' + 'parentId' => 'setParentId', + 'metaInfo' => 'setMetaInfo', + 'deletedAt' => 'setDeletedAt' ]; /** @@ -149,7 +157,9 @@ public static function swaggerFormats() 'sku' => 'getSku', 'price' => 'getPrice', 'categories' => 'getCategories', - 'parentId' => 'getParentId' + 'parentId' => 'getParentId', + 'metaInfo' => 'getMetaInfo', + 'deletedAt' => 'getDeletedAt' ]; /** @@ -220,6 +230,8 @@ public function __construct(array $data = null) $this->container['price'] = isset($data['price']) ? $data['price'] : null; $this->container['categories'] = isset($data['categories']) ? $data['categories'] : null; $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; } /** @@ -443,6 +455,54 @@ public function setParentId($parentId) return $this; } + + /** + * Gets metaInfo + * + * @return map[string,string] + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + + /** + * Gets deletedAt + * + * @return string + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/FileList.php b/lib/Model/FileList.php index 8e7f0c1..a858237 100644 --- a/lib/Model/FileList.php +++ b/lib/Model/FileList.php @@ -279,4 +279,3 @@ public function __toString() } - diff --git a/lib/Model/GetCategoryDetails.php b/lib/Model/GetCategoryDetails.php index 3bd1133..5a4350f 100644 --- a/lib/Model/GetCategoryDetails.php +++ b/lib/Model/GetCategoryDetails.php @@ -61,7 +61,8 @@ class GetCategoryDetails implements ModelInterface, ArrayAccess 'name' => 'string', 'createdAt' => 'string', 'modifiedAt' => 'string', - 'url' => 'string' + 'url' => 'string', + 'isDeleted' => 'bool' ]; /** @@ -74,7 +75,8 @@ class GetCategoryDetails implements ModelInterface, ArrayAccess 'name' => 'string', 'createdAt' => null, 'modifiedAt' => null, - 'url' => 'string' + 'url' => 'string', + 'isDeleted' => 'string' ]; /** @@ -108,7 +110,8 @@ public static function swaggerFormats() 'name' => 'name', 'createdAt' => 'createdAt', 'modifiedAt' => 'modifiedAt', - 'url' => 'url' + 'url' => 'url', + 'isDeleted' => 'isDeleted' ]; /** @@ -121,7 +124,8 @@ public static function swaggerFormats() 'name' => 'setName', 'createdAt' => 'setCreatedAt', 'modifiedAt' => 'setModifiedAt', - 'url' => 'setUrl' + 'url' => 'setUrl', + 'isDeleted' => 'setIsDeleted' ]; /** @@ -134,7 +138,8 @@ public static function swaggerFormats() 'name' => 'getName', 'createdAt' => 'getCreatedAt', 'modifiedAt' => 'getModifiedAt', - 'url' => 'getUrl' + 'url' => 'getUrl', + 'isDeleted' => 'getIsDeleted' ]; /** @@ -202,6 +207,7 @@ public function __construct(array $data = null) $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['isDeleted'] = isset($data['isDeleted']) ? $data['isDeleted'] : null; } /** @@ -359,6 +365,30 @@ public function setUrl($url) return $this; } + + /** + * Gets isDeleted + * + * @return bool + */ + public function getIsDeleted() + { + return $this->container['isDeleted']; + } + + /** + * Sets isDeleted + * + * @param bool $isDeleted category deleted from the shop's database + * + * @return $this + */ + public function setIsDeleted($isDeleted) + { + $this->container['isDeleted'] = $isDeleted; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/GetProductDetails.php b/lib/Model/GetProductDetails.php index 2f74bcc..6ddff24 100644 --- a/lib/Model/GetProductDetails.php +++ b/lib/Model/GetProductDetails.php @@ -69,7 +69,9 @@ class GetProductDetails implements ModelInterface, ArrayAccess 'parentId' => 'string', 's3Original' => 'string', 's3ThumbAnalytics' => 'string', - 's3ThumbEditor' => 'string' + 'metaInfo' => 'object', + 's3ThumbEditor' => 'string', + 'isDeleted' => 'bool' ]; /** @@ -90,7 +92,9 @@ class GetProductDetails implements ModelInterface, ArrayAccess 'parentId' => 'string', 's3Original' => 'string', 's3ThumbAnalytics' => 'string', - 's3ThumbEditor' => 'string' + 'metaInfo' => null, + 's3ThumbEditor' => 'string', + 'isDeleted' => 'string' ]; /** @@ -132,7 +136,9 @@ public static function swaggerFormats() 'parentId' => 'parentId', 's3Original' => 's3Original', 's3ThumbAnalytics' => 's3ThumbAnalytics', - 's3ThumbEditor' => 's3ThumbEditor' + 'metaInfo' => 'metaInfo', + 's3ThumbEditor' => 's3ThumbEditor', + 'isDeleted' => 'isDeleted' ]; /** @@ -153,7 +159,9 @@ public static function swaggerFormats() 'parentId' => 'setParentId', 's3Original' => 'setS3Original', 's3ThumbAnalytics' => 'setS3ThumbAnalytics', - 's3ThumbEditor' => 'setS3ThumbEditor' + 'metaInfo' => 'setMetaInfo', + 's3ThumbEditor' => 'setS3ThumbEditor', + 'isDeleted' => 'setIsDeleted' ]; /** @@ -174,7 +182,9 @@ public static function swaggerFormats() 'parentId' => 'getParentId', 's3Original' => 'getS3Original', 's3ThumbAnalytics' => 'getS3ThumbAnalytics', - 's3ThumbEditor' => 'getS3ThumbEditor' + 'metaInfo' => 'getMetaInfo', + 's3ThumbEditor' => 'getS3ThumbEditor', + 'isDeleted' => 'getIsDeleted' ]; /** @@ -249,7 +259,9 @@ public function __construct(array $data = null) $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; $this->container['s3Original'] = isset($data['s3Original']) ? $data['s3Original'] : null; $this->container['s3ThumbAnalytics'] = isset($data['s3ThumbAnalytics']) ? $data['s3ThumbAnalytics'] : null; + $this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null; $this->container['s3ThumbEditor'] = isset($data['s3ThumbEditor']) ? $data['s3ThumbEditor'] : null; + $this->container['isDeleted'] = isset($data['isDeleted']) ? $data['isDeleted'] : null; } /** @@ -582,6 +594,30 @@ public function setS3ThumbAnalytics($s3ThumbAnalytics) return $this; } + /** + * Gets metaInfo + * + * @return object + */ + public function getMetaInfo() + { + return $this->container['metaInfo']; + } + + /** + * Sets metaInfo + * + * @param object $metaInfo Meta data of product such as description, vendor, producer, stock level, etc. + * + * @return $this + */ + public function setMetaInfo($metaInfo) + { + $this->container['metaInfo'] = $metaInfo; + + return $this; + } + /** * Gets s3ThumbEditor * @@ -605,6 +641,30 @@ public function setS3ThumbEditor($s3ThumbEditor) return $this; } + + /** + * Gets isDeleted + * + * @return bool + */ + public function getIsDeleted() + { + return $this->container['isDeleted']; + } + + /** + * Sets isDeleted + * + * @param bool $isDeleted product deleted from the shop's database + * + * @return $this + */ + public function setIsDeleted($isDeleted) + { + $this->container['isDeleted'] = $isDeleted; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/GetSmsEventReportEvents.php b/lib/Model/GetSmsEventReportEvents.php index a7b7b24..a7e79d6 100644 --- a/lib/Model/GetSmsEventReportEvents.php +++ b/lib/Model/GetSmsEventReportEvents.php @@ -197,6 +197,7 @@ public function getModelName() const EVENT_UNSUBSCRIPTION = 'unsubscription'; const EVENT_REPLIES = 'replies'; const EVENT_BLOCKED = 'blocked'; + const EVENT_REJECTED = 'rejected'; @@ -217,6 +218,7 @@ public function getEventAllowableValues() self::EVENT_UNSUBSCRIPTION, self::EVENT_REPLIES, self::EVENT_BLOCKED, + self::EVENT_REJECTED, ]; } diff --git a/lib/Model/GetWebhook.php b/lib/Model/GetWebhook.php index 7af62af..5011906 100644 --- a/lib/Model/GetWebhook.php +++ b/lib/Model/GetWebhook.php @@ -189,7 +189,7 @@ public function getModelName() } const TYPE_MARKETING = 'marketing'; - const TYPE_TRANSAC = 'transac'; + const TYPE_TRANSACTIONAL = 'transactional'; @@ -202,7 +202,7 @@ public function getTypeAllowableValues() { return [ self::TYPE_MARKETING, - self::TYPE_TRANSAC, + self::TYPE_TRANSACTIONAL, ]; } @@ -393,7 +393,7 @@ public function getType() /** * Sets type * - * @param string $type Type of webhook (marketing or transac) + * @param string $type Type of webhook (marketing or transactional) * * @return $this */ diff --git a/lib/Model/GetWhatsappCampaignOverview.php b/lib/Model/GetWhatsappCampaignOverview.php new file mode 100644 index 0000000..ef95bd4 --- /dev/null +++ b/lib/Model/GetWhatsappCampaignOverview.php @@ -0,0 +1,610 @@ + 'int', + 'campaignName' => 'string', + 'campaignStatus' => 'string', + 'scheduledAt' => 'string', + 'senderNumber' => 'string', + 'stats' => '\SendinBlue\Client\Model\WhatsappCampStats', + 'template' => '\SendinBlue\Client\Model\WhatsappCampTemplate', + 'createdAt' => 'string', + 'modifiedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64', + 'campaignName' => null, + 'campaignStatus' => null, + 'scheduledAt' => null, + 'senderNumber' => null, + 'stats' => null, + 'template' => null, + 'createdAt' => null, + 'modifiedAt' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'campaignName' => 'campaignName', + 'campaignStatus' => 'campaignStatus', + 'scheduledAt' => 'scheduledAt', + 'senderNumber' => 'senderNumber', + 'stats' => 'stats', + 'template' => 'template', + 'createdAt' => 'createdAt', + 'modifiedAt' => 'modifiedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'campaignName' => 'setCampaignName', + 'campaignStatus' => 'setCampaignStatus', + 'scheduledAt' => 'setScheduledAt', + 'senderNumber' => 'setSenderNumber', + 'stats' => 'setStats', + 'template' => 'setTemplate', + 'createdAt' => 'setCreatedAt', + 'modifiedAt' => 'setModifiedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'campaignName' => 'getCampaignName', + 'campaignStatus' => 'getCampaignStatus', + 'scheduledAt' => 'getScheduledAt', + 'senderNumber' => 'getSenderNumber', + 'stats' => 'getStats', + 'template' => 'getTemplate', + 'createdAt' => 'getCreatedAt', + 'modifiedAt' => 'getModifiedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const CAMPAIGN_STATUS_DRAFT = 'draft'; + const CAMPAIGN_STATUS_SCHEDULED = 'scheduled'; + const CAMPAIGN_STATUS_PENDING = 'pending'; + const CAMPAIGN_STATUS_APPROVED = 'approved'; + const CAMPAIGN_STATUS_RUNNING = 'running'; + const CAMPAIGN_STATUS_SUSPENDED = 'suspended'; + const CAMPAIGN_STATUS_REJECTED = 'rejected'; + const CAMPAIGN_STATUS_SENT = 'sent'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCampaignStatusAllowableValues() + { + return [ + self::CAMPAIGN_STATUS_DRAFT, + self::CAMPAIGN_STATUS_SCHEDULED, + self::CAMPAIGN_STATUS_PENDING, + self::CAMPAIGN_STATUS_APPROVED, + self::CAMPAIGN_STATUS_RUNNING, + self::CAMPAIGN_STATUS_SUSPENDED, + self::CAMPAIGN_STATUS_REJECTED, + self::CAMPAIGN_STATUS_SENT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['campaignName'] = isset($data['campaignName']) ? $data['campaignName'] : null; + $this->container['campaignStatus'] = isset($data['campaignStatus']) ? $data['campaignStatus'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + $this->container['stats'] = isset($data['stats']) ? $data['stats'] : null; + $this->container['template'] = isset($data['template']) ? $data['template'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['campaignName'] === null) { + $invalidProperties[] = "'campaignName' can't be null"; + } + if ($this->container['campaignStatus'] === null) { + $invalidProperties[] = "'campaignStatus' can't be null"; + } + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!is_null($this->container['campaignStatus']) && !in_array($this->container['campaignStatus'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + if ($this->container['template'] === null) { + $invalidProperties[] = "'template' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['modifiedAt'] === null) { + $invalidProperties[] = "'modifiedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the Whatsapp Campaign + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets campaignName + * + * @return string + */ + public function getCampaignName() + { + return $this->container['campaignName']; + } + + /** + * Sets campaignName + * + * @param string $campaignName Name of the Whatsapp Campaign + * + * @return $this + */ + public function setCampaignName($campaignName) + { + $this->container['campaignName'] = $campaignName; + + return $this; + } + + /** + * Gets campaignStatus + * + * @return string + */ + public function getCampaignStatus() + { + return $this->container['campaignStatus']; + } + + /** + * Sets campaignStatus + * + * @param string $campaignStatus Status of the Whatsapp Campaign + * + * @return $this + */ + public function setCampaignStatus($campaignStatus) + { + $allowedValues = $this->getCampaignStatusAllowableValues(); + if (!in_array($campaignStatus, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'campaignStatus', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['campaignStatus'] = $campaignStatus; + + return $this; + } + + /** + * Gets scheduledAt + * + * @return string + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param string $scheduledAt UTC date-time on which Whatsapp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber Sender of the Whatsapp Campaign + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + + /** + * Gets stats + * + * @return \SendinBlue\Client\Model\WhatsappCampStats + */ + public function getStats() + { + return $this->container['stats']; + } + + /** + * Sets stats + * + * @param \SendinBlue\Client\Model\WhatsappCampStats $stats stats + * + * @return $this + */ + public function setStats($stats) + { + $this->container['stats'] = $stats; + + return $this; + } + + /** + * Gets template + * + * @return \SendinBlue\Client\Model\WhatsappCampTemplate + */ + public function getTemplate() + { + return $this->container['template']; + } + + /** + * Sets template + * + * @param \SendinBlue\Client\Model\WhatsappCampTemplate $template template + * + * @return $this + */ + public function setTemplate($template) + { + $this->container['template'] = $template; + + return $this; + } + + /** + * Gets createdAt + * + * @return string + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param string $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets modifiedAt + * + * @return string + */ + public function getModifiedAt() + { + return $this->container['modifiedAt']; + } + + /** + * Sets modifiedAt + * + * @param string $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * + * @return $this + */ + public function setModifiedAt($modifiedAt) + { + $this->container['modifiedAt'] = $modifiedAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetWhatsappEventReport.php b/lib/Model/GetWhatsappEventReport.php new file mode 100644 index 0000000..5c06f3b --- /dev/null +++ b/lib/Model/GetWhatsappEventReport.php @@ -0,0 +1,305 @@ + '\SendinBlue\Client\Model\GetWhatsappEventReportEvents[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'events' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'events' => 'events' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'events' => 'setEvents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'events' => 'getEvents' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets events + * + * @return \SendinBlue\Client\Model\GetWhatsappEventReportEvents[] + */ + public function getEvents() + { + return $this->container['events']; + } + + /** + * Sets events + * + * @param \SendinBlue\Client\Model\GetWhatsappEventReportEvents[] $events events + * + * @return $this + */ + public function setEvents($events) + { + $this->container['events'] = $events; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetWhatsappEventReportEvents.php b/lib/Model/GetWhatsappEventReportEvents.php new file mode 100644 index 0000000..7307166 --- /dev/null +++ b/lib/Model/GetWhatsappEventReportEvents.php @@ -0,0 +1,572 @@ + 'string', + 'date' => 'string', + 'messageId' => 'string', + 'event' => 'string', + 'reason' => 'string', + 'body' => 'string', + 'mediaUrl' => 'string', + 'senderNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'contactNumber' => 'mobile', + 'date' => null, + 'messageId' => null, + 'event' => null, + 'reason' => null, + 'body' => null, + 'mediaUrl' => 'url', + 'senderNumber' => 'mobile' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'contactNumber' => 'contactNumber', + 'date' => 'date', + 'messageId' => 'messageId', + 'event' => 'event', + 'reason' => 'reason', + 'body' => 'body', + 'mediaUrl' => 'mediaUrl', + 'senderNumber' => 'senderNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'contactNumber' => 'setContactNumber', + 'date' => 'setDate', + 'messageId' => 'setMessageId', + 'event' => 'setEvent', + 'reason' => 'setReason', + 'body' => 'setBody', + 'mediaUrl' => 'setMediaUrl', + 'senderNumber' => 'setSenderNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'contactNumber' => 'getContactNumber', + 'date' => 'getDate', + 'messageId' => 'getMessageId', + 'event' => 'getEvent', + 'reason' => 'getReason', + 'body' => 'getBody', + 'mediaUrl' => 'getMediaUrl', + 'senderNumber' => 'getSenderNumber' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const EVENT_SENT = 'sent'; + const EVENT_DELIVERED = 'delivered'; + const EVENT_READ = 'read'; + const EVENT_ERROR = 'error'; + const EVENT_UNSUBSCRIBE = 'unsubscribe'; + const EVENT_REPLY = 'reply'; + const EVENT_SOFT_BOUNCE = 'soft-bounce'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEventAllowableValues() + { + return [ + self::EVENT_SENT, + self::EVENT_DELIVERED, + self::EVENT_READ, + self::EVENT_ERROR, + self::EVENT_UNSUBSCRIBE, + self::EVENT_REPLY, + self::EVENT_SOFT_BOUNCE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['contactNumber'] = isset($data['contactNumber']) ? $data['contactNumber'] : null; + $this->container['date'] = isset($data['date']) ? $data['date'] : null; + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['event'] = isset($data['event']) ? $data['event'] : null; + $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; + $this->container['body'] = isset($data['body']) ? $data['body'] : null; + $this->container['mediaUrl'] = isset($data['mediaUrl']) ? $data['mediaUrl'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['contactNumber'] === null) { + $invalidProperties[] = "'contactNumber' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + if ($this->container['event'] === null) { + $invalidProperties[] = "'event' can't be null"; + } + $allowedValues = $this->getEventAllowableValues(); + if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets contactNumber + * + * @return string + */ + public function getContactNumber() + { + return $this->container['contactNumber']; + } + + /** + * Sets contactNumber + * + * @param string $contactNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setContactNumber($contactNumber) + { + $this->container['contactNumber'] = $contactNumber; + + return $this; + } + + /** + * Gets date + * + * @return string + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param string $date UTC date-time on which the event has been generated + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId Message ID which generated the event + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + + /** + * Gets event + * + * @return string + */ + public function getEvent() + { + return $this->container['event']; + } + + /** + * Sets event + * + * @param string $event Event which occurred + * + * @return $this + */ + public function setEvent($event) + { + $allowedValues = $this->getEventAllowableValues(); + if (!in_array($event, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'event', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['event'] = $event; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason() + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason Reason for the event (will be there in case of `error` and `soft-bounce` events) + * + * @return $this + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets body + * + * @return string + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string $body Text of the reply (will be there only in case of `reply` event with text) + * + * @return $this + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + + /** + * Gets mediaUrl + * + * @return string + */ + public function getMediaUrl() + { + return $this->container['mediaUrl']; + } + + /** + * Sets mediaUrl + * + * @param string $mediaUrl Url of the media reply (will be there only in case of `reply` event with media) + * + * @return $this + */ + public function setMediaUrl($mediaUrl) + { + $this->container['mediaUrl'] = $mediaUrl; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse2012.php b/lib/Model/InlineResponse2012.php new file mode 100644 index 0000000..81c5690 --- /dev/null +++ b/lib/Model/InlineResponse2012.php @@ -0,0 +1,308 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'messageId' => 'uuidv4' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'messageId' => 'messageId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'messageId' => 'setMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'messageId' => 'getMessageId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['messageId'] === null) { + $invalidProperties[] = "'messageId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets messageId + * + * @return string + */ + public function getMessageId() + { + return $this->container['messageId']; + } + + /** + * Sets messageId + * + * @param string $messageId messageId of sent message + * + * @return $this + */ + public function setMessageId($messageId) + { + $this->container['messageId'] = $messageId; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SendWhatsappMessage.php b/lib/Model/SendWhatsappMessage.php new file mode 100644 index 0000000..b5cab2a --- /dev/null +++ b/lib/Model/SendWhatsappMessage.php @@ -0,0 +1,401 @@ + 'int', + 'text' => 'string', + 'senderNumber' => 'string', + 'contactNumbers' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'templateId' => null, + 'text' => null, + 'senderNumber' => 'mobile', + 'contactNumbers' => 'mobile' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'templateId' => 'templateId', + 'text' => 'text', + 'senderNumber' => 'senderNumber', + 'contactNumbers' => 'contactNumbers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'templateId' => 'setTemplateId', + 'text' => 'setText', + 'senderNumber' => 'setSenderNumber', + 'contactNumbers' => 'setContactNumbers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'templateId' => 'getTemplateId', + 'text' => 'getText', + 'senderNumber' => 'getSenderNumber', + 'contactNumbers' => 'getContactNumbers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['senderNumber'] = isset($data['senderNumber']) ? $data['senderNumber'] : null; + $this->container['contactNumbers'] = isset($data['contactNumbers']) ? $data['contactNumbers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['senderNumber'] === null) { + $invalidProperties[] = "'senderNumber' can't be null"; + } + if ($this->container['contactNumbers'] === null) { + $invalidProperties[] = "'contactNumbers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId ID of the template to send + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Text to be sent as message body (will be overridden if templateId is passed in the same request) + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets senderNumber + * + * @return string + */ + public function getSenderNumber() + { + return $this->container['senderNumber']; + } + + /** + * Sets senderNumber + * + * @param string $senderNumber WhatsApp Number with country code. Example, 85264318721 + * + * @return $this + */ + public function setSenderNumber($senderNumber) + { + $this->container['senderNumber'] = $senderNumber; + + return $this; + } + + /** + * Gets contactNumbers + * + * @return string[] + */ + public function getContactNumbers() + { + return $this->container['contactNumbers']; + } + + /** + * Sets contactNumbers + * + * @param string[] $contactNumbers List of phone numbers of the contacts + * + * @return $this + */ + public function setContactNumbers($contactNumbers) + { + $this->container['contactNumbers'] = $contactNumbers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SsoTokenRequest.php b/lib/Model/SsoTokenRequest.php index b985095..c419946 100644 --- a/lib/Model/SsoTokenRequest.php +++ b/lib/Model/SsoTokenRequest.php @@ -58,7 +58,8 @@ class SsoTokenRequest implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'id' => 'int', - 'email' => 'string' + 'email' => 'string', + 'target' => 'string' ]; /** @@ -68,7 +69,8 @@ class SsoTokenRequest implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'id' => 'int64', - 'email' => null + 'email' => null, + 'target' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'email' => 'email' + 'email' => 'email', + 'target' => 'target' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'id' => 'setId', - 'email' => 'setEmail' + 'email' => 'setEmail', + 'target' => 'setTarget' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'id' => 'getId', - 'email' => 'getEmail' + 'email' => 'getEmail', + 'target' => 'getTarget' ]; /** @@ -163,9 +168,36 @@ public function getModelName() return self::$swaggerModelName; } + const TARGET_AUTOMATION = 'automation'; + const TARGET_EMAIL_CAMPAIGN = 'email_campaign'; + const TARGET_CONTACTS = 'contacts'; + const TARGET_LANDING_PAGES = 'landing_pages'; + const TARGET_EMAIL_TRANSACTIONAL = 'email_transactional'; + const TARGET_SENDERS = 'senders'; + const TARGET_SMS_CAMPAIGN = 'sms_campaign'; + const TARGET_SMS_TRANSACTIONAL = 'sms_transactional'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTargetAllowableValues() + { + return [ + self::TARGET_AUTOMATION, + self::TARGET_EMAIL_CAMPAIGN, + self::TARGET_CONTACTS, + self::TARGET_LANDING_PAGES, + self::TARGET_EMAIL_TRANSACTIONAL, + self::TARGET_SENDERS, + self::TARGET_SMS_CAMPAIGN, + self::TARGET_SMS_TRANSACTIONAL, + ]; + } + /** * Associative array for storing property values @@ -184,6 +216,7 @@ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['target'] = isset($data['target']) ? $data['target'] : null; } /** @@ -198,6 +231,14 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + $allowedValues = $this->getTargetAllowableValues(); + if (!is_null($this->container['target']) && !in_array($this->container['target'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'target', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -260,6 +301,39 @@ public function setEmail($email) return $this; } + + /** + * Gets target + * + * @return string + */ + public function getTarget() + { + return $this->container['target']; + } + + /** + * Sets target + * + * @param string $target Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login + * + * @return $this + */ + public function setTarget($target) + { + $allowedValues = $this->getTargetAllowableValues(); + if (!is_null($target) && !in_array($target, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'target', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['target'] = $target; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/VariablesItems.php b/lib/Model/VariablesItems.php new file mode 100644 index 0000000..03cfc64 --- /dev/null +++ b/lib/Model/VariablesItems.php @@ -0,0 +1,365 @@ + 'string', + 'default' => 'string', + 'datatype' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'default' => null, + 'datatype' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'default' => 'default', + 'datatype' => 'datatype' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'default' => 'setDefault', + 'datatype' => 'setDatatype' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'default' => 'getDefault', + 'datatype' => 'getDatatype' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['default'] = isset($data['default']) ? $data['default'] : null; + $this->container['datatype'] = isset($data['datatype']) ? $data['datatype'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets default + * + * @return string + */ + public function getDefault() + { + return $this->container['default']; + } + + /** + * Sets default + * + * @param string $default default + * + * @return $this + */ + public function setDefault($default) + { + $this->container['default'] = $default; + + return $this; + } + + /** + * Gets datatype + * + * @return string + */ + public function getDatatype() + { + return $this->container['datatype']; + } + + /** + * Sets datatype + * + * @param string $datatype datatype + * + * @return $this + */ + public function setDatatype($datatype) + { + $this->container['datatype'] = $datatype; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WhatsappCampStats.php b/lib/Model/WhatsappCampStats.php new file mode 100644 index 0000000..66f673d --- /dev/null +++ b/lib/Model/WhatsappCampStats.php @@ -0,0 +1,440 @@ + 'int', + 'delivered' => 'int', + 'read' => 'int', + 'unsubscribe' => 'int', + 'notSent' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'sent' => null, + 'delivered' => null, + 'read' => null, + 'unsubscribe' => null, + 'notSent' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sent' => 'sent', + 'delivered' => 'delivered', + 'read' => 'read', + 'unsubscribe' => 'unsubscribe', + 'notSent' => 'not_sent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sent' => 'setSent', + 'delivered' => 'setDelivered', + 'read' => 'setRead', + 'unsubscribe' => 'setUnsubscribe', + 'notSent' => 'setNotSent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sent' => 'getSent', + 'delivered' => 'getDelivered', + 'read' => 'getRead', + 'unsubscribe' => 'getUnsubscribe', + 'notSent' => 'getNotSent' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; + $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['read'] = isset($data['read']) ? $data['read'] : null; + $this->container['unsubscribe'] = isset($data['unsubscribe']) ? $data['unsubscribe'] : null; + $this->container['notSent'] = isset($data['notSent']) ? $data['notSent'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['sent'] === null) { + $invalidProperties[] = "'sent' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['read'] === null) { + $invalidProperties[] = "'read' can't be null"; + } + if ($this->container['unsubscribe'] === null) { + $invalidProperties[] = "'unsubscribe' can't be null"; + } + if ($this->container['notSent'] === null) { + $invalidProperties[] = "'notSent' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sent + * + * @return int + */ + public function getSent() + { + return $this->container['sent']; + } + + /** + * Sets sent + * + * @param int $sent sent + * + * @return $this + */ + public function setSent($sent) + { + $this->container['sent'] = $sent; + + return $this; + } + + /** + * Gets delivered + * + * @return int + */ + public function getDelivered() + { + return $this->container['delivered']; + } + + /** + * Sets delivered + * + * @param int $delivered delivered + * + * @return $this + */ + public function setDelivered($delivered) + { + $this->container['delivered'] = $delivered; + + return $this; + } + + /** + * Gets read + * + * @return int + */ + public function getRead() + { + return $this->container['read']; + } + + /** + * Sets read + * + * @param int $read read + * + * @return $this + */ + public function setRead($read) + { + $this->container['read'] = $read; + + return $this; + } + + /** + * Gets unsubscribe + * + * @return int + */ + public function getUnsubscribe() + { + return $this->container['unsubscribe']; + } + + /** + * Sets unsubscribe + * + * @param int $unsubscribe unsubscribe + * + * @return $this + */ + public function setUnsubscribe($unsubscribe) + { + $this->container['unsubscribe'] = $unsubscribe; + + return $this; + } + + /** + * Gets notSent + * + * @return int + */ + public function getNotSent() + { + return $this->container['notSent']; + } + + /** + * Sets notSent + * + * @param int $notSent notSent + * + * @return $this + */ + public function setNotSent($notSent) + { + $this->container['notSent'] = $notSent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WhatsappCampTemplate.php b/lib/Model/WhatsappCampTemplate.php new file mode 100644 index 0000000..304d7d4 --- /dev/null +++ b/lib/Model/WhatsappCampTemplate.php @@ -0,0 +1,605 @@ + 'string', + 'category' => 'string', + 'language' => 'string', + 'containsButton' => 'bool', + 'displayHeader' => 'bool', + 'headerType' => 'string', + 'components' => '\SendinBlue\Client\Model\ComponentItems[]', + 'headerVariables' => '\SendinBlue\Client\Model\VariablesItems[]', + 'bodyVariables' => '\SendinBlue\Client\Model\VariablesItems[]', + 'buttonType' => 'string', + 'hideFooter' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, + 'category' => null, + 'language' => null, + 'containsButton' => null, + 'displayHeader' => null, + 'headerType' => null, + 'components' => null, + 'headerVariables' => null, + 'bodyVariables' => null, + 'buttonType' => null, + 'hideFooter' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'category' => 'category', + 'language' => 'language', + 'containsButton' => 'contains_button', + 'displayHeader' => 'display_header', + 'headerType' => 'header_type', + 'components' => 'components', + 'headerVariables' => 'header_variables', + 'bodyVariables' => 'body_variables', + 'buttonType' => 'button_type', + 'hideFooter' => 'hide_footer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'category' => 'setCategory', + 'language' => 'setLanguage', + 'containsButton' => 'setContainsButton', + 'displayHeader' => 'setDisplayHeader', + 'headerType' => 'setHeaderType', + 'components' => 'setComponents', + 'headerVariables' => 'setHeaderVariables', + 'bodyVariables' => 'setBodyVariables', + 'buttonType' => 'setButtonType', + 'hideFooter' => 'setHideFooter' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'category' => 'getCategory', + 'language' => 'getLanguage', + 'containsButton' => 'getContainsButton', + 'displayHeader' => 'getDisplayHeader', + 'headerType' => 'getHeaderType', + 'components' => 'getComponents', + 'headerVariables' => 'getHeaderVariables', + 'bodyVariables' => 'getBodyVariables', + 'buttonType' => 'getButtonType', + 'hideFooter' => 'getHideFooter' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + $this->container['containsButton'] = isset($data['containsButton']) ? $data['containsButton'] : null; + $this->container['displayHeader'] = isset($data['displayHeader']) ? $data['displayHeader'] : null; + $this->container['headerType'] = isset($data['headerType']) ? $data['headerType'] : null; + $this->container['components'] = isset($data['components']) ? $data['components'] : null; + $this->container['headerVariables'] = isset($data['headerVariables']) ? $data['headerVariables'] : null; + $this->container['bodyVariables'] = isset($data['bodyVariables']) ? $data['bodyVariables'] : null; + $this->container['buttonType'] = isset($data['buttonType']) ? $data['buttonType'] : null; + $this->container['hideFooter'] = isset($data['hideFooter']) ? $data['hideFooter'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name of the template + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category description of the template + * + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language language of the template + * + * @return $this + */ + public function setLanguage($language) + { + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets containsButton + * + * @return bool + */ + public function getContainsButton() + { + return $this->container['containsButton']; + } + + /** + * Sets containsButton + * + * @param bool $containsButton containsButton + * + * @return $this + */ + public function setContainsButton($containsButton) + { + $this->container['containsButton'] = $containsButton; + + return $this; + } + + /** + * Gets displayHeader + * + * @return bool + */ + public function getDisplayHeader() + { + return $this->container['displayHeader']; + } + + /** + * Sets displayHeader + * + * @param bool $displayHeader displayHeader + * + * @return $this + */ + public function setDisplayHeader($displayHeader) + { + $this->container['displayHeader'] = $displayHeader; + + return $this; + } + + /** + * Gets headerType + * + * @return string + */ + public function getHeaderType() + { + return $this->container['headerType']; + } + + /** + * Sets headerType + * + * @param string $headerType type of header + * + * @return $this + */ + public function setHeaderType($headerType) + { + $this->container['headerType'] = $headerType; + + return $this; + } + + /** + * Gets components + * + * @return \SendinBlue\Client\Model\ComponentItems[] + */ + public function getComponents() + { + return $this->container['components']; + } + + /** + * Sets components + * + * @param \SendinBlue\Client\Model\ComponentItems[] $components array of component item objects + * + * @return $this + */ + public function setComponents($components) + { + $this->container['components'] = $components; + + return $this; + } + + /** + * Gets headerVariables + * + * @return \SendinBlue\Client\Model\VariablesItems[] + */ + public function getHeaderVariables() + { + return $this->container['headerVariables']; + } + + /** + * Sets headerVariables + * + * @param \SendinBlue\Client\Model\VariablesItems[] $headerVariables array of variables item object + * + * @return $this + */ + public function setHeaderVariables($headerVariables) + { + $this->container['headerVariables'] = $headerVariables; + + return $this; + } + + /** + * Gets bodyVariables + * + * @return \SendinBlue\Client\Model\VariablesItems[] + */ + public function getBodyVariables() + { + return $this->container['bodyVariables']; + } + + /** + * Sets bodyVariables + * + * @param \SendinBlue\Client\Model\VariablesItems[] $bodyVariables array of variables item variables + * + * @return $this + */ + public function setBodyVariables($bodyVariables) + { + $this->container['bodyVariables'] = $bodyVariables; + + return $this; + } + + /** + * Gets buttonType + * + * @return string + */ + public function getButtonType() + { + return $this->container['buttonType']; + } + + /** + * Sets buttonType + * + * @param string $buttonType buttonType + * + * @return $this + */ + public function setButtonType($buttonType) + { + $this->container['buttonType'] = $buttonType; + + return $this; + } + + /** + * Gets hideFooter + * + * @return bool + */ + public function getHideFooter() + { + return $this->container['hideFooter']; + } + + /** + * Sets hideFooter + * + * @param bool $hideFooter hideFooter + * + * @return $this + */ + public function setHideFooter($hideFooter) + { + $this->container['hideFooter'] = $hideFooter; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/test/Api/EcommerceApiTest.php b/test/Api/EcommerceApiTest.php index f6e1406..497d53a 100644 --- a/test/Api/EcommerceApiTest.php +++ b/test/Api/EcommerceApiTest.php @@ -74,7 +74,7 @@ public static function tearDownAfterClass() /** * Test case for createBatchOrder * - * Maintains a batch of orders. + * Create orders in batch. * */ public function testCreateBatchOrder() @@ -84,7 +84,7 @@ public function testCreateBatchOrder() /** * Test case for createOrder * - * Maintains every transactional status of the order. + * Managing the status of the order. * */ public function testCreateOrder() @@ -94,7 +94,7 @@ public function testCreateOrder() /** * Test case for createUpdateBatchCategory * - * Create the categories in a batch. + * Create categories in batch. * */ public function testCreateUpdateBatchCategory() @@ -104,7 +104,7 @@ public function testCreateUpdateBatchCategory() /** * Test case for createUpdateBatchProducts * - * Creates the products in a batch. + * Create products in batch. * */ public function testCreateUpdateBatchProducts() @@ -134,7 +134,7 @@ public function testCreateUpdateProduct() /** * Test case for ecommerceActivatePost * - * **Fulfills the eCommerce pre-requisites**. + * Activate the eCommerce app. * */ public function testEcommerceActivatePost() diff --git a/test/Api/MasterAccountApiTest.php b/test/Api/MasterAccountApiTest.php index 18ebd4a..6b425f5 100644 --- a/test/Api/MasterAccountApiTest.php +++ b/test/Api/MasterAccountApiTest.php @@ -121,6 +121,16 @@ public function testCorporateSubAccountIdPlanPut() { } + /** + * Test case for corporateSubAccountKeyPost + * + * Create an API key for a sub-account. + * + */ + public function testCorporateSubAccountKeyPost() + { + } + /** * Test case for corporateSubAccountPost * diff --git a/test/Api/TransactionalWhatsAppApiTest.php b/test/Api/TransactionalWhatsAppApiTest.php new file mode 100644 index 0000000..84c5d99 --- /dev/null +++ b/test/Api/TransactionalWhatsAppApiTest.php @@ -0,0 +1,93 @@ +