diff --git a/README.md b/README.md
index 487ddaa..91df070 100644
--- a/README.md
+++ b/README.md
@@ -151,15 +151,12 @@ Class | Method | HTTP request | Description
- [SalesforceMarketingCloud.AssetType](docs/AssetType.md)
- [SalesforceMarketingCloud.Attributes](docs/Attributes.md)
- [SalesforceMarketingCloud.Campaign](docs/Campaign.md)
- - [SalesforceMarketingCloud.CreateEmailDefinitionContent](docs/CreateEmailDefinitionContent.md)
- - [SalesforceMarketingCloud.CreateEmailDefinitionOptionsRequest](docs/CreateEmailDefinitionOptionsRequest.md)
- - [SalesforceMarketingCloud.CreateEmailDefinitionRequest](docs/CreateEmailDefinitionRequest.md)
- - [SalesforceMarketingCloud.CreateEmailDefinitionSubscriptions](docs/CreateEmailDefinitionSubscriptions.md)
- - [SalesforceMarketingCloud.CreateSmsDefinitionContent](docs/CreateSmsDefinitionContent.md)
- - [SalesforceMarketingCloud.CreateSmsDefinitionRequest](docs/CreateSmsDefinitionRequest.md)
- - [SalesforceMarketingCloud.CreateSmsDefinitionSubscriptions](docs/CreateSmsDefinitionSubscriptions.md)
- [SalesforceMarketingCloud.DeleteQueuedMessagesForSendDefinitionResponse](docs/DeleteQueuedMessagesForSendDefinitionResponse.md)
- [SalesforceMarketingCloud.DeleteSendDefinitionResponse](docs/DeleteSendDefinitionResponse.md)
+ - [SalesforceMarketingCloud.EmailDefinition](docs/EmailDefinition.md)
+ - [SalesforceMarketingCloud.EmailDefinitionContent](docs/EmailDefinitionContent.md)
+ - [SalesforceMarketingCloud.EmailDefinitionOptions](docs/EmailDefinitionOptions.md)
+ - [SalesforceMarketingCloud.EmailDefinitionSubscriptions](docs/EmailDefinitionSubscriptions.md)
- [SalesforceMarketingCloud.GetDefinitionSendStatusForRecipientResponse](docs/GetDefinitionSendStatusForRecipientResponse.md)
- [SalesforceMarketingCloud.GetDefinitionSendStatusForRecipientResponseInfo](docs/GetDefinitionSendStatusForRecipientResponseInfo.md)
- [SalesforceMarketingCloud.GetDefinitionsNotSentToRecipientsMessage](docs/GetDefinitionsNotSentToRecipientsMessage.md)
@@ -179,5 +176,8 @@ Class | Method | HTTP request | Description
- [SalesforceMarketingCloud.SendSmsToMultipleRecipientsSubscriptionsRequest](docs/SendSmsToMultipleRecipientsSubscriptionsRequest.md)
- [SalesforceMarketingCloud.SendSmsToSingleRecipientRequest](docs/SendSmsToSingleRecipientRequest.md)
- [SalesforceMarketingCloud.SharingProperties](docs/SharingProperties.md)
+ - [SalesforceMarketingCloud.SmsDefinition](docs/SmsDefinition.md)
+ - [SalesforceMarketingCloud.SmsDefinitionContent](docs/SmsDefinitionContent.md)
+ - [SalesforceMarketingCloud.SmsDefinitionSubscriptions](docs/SmsDefinitionSubscriptions.md)
- [SalesforceMarketingCloud.UpdateEmailDefinitionRequest](docs/UpdateEmailDefinitionRequest.md)
- [SalesforceMarketingCloud.UpdateSmsDefinitionRequest](docs/UpdateSmsDefinitionRequest.md)
diff --git a/docs/EmailDefinition.md b/docs/EmailDefinition.md
new file mode 100644
index 0000000..ad175b0
--- /dev/null
+++ b/docs/EmailDefinition.md
@@ -0,0 +1,19 @@
+# SalesforceMarketingCloud.EmailDefinition
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**requestId** | **String** | The ID of the request | [optional]
+**name** | **String** | Name of the definition. Must be unique. |
+**definitionKey** | **String** | Unique, user-generated key to access the definition object. |
+**definitionId** | **String** | Definition Id | [optional]
+**description** | **String** | User-provided description of the email definition. | [optional]
+**classification** | **String** | Marketing Cloud external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional. | [optional]
+**status** | **String** | Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days. | [optional]
+**createdDate** | **Date** | The date the object was created. | [optional]
+**modifiedDate** | **Date** | The date the object was modified. | [optional]
+**content** | [**EmailDefinitionContent**](EmailDefinitionContent.md) | |
+**subscriptions** | [**EmailDefinitionSubscriptions**](EmailDefinitionSubscriptions.md) | |
+**options** | [**EmailDefinitionOptions**](EmailDefinitionOptions.md) | | [optional]
+
+
diff --git a/docs/EmailDefinitionContent.md b/docs/EmailDefinitionContent.md
new file mode 100644
index 0000000..b35006e
--- /dev/null
+++ b/docs/EmailDefinitionContent.md
@@ -0,0 +1,8 @@
+# SalesforceMarketingCloud.EmailDefinitionContent
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**customerKey** | **String** | Unique identifier of the content asset. |
+
+
diff --git a/docs/EmailDefinitionOptions.md b/docs/EmailDefinitionOptions.md
new file mode 100644
index 0000000..1bb1e33
--- /dev/null
+++ b/docs/EmailDefinitionOptions.md
@@ -0,0 +1,8 @@
+# SalesforceMarketingCloud.EmailDefinitionOptions
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**trackLinks** | **Boolean** | Wraps links for tracking and reporting. Default is true. | [optional]
+
+
diff --git a/docs/EmailDefinitionSubscriptions.md b/docs/EmailDefinitionSubscriptions.md
new file mode 100644
index 0000000..21561e8
--- /dev/null
+++ b/docs/EmailDefinitionSubscriptions.md
@@ -0,0 +1,11 @@
+# SalesforceMarketingCloud.EmailDefinitionSubscriptions
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**list** | **String** | Marketing Cloud external key of the list or all subscribers. Contains the subscriber keys and profile attributes. |
+**dataExtension** | **String** | Marketing Cloud external key of the triggered send data extension. Each request inserts as a new row in the data extension. | [optional]
+**autoAddSubscriber** | **Boolean** | Adds the recipient’s email address and contact key as a subscriber key to subscriptions.list. Default is true. | [optional] [default to true]
+**updateSubscriber** | **Boolean** | Updates the recipient’s contact key as a subscriber key with the provided email address and profile attributes to subscriptions.list. Default is true. | [optional]
+
+
diff --git a/docs/GetEmailDefinitionsResponse.md b/docs/GetEmailDefinitionsResponse.md
index b6616e3..78962fc 100644
--- a/docs/GetEmailDefinitionsResponse.md
+++ b/docs/GetEmailDefinitionsResponse.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**requestId** | **String** | The ID of the request | [optional]
-**definitions** | [**[CreateEmailDefinitionRequest]**](CreateEmailDefinitionRequest.md) | | [optional]
+**definitions** | [**[EmailDefinition]**](EmailDefinition.md) | | [optional]
**count** | **Number** | Number of pages | [optional]
**page** | **Number** | Page number to return. | [optional]
**pageSize** | **Number** | Number of definitions, which are array elements, to return per paged response. | [optional]
diff --git a/docs/GetSmsDefinitionsResponse.md b/docs/GetSmsDefinitionsResponse.md
index 721dbe7..c167f03 100644
--- a/docs/GetSmsDefinitionsResponse.md
+++ b/docs/GetSmsDefinitionsResponse.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**requestId** | **String** | The ID of the request | [optional]
-**definitions** | [**[CreateSmsDefinitionRequest]**](CreateSmsDefinitionRequest.md) | | [optional]
+**definitions** | [**[SmsDefinition]**](SmsDefinition.md) | | [optional]
**count** | **Number** | Number of pages | [optional]
**page** | **Number** | Page number to return. | [optional]
**pageSize** | **Number** | Number of definitions, which are array elements, to return per paged response. | [optional]
diff --git a/docs/SmsDefinition.md b/docs/SmsDefinition.md
new file mode 100644
index 0000000..1cb974b
--- /dev/null
+++ b/docs/SmsDefinition.md
@@ -0,0 +1,16 @@
+# SalesforceMarketingCloud.SmsDefinition
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**definitionKey** | **String** | Unique, user-generated key to access the definition object. |
+**name** | **String** | Name of the definition. Must be unique. |
+**content** | [**SmsDefinitionContent**](SmsDefinitionContent.md) | |
+**status** | **String** | Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days. | [optional]
+**createdDate** | **Date** | The date the object was created. | [optional]
+**modifiedDate** | **Date** | The date the object was modified. | [optional]
+**description** | **String** | User-provided description of the SMS definition. | [optional]
+**subscriptions** | [**SmsDefinitionSubscriptions**](SmsDefinitionSubscriptions.md) | |
+**requestId** | **String** | The ID of the request | [optional]
+
+
diff --git a/docs/SmsDefinitionContent.md b/docs/SmsDefinitionContent.md
new file mode 100644
index 0000000..8e60085
--- /dev/null
+++ b/docs/SmsDefinitionContent.md
@@ -0,0 +1,8 @@
+# SalesforceMarketingCloud.SmsDefinitionContent
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **String** | The message content that you want sent with each message. Use substitution strings and AMPscript to personalize the message. |
+
+
diff --git a/docs/SmsDefinitionSubscriptions.md b/docs/SmsDefinitionSubscriptions.md
new file mode 100644
index 0000000..8bbcd7b
--- /dev/null
+++ b/docs/SmsDefinitionSubscriptions.md
@@ -0,0 +1,11 @@
+# SalesforceMarketingCloud.SmsDefinitionSubscriptions
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**shortCode** | **String** | The short code for the mobile transmissions for each message on this definition. |
+**countryCode** | **String** | The country code associated with the shortCode for the mobile transmissions for each message on this definition. |
+**keyword** | **String** | The keyword used to track messages. | [optional]
+**autoAddSubscriber** | **Boolean** | Permits adding a recipient as subscriber against the shortCode using contactKey. When false, the message is rejected if contactKey does not exist as a subscriber. Default is true. | [optional] [default to true]
+
+
diff --git a/docs/TransactionalMessagingApi.md b/docs/TransactionalMessagingApi.md
index c0b36c2..66d356a 100644
--- a/docs/TransactionalMessagingApi.md
+++ b/docs/TransactionalMessagingApi.md
@@ -30,7 +30,7 @@ Method | HTTP request | Description
# **createEmailDefinition**
-> CreateEmailDefinitionRequest createEmailDefinition(body)
+> EmailDefinition createEmailDefinition(body)
createEmailDefinition
@@ -42,7 +42,7 @@ const SalesforceMarketingCloud = require ('SalesforceMarketingCloud');
let apiInstance = new SalesforceMarketingCloud.TransactionalMessagingApi();
-let body = new SalesforceMarketingCloud.CreateEmailDefinitionRequest(); // CreateEmailDefinitionRequest | JSON Parameters
+let body = new SalesforceMarketingCloud.EmailDefinition(); // EmailDefinition | JSON Parameters
apiInstance.createEmailDefinition(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
@@ -56,11 +56,11 @@ apiInstance.createEmailDefinition(body).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CreateEmailDefinitionRequest**](CreateEmailDefinitionRequest.md)| JSON Parameters |
+ **body** | [**EmailDefinition**](EmailDefinition.md)| JSON Parameters |
### Return type
-[**CreateEmailDefinitionRequest**](CreateEmailDefinitionRequest.md)
+[**EmailDefinition**](EmailDefinition.md)
### Authorization
@@ -73,7 +73,7 @@ No authorization required
# **createSmsDefinition**
-> CreateSmsDefinitionRequest createSmsDefinition(body)
+> SmsDefinition createSmsDefinition(body)
createSmsDefinition
@@ -85,7 +85,7 @@ const SalesforceMarketingCloud = require ('SalesforceMarketingCloud');
let apiInstance = new SalesforceMarketingCloud.TransactionalMessagingApi();
-let body = new SalesforceMarketingCloud.CreateSmsDefinitionRequest(); // CreateSmsDefinitionRequest | JSON Parameters
+let body = new SalesforceMarketingCloud.SmsDefinition(); // SmsDefinition | JSON Parameters
apiInstance.createSmsDefinition(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
@@ -99,11 +99,11 @@ apiInstance.createSmsDefinition(body).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**CreateSmsDefinitionRequest**](CreateSmsDefinitionRequest.md)| JSON Parameters |
+ **body** | [**SmsDefinition**](SmsDefinition.md)| JSON Parameters |
### Return type
-[**CreateSmsDefinitionRequest**](CreateSmsDefinitionRequest.md)
+[**SmsDefinition**](SmsDefinition.md)
### Authorization
@@ -288,7 +288,7 @@ No authorization required
# **getEmailDefinition**
-> CreateEmailDefinitionRequest getEmailDefinition(definitionKey)
+> EmailDefinition getEmailDefinition(definitionKey)
getEmailDefinition
@@ -318,7 +318,7 @@ Name | Type | Description | Notes
### Return type
-[**CreateEmailDefinitionRequest**](CreateEmailDefinitionRequest.md)
+[**EmailDefinition**](EmailDefinition.md)
### Authorization
@@ -608,7 +608,7 @@ No authorization required
# **getSmsDefinition**
-> CreateSmsDefinitionRequest getSmsDefinition(definitionKey)
+> SmsDefinition getSmsDefinition(definitionKey)
getSmsDefinition
@@ -638,7 +638,7 @@ Name | Type | Description | Notes
### Return type
-[**CreateSmsDefinitionRequest**](CreateSmsDefinitionRequest.md)
+[**SmsDefinition**](SmsDefinition.md)
### Authorization
@@ -744,7 +744,7 @@ No authorization required
# **partiallyUpdateEmailDefinition**
-> CreateEmailDefinitionRequest partiallyUpdateEmailDefinition(definitionKey, body)
+> EmailDefinition partiallyUpdateEmailDefinition(definitionKey, body)
partiallyUpdateEmailDefinition
@@ -777,7 +777,7 @@ Name | Type | Description | Notes
### Return type
-[**CreateEmailDefinitionRequest**](CreateEmailDefinitionRequest.md)
+[**EmailDefinition**](EmailDefinition.md)
### Authorization
@@ -790,7 +790,7 @@ No authorization required
# **partiallyUpdateSmsDefinition**
-> CreateSmsDefinitionRequest partiallyUpdateSmsDefinition(definitionKey, body)
+> SmsDefinition partiallyUpdateSmsDefinition(definitionKey, body)
partiallyUpdateSmsDefinition
@@ -823,7 +823,7 @@ Name | Type | Description | Notes
### Return type
-[**CreateSmsDefinitionRequest**](CreateSmsDefinitionRequest.md)
+[**SmsDefinition**](SmsDefinition.md)
### Authorization
diff --git a/docs/UpdateEmailDefinitionRequest.md b/docs/UpdateEmailDefinitionRequest.md
index 185dd11..3b46179 100644
--- a/docs/UpdateEmailDefinitionRequest.md
+++ b/docs/UpdateEmailDefinitionRequest.md
@@ -4,11 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Name of the definition. Must be unique. | [optional]
-**content** | [**CreateEmailDefinitionContent**](CreateEmailDefinitionContent.md) | | [optional]
+**content** | [**EmailDefinitionContent**](EmailDefinitionContent.md) | | [optional]
**status** | **String** | Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days. | [optional]
**description** | **String** | User-provided description of the email definition. | [optional]
**classification** | **String** | Marketing Cloud external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional. | [optional]
-**subscriptions** | [**CreateEmailDefinitionSubscriptions**](CreateEmailDefinitionSubscriptions.md) | | [optional]
-**options** | [**CreateEmailDefinitionOptionsRequest**](CreateEmailDefinitionOptionsRequest.md) | | [optional]
+**subscriptions** | [**EmailDefinitionSubscriptions**](EmailDefinitionSubscriptions.md) | | [optional]
+**options** | [**EmailDefinitionOptions**](EmailDefinitionOptions.md) | | [optional]
diff --git a/docs/UpdateSmsDefinitionRequest.md b/docs/UpdateSmsDefinitionRequest.md
index 0502e06..62dd522 100644
--- a/docs/UpdateSmsDefinitionRequest.md
+++ b/docs/UpdateSmsDefinitionRequest.md
@@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Name of the definition. Must be unique. | [optional]
-**content** | [**CreateSmsDefinitionContent**](CreateSmsDefinitionContent.md) | | [optional]
+**content** | [**SmsDefinitionContent**](SmsDefinitionContent.md) | | [optional]
**status** | **String** | Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days. | [optional]
**description** | **String** | User-provided description of the SMS definition. | [optional]
-**subscriptions** | [**CreateSmsDefinitionSubscriptions**](CreateSmsDefinitionSubscriptions.md) | | [optional]
+**subscriptions** | [**SmsDefinitionSubscriptions**](SmsDefinitionSubscriptions.md) | | [optional]
diff --git a/src/Api/TransactionalMessagingApi.js b/src/Api/TransactionalMessagingApi.js
index d69035d..01a4f32 100644
--- a/src/Api/TransactionalMessagingApi.js
+++ b/src/Api/TransactionalMessagingApi.js
@@ -13,10 +13,9 @@
const ApiError = require ('../Model/ApiError');
-const CreateEmailDefinitionRequest = require ('../Model/CreateEmailDefinitionRequest');
-const CreateSmsDefinitionRequest = require ('../Model/CreateSmsDefinitionRequest');
const DeleteQueuedMessagesForSendDefinitionResponse = require ('../Model/DeleteQueuedMessagesForSendDefinitionResponse');
const DeleteSendDefinitionResponse = require ('../Model/DeleteSendDefinitionResponse');
+const EmailDefinition = require ('../Model/EmailDefinition');
const GetDefinitionSendStatusForRecipientResponse = require ('../Model/GetDefinitionSendStatusForRecipientResponse');
const GetDefinitionsNotSentToRecipientsResponse = require ('../Model/GetDefinitionsNotSentToRecipientsResponse');
const GetEmailDefinitionsResponse = require ('../Model/GetEmailDefinitionsResponse');
@@ -28,6 +27,7 @@ const SendEmailToMultipleRecipientsRequest = require ('../Model/SendEmailToMulti
const SendEmailToSingleRecipientRequest = require ('../Model/SendEmailToSingleRecipientRequest');
const SendSmsToMultipleRecipientsRequest = require ('../Model/SendSmsToMultipleRecipientsRequest');
const SendSmsToSingleRecipientRequest = require ('../Model/SendSmsToSingleRecipientRequest');
+const SmsDefinition = require ('../Model/SmsDefinition');
const UpdateEmailDefinitionRequest = require ('../Model/UpdateEmailDefinitionRequest');
const UpdateSmsDefinitionRequest = require ('../Model/UpdateSmsDefinitionRequest');
const BaseApi = require('./BaseApi');
@@ -55,8 +55,8 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
/**
* createEmailDefinition
* Creates the definition for an email.
- * @param {module:Model/CreateEmailDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateEmailDefinitionRequest} and HTTP response
+ * @param {module:Model/EmailDefinition} body JSON Parameters
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/EmailDefinition} and HTTP response
*/
createEmailDefinitionWithHttpInfo(caller, body) {
let postBody = body;
@@ -91,8 +91,8 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
/**
* createEmailDefinition
* Creates the definition for an email.
- * @param {module:Model/CreateEmailDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateEmailDefinitionRequest}
+ * @param {module:Model/EmailDefinition} body JSON Parameters
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/EmailDefinition}
*/
createEmailDefinition(body) {
return this.createEmailDefinitionWithHttpInfo('createEmailDefinition', body)
@@ -105,8 +105,8 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
/**
* createSmsDefinition
* Creates the definition for an SMS.
- * @param {module:Model/CreateSmsDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateSmsDefinitionRequest} and HTTP response
+ * @param {module:Model/SmsDefinition} body JSON Parameters
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/SmsDefinition} and HTTP response
*/
createSmsDefinitionWithHttpInfo(caller, body) {
let postBody = body;
@@ -141,8 +141,8 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
/**
* createSmsDefinition
* Creates the definition for an SMS.
- * @param {module:Model/CreateSmsDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateSmsDefinitionRequest}
+ * @param {module:Model/SmsDefinition} body JSON Parameters
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/SmsDefinition}
*/
createSmsDefinition(body) {
return this.createSmsDefinitionWithHttpInfo('createSmsDefinition', body)
@@ -360,7 +360,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* getEmailDefinition
* Gets email definition configuration details for a definition key.
* @param {String} definitionKey Unique identifier of the definition to get
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateEmailDefinitionRequest} and HTTP response
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/EmailDefinition} and HTTP response
*/
getEmailDefinitionWithHttpInfo(caller, definitionKey) {
let postBody = null;
@@ -397,7 +397,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* getEmailDefinition
* Gets email definition configuration details for a definition key.
* @param {String} definitionKey Unique identifier of the definition to get
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateEmailDefinitionRequest}
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/EmailDefinition}
*/
getEmailDefinition(definitionKey) {
return this.getEmailDefinitionWithHttpInfo('getEmailDefinition', definitionKey)
@@ -742,7 +742,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* getSmsDefinition
* Gets SMS definition configuration details for a definition key.
* @param {String} definitionKey Unique identifier of the definition to get
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateSmsDefinitionRequest} and HTTP response
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/SmsDefinition} and HTTP response
*/
getSmsDefinitionWithHttpInfo(caller, definitionKey) {
let postBody = null;
@@ -779,7 +779,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* getSmsDefinition
* Gets SMS definition configuration details for a definition key.
* @param {String} definitionKey Unique identifier of the definition to get
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateSmsDefinitionRequest}
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/SmsDefinition}
*/
getSmsDefinition(definitionKey) {
return this.getSmsDefinitionWithHttpInfo('getSmsDefinition', definitionKey)
@@ -903,7 +903,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* Updates a specific email definition.
* @param {String} definitionKey Unique identifier of the definition.
* @param {module:Model/UpdateEmailDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateEmailDefinitionRequest} and HTTP response
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/EmailDefinition} and HTTP response
*/
partiallyUpdateEmailDefinitionWithHttpInfo(caller, definitionKey, body) {
let postBody = body;
@@ -946,7 +946,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* Updates a specific email definition.
* @param {String} definitionKey Unique identifier of the definition.
* @param {module:Model/UpdateEmailDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateEmailDefinitionRequest}
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/EmailDefinition}
*/
partiallyUpdateEmailDefinition(definitionKey, body) {
return this.partiallyUpdateEmailDefinitionWithHttpInfo('partiallyUpdateEmailDefinition', definitionKey, body)
@@ -961,7 +961,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* Updates a specific SMS definition.
* @param {String} definitionKey Unique identifier of the definition.
* @param {module:Model/UpdateSmsDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/CreateSmsDefinitionRequest} and HTTP response
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:Model/SmsDefinition} and HTTP response
*/
partiallyUpdateSmsDefinitionWithHttpInfo(caller, definitionKey, body) {
let postBody = body;
@@ -1004,7 +1004,7 @@ module.exports = class TransactionalMessagingApi extends BaseApi {
* Updates a specific SMS definition.
* @param {String} definitionKey Unique identifier of the definition.
* @param {module:Model/UpdateSmsDefinitionRequest} body JSON Parameters
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/CreateSmsDefinitionRequest}
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:Model/SmsDefinition}
*/
partiallyUpdateSmsDefinition(definitionKey, body) {
return this.partiallyUpdateSmsDefinitionWithHttpInfo('partiallyUpdateSmsDefinition', definitionKey, body)
diff --git a/src/Model/EmailDefinition.js b/src/Model/EmailDefinition.js
new file mode 100644
index 0000000..056a112
--- /dev/null
+++ b/src/Model/EmailDefinition.js
@@ -0,0 +1,200 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+const EmailDefinitionContent = require ('./EmailDefinitionContent');
+const EmailDefinitionOptions = require ('./EmailDefinitionOptions');
+const EmailDefinitionSubscriptions = require ('./EmailDefinitionSubscriptions');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The EmailDefinition model module.
+* @module Model/EmailDefinition
+* @version 1.0.0
+*/
+module.exports = class EmailDefinition{
+ /**
+ * Constructs a new EmailDefinition
.
+ * @alias module:Model/EmailDefinition
+ * @class
+ * @param name {String} Name of the definition. Must be unique.
+ * @param definitionKey {String} Unique, user-generated key to access the definition object.
+ * @param content {module:Model/EmailDefinitionContent}
+ * @param subscriptions {module:Model/EmailDefinitionSubscriptions}
+ */
+
+ constructor(name, definitionKey, content, subscriptions) {
+
+
+ // verify the required parameter 'name' is set
+ if(name === undefined || name === null){
+ throw new InvalidModelException('"name" is a required property for EmailDefinition and cannot be undefined or null');
+ }
+ this['name'] = name;
+
+ // verify the required parameter 'definitionKey' is set
+ if(definitionKey === undefined || definitionKey === null){
+ throw new InvalidModelException('"definitionKey" is a required property for EmailDefinition and cannot be undefined or null');
+ }
+ this['definitionKey'] = definitionKey;
+
+
+
+
+
+
+
+ // verify the required parameter 'content' is set
+ if(content === undefined || content === null){
+ throw new InvalidModelException('"content" is a required property for EmailDefinition and cannot be undefined or null');
+ }
+ this['content'] = content;
+
+ // verify the required parameter 'subscriptions' is set
+ if(subscriptions === undefined || subscriptions === null){
+ throw new InvalidModelException('"subscriptions" is a required property for EmailDefinition and cannot be undefined or null');
+ }
+ this['subscriptions'] = subscriptions;
+
+
+ }
+
+ /**
+ * Constructs a EmailDefinition
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/EmailDefinition} obj Optional instance to populate.
+ * @return {module:Model/EmailDefinition} The populated EmailDefinition
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EmailDefinition();
+
+
+
+
+
+ if (data.hasOwnProperty('requestId')) {
+ obj['requestId'] = ApiClient.convertToType(data['requestId'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('definitionKey')) {
+ obj['definitionKey'] = ApiClient.convertToType(data['definitionKey'], 'String');
+ }
+ if (data.hasOwnProperty('definitionId')) {
+ obj['definitionId'] = ApiClient.convertToType(data['definitionId'], 'String');
+ }
+ if (data.hasOwnProperty('description')) {
+ obj['description'] = ApiClient.convertToType(data['description'], 'String');
+ }
+ if (data.hasOwnProperty('classification')) {
+ obj['classification'] = ApiClient.convertToType(data['classification'], 'String');
+ }
+ if (data.hasOwnProperty('status')) {
+ obj['status'] = ApiClient.convertToType(data['status'], 'String');
+ }
+ if (data.hasOwnProperty('createdDate')) {
+ obj['createdDate'] = ApiClient.convertToType(data['createdDate'], 'Date');
+ }
+ if (data.hasOwnProperty('modifiedDate')) {
+ obj['modifiedDate'] = ApiClient.convertToType(data['modifiedDate'], 'Date');
+ }
+ if (data.hasOwnProperty('content')) {
+ obj['content'] = EmailDefinitionContent.constructFromObject(data['content']);
+ }
+ if (data.hasOwnProperty('subscriptions')) {
+ obj['subscriptions'] = EmailDefinitionSubscriptions.constructFromObject(data['subscriptions']);
+ }
+ if (data.hasOwnProperty('options')) {
+ obj['options'] = EmailDefinitionOptions.constructFromObject(data['options']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * The ID of the request
+ * @member {String} requestId
+ */
+ requestId = undefined;
+ /**
+ * Name of the definition. Must be unique.
+ * @member {String} name
+ */
+ name = undefined;
+ /**
+ * Unique, user-generated key to access the definition object.
+ * @member {String} definitionKey
+ */
+ definitionKey = undefined;
+ /**
+ * Definition Id
+ * @member {String} definitionId
+ */
+ definitionId = undefined;
+ /**
+ * User-provided description of the email definition.
+ * @member {String} description
+ */
+ description = undefined;
+ /**
+ * Marketing Cloud external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional.
+ * @member {String} classification
+ */
+ classification = undefined;
+ /**
+ * Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.
+ * @member {String} status
+ */
+ status = undefined;
+ /**
+ * The date the object was created.
+ * @member {Date} createdDate
+ */
+ createdDate = undefined;
+ /**
+ * The date the object was modified.
+ * @member {Date} modifiedDate
+ */
+ modifiedDate = undefined;
+ /**
+ * @member {module:Model/EmailDefinitionContent} content
+ */
+ content = undefined;
+ /**
+ * @member {module:Model/EmailDefinitionSubscriptions} subscriptions
+ */
+ subscriptions = undefined;
+ /**
+ * @member {module:Model/EmailDefinitionOptions} options
+ */
+ options = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/EmailDefinitionContent.js b/src/Model/EmailDefinitionContent.js
new file mode 100644
index 0000000..1f1dd36
--- /dev/null
+++ b/src/Model/EmailDefinitionContent.js
@@ -0,0 +1,83 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The EmailDefinitionContent model module.
+* @module Model/EmailDefinitionContent
+* @version 1.0.0
+*/
+module.exports = class EmailDefinitionContent{
+ /**
+ * Constructs a new EmailDefinitionContent
.
+ * @alias module:Model/EmailDefinitionContent
+ * @class
+ * @param customerKey {String} Unique identifier of the content asset.
+ */
+
+ constructor(customerKey) {
+
+ // verify the required parameter 'customerKey' is set
+ if(customerKey === undefined || customerKey === null){
+ throw new InvalidModelException('"customerKey" is a required property for EmailDefinitionContent and cannot be undefined or null');
+ }
+ this['customerKey'] = customerKey;
+
+ }
+
+ /**
+ * Constructs a EmailDefinitionContent
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/EmailDefinitionContent} obj Optional instance to populate.
+ * @return {module:Model/EmailDefinitionContent} The populated EmailDefinitionContent
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EmailDefinitionContent();
+
+
+
+
+
+ if (data.hasOwnProperty('customerKey')) {
+ obj['customerKey'] = ApiClient.convertToType(data['customerKey'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Unique identifier of the content asset.
+ * @member {String} customerKey
+ */
+ customerKey = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/EmailDefinitionOptions.js b/src/Model/EmailDefinitionOptions.js
new file mode 100644
index 0000000..39d9f4a
--- /dev/null
+++ b/src/Model/EmailDefinitionOptions.js
@@ -0,0 +1,77 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The EmailDefinitionOptions model module.
+* @module Model/EmailDefinitionOptions
+* @version 1.0.0
+*/
+module.exports = class EmailDefinitionOptions{
+ /**
+ * Constructs a new EmailDefinitionOptions
.
+ * @alias module:Model/EmailDefinitionOptions
+ * @class
+ */
+
+ constructor() {
+
+
+ }
+
+ /**
+ * Constructs a EmailDefinitionOptions
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/EmailDefinitionOptions} obj Optional instance to populate.
+ * @return {module:Model/EmailDefinitionOptions} The populated EmailDefinitionOptions
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EmailDefinitionOptions();
+
+
+
+
+
+ if (data.hasOwnProperty('trackLinks')) {
+ obj['trackLinks'] = ApiClient.convertToType(data['trackLinks'], 'Boolean');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Wraps links for tracking and reporting. Default is true.
+ * @member {Boolean} trackLinks
+ */
+ trackLinks = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/EmailDefinitionSubscriptions.js b/src/Model/EmailDefinitionSubscriptions.js
new file mode 100644
index 0000000..c4848f1
--- /dev/null
+++ b/src/Model/EmailDefinitionSubscriptions.js
@@ -0,0 +1,111 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The EmailDefinitionSubscriptions model module.
+* @module Model/EmailDefinitionSubscriptions
+* @version 1.0.0
+*/
+module.exports = class EmailDefinitionSubscriptions{
+ /**
+ * Constructs a new EmailDefinitionSubscriptions
.
+ * @alias module:Model/EmailDefinitionSubscriptions
+ * @class
+ * @param list {String} Marketing Cloud external key of the list or all subscribers. Contains the subscriber keys and profile attributes.
+ */
+
+ constructor(list) {
+
+ // verify the required parameter 'list' is set
+ if(list === undefined || list === null){
+ throw new InvalidModelException('"list" is a required property for EmailDefinitionSubscriptions and cannot be undefined or null');
+ }
+ this['list'] = list;
+
+
+
+
+ }
+
+ /**
+ * Constructs a EmailDefinitionSubscriptions
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/EmailDefinitionSubscriptions} obj Optional instance to populate.
+ * @return {module:Model/EmailDefinitionSubscriptions} The populated EmailDefinitionSubscriptions
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new EmailDefinitionSubscriptions();
+
+
+
+
+
+ if (data.hasOwnProperty('list')) {
+ obj['list'] = ApiClient.convertToType(data['list'], 'String');
+ }
+ if (data.hasOwnProperty('dataExtension')) {
+ obj['dataExtension'] = ApiClient.convertToType(data['dataExtension'], 'String');
+ }
+ if (data.hasOwnProperty('autoAddSubscriber')) {
+ obj['autoAddSubscriber'] = ApiClient.convertToType(data['autoAddSubscriber'], 'Boolean');
+ }
+ if (data.hasOwnProperty('updateSubscriber')) {
+ obj['updateSubscriber'] = ApiClient.convertToType(data['updateSubscriber'], 'Boolean');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Marketing Cloud external key of the list or all subscribers. Contains the subscriber keys and profile attributes.
+ * @member {String} list
+ */
+ list = undefined;
+ /**
+ * Marketing Cloud external key of the triggered send data extension. Each request inserts as a new row in the data extension.
+ * @member {String} dataExtension
+ */
+ dataExtension = undefined;
+ /**
+ * Adds the recipient’s email address and contact key as a subscriber key to subscriptions.list. Default is true.
+ * @member {Boolean} autoAddSubscriber
+ * @default true
+ */
+ autoAddSubscriber = true;
+ /**
+ * Updates the recipient’s contact key as a subscriber key with the provided email address and profile attributes to subscriptions.list. Default is true.
+ * @member {Boolean} updateSubscriber
+ */
+ updateSubscriber = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/GetEmailDefinitionsResponse.js b/src/Model/GetEmailDefinitionsResponse.js
index 25f5f68..f54772e 100644
--- a/src/Model/GetEmailDefinitionsResponse.js
+++ b/src/Model/GetEmailDefinitionsResponse.js
@@ -13,7 +13,7 @@
const ApiClient = require ('../ApiClient');
-const CreateEmailDefinitionRequest = require ('./CreateEmailDefinitionRequest');
+const EmailDefinition = require ('./EmailDefinition');
@@ -61,7 +61,7 @@ module.exports = class GetEmailDefinitionsResponse{
obj['requestId'] = ApiClient.convertToType(data['requestId'], 'String');
}
if (data.hasOwnProperty('definitions')) {
- obj['definitions'] = ApiClient.convertToType(data['definitions'], [CreateEmailDefinitionRequest]);
+ obj['definitions'] = ApiClient.convertToType(data['definitions'], [EmailDefinition]);
}
if (data.hasOwnProperty('count')) {
obj['count'] = ApiClient.convertToType(data['count'], 'Number');
@@ -82,7 +82,7 @@ module.exports = class GetEmailDefinitionsResponse{
*/
requestId = undefined;
/**
- * @member {Array.} definitions
+ * @member {Array.} definitions
*/
definitions = undefined;
/**
diff --git a/src/Model/GetSmsDefinitionsResponse.js b/src/Model/GetSmsDefinitionsResponse.js
index fc9a36f..23958a6 100644
--- a/src/Model/GetSmsDefinitionsResponse.js
+++ b/src/Model/GetSmsDefinitionsResponse.js
@@ -13,7 +13,7 @@
const ApiClient = require ('../ApiClient');
-const CreateSmsDefinitionRequest = require ('./CreateSmsDefinitionRequest');
+const SmsDefinition = require ('./SmsDefinition');
@@ -61,7 +61,7 @@ module.exports = class GetSmsDefinitionsResponse{
obj['requestId'] = ApiClient.convertToType(data['requestId'], 'String');
}
if (data.hasOwnProperty('definitions')) {
- obj['definitions'] = ApiClient.convertToType(data['definitions'], [CreateSmsDefinitionRequest]);
+ obj['definitions'] = ApiClient.convertToType(data['definitions'], [SmsDefinition]);
}
if (data.hasOwnProperty('count')) {
obj['count'] = ApiClient.convertToType(data['count'], 'Number');
@@ -82,7 +82,7 @@ module.exports = class GetSmsDefinitionsResponse{
*/
requestId = undefined;
/**
- * @member {Array.} definitions
+ * @member {Array.} definitions
*/
definitions = undefined;
/**
diff --git a/src/Model/SmsDefinition.js b/src/Model/SmsDefinition.js
new file mode 100644
index 0000000..5254208
--- /dev/null
+++ b/src/Model/SmsDefinition.js
@@ -0,0 +1,173 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+const SmsDefinitionContent = require ('./SmsDefinitionContent');
+const SmsDefinitionSubscriptions = require ('./SmsDefinitionSubscriptions');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The SmsDefinition model module.
+* @module Model/SmsDefinition
+* @version 1.0.0
+*/
+module.exports = class SmsDefinition{
+ /**
+ * Constructs a new SmsDefinition
.
+ * @alias module:Model/SmsDefinition
+ * @class
+ * @param definitionKey {String} Unique, user-generated key to access the definition object.
+ * @param name {String} Name of the definition. Must be unique.
+ * @param content {module:Model/SmsDefinitionContent}
+ * @param subscriptions {module:Model/SmsDefinitionSubscriptions}
+ */
+
+ constructor(definitionKey, name, content, subscriptions) {
+
+ // verify the required parameter 'definitionKey' is set
+ if(definitionKey === undefined || definitionKey === null){
+ throw new InvalidModelException('"definitionKey" is a required property for SmsDefinition and cannot be undefined or null');
+ }
+ this['definitionKey'] = definitionKey;
+
+ // verify the required parameter 'name' is set
+ if(name === undefined || name === null){
+ throw new InvalidModelException('"name" is a required property for SmsDefinition and cannot be undefined or null');
+ }
+ this['name'] = name;
+
+ // verify the required parameter 'content' is set
+ if(content === undefined || content === null){
+ throw new InvalidModelException('"content" is a required property for SmsDefinition and cannot be undefined or null');
+ }
+ this['content'] = content;
+
+
+
+
+
+ // verify the required parameter 'subscriptions' is set
+ if(subscriptions === undefined || subscriptions === null){
+ throw new InvalidModelException('"subscriptions" is a required property for SmsDefinition and cannot be undefined or null');
+ }
+ this['subscriptions'] = subscriptions;
+
+
+ }
+
+ /**
+ * Constructs a SmsDefinition
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/SmsDefinition} obj Optional instance to populate.
+ * @return {module:Model/SmsDefinition} The populated SmsDefinition
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new SmsDefinition();
+
+
+
+
+
+ if (data.hasOwnProperty('definitionKey')) {
+ obj['definitionKey'] = ApiClient.convertToType(data['definitionKey'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('content')) {
+ obj['content'] = SmsDefinitionContent.constructFromObject(data['content']);
+ }
+ if (data.hasOwnProperty('status')) {
+ obj['status'] = ApiClient.convertToType(data['status'], 'String');
+ }
+ if (data.hasOwnProperty('createdDate')) {
+ obj['createdDate'] = ApiClient.convertToType(data['createdDate'], 'Date');
+ }
+ if (data.hasOwnProperty('modifiedDate')) {
+ obj['modifiedDate'] = ApiClient.convertToType(data['modifiedDate'], 'Date');
+ }
+ if (data.hasOwnProperty('description')) {
+ obj['description'] = ApiClient.convertToType(data['description'], 'String');
+ }
+ if (data.hasOwnProperty('subscriptions')) {
+ obj['subscriptions'] = SmsDefinitionSubscriptions.constructFromObject(data['subscriptions']);
+ }
+ if (data.hasOwnProperty('requestId')) {
+ obj['requestId'] = ApiClient.convertToType(data['requestId'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Unique, user-generated key to access the definition object.
+ * @member {String} definitionKey
+ */
+ definitionKey = undefined;
+ /**
+ * Name of the definition. Must be unique.
+ * @member {String} name
+ */
+ name = undefined;
+ /**
+ * @member {module:Model/SmsDefinitionContent} content
+ */
+ content = undefined;
+ /**
+ * Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.
+ * @member {String} status
+ */
+ status = undefined;
+ /**
+ * The date the object was created.
+ * @member {Date} createdDate
+ */
+ createdDate = undefined;
+ /**
+ * The date the object was modified.
+ * @member {Date} modifiedDate
+ */
+ modifiedDate = undefined;
+ /**
+ * User-provided description of the SMS definition.
+ * @member {String} description
+ */
+ description = undefined;
+ /**
+ * @member {module:Model/SmsDefinitionSubscriptions} subscriptions
+ */
+ subscriptions = undefined;
+ /**
+ * The ID of the request
+ * @member {String} requestId
+ */
+ requestId = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/SmsDefinitionContent.js b/src/Model/SmsDefinitionContent.js
new file mode 100644
index 0000000..69b0181
--- /dev/null
+++ b/src/Model/SmsDefinitionContent.js
@@ -0,0 +1,83 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The SmsDefinitionContent model module.
+* @module Model/SmsDefinitionContent
+* @version 1.0.0
+*/
+module.exports = class SmsDefinitionContent{
+ /**
+ * Constructs a new SmsDefinitionContent
.
+ * @alias module:Model/SmsDefinitionContent
+ * @class
+ * @param message {String} The message content that you want sent with each message. Use substitution strings and AMPscript to personalize the message.
+ */
+
+ constructor(message) {
+
+ // verify the required parameter 'message' is set
+ if(message === undefined || message === null){
+ throw new InvalidModelException('"message" is a required property for SmsDefinitionContent and cannot be undefined or null');
+ }
+ this['message'] = message;
+
+ }
+
+ /**
+ * Constructs a SmsDefinitionContent
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/SmsDefinitionContent} obj Optional instance to populate.
+ * @return {module:Model/SmsDefinitionContent} The populated SmsDefinitionContent
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new SmsDefinitionContent();
+
+
+
+
+
+ if (data.hasOwnProperty('message')) {
+ obj['message'] = ApiClient.convertToType(data['message'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * The message content that you want sent with each message. Use substitution strings and AMPscript to personalize the message.
+ * @member {String} message
+ */
+ message = undefined;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/SmsDefinitionSubscriptions.js b/src/Model/SmsDefinitionSubscriptions.js
new file mode 100644
index 0000000..090d374
--- /dev/null
+++ b/src/Model/SmsDefinitionSubscriptions.js
@@ -0,0 +1,117 @@
+/**
+ * Marketing Cloud REST API
+ * Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: mc_sdk@salesforce.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ */
+
+
+const ApiClient = require ('../ApiClient');
+
+
+
+
+
+const InvalidModelException = require('../Exception/InvalidModelException');
+
+/**
+* The SmsDefinitionSubscriptions model module.
+* @module Model/SmsDefinitionSubscriptions
+* @version 1.0.0
+*/
+module.exports = class SmsDefinitionSubscriptions{
+ /**
+ * Constructs a new SmsDefinitionSubscriptions
.
+ * @alias module:Model/SmsDefinitionSubscriptions
+ * @class
+ * @param shortCode {String} The short code for the mobile transmissions for each message on this definition.
+ * @param countryCode {String} The country code associated with the shortCode for the mobile transmissions for each message on this definition.
+ */
+
+ constructor(shortCode, countryCode) {
+
+ // verify the required parameter 'shortCode' is set
+ if(shortCode === undefined || shortCode === null){
+ throw new InvalidModelException('"shortCode" is a required property for SmsDefinitionSubscriptions and cannot be undefined or null');
+ }
+ this['shortCode'] = shortCode;
+
+ // verify the required parameter 'countryCode' is set
+ if(countryCode === undefined || countryCode === null){
+ throw new InvalidModelException('"countryCode" is a required property for SmsDefinitionSubscriptions and cannot be undefined or null');
+ }
+ this['countryCode'] = countryCode;
+
+
+
+ }
+
+ /**
+ * Constructs a SmsDefinitionSubscriptions
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:Model/SmsDefinitionSubscriptions} obj Optional instance to populate.
+ * @return {module:Model/SmsDefinitionSubscriptions} The populated SmsDefinitionSubscriptions
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new SmsDefinitionSubscriptions();
+
+
+
+
+
+ if (data.hasOwnProperty('shortCode')) {
+ obj['shortCode'] = ApiClient.convertToType(data['shortCode'], 'String');
+ }
+ if (data.hasOwnProperty('countryCode')) {
+ obj['countryCode'] = ApiClient.convertToType(data['countryCode'], 'String');
+ }
+ if (data.hasOwnProperty('keyword')) {
+ obj['keyword'] = ApiClient.convertToType(data['keyword'], 'String');
+ }
+ if (data.hasOwnProperty('autoAddSubscriber')) {
+ obj['autoAddSubscriber'] = ApiClient.convertToType(data['autoAddSubscriber'], 'Boolean');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * The short code for the mobile transmissions for each message on this definition.
+ * @member {String} shortCode
+ */
+ shortCode = undefined;
+ /**
+ * The country code associated with the shortCode for the mobile transmissions for each message on this definition.
+ * @member {String} countryCode
+ */
+ countryCode = undefined;
+ /**
+ * The keyword used to track messages.
+ * @member {String} keyword
+ */
+ keyword = undefined;
+ /**
+ * Permits adding a recipient as subscriber against the shortCode using contactKey. When false, the message is rejected if contactKey does not exist as a subscriber. Default is true.
+ * @member {Boolean} autoAddSubscriber
+ * @default true
+ */
+ autoAddSubscriber = true;
+
+
+
+
+
+
+
+
+}
+
+
diff --git a/src/Model/UpdateEmailDefinitionRequest.js b/src/Model/UpdateEmailDefinitionRequest.js
index 23b4d6d..f44741d 100644
--- a/src/Model/UpdateEmailDefinitionRequest.js
+++ b/src/Model/UpdateEmailDefinitionRequest.js
@@ -13,9 +13,9 @@
const ApiClient = require ('../ApiClient');
-const CreateEmailDefinitionContent = require ('./CreateEmailDefinitionContent');
-const CreateEmailDefinitionOptionsRequest = require ('./CreateEmailDefinitionOptionsRequest');
-const CreateEmailDefinitionSubscriptions = require ('./CreateEmailDefinitionSubscriptions');
+const EmailDefinitionContent = require ('./EmailDefinitionContent');
+const EmailDefinitionOptions = require ('./EmailDefinitionOptions');
+const EmailDefinitionSubscriptions = require ('./EmailDefinitionSubscriptions');
@@ -65,7 +65,7 @@ module.exports = class UpdateEmailDefinitionRequest{
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('content')) {
- obj['content'] = CreateEmailDefinitionContent.constructFromObject(data['content']);
+ obj['content'] = EmailDefinitionContent.constructFromObject(data['content']);
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
@@ -77,10 +77,10 @@ module.exports = class UpdateEmailDefinitionRequest{
obj['classification'] = ApiClient.convertToType(data['classification'], 'String');
}
if (data.hasOwnProperty('subscriptions')) {
- obj['subscriptions'] = CreateEmailDefinitionSubscriptions.constructFromObject(data['subscriptions']);
+ obj['subscriptions'] = EmailDefinitionSubscriptions.constructFromObject(data['subscriptions']);
}
if (data.hasOwnProperty('options')) {
- obj['options'] = CreateEmailDefinitionOptionsRequest.constructFromObject(data['options']);
+ obj['options'] = EmailDefinitionOptions.constructFromObject(data['options']);
}
}
return obj;
@@ -92,7 +92,7 @@ module.exports = class UpdateEmailDefinitionRequest{
*/
name = undefined;
/**
- * @member {module:Model/CreateEmailDefinitionContent} content
+ * @member {module:Model/EmailDefinitionContent} content
*/
content = undefined;
/**
@@ -111,11 +111,11 @@ module.exports = class UpdateEmailDefinitionRequest{
*/
classification = undefined;
/**
- * @member {module:Model/CreateEmailDefinitionSubscriptions} subscriptions
+ * @member {module:Model/EmailDefinitionSubscriptions} subscriptions
*/
subscriptions = undefined;
/**
- * @member {module:Model/CreateEmailDefinitionOptionsRequest} options
+ * @member {module:Model/EmailDefinitionOptions} options
*/
options = undefined;
diff --git a/src/Model/UpdateSmsDefinitionRequest.js b/src/Model/UpdateSmsDefinitionRequest.js
index 0499af2..f45950b 100644
--- a/src/Model/UpdateSmsDefinitionRequest.js
+++ b/src/Model/UpdateSmsDefinitionRequest.js
@@ -13,8 +13,8 @@
const ApiClient = require ('../ApiClient');
-const CreateSmsDefinitionContent = require ('./CreateSmsDefinitionContent');
-const CreateSmsDefinitionSubscriptions = require ('./CreateSmsDefinitionSubscriptions');
+const SmsDefinitionContent = require ('./SmsDefinitionContent');
+const SmsDefinitionSubscriptions = require ('./SmsDefinitionSubscriptions');
@@ -62,7 +62,7 @@ module.exports = class UpdateSmsDefinitionRequest{
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('content')) {
- obj['content'] = CreateSmsDefinitionContent.constructFromObject(data['content']);
+ obj['content'] = SmsDefinitionContent.constructFromObject(data['content']);
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
@@ -71,7 +71,7 @@ module.exports = class UpdateSmsDefinitionRequest{
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
if (data.hasOwnProperty('subscriptions')) {
- obj['subscriptions'] = CreateSmsDefinitionSubscriptions.constructFromObject(data['subscriptions']);
+ obj['subscriptions'] = SmsDefinitionSubscriptions.constructFromObject(data['subscriptions']);
}
}
return obj;
@@ -83,7 +83,7 @@ module.exports = class UpdateSmsDefinitionRequest{
*/
name = undefined;
/**
- * @member {module:Model/CreateSmsDefinitionContent} content
+ * @member {module:Model/SmsDefinitionContent} content
*/
content = undefined;
/**
@@ -97,7 +97,7 @@ module.exports = class UpdateSmsDefinitionRequest{
*/
description = undefined;
/**
- * @member {module:Model/CreateSmsDefinitionSubscriptions} subscriptions
+ * @member {module:Model/SmsDefinitionSubscriptions} subscriptions
*/
subscriptions = undefined;
diff --git a/src/index.js b/src/index.js
index 0deabb0..e0034f8 100644
--- a/src/index.js
+++ b/src/index.js
@@ -18,15 +18,12 @@ const Asset = require ('./Model/Asset');
const AssetType = require ('./Model/AssetType');
const Attributes = require ('./Model/Attributes');
const Campaign = require ('./Model/Campaign');
-const CreateEmailDefinitionContent = require ('./Model/CreateEmailDefinitionContent');
-const CreateEmailDefinitionOptionsRequest = require ('./Model/CreateEmailDefinitionOptionsRequest');
-const CreateEmailDefinitionRequest = require ('./Model/CreateEmailDefinitionRequest');
-const CreateEmailDefinitionSubscriptions = require ('./Model/CreateEmailDefinitionSubscriptions');
-const CreateSmsDefinitionContent = require ('./Model/CreateSmsDefinitionContent');
-const CreateSmsDefinitionRequest = require ('./Model/CreateSmsDefinitionRequest');
-const CreateSmsDefinitionSubscriptions = require ('./Model/CreateSmsDefinitionSubscriptions');
const DeleteQueuedMessagesForSendDefinitionResponse = require ('./Model/DeleteQueuedMessagesForSendDefinitionResponse');
const DeleteSendDefinitionResponse = require ('./Model/DeleteSendDefinitionResponse');
+const EmailDefinition = require ('./Model/EmailDefinition');
+const EmailDefinitionContent = require ('./Model/EmailDefinitionContent');
+const EmailDefinitionOptions = require ('./Model/EmailDefinitionOptions');
+const EmailDefinitionSubscriptions = require ('./Model/EmailDefinitionSubscriptions');
const GetDefinitionSendStatusForRecipientResponse = require ('./Model/GetDefinitionSendStatusForRecipientResponse');
const GetDefinitionSendStatusForRecipientResponseInfo = require ('./Model/GetDefinitionSendStatusForRecipientResponseInfo');
const GetDefinitionsNotSentToRecipientsMessage = require ('./Model/GetDefinitionsNotSentToRecipientsMessage');
@@ -46,6 +43,9 @@ const SendSmsToMultipleRecipientsRequest = require ('./Model/SendSmsToMultipleRe
const SendSmsToMultipleRecipientsSubscriptionsRequest = require ('./Model/SendSmsToMultipleRecipientsSubscriptionsRequest');
const SendSmsToSingleRecipientRequest = require ('./Model/SendSmsToSingleRecipientRequest');
const SharingProperties = require ('./Model/SharingProperties');
+const SmsDefinition = require ('./Model/SmsDefinition');
+const SmsDefinitionContent = require ('./Model/SmsDefinitionContent');
+const SmsDefinitionSubscriptions = require ('./Model/SmsDefinitionSubscriptions');
const UpdateEmailDefinitionRequest = require ('./Model/UpdateEmailDefinitionRequest');
const UpdateSmsDefinitionRequest = require ('./Model/UpdateSmsDefinitionRequest');
const AssetApi = require ('./Api/AssetApi');
@@ -122,58 +122,40 @@ module.exports={
Campaign,
/**
- * The CreateEmailDefinitionContent model constructor.
- * @property {module:Model/CreateEmailDefinitionContent}
- */
- CreateEmailDefinitionContent,
-
- /**
- * The CreateEmailDefinitionOptionsRequest model constructor.
- * @property {module:Model/CreateEmailDefinitionOptionsRequest}
- */
- CreateEmailDefinitionOptionsRequest,
-
- /**
- * The CreateEmailDefinitionRequest model constructor.
- * @property {module:Model/CreateEmailDefinitionRequest}
- */
- CreateEmailDefinitionRequest,
-
- /**
- * The CreateEmailDefinitionSubscriptions model constructor.
- * @property {module:Model/CreateEmailDefinitionSubscriptions}
+ * The DeleteQueuedMessagesForSendDefinitionResponse model constructor.
+ * @property {module:Model/DeleteQueuedMessagesForSendDefinitionResponse}
*/
- CreateEmailDefinitionSubscriptions,
+ DeleteQueuedMessagesForSendDefinitionResponse,
/**
- * The CreateSmsDefinitionContent model constructor.
- * @property {module:Model/CreateSmsDefinitionContent}
+ * The DeleteSendDefinitionResponse model constructor.
+ * @property {module:Model/DeleteSendDefinitionResponse}
*/
- CreateSmsDefinitionContent,
+ DeleteSendDefinitionResponse,
/**
- * The CreateSmsDefinitionRequest model constructor.
- * @property {module:Model/CreateSmsDefinitionRequest}
+ * The EmailDefinition model constructor.
+ * @property {module:Model/EmailDefinition}
*/
- CreateSmsDefinitionRequest,
+ EmailDefinition,
/**
- * The CreateSmsDefinitionSubscriptions model constructor.
- * @property {module:Model/CreateSmsDefinitionSubscriptions}
+ * The EmailDefinitionContent model constructor.
+ * @property {module:Model/EmailDefinitionContent}
*/
- CreateSmsDefinitionSubscriptions,
+ EmailDefinitionContent,
/**
- * The DeleteQueuedMessagesForSendDefinitionResponse model constructor.
- * @property {module:Model/DeleteQueuedMessagesForSendDefinitionResponse}
+ * The EmailDefinitionOptions model constructor.
+ * @property {module:Model/EmailDefinitionOptions}
*/
- DeleteQueuedMessagesForSendDefinitionResponse,
+ EmailDefinitionOptions,
/**
- * The DeleteSendDefinitionResponse model constructor.
- * @property {module:Model/DeleteSendDefinitionResponse}
+ * The EmailDefinitionSubscriptions model constructor.
+ * @property {module:Model/EmailDefinitionSubscriptions}
*/
- DeleteSendDefinitionResponse,
+ EmailDefinitionSubscriptions,
/**
* The GetDefinitionSendStatusForRecipientResponse model constructor.
@@ -289,6 +271,24 @@ module.exports={
*/
SharingProperties,
+ /**
+ * The SmsDefinition model constructor.
+ * @property {module:Model/SmsDefinition}
+ */
+ SmsDefinition,
+
+ /**
+ * The SmsDefinitionContent model constructor.
+ * @property {module:Model/SmsDefinitionContent}
+ */
+ SmsDefinitionContent,
+
+ /**
+ * The SmsDefinitionSubscriptions model constructor.
+ * @property {module:Model/SmsDefinitionSubscriptions}
+ */
+ SmsDefinitionSubscriptions,
+
/**
* The UpdateEmailDefinitionRequest model constructor.
* @property {module:Model/UpdateEmailDefinitionRequest}