UNPKG

smartystreets-javascript-sdk

Version:
2 lines (1 loc) 516 B
"use strict";var e=require("./SharedCredentials.cjs"),r=require("./_virtual/Errors.cjs"),t=function(){function t(e,r){this.signer=r,this.sender=e}return t.prototype.send=function(t){var n=this;if(t.payload&&this.signer instanceof e.default){throw new r.ErrorsExports.UnprocessableEntityError("Shared credentials cannot be used in batches with a length greater than 1 or when using the US Extract API.")}return new Promise((function(e,r){n.signer.sign(t),n.sender.send(t).then(e).catch(r)}))},t}();exports.default=t;