New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cdrator

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdrator - npm Package Compare versions

Comparing version 0.11.0 to 1.0.0

test/soap/subscribeProductOptions-request-with-params.xml

23

lib/soaper.js

@@ -57,7 +57,2 @@ const xmlBuilder = require('xmlbuilder')

case 'undefined':
values = _.assign(xsi, xmlns, {
'key': changeCase.constantCase(key),
'value': secure(value)
})
break
case 'string':

@@ -71,3 +66,3 @@ case 'number':

break
default:
default: // object, Array, Date
if (value === null) {

@@ -88,17 +83,3 @@ return null

.concat(Object.keys(value).map(function (key) {
let val = value[key]
let typ
if (val.type) {
typ = dto.getType(val.type)
val = val.value
} else {
typ = dto.getType(val)
}
return {
'value': {
'@xsi:type': 'q' + (index + 1) + ':' + typ,
'key': changeCase.constantCase(key),
'value': secure(val)
}
}
return buildValue(key, value[key], index, true)
}))

@@ -105,0 +86,0 @@ }

{
"name": "cdrator",
"version": "0.11.0",
"version": "1.0.0",
"description": "Call CDRator SOAP WebServices using node.js",

@@ -34,2 +34,3 @@ "main": "lib/cdrator",

"chai": "^3.0.0",
"chai-xml": "^0.3.2",
"eslint-config-standard": "^5.3.5",

@@ -36,0 +37,0 @@ "eslint-plugin-import": "^2.7.0",

@@ -0,5 +1,9 @@

const chai = require('chai')
const { expect } = require('chai')
const chaiXml = require('chai-xml')
const helper = require('../../helper')
const soaper = require(process.cwd() + '/lib/soaper')
chai.use(chaiXml)
describe('soaper - subscribeProductOptions', function () {

@@ -27,2 +31,27 @@ let context

})
it('succeeds with parameters', function () {
const hookpointKey = 'SOAP_SUBSCRIBE_PRODUCT_OPTIONS'
const args = {
subscriptionId: '201612222222222222',
productOptions: [{
id: '201703333333333333',
productOptionParameters: [
{
KEY: 'VOICE_CF_NUM_NO_COND',
VALUE: '46700000000'
},
{
KEY: 'VOICE_CF_NUM_UNREACHABLE',
VALUE: '47444444444'
}
]
}],
context: context
}
const result = soaper.buildEnvelope(hookpointKey, args)
const expected = helper.getXml('subscribeProductOptions-request-with-params')
expect(result).xml.to.deep.equal(expected)
})
})

@@ -29,0 +58,0 @@ describe('#parse', function () {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc