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

auth-net-types

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-net-types - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

16

lib/index.js

@@ -142,4 +142,9 @@ var xml = require('xml');

this.customerProfileId = options.customerProfileId || '';
this.shipToList = new AuthorizeShippingAddress(options.shipToList);
this.paymentProfiles = new AuthorizePaymentProfiles(options.paymentProfiles);
if (options.shipToList) {
this.shipToList = new AuthorizeShippingAddress(options.shipToList);
}
if (options.paymentProfiles) {
this.paymentProfiles = new AuthorizePaymentProfiles(options.paymentProfiles);
}
};

@@ -155,4 +160,7 @@

addXmlObjToList(xmlObj.profile, 'email', this.email);
xmlObj.profile = xmlObj.profile.concat(this.paymentProfiles.toXmlObjList());
if (this.shipToList.length > 0) {
if (this.paymentProfiles && this.paymentProfiles.length) {
xmlObj.profile = xmlObj.profile.concat(this.paymentProfiles.toXmlObjList());
}
if (this.shipToList && this.shipToList.length) {
xmlObj.profile.push({ shipToList: this.shipToList.toXmlObjList() });

@@ -159,0 +167,0 @@ }

{
"name": "auth-net-types",
"version": "1.2.0",
"version": "1.2.1",
"description": "A collection of Authorize.net's types/data types/xml objects.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,2 +19,4 @@ var Types = require(__dirname + '/../index')

expect(Customer.customerProfileId).to.equal(1234);
expect(Customer.shipToList).to.not.exist;
expect(Customer.paymentProfiles).to.not.exist;
expect(Customer.toXml()).to.equal('<profile><merchantCustomerId>123</merchantCustomerId><description>A customer with a lot of cash &amp; stuff.</description><email>completelyfake@dontemail.com</email></profile>');

@@ -21,0 +23,0 @@

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