Skip to content

Commit

Permalink
#732: revert not needed changes & refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Feb 13, 2023
1 parent 7c5a999 commit 7076a21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 2 additions & 3 deletions docs/dist/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3203,7 +3203,7 @@ Provides default functionality that can be overwritten by child metadata type cl
* [.document([metadata], [isDeploy])](#MetadataType.document) ⇒ <code>void</code>
* [.deleteByKey(customerKey)](#MetadataType.deleteByKey) ⇒ <code>boolean</code>
* [.postDeleteTasks(customerKey, [additionalExtensions])](#MetadataType.postDeleteTasks) ⇒ <code>Promise.&lt;void&gt;</code>
* [.deleteByKeySOAP(customerKey, [overrideType], [handleOutside])](#MetadataType.deleteByKeySOAP) ⇒ <code>boolean</code>
* [.deleteByKeySOAP(customerKey, [handleOutside])](#MetadataType.deleteByKeySOAP) ⇒ <code>boolean</code>
* [.deleteByKeyREST(url, key, [handleOutside])](#MetadataType.deleteByKeyREST) ⇒ <code>boolean</code>
* [.readBUMetadataForType(readDir, [listBadKeys], [buMetadata])](#MetadataType.readBUMetadataForType) ⇒ <code>object</code>
* [.getFilesToCommit(keyArr)](#MetadataType.getFilesToCommit) ⇒ <code>Promise.&lt;Array.&lt;string&gt;&gt;</code>
Expand Down Expand Up @@ -3865,7 +3865,7 @@ clean up after deleting a metadata item

<a name="MetadataType.deleteByKeySOAP"></a>

### MetadataType.deleteByKeySOAP(customerKey, [overrideType], [handleOutside]) ⇒ <code>boolean</code>
### MetadataType.deleteByKeySOAP(customerKey, [handleOutside]) ⇒ <code>boolean</code>
Delete a data extension from the specified business unit

**Kind**: static method of [<code>MetadataType</code>](#MetadataType)
Expand All @@ -3874,7 +3874,6 @@ Delete a data extension from the specified business unit
| Param | Type | Description |
| --- | --- | --- |
| customerKey | <code>string</code> | Identifier of metadata |
| [overrideType] | <code>string</code> | can be used if the API type differs from the otherwise used type identifier |
| [handleOutside] | <code>boolean</code> | if the API reponse is irregular this allows you to handle it outside of this generic method |

<a name="MetadataType.deleteByKeyREST"></a>
Expand Down
12 changes: 5 additions & 7 deletions lib/metadataTypes/MetadataType.js
Original file line number Diff line number Diff line change
Expand Up @@ -1615,18 +1615,16 @@ class MetadataType {
* Delete a data extension from the specified business unit
*
* @param {string} customerKey Identifier of metadata
* @param {string} [overrideType] can be used if the API type differs from the otherwise used type identifier
* @param {boolean} [handleOutside] if the API reponse is irregular this allows you to handle it outside of this generic method
* @returns {boolean} deletion success flag
*/
static async deleteByKeySOAP(customerKey, overrideType, handleOutside) {
const keyObj = {};
keyObj[this.definition.keyField] = customerKey;
static async deleteByKeySOAP(customerKey, handleOutside) {
const metadata = {};
metadata[this.definition.keyField] = customerKey;
try {
await this.client.soap.delete(
overrideType ||
this.definition.type.charAt(0).toUpperCase() + this.definition.type.slice(1),
keyObj,
this.definition.type.charAt(0).toUpperCase() + this.definition.type.slice(1),
metadata,
null
);
if (!handleOutside) {
Expand Down

0 comments on commit 7076a21

Please sign in to comment.