From fba67cfc2e69c4c85d939b0236119476a52a3303 Mon Sep 17 00:00:00 2001 From: Crhistian Ramirez Date: Mon, 10 Jun 2019 08:26:08 -0500 Subject: [PATCH] fix: codegen output wrong dist --- README.md | 4 +- dist/ordercloud-javascript-sdk.js | 41682 +++++++++++++++++++++++- dist/ordercloud-javascript-sdk.min.js | 27 +- package.json | 2 +- src/index.js | 2 +- 5 files changed, 41684 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index dcb8709c..edde4cff 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ of your imagination. This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0 -- Package version: 3.3.5 -- Build date: 2019-06-07T15:26:22.310-05:00 +- Package version: 3.3.6 +- Build date: 2019-06-10T08:23:44.872-05:00 For more information, please visit [https://documentation.ordercloud.io](https://documentation.ordercloud.io/platform-guides/getting-started/introduction-to-ordercloud) diff --git a/dist/ordercloud-javascript-sdk.js b/dist/ordercloud-javascript-sdk.js index 9e2efc53..11ab8b93 100644 --- a/dist/ordercloud-javascript-sdk.js +++ b/dist/ordercloud-javascript-sdk.js @@ -1,18 +1,41668 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.OrderCloudSDK = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function n(e){var t=o(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function i(e,t,r){return 3*(t+r)/4-r}function s(e){for(var t,r=o(e),n=r[0],s=r[1],a=new c(i(e,n,s)),p=0,d=s>0?n-4:n,l=0;l>16&255,a[p++]=t>>8&255,a[p++]=255&t;return 2===s&&(t=u[e.charCodeAt(l)]<<2|u[e.charCodeAt(l+1)]>>4,a[p++]=255&t),1===s&&(t=u[e.charCodeAt(l)]<<10|u[e.charCodeAt(l+1)]<<4|u[e.charCodeAt(l+2)]>>2,a[p++]=t>>8&255,a[p++]=255&t),a}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function p(e,t,r){for(var o,n=[],i=t;ia?a:s+i));return 1===o?(t=e[r-1],n.push(l[t>>2]+l[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],n.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),n.join("")}r.byteLength=n,r.toByteArray=s,r.fromByteArray=d;for(var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;yK)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return l(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return i.from(o,t,r);var n=h(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function d(e){return a(e),n(e<0?0:0|y(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),o=n(r),s=o.write(e,t);return s!==r&&(o=o.slice(0,s)),o}function u(e){for(var t=e.length<0?0:0|y(e.length),r=n(t),o=0;o=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function f(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return o?-1:R(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}function w(e,t,r,o,n){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,W(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=i.from(t,o)),i.isBuffer(t))return 0===t.length?-1:S(e,t,r,o,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):S(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function S(e,t,r,o,n){function i(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,p=t.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;s=2,a/=2,p/=2,r/=2}var d;if(n){var l=-1;for(d=r;da&&(r=a-p),d=r;d>=0;d--){for(var u=!0,c=0;cn&&(o=n)):o=n;var i=t.length;o>i/2&&(o=i/2);for(var s=0;s239?4:i>223?3:i>191?2:1;if(n+a<=r){var p,d,l,u;switch(a){case 1:i<128&&(s=i);break;case 2:p=e[n+1],128===(192&p)&&(u=(31&i)<<6|63&p,u>127&&(s=u));break;case 3:p=e[n+1],d=e[n+2],128===(192&p)&&128===(192&d)&&(u=(15&i)<<12|(63&p)<<6|63&d,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:p=e[n+1],d=e[n+2],l=e[n+3],128===(192&p)&&128===(192&d)&&128===(192&l)&&(u=(15&i)<<18|(63&p)<<12|(63&d)<<6|63&l,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|1023&s),o.push(s),n+=a}return b(o)}function b(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",o=0;oo)&&(r=o);for(var n="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,o,n,s){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function B(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,o,23,4),r+4}function N(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,o,52,8),r+8}function G(e){if(e=e.split("=")[0],e=e.trim().replace(J,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(e,t){t=t||1/0;for(var r,o=e.length,n=null,i=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function _(e){for(var t=[],r=0;r>8,n=r%256,i.push(n),i.push(o);return i}function z(e){return X.toByteArray(G(e))}function H(e,t,r,o){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!==e}var X=e("base64-js"),Z=e("ieee754");r.Buffer=i,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50;var K=2147483647;r.kMaxLength=K,i.TYPED_ARRAY_SUPPORT=o(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return p(e,t,r)},i.allocUnsafe=function(e){return d(e)},i.allocUnsafeSlow=function(e){return d(e)},i.isBuffer=function e(t){return null!=t&&t._isBuffer===!0&&t!==i.prototype},i.compare=function e(t,r){if(Q(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),Q(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var o=t.length,n=r.length,s=0,a=Math.min(o,n);so&&(t+=" ... "),""},i.prototype.compare=function e(t,r,o,n,s){if(Q(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===o&&(o=t?t.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),r<0||o>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&r>=o)return 0;if(n>=s)return-1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,s>>>=0,this===t)return 0;for(var a=s-n,p=o-r,d=Math.min(a,p),l=this.slice(n,s),u=t.slice(r,o),c=0;c>>=0,isFinite(o)?(o>>>=0,void 0===n&&(n="utf8")):(n=o,o=void 0)}var i=this.length-r;if((void 0===o||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return O(this,t,r,o);case"utf8":case"utf-8":return D(this,t,r,o);case"ascii":return I(this,t,r,o);case"latin1":case"binary":return C(this,t,r,o);case"base64":return T(this,t,r,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function e(t,r){var o=this.length;t=~~t,r=void 0===r?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},i.prototype.readUInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),this[t]},i.prototype.readUInt16LE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s=i&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=r,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s},i.prototype.readInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t]|this[t+1]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt16BE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t+1]|this[t]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function e(t,r){return t>>>=0,r||L(t,4,this.length),Z.read(this,t,!0,23,4)},i.prototype.readFloatBE=function e(t,r){return t>>>=0,r||L(t,4,this.length),Z.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function e(t,r){return t>>>=0,r||L(t,8,this.length),Z.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function e(t,r){return t>>>=0,r||L(t,8,this.length),Z.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=1,a=0;for(this[r]=255&t;++a>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=o-1,a=1;for(this[r+s]=255&t;--s>=0&&(a*=256);)this[r+s]=t/a&255;return r+o},i.prototype.writeUInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,255,0),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeUInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeUInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},i.prototype.writeUInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=0,a=1,p=0;for(this[r]=255&t;++s>0)-p&255;return r+o},i.prototype.writeIntBE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=o-1,a=1,p=0;for(this[r+s]=255&t;--s>=0&&(a*=256);)t<0&&0===p&&0!==this[r+s+1]&&(p=1),this[r+s]=(t/a>>0)-p&255;return r+o},i.prototype.writeInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},i.prototype.writeInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeFloatLE=function e(t,r,o){return U(this,t,r,!0,o)},i.prototype.writeFloatBE=function e(t,r,o){return U(this,t,r,!1,o)},i.prototype.writeDoubleLE=function e(t,r,o){return N(this,t,r,!0,o)},i.prototype.writeDoubleBE=function e(t,r,o){return N(this,t,r,!1,o)},i.prototype.copy=function e(t,r,o,n){if(!i.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--a)t[a+r]=this[a+o];else Uint8Array.prototype.set.call(t,this.subarray(o,n),r);return s},i.prototype.fill=function e(t,r,o,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,o=this.length):"string"==typeof o&&(n=o,o=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var s=t.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(t=s)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,o=void 0===o?this.length:o>>>0,t||(t=0);var a;if("number"==typeof t)for(a=r;a>1,l=-7,u=r?n-1:0,c=r?-1:1,h=e[t+u];for(u+=c,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+u],u+=c,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=c,l-=8);if(0===i)i=1-d;else{if(i===p)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,o),i-=d}return(h?-1:1)*s*Math.pow(2,i-o)},r.write=function(e,t,r,o,n,i){var s,a,p,d=8*i-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,y=o?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-s))<1&&(s--,p*=2),t+=s+u>=1?c/p:c*Math.pow(2,1-u),t*p>=2&&(s++,p/=2),s+u>=l?(a=0,s=l):s+u>=1?(a=(t*p-1)*Math.pow(2,n),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=255&a,h+=y,a/=256,n-=8);for(s=s<0;e[r+h]=255&s,h+=y,s/=256,d-=8);e[r+h-y]|=128*m}},{}],5:[function(e,t,r){function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}"undefined"!=typeof t&&(t.exports=o),o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o,n=0;n=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var o;try{o=t.status}catch(e){o=0}if(!o){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var o=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=o.bind(null,"download"),t.upload&&(t.upload.onprogress=o.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0); -}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var n=this._header["content-type"],i=this._serializer||g.serialize[n?n.split(";")[0]:""];!i&&p(n)&&(i=g.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&t.setRequestHeader(s,this.header[s]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send("undefined"!=typeof r?r:null),this},g.agent=function(){return new v},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){v.prototype[e.toLowerCase()]=function(t,r){var o=new g.Request(e,t);return this._setDefaults(o),r&&o.end(r),o}}),v.prototype.del=v.prototype.delete,g.get=function(e,t,r){var o=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.head=function(e,t,r){var o=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.options=function(e,t,r){var o=g("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.del=u,g.delete=u,g.patch=function(e,t,r){var o=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.post=function(e,t,r){var o=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.put=function(e,t,r){var o=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(e,t,r){"use strict";function o(e){return null!==e&&"object"==typeof e}t.exports=o},{}],9:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./is-object");t.exports=o,o.prototype.clearTimeout=function e(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function e(t){return this._parser=t,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function e(t){return this._serializer=t,this},o.prototype.timeout=function e(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var r in t)switch(r){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",r)}return this},o.prototype.retry=function e(t,r){return 0!==arguments.length&&t!==!0||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=r,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(r===!0)return!0;if(r===!1)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function e(t,r){if(!this._fullfilledPromise){var o=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){o.end(function(r,o){r?t(r):e(o)})})}return this._fullfilledPromise.then(t,r)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function e(t){return t(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(i(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)this.field(e,t[o]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},o.prototype._auth=function(e,t,r,o){switch(r.type){case"basic":this.set("Authorization","Basic "+o(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=i(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var o in e)this._data[o]=e[o];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)},o.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var o=new Error(e+t+"ms exceeded");o.timeout=t,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.abort(),this.callback(o)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./utils");t.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var r=i.params(t);for(var o in r)this[o]=r[o];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},{"./utils":11}],11:[function(e,t,r){"use strict";r.type=function(e){return e.split(/ *; */).shift()},r.params=function(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),o=r.shift(),n=r.shift();return o&&n&&(e[o]=n),e},{})},r.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var r=t.split(/ *; */),o=r[0].slice(1,-1),n=r[1].split(/ *= */)[1].slice(1,-1);return e[n]=o,e},{})},r.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},{}],12:[function(t,r,o){(function(o){!function(o,n){"function"==typeof e&&e.amd?e(["superagent"],n):"object"==typeof r&&r.exports?r.exports=n(t("superagent")):(o.OrderCloud||(o.OrderCloud={}),o.OrderCloud.Sdk=n(o.superagent))}(this,function(e){"use strict";var r=function(){this.baseApiPath="https://api.ordercloud.io/v1".replace(/\/+$/,""),this.baseAuthPath="https://auth.ordercloud.io".replace(/\/+$/,""),this.authentications={oauth2:{type:"oauth2"}},this.defaultHeaders={},this.timeout=6e4};return r.prototype.paramToString=function(e){return void 0==e||null==e?"":e instanceof Date?e.toJSON():e.toString()},r.prototype.buildUrl=function(e,t){e.match(/^\//)||(e="/"+e);var r=this,o=r.baseApiPath+e;return o=o.replace(/\{([\w-]+)\}/g,function(e,o){var n;return n=t.hasOwnProperty(o)?r.paramToString(t[o]):e,encodeURIComponent(n)})},r.prototype.isJsonMime=function(e){return Boolean(null!=e&&e.match(/^application\/json(;.*)?$/i))},r.prototype.jsonPreferredMime=function(e){for(var t=0;t 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],3:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +},{"base64-js":2,"ieee754":4}],4:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],5:[function(require,module,exports){ + +/** + * Expose `Emitter`. + */ + +if (typeof module !== 'undefined') { + module.exports = Emitter; +} + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = +Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = +Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks['$' + event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; + +},{}],6:[function(require,module,exports){ +function Agent() { + this._defaults = []; +} + +["use", "on", "once", "set", "query", "type", "accept", "auth", "withCredentials", "sortQuery", "retry", "ok", "redirects", + "timeout", "buffer", "serialize", "parse", "ca", "key", "pfx", "cert"].forEach(function(fn) { + /** Default setting for all requests from this agent */ + Agent.prototype[fn] = function(/*varargs*/) { + this._defaults.push({fn:fn, arguments:arguments}); + return this; + } +}); + +Agent.prototype._setDefaults = function(req) { + this._defaults.forEach(function(def) { + req[def.fn].apply(req, def.arguments); + }); +}; + +module.exports = Agent; + +},{}],7:[function(require,module,exports){ +/** + * Root reference for iframes. + */ + +var root; +if (typeof window !== 'undefined') { // Browser window + root = window; +} else if (typeof self !== 'undefined') { // Web Worker + root = self; +} else { // Other environments + console.warn("Using browser-only version of superagent in non-browser environment"); + root = this; +} + +var Emitter = require('component-emitter'); +var RequestBase = require('./request-base'); +var isObject = require('./is-object'); +var ResponseBase = require('./response-base'); +var Agent = require('./agent-base'); + +/** + * Noop. + */ + +function noop(){}; + +/** + * Expose `request`. + */ + +var request = exports = module.exports = function(method, url) { + // callback + if ('function' == typeof url) { + return new exports.Request('GET', method).end(url); + } + + // url first + if (1 == arguments.length) { + return new exports.Request('GET', method); + } + + return new exports.Request(method, url); +} + +exports.Request = Request; + +/** + * Determine XHR. + */ + +request.getXHR = function () { + if (root.XMLHttpRequest + && (!root.location || 'file:' != root.location.protocol + || !root.ActiveXObject)) { + return new XMLHttpRequest; + } else { + try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {} + try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {} + try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {} + try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {} + } + throw Error("Browser-only version of superagent could not find XHR"); +}; + +/** + * Removes leading and trailing whitespace, added to support IE. + * + * @param {String} s + * @return {String} + * @api private + */ + +var trim = ''.trim + ? function(s) { return s.trim(); } + : function(s) { return s.replace(/(^\s*|\s*$)/g, ''); }; + +/** + * Serialize the given `obj`. + * + * @param {Object} obj + * @return {String} + * @api private + */ + +function serialize(obj) { + if (!isObject(obj)) return obj; + var pairs = []; + for (var key in obj) { + pushEncodedKeyValuePair(pairs, key, obj[key]); + } + return pairs.join('&'); +} + +/** + * Helps 'serialize' with serializing arrays. + * Mutates the pairs array. + * + * @param {Array} pairs + * @param {String} key + * @param {Mixed} val + */ + +function pushEncodedKeyValuePair(pairs, key, val) { + if (val != null) { + if (Array.isArray(val)) { + val.forEach(function(v) { + pushEncodedKeyValuePair(pairs, key, v); + }); + } else if (isObject(val)) { + for(var subkey in val) { + pushEncodedKeyValuePair(pairs, key + '[' + subkey + ']', val[subkey]); + } + } else { + pairs.push(encodeURIComponent(key) + + '=' + encodeURIComponent(val)); + } + } else if (val === null) { + pairs.push(encodeURIComponent(key)); + } +} + +/** + * Expose serialization method. + */ + +request.serializeObject = serialize; + +/** + * Parse the given x-www-form-urlencoded `str`. + * + * @param {String} str + * @return {Object} + * @api private + */ + +function parseString(str) { + var obj = {}; + var pairs = str.split('&'); + var pair; + var pos; + + for (var i = 0, len = pairs.length; i < len; ++i) { + pair = pairs[i]; + pos = pair.indexOf('='); + if (pos == -1) { + obj[decodeURIComponent(pair)] = ''; + } else { + obj[decodeURIComponent(pair.slice(0, pos))] = + decodeURIComponent(pair.slice(pos + 1)); + } + } + + return obj; +} + +/** + * Expose parser. + */ + +request.parseString = parseString; + +/** + * Default MIME type map. + * + * superagent.types.xml = 'application/xml'; + * + */ + +request.types = { + html: 'text/html', + json: 'application/json', + xml: 'text/xml', + urlencoded: 'application/x-www-form-urlencoded', + 'form': 'application/x-www-form-urlencoded', + 'form-data': 'application/x-www-form-urlencoded' +}; + +/** + * Default serialization map. + * + * superagent.serialize['application/xml'] = function(obj){ + * return 'generated xml here'; + * }; + * + */ + +request.serialize = { + 'application/x-www-form-urlencoded': serialize, + 'application/json': JSON.stringify, +}; + +/** + * Default parsers. + * + * superagent.parse['application/xml'] = function(str){ + * return { object parsed from str }; + * }; + * + */ + +request.parse = { + 'application/x-www-form-urlencoded': parseString, + 'application/json': JSON.parse, +}; + +/** + * Parse the given header `str` into + * an object containing the mapped fields. + * + * @param {String} str + * @return {Object} + * @api private + */ + +function parseHeader(str) { + var lines = str.split(/\r?\n/); + var fields = {}; + var index; + var line; + var field; + var val; + + for (var i = 0, len = lines.length; i < len; ++i) { + line = lines[i]; + index = line.indexOf(':'); + if (index === -1) { // could be empty line, just skip it + continue; + } + field = line.slice(0, index).toLowerCase(); + val = trim(line.slice(index + 1)); + fields[field] = val; + } + + return fields; +} + +/** + * Check if `mime` is json or has +json structured syntax suffix. + * + * @param {String} mime + * @return {Boolean} + * @api private + */ + +function isJSON(mime) { + // should match /json or +json + // but not /json-seq + return /[\/+]json($|[^-\w])/.test(mime); +} + +/** + * Initialize a new `Response` with the given `xhr`. + * + * - set flags (.ok, .error, etc) + * - parse header + * + * Examples: + * + * Aliasing `superagent` as `request` is nice: + * + * request = superagent; + * + * We can use the promise-like API, or pass callbacks: + * + * request.get('/').end(function(res){}); + * request.get('/', function(res){}); + * + * Sending data can be chained: + * + * request + * .post('/user') + * .send({ name: 'tj' }) + * .end(function(res){}); + * + * Or passed to `.send()`: + * + * request + * .post('/user') + * .send({ name: 'tj' }, function(res){}); + * + * Or passed to `.post()`: + * + * request + * .post('/user', { name: 'tj' }) + * .end(function(res){}); + * + * Or further reduced to a single call for simple cases: + * + * request + * .post('/user', { name: 'tj' }, function(res){}); + * + * @param {XMLHTTPRequest} xhr + * @param {Object} options + * @api private + */ + +function Response(req) { + this.req = req; + this.xhr = this.req.xhr; + // responseText is accessible only if responseType is '' or 'text' and on older browsers + this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined') + ? this.xhr.responseText + : null; + this.statusText = this.req.xhr.statusText; + var status = this.xhr.status; + // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request + if (status === 1223) { + status = 204; + } + this._setStatusProperties(status); + this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders()); + // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but + // getResponseHeader still works. so we get content-type even if getting + // other headers fails. + this.header['content-type'] = this.xhr.getResponseHeader('content-type'); + this._setHeaderProperties(this.header); + + if (null === this.text && req._responseType) { + this.body = this.xhr.response; + } else { + this.body = this.req.method != 'HEAD' + ? this._parseBody(this.text ? this.text : this.xhr.response) + : null; + } +} + +ResponseBase(Response.prototype); + +/** + * Parse the given body `str`. + * + * Used for auto-parsing of bodies. Parsers + * are defined on the `superagent.parse` object. + * + * @param {String} str + * @return {Mixed} + * @api private + */ + +Response.prototype._parseBody = function(str) { + var parse = request.parse[this.type]; + if (this.req._parser) { + return this.req._parser(this, str); + } + if (!parse && isJSON(this.type)) { + parse = request.parse['application/json']; + } + return parse && str && (str.length || str instanceof Object) + ? parse(str) + : null; +}; + +/** + * Return an `Error` representative of this response. + * + * @return {Error} + * @api public + */ + +Response.prototype.toError = function(){ + var req = this.req; + var method = req.method; + var url = req.url; + + var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')'; + var err = new Error(msg); + err.status = this.status; + err.method = method; + err.url = url; + + return err; +}; + +/** + * Expose `Response`. + */ + +request.Response = Response; + +/** + * Initialize a new `Request` with the given `method` and `url`. + * + * @param {String} method + * @param {String} url + * @api public + */ + +function Request(method, url) { + var self = this; + this._query = this._query || []; + this.method = method; + this.url = url; + this.header = {}; // preserves header name case + this._header = {}; // coerces header names to lowercase + this.on('end', function(){ + var err = null; + var res = null; + + try { + res = new Response(self); + } catch(e) { + err = new Error('Parser is unable to parse the response'); + err.parse = true; + err.original = e; + // issue #675: return the raw response if the response parsing fails + if (self.xhr) { + // ie9 doesn't have 'response' property + err.rawResponse = typeof self.xhr.responseType == 'undefined' ? self.xhr.responseText : self.xhr.response; + // issue #876: return the http status code if the response parsing fails + err.status = self.xhr.status ? self.xhr.status : null; + err.statusCode = err.status; // backwards-compat only + } else { + err.rawResponse = null; + err.status = null; + } + + return self.callback(err); + } + + self.emit('response', res); + + var new_err; + try { + if (!self._isResponseOK(res)) { + new_err = new Error(res.statusText || 'Unsuccessful HTTP response'); + } + } catch(custom_err) { + new_err = custom_err; // ok() callback can throw + } + + // #1000 don't catch errors from the callback to avoid double calling it + if (new_err) { + new_err.original = err; + new_err.response = res; + new_err.status = res.status; + self.callback(new_err, res); + } else { + self.callback(null, res); + } + }); +} + +/** + * Mixin `Emitter` and `RequestBase`. + */ + +Emitter(Request.prototype); +RequestBase(Request.prototype); + +/** + * Set Content-Type to `type`, mapping values from `request.types`. + * + * Examples: + * + * superagent.types.xml = 'application/xml'; + * + * request.post('/') + * .type('xml') + * .send(xmlstring) + * .end(callback); + * + * request.post('/') + * .type('application/xml') + * .send(xmlstring) + * .end(callback); + * + * @param {String} type + * @return {Request} for chaining + * @api public + */ + +Request.prototype.type = function(type){ + this.set('Content-Type', request.types[type] || type); + return this; +}; + +/** + * Set Accept to `type`, mapping values from `request.types`. + * + * Examples: + * + * superagent.types.json = 'application/json'; + * + * request.get('/agent') + * .accept('json') + * .end(callback); + * + * request.get('/agent') + * .accept('application/json') + * .end(callback); + * + * @param {String} accept + * @return {Request} for chaining + * @api public + */ + +Request.prototype.accept = function(type){ + this.set('Accept', request.types[type] || type); + return this; +}; + +/** + * Set Authorization field value with `user` and `pass`. + * + * @param {String} user + * @param {String} [pass] optional in case of using 'bearer' as type + * @param {Object} options with 'type' property 'auto', 'basic' or 'bearer' (default 'basic') + * @return {Request} for chaining + * @api public + */ + +Request.prototype.auth = function(user, pass, options){ + if (1 === arguments.length) pass = ''; + if (typeof pass === 'object' && pass !== null) { // pass is optional and can be replaced with options + options = pass; + pass = ''; + } + if (!options) { + options = { + type: 'function' === typeof btoa ? 'basic' : 'auto', + }; + } + + var encoder = function(string) { + if ('function' === typeof btoa) { + return btoa(string); + } + throw new Error('Cannot use basic auth, btoa is not a function'); + }; + + return this._auth(user, pass, options, encoder); +}; + +/** + * Add query-string `val`. + * + * Examples: + * + * request.get('/shoes') + * .query('size=10') + * .query({ color: 'blue' }) + * + * @param {Object|String} val + * @return {Request} for chaining + * @api public + */ + +Request.prototype.query = function(val){ + if ('string' != typeof val) val = serialize(val); + if (val) this._query.push(val); + return this; +}; + +/** + * Queue the given `file` as an attachment to the specified `field`, + * with optional `options` (or filename). + * + * ``` js + * request.post('/upload') + * .attach('content', new Blob(['hey!'], { type: "text/html"})) + * .end(callback); + * ``` + * + * @param {String} field + * @param {Blob|File} file + * @param {String|Object} options + * @return {Request} for chaining + * @api public + */ + +Request.prototype.attach = function(field, file, options){ + if (file) { + if (this._data) { + throw Error("superagent can't mix .send() and .attach()"); + } + + this._getFormData().append(field, file, options || file.name); + } + return this; +}; + +Request.prototype._getFormData = function(){ + if (!this._formData) { + this._formData = new root.FormData(); + } + return this._formData; +}; + +/** + * Invoke the callback with `err` and `res` + * and handle arity check. + * + * @param {Error} err + * @param {Response} res + * @api private + */ + +Request.prototype.callback = function(err, res){ + if (this._shouldRetry(err, res)) { + return this._retry(); + } + + var fn = this._callback; + this.clearTimeout(); + + if (err) { + if (this._maxRetries) err.retries = this._retries - 1; + this.emit('error', err); + } + + fn(err, res); +}; + +/** + * Invoke callback with x-domain error. + * + * @api private + */ + +Request.prototype.crossDomainError = function(){ + var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.'); + err.crossDomain = true; + + err.status = this.status; + err.method = this.method; + err.url = this.url; + + this.callback(err); +}; + +// This only warns, because the request is still likely to work +Request.prototype.buffer = Request.prototype.ca = Request.prototype.agent = function(){ + console.warn("This is not supported in browser version of superagent"); + return this; +}; + +// This throws, because it can't send/receive data as expected +Request.prototype.pipe = Request.prototype.write = function(){ + throw Error("Streaming is not supported in browser version of superagent"); +}; + +/** + * Check if `obj` is a host object, + * we don't want to serialize these :) + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ +Request.prototype._isHost = function _isHost(obj) { + // Native objects stringify to [object File], [object Blob], [object FormData], etc. + return obj && 'object' === typeof obj && !Array.isArray(obj) && Object.prototype.toString.call(obj) !== '[object Object]'; +} + +/** + * Initiate request, invoking callback `fn(res)` + * with an instanceof `Response`. + * + * @param {Function} fn + * @return {Request} for chaining + * @api public + */ + +Request.prototype.end = function(fn){ + if (this._endCalled) { + console.warn("Warning: .end() was called twice. This is not supported in superagent"); + } + this._endCalled = true; + + // store callback + this._callback = fn || noop; + + // querystring + this._finalizeQueryString(); + + return this._end(); +}; + +Request.prototype._end = function() { + var self = this; + var xhr = (this.xhr = request.getXHR()); + var data = this._formData || this._data; + + this._setTimeouts(); + + // state change + xhr.onreadystatechange = function(){ + var readyState = xhr.readyState; + if (readyState >= 2 && self._responseTimeoutTimer) { + clearTimeout(self._responseTimeoutTimer); + } + if (4 != readyState) { + return; + } + + // In IE9, reads to any property (e.g. status) off of an aborted XHR will + // result in the error "Could not complete the operation due to error c00c023f" + var status; + try { status = xhr.status } catch(e) { status = 0; } + + if (!status) { + if (self.timedout || self._aborted) return; + return self.crossDomainError(); + } + self.emit('end'); + }; + + // progress + var handleProgress = function(direction, e) { + if (e.total > 0) { + e.percent = e.loaded / e.total * 100; + } + e.direction = direction; + self.emit('progress', e); + }; + if (this.hasListeners('progress')) { + try { + xhr.onprogress = handleProgress.bind(null, 'download'); + if (xhr.upload) { + xhr.upload.onprogress = handleProgress.bind(null, 'upload'); + } + } catch(e) { + // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist. + // Reported here: + // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context + } + } + + // initiate request + try { + if (this.username && this.password) { + xhr.open(this.method, this.url, true, this.username, this.password); + } else { + xhr.open(this.method, this.url, true); + } + } catch (err) { + // see #1149 + return this.callback(err); + } + + // CORS + if (this._withCredentials) xhr.withCredentials = true; + + // body + if (!this._formData && 'GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !this._isHost(data)) { + // serialize stuff + var contentType = this._header['content-type']; + var serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : '']; + if (!serialize && isJSON(contentType)) { + serialize = request.serialize['application/json']; + } + if (serialize) data = serialize(data); + } + + // set header fields + for (var field in this.header) { + if (null == this.header[field]) continue; + + if (this.header.hasOwnProperty(field)) + xhr.setRequestHeader(field, this.header[field]); + } + + if (this._responseType) { + xhr.responseType = this._responseType; + } + + // send stuff + this.emit('request', this); + + // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing) + // We need null here if data is undefined + xhr.send(typeof data !== 'undefined' ? data : null); + return this; +}; + +request.agent = function() { + return new Agent(); +}; + +["GET", "POST", "OPTIONS", "PATCH", "PUT", "DELETE"].forEach(function(method) { + Agent.prototype[method.toLowerCase()] = function(url, fn) { + var req = new request.Request(method, url); + this._setDefaults(req); + if (fn) { + req.end(fn); + } + return req; + }; +}); + +Agent.prototype.del = Agent.prototype['delete']; + +/** + * GET `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.get = function(url, data, fn) { + var req = request('GET', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.query(data); + if (fn) req.end(fn); + return req; +}; + +/** + * HEAD `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.head = function(url, data, fn) { + var req = request('HEAD', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.query(data); + if (fn) req.end(fn); + return req; +}; + +/** + * OPTIONS query to `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.options = function(url, data, fn) { + var req = request('OPTIONS', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * DELETE `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed} [data] + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +function del(url, data, fn) { + var req = request('DELETE', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.send(data); + if (fn) req.end(fn); + return req; +} + +request['del'] = del; +request['delete'] = del; + +/** + * PATCH `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed} [data] + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.patch = function(url, data, fn) { + var req = request('PATCH', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * POST `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed} [data] + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.post = function(url, data, fn) { + var req = request('POST', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * PUT `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.put = function(url, data, fn) { + var req = request('PUT', url); + if ('function' == typeof data) (fn = data), (data = null); + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(require,module,exports){ +'use strict'; + +/** + * Check if `obj` is an object. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isObject(obj) { + return null !== obj && 'object' === typeof obj; +} + +module.exports = isObject; + +},{}],9:[function(require,module,exports){ +'use strict'; + +/** + * Module of mixed-in functions shared between node and client code + */ +var isObject = require('./is-object'); + +/** + * Expose `RequestBase`. + */ + +module.exports = RequestBase; + +/** + * Initialize a new `RequestBase`. + * + * @api public + */ + +function RequestBase(obj) { + if (obj) return mixin(obj); +} + +/** + * Mixin the prototype properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in RequestBase.prototype) { + obj[key] = RequestBase.prototype[key]; + } + return obj; +} + +/** + * Clear previous timeout. + * + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.clearTimeout = function _clearTimeout(){ + clearTimeout(this._timer); + clearTimeout(this._responseTimeoutTimer); + delete this._timer; + delete this._responseTimeoutTimer; + return this; +}; + +/** + * Override default response body parser + * + * This function will be called to convert incoming data into request.body + * + * @param {Function} + * @api public + */ + +RequestBase.prototype.parse = function parse(fn){ + this._parser = fn; + return this; +}; + +/** + * Set format of binary response body. + * In browser valid formats are 'blob' and 'arraybuffer', + * which return Blob and ArrayBuffer, respectively. + * + * In Node all values result in Buffer. + * + * Examples: + * + * req.get('/') + * .responseType('blob') + * .end(callback); + * + * @param {String} val + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.responseType = function(val){ + this._responseType = val; + return this; +}; + +/** + * Override default request body serializer + * + * This function will be called to convert data set via .send or .attach into payload to send + * + * @param {Function} + * @api public + */ + +RequestBase.prototype.serialize = function serialize(fn){ + this._serializer = fn; + return this; +}; + +/** + * Set timeouts. + * + * - response timeout is time between sending request and receiving the first byte of the response. Includes DNS and connection time. + * - deadline is the time from start of the request to receiving response body in full. If the deadline is too short large files may not load at all on slow connections. + * + * Value of 0 or false means no timeout. + * + * @param {Number|Object} ms or {response, deadline} + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.timeout = function timeout(options){ + if (!options || 'object' !== typeof options) { + this._timeout = options; + this._responseTimeout = 0; + return this; + } + + for(var option in options) { + switch(option) { + case 'deadline': + this._timeout = options.deadline; + break; + case 'response': + this._responseTimeout = options.response; + break; + default: + console.warn("Unknown timeout option", option); + } + } + return this; +}; + +/** + * Set number of retry attempts on error. + * + * Failed requests will be retried 'count' times if timeout or err.code >= 500. + * + * @param {Number} count + * @param {Function} [fn] + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.retry = function retry(count, fn){ + // Default to 1 if no count passed or true + if (arguments.length === 0 || count === true) count = 1; + if (count <= 0) count = 0; + this._maxRetries = count; + this._retries = 0; + this._retryCallback = fn; + return this; +}; + +var ERROR_CODES = [ + 'ECONNRESET', + 'ETIMEDOUT', + 'EADDRINFO', + 'ESOCKETTIMEDOUT' +]; + +/** + * Determine if a request should be retried. + * (Borrowed from segmentio/superagent-retry) + * + * @param {Error} err + * @param {Response} [res] + * @returns {Boolean} + */ +RequestBase.prototype._shouldRetry = function(err, res) { + if (!this._maxRetries || this._retries++ >= this._maxRetries) { + return false; + } + if (this._retryCallback) { + try { + var override = this._retryCallback(err, res); + if (override === true) return true; + if (override === false) return false; + // undefined falls back to defaults + } catch(e) { + console.error(e); + } + } + if (res && res.status && res.status >= 500 && res.status != 501) return true; + if (err) { + if (err.code && ~ERROR_CODES.indexOf(err.code)) return true; + // Superagent timeout + if (err.timeout && err.code == 'ECONNABORTED') return true; + if (err.crossDomain) return true; + } + return false; +}; + +/** + * Retry request + * + * @return {Request} for chaining + * @api private + */ + +RequestBase.prototype._retry = function() { + + this.clearTimeout(); + + // node + if (this.req) { + this.req = null; + this.req = this.request(); + } + + this._aborted = false; + this.timedout = false; + + return this._end(); +}; + +/** + * Promise support + * + * @param {Function} resolve + * @param {Function} [reject] + * @return {Request} + */ + +RequestBase.prototype.then = function then(resolve, reject) { + if (!this._fullfilledPromise) { + var self = this; + if (this._endCalled) { + console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"); + } + this._fullfilledPromise = new Promise(function(innerResolve, innerReject) { + self.end(function(err, res) { + if (err) innerReject(err); + else innerResolve(res); + }); + }); + } + return this._fullfilledPromise.then(resolve, reject); +}; + +RequestBase.prototype.catch = function(cb) { + return this.then(undefined, cb); +}; + +/** + * Allow for extension + */ + +RequestBase.prototype.use = function use(fn) { + fn(this); + return this; +}; + +RequestBase.prototype.ok = function(cb) { + if ('function' !== typeof cb) throw Error("Callback required"); + this._okCallback = cb; + return this; +}; + +RequestBase.prototype._isResponseOK = function(res) { + if (!res) { + return false; + } + + if (this._okCallback) { + return this._okCallback(res); + } + + return res.status >= 200 && res.status < 300; +}; + +/** + * Get request header `field`. + * Case-insensitive. + * + * @param {String} field + * @return {String} + * @api public + */ + +RequestBase.prototype.get = function(field){ + return this._header[field.toLowerCase()]; +}; + +/** + * Get case-insensitive header `field` value. + * This is a deprecated internal API. Use `.get(field)` instead. + * + * (getHeader is no longer used internally by the superagent code base) + * + * @param {String} field + * @return {String} + * @api private + * @deprecated + */ + +RequestBase.prototype.getHeader = RequestBase.prototype.get; + +/** + * Set header `field` to `val`, or multiple fields with one object. + * Case-insensitive. + * + * Examples: + * + * req.get('/') + * .set('Accept', 'application/json') + * .set('X-API-Key', 'foobar') + * .end(callback); + * + * req.get('/') + * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' }) + * .end(callback); + * + * @param {String|Object} field + * @param {String} val + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.set = function(field, val){ + if (isObject(field)) { + for (var key in field) { + this.set(key, field[key]); + } + return this; + } + this._header[field.toLowerCase()] = val; + this.header[field] = val; + return this; +}; + +/** + * Remove header `field`. + * Case-insensitive. + * + * Example: + * + * req.get('/') + * .unset('User-Agent') + * .end(callback); + * + * @param {String} field + */ +RequestBase.prototype.unset = function(field){ + delete this._header[field.toLowerCase()]; + delete this.header[field]; + return this; +}; + +/** + * Write the field `name` and `val`, or multiple fields with one object + * for "multipart/form-data" request bodies. + * + * ``` js + * request.post('/upload') + * .field('foo', 'bar') + * .end(callback); + * + * request.post('/upload') + * .field({ foo: 'bar', baz: 'qux' }) + * .end(callback); + * ``` + * + * @param {String|Object} name + * @param {String|Blob|File|Buffer|fs.ReadStream} val + * @return {Request} for chaining + * @api public + */ +RequestBase.prototype.field = function(name, val) { + // name should be either a string or an object. + if (null === name || undefined === name) { + throw new Error('.field(name, val) name can not be empty'); + } + + if (this._data) { + console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"); + } + + if (isObject(name)) { + for (var key in name) { + this.field(key, name[key]); + } + return this; + } + + if (Array.isArray(val)) { + for (var i in val) { + this.field(name, val[i]); + } + return this; + } + + // val should be defined now + if (null === val || undefined === val) { + throw new Error('.field(name, val) val can not be empty'); + } + if ('boolean' === typeof val) { + val = '' + val; + } + this._getFormData().append(name, val); + return this; +}; + +/** + * Abort the request, and clear potential timeout. + * + * @return {Request} + * @api public + */ +RequestBase.prototype.abort = function(){ + if (this._aborted) { + return this; + } + this._aborted = true; + this.xhr && this.xhr.abort(); // browser + this.req && this.req.abort(); // node + this.clearTimeout(); + this.emit('abort'); + return this; +}; + +RequestBase.prototype._auth = function(user, pass, options, base64Encoder) { + switch (options.type) { + case 'basic': + this.set('Authorization', 'Basic ' + base64Encoder(user + ':' + pass)); + break; + + case 'auto': + this.username = user; + this.password = pass; + break; + + case 'bearer': // usage would be .auth(accessToken, { type: 'bearer' }) + this.set('Authorization', 'Bearer ' + user); + break; + } + return this; +}; + +/** + * Enable transmission of cookies with x-domain requests. + * + * Note that for this to work the origin must not be + * using "Access-Control-Allow-Origin" with a wildcard, + * and also must set "Access-Control-Allow-Credentials" + * to "true". + * + * @api public + */ + +RequestBase.prototype.withCredentials = function(on) { + // This is browser-only functionality. Node side is no-op. + if (on == undefined) on = true; + this._withCredentials = on; + return this; +}; + +/** + * Set the max redirects to `n`. Does noting in browser XHR implementation. + * + * @param {Number} n + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.redirects = function(n){ + this._maxRedirects = n; + return this; +}; + +/** + * Maximum size of buffered response body, in bytes. Counts uncompressed size. + * Default 200MB. + * + * @param {Number} n + * @return {Request} for chaining + */ +RequestBase.prototype.maxResponseSize = function(n){ + if ('number' !== typeof n) { + throw TypeError("Invalid argument"); + } + this._maxResponseSize = n; + return this; +}; + +/** + * Convert to a plain javascript object (not JSON string) of scalar properties. + * Note as this method is designed to return a useful non-this value, + * it cannot be chained. + * + * @return {Object} describing method, url, and data of this request + * @api public + */ + +RequestBase.prototype.toJSON = function() { + return { + method: this.method, + url: this.url, + data: this._data, + headers: this._header, + }; +}; + +/** + * Send `data` as the request body, defaulting the `.type()` to "json" when + * an object is given. + * + * Examples: + * + * // manual json + * request.post('/user') + * .type('json') + * .send('{"name":"tj"}') + * .end(callback) + * + * // auto json + * request.post('/user') + * .send({ name: 'tj' }) + * .end(callback) + * + * // manual x-www-form-urlencoded + * request.post('/user') + * .type('form') + * .send('name=tj') + * .end(callback) + * + * // auto x-www-form-urlencoded + * request.post('/user') + * .type('form') + * .send({ name: 'tj' }) + * .end(callback) + * + * // defaults to x-www-form-urlencoded + * request.post('/user') + * .send('name=tobi') + * .send('species=ferret') + * .end(callback) + * + * @param {String|Object} data + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.send = function(data){ + var isObj = isObject(data); + var type = this._header['content-type']; + + if (this._formData) { + console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"); + } + + if (isObj && !this._data) { + if (Array.isArray(data)) { + this._data = []; + } else if (!this._isHost(data)) { + this._data = {}; + } + } else if (data && this._data && this._isHost(this._data)) { + throw Error("Can't merge these send calls"); + } + + // merge + if (isObj && isObject(this._data)) { + for (var key in data) { + this._data[key] = data[key]; + } + } else if ('string' == typeof data) { + // default to x-www-form-urlencoded + if (!type) this.type('form'); + type = this._header['content-type']; + if ('application/x-www-form-urlencoded' == type) { + this._data = this._data + ? this._data + '&' + data + : data; + } else { + this._data = (this._data || '') + data; + } + } else { + this._data = data; + } + + if (!isObj || this._isHost(data)) { + return this; + } + + // default to json + if (!type) this.type('json'); + return this; +}; + +/** + * Sort `querystring` by the sort function + * + * + * Examples: + * + * // default order + * request.get('/user') + * .query('name=Nick') + * .query('search=Manny') + * .sortQuery() + * .end(callback) + * + * // customized sort function + * request.get('/user') + * .query('name=Nick') + * .query('search=Manny') + * .sortQuery(function(a, b){ + * return a.length - b.length; + * }) + * .end(callback) + * + * + * @param {Function} sort + * @return {Request} for chaining + * @api public + */ + +RequestBase.prototype.sortQuery = function(sort) { + // _sort default to true but otherwise can be a function or boolean + this._sort = typeof sort === 'undefined' ? true : sort; + return this; +}; + +/** + * Compose querystring to append to req.url + * + * @api private + */ +RequestBase.prototype._finalizeQueryString = function(){ + var query = this._query.join('&'); + if (query) { + this.url += (this.url.indexOf('?') >= 0 ? '&' : '?') + query; + } + this._query.length = 0; // Makes the call idempotent + + if (this._sort) { + var index = this.url.indexOf('?'); + if (index >= 0) { + var queryArr = this.url.substring(index + 1).split('&'); + if ('function' === typeof this._sort) { + queryArr.sort(this._sort); + } else { + queryArr.sort(); + } + this.url = this.url.substring(0, index) + '?' + queryArr.join('&'); + } + } +}; + +// For backwards compat only +RequestBase.prototype._appendQueryString = function() {console.trace("Unsupported");} + +/** + * Invoke callback with timeout error. + * + * @api private + */ + +RequestBase.prototype._timeoutError = function(reason, timeout, errno){ + if (this._aborted) { + return; + } + var err = new Error(reason + timeout + 'ms exceeded'); + err.timeout = timeout; + err.code = 'ECONNABORTED'; + err.errno = errno; + this.timedout = true; + this.abort(); + this.callback(err); +}; + +RequestBase.prototype._setTimeouts = function() { + var self = this; + + // deadline + if (this._timeout && !this._timer) { + this._timer = setTimeout(function(){ + self._timeoutError('Timeout of ', self._timeout, 'ETIME'); + }, this._timeout); + } + // response timeout + if (this._responseTimeout && !this._responseTimeoutTimer) { + this._responseTimeoutTimer = setTimeout(function(){ + self._timeoutError('Response timeout of ', self._responseTimeout, 'ETIMEDOUT'); + }, this._responseTimeout); + } +}; + +},{"./is-object":8}],10:[function(require,module,exports){ +'use strict'; + +/** + * Module dependencies. + */ + +var utils = require('./utils'); + +/** + * Expose `ResponseBase`. + */ + +module.exports = ResponseBase; + +/** + * Initialize a new `ResponseBase`. + * + * @api public + */ + +function ResponseBase(obj) { + if (obj) return mixin(obj); +} + +/** + * Mixin the prototype properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in ResponseBase.prototype) { + obj[key] = ResponseBase.prototype[key]; + } + return obj; +} + +/** + * Get case-insensitive `field` value. + * + * @param {String} field + * @return {String} + * @api public + */ + +ResponseBase.prototype.get = function(field) { + return this.header[field.toLowerCase()]; +}; + +/** + * Set header related properties: + * + * - `.type` the content type without params + * + * A response of "Content-Type: text/plain; charset=utf-8" + * will provide you with a `.type` of "text/plain". + * + * @param {Object} header + * @api private + */ + +ResponseBase.prototype._setHeaderProperties = function(header){ + // TODO: moar! + // TODO: make this a util + + // content-type + var ct = header['content-type'] || ''; + this.type = utils.type(ct); + + // params + var params = utils.params(ct); + for (var key in params) this[key] = params[key]; + + this.links = {}; + + // links + try { + if (header.link) { + this.links = utils.parseLinks(header.link); + } + } catch (err) { + // ignore + } +}; + +/** + * Set flags such as `.ok` based on `status`. + * + * For example a 2xx response will give you a `.ok` of __true__ + * whereas 5xx will be __false__ and `.error` will be __true__. The + * `.clientError` and `.serverError` are also available to be more + * specific, and `.statusType` is the class of error ranging from 1..5 + * sometimes useful for mapping respond colors etc. + * + * "sugar" properties are also defined for common cases. Currently providing: + * + * - .noContent + * - .badRequest + * - .unauthorized + * - .notAcceptable + * - .notFound + * + * @param {Number} status + * @api private + */ + +ResponseBase.prototype._setStatusProperties = function(status){ + var type = status / 100 | 0; + + // status / class + this.status = this.statusCode = status; + this.statusType = type; + + // basics + this.info = 1 == type; + this.ok = 2 == type; + this.redirect = 3 == type; + this.clientError = 4 == type; + this.serverError = 5 == type; + this.error = (4 == type || 5 == type) + ? this.toError() + : false; + + // sugar + this.accepted = 202 == status; + this.noContent = 204 == status; + this.badRequest = 400 == status; + this.unauthorized = 401 == status; + this.notAcceptable = 406 == status; + this.forbidden = 403 == status; + this.notFound = 404 == status; +}; + +},{"./utils":11}],11:[function(require,module,exports){ +'use strict'; + +/** + * Return the mime type for the given `str`. + * + * @param {String} str + * @return {String} + * @api private + */ + +exports.type = function(str){ + return str.split(/ *; */).shift(); +}; + +/** + * Return header field parameters. + * + * @param {String} str + * @return {Object} + * @api private + */ + +exports.params = function(str){ + return str.split(/ *; */).reduce(function(obj, str){ + var parts = str.split(/ *= */); + var key = parts.shift(); + var val = parts.shift(); + + if (key && val) obj[key] = val; + return obj; + }, {}); +}; + +/** + * Parse Link header fields. + * + * @param {String} str + * @return {Object} + * @api private + */ + +exports.parseLinks = function(str){ + return str.split(/ *, */).reduce(function(obj, str){ + var parts = str.split(/ *; */); + var url = parts[0].slice(1, -1); + var rel = parts[1].split(/ *= */)[1].slice(1, -1); + obj[rel] = url; + return obj; + }, {}); +}; + +/** + * Strip content related fields from `header`. + * + * @param {Object} header + * @return {Object} header + * @api private + */ + +exports.cleanHeader = function(header, changesOrigin){ + delete header['content-type']; + delete header['content-length']; + delete header['transfer-encoding']; + delete header['host']; + // secuirty + if (changesOrigin) { + delete header['authorization']; + delete header['cookie']; + } + return header; +}; + +},{}],12:[function(require,module,exports){ +(function (Buffer){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['superagent'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('superagent')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Sdk = factory(root.superagent); + } +}(this, function(superagent) { + 'use strict'; + + /** + * @module Sdk + */ + + /** + * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an + * application to use this class directly - the *Api and model classes provide the public API for the service. The + * contents of this file should be regarded as internal but are documented for completeness. + * @alias module:Sdk + * @class + */ + var exports = function() { + /** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default https://api.ordercloud.io/v1 + */ + this.baseApiPath = 'https://api.ordercloud.io/v1'.replace(/\/+$/, ''); + + /** + * The base URL against Auth calls are resolved. + * @type {String} + * @default https://auth.ordercloud.io + */ + this.baseAuthPath = 'https://auth.ordercloud.io'.replace(/\/+$/, ''); + + /** + * The authentication methods to be included for all API calls. + * @type {Array.} + */ + this.authentications = { + 'oauth2': {type: 'oauth2'} + }; + /** + * The default HTTP headers to be included for all API calls. + * @type {Array.} + * @default {} + */ + this.defaultHeaders = {}; + + /** + * The default HTTP timeout for all API calls. + * @type {Number} + * @default 60000 + */ + this.timeout = 60000; + }; + + /** + * Returns a string representation for an actual parameter. + * @param param The actual parameter. + * @returns {String} The string representation of param. + */ + exports.prototype.paramToString = function(param) { + if (param == undefined || param == null) { + return ''; + } + if (param instanceof Date) { + return param.toJSON(); + } + return param.toString(); + }; + + /** + * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. + * NOTE: query parameters are not handled here. + * @param {String} path The path to append to the base URL. + * @param {Object} pathParams The parameter values to append. + * @returns {String} The encoded path with parameter values substituted. + */ + exports.prototype.buildUrl = function(path, pathParams) { + if (!path.match(/^\//)) { + path = '/' + path; + } + var _this = this; + var url = _this.baseApiPath + path; + url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) { + var value; + if (pathParams.hasOwnProperty(key)) { + value = _this.paramToString(pathParams[key]); + } else { + value = fullMatch; + } + return encodeURIComponent(value); + }); + return url; + }; + + /** + * Checks whether the given content type represents JSON.
+ * JSON content type examples:
+ *
    + *
  • application/json
  • + *
  • application/json; charset=UTF8
  • + *
  • APPLICATION/JSON
  • + *
+ * @param {String} contentType The MIME content type to check. + * @returns {Boolean} true if contentType represents JSON, otherwise false. + */ + exports.prototype.isJsonMime = function(contentType) { + return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); + }; + + /** + * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. + * @param {Array.} contentTypes + * @returns {String} The chosen content type, preferring JSON. + */ + exports.prototype.jsonPreferredMime = function(contentTypes) { + for (var i = 0; i < contentTypes.length; i++) { + if (this.isJsonMime(contentTypes[i])) { + return contentTypes[i]; + } + } + return contentTypes[0]; + }; + + /** + * Checks whether the given parameter value represents file-like content. + * @param param The parameter to check. + * @returns {Boolean} true if param represents a file. + */ + exports.prototype.isFileParam = function(param) { + // fs.ReadStream in Node.js (but not in runtime like browserify) + if (typeof window === 'undefined' && + typeof require === 'function' && + require('fs') && + param instanceof require('fs').ReadStream) { + return true; + } + // Buffer in Node.js + if (typeof Buffer === 'function' && param instanceof Buffer) { + return true; + } + // Blob in browser + if (typeof Blob === 'function' && param instanceof Blob) { + return true; + } + // File in browser (it seems File object is also instance of Blob, but keep this for safe) + if (typeof File === 'function' && param instanceof File) { + return true; + } + return false; + }; + + /** + * Normalizes parameter values: + *
    + *
  • remove nils
  • + *
  • keep files and arrays
  • + *
  • format to string with `paramToString` for other cases
  • + *
+ * @param {Object.} params The parameters as object properties. + * @returns {Object.} normalized parameters. + */ + exports.prototype.normalizeParams = function(params) { + var newParams = {}; + for (var key in params) { + if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null && key != "filters") { + var value = params[key]; + if (this.isFileParam(value) || Array.isArray(value)) { + newParams[key] = value; + } else { + newParams[key] = this.paramToString(value); + } + } + else if (key == "filters" && params[key] != null && params[key] != undefined) { + for (var filterKey in params[key]) { + if (params[key].hasOwnProperty(filterKey) && params[key][filterKey] != undefined && params[key][filterKey] != null) { + var value = params[key][filterKey]; + if (this.isFileParam(value) || Array.isArray(value)) { + newParams[filterKey] = value; + } else { + newParams[filterKey] = this.paramToString(value); + } + } + } + } + } + return newParams; + }; + + /** + * Enumeration of collection format separator strategies. + * @enum {String} + * @readonly + */ + exports.CollectionFormatEnum = { + /** + * Comma-separated values. Value: csv + * @const + */ + CSV: ',', + /** + * Space-separated values. Value: ssv + * @const + */ + SSV: ' ', + /** + * Tab-separated values. Value: tsv + * @const + */ + TSV: '\t', + /** + * Pipe(|)-separated values. Value: pipes + * @const + */ + PIPES: '|', + /** + * Native array. Value: multi + * @const + */ + MULTI: 'multi' + }; + + /** + * Builds a string representation of an array-type actual parameter, according to the given collection format. + * @param {Array} param An array parameter. + * @param {module:Sdk.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns + * param as is if collectionFormat is multi. + */ + exports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) { + if (param == null) { + return null; + } + if (typeof(param) == "string") { + return param + } + switch (collectionFormat) { + case 'csv': + return param.map(this.paramToString).join(','); + case 'ssv': + return param.map(this.paramToString).join(' '); + case 'tsv': + return param.map(this.paramToString).join('\t'); + case 'plus': + return param.map(this.paramToString).join('+'); + case 'pipes': + return param.map(this.paramToString).join('|'); + case 'multi': + // return the array directly as SuperAgent will handle it as expected + return param.map(this.paramToString); + default: + throw new Error('Unknown collection format: ' + collectionFormat); + } + }; + + /** + * Applies authentication headers to the request. + * @param {Object} request The request object created by a superagent() call. + * @param {String} accessToken An alternative token to the one stored in the sdk instance (useful for impersonation) + */ + exports.prototype.applyAuthToRequest = function(request, accessToken) { + var _this = this; + var auth = _this.authentications['oauth2']; + var token; + + if(accessToken) { + token = accessToken; + } else if(_this.impersonation) { + token = auth.impersonationToken; + } else { + token = auth.accessToken; + } + + _this.impersonation = false; // reset impersonation boolean + request.set({'Authorization': 'Bearer ' + token}); + }; + + /** + * Deserializes an HTTP response body into a value of the specified type. + * @param {Object} response A SuperAgent response object. + * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns A value of the specified type. + */ + exports.prototype.deserialize = function deserialize(response, returnType) { + if (response == null || returnType == null) { + return null; + } + // Rely on SuperAgent for parsing response body. + // See http://visionmedia.github.io/superagent/#parsing-response-bodies + var data = response.body; + if (data == null) { + // SuperAgent does not always produce a body; use the unparsed response as a fallback + data = response.text; + } + return exports.convertToType(data, returnType); + }; + + /** + * Invokes the REST service using the supplied settings and parameters. + * @param {String} path The base URL to invoke. + * @param {String} httpMethod The HTTP method to use. + * @param {Object.} pathParams A map of path parameters and their values. + * @param {Object.} queryParams A map of query parameters and their values. + * @param {Object.} headerParams A map of header parameters and their values. + * @param {Object.} formParams A map of form parameters and their values. + * @param {Object} bodyParam The value to pass as the request body. + * @param {Array.} contentTypes An array of request MIME types. + * @param {Array.} accepts An array of acceptable response MIME types. + * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the + * constructor for a complex type. + * @param {String} accessToken An alternative token to the one stored in the sdk instance (useful for impersonation) + * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. + */ + exports.prototype.callApi = function callApi(path, httpMethod, pathParams, + queryParams, headerParams, formParams, bodyParam, contentTypes, accepts, + returnType, accessToken) { + + var _this = this; + var url = this.buildUrl(path, pathParams); + var request = superagent(httpMethod, url); + + // apply authentications + this.applyAuthToRequest(request, accessToken); + + // set query parameters + request.query(this.normalizeParams(queryParams)); + + // set header parameters + request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // dont cache response (guards against IE's aggressive caching) + request.set('X-Requested-With', 'XMLHttpRequest') + request.set('Expires', '-1') + request.set('Cache-Control', 'no-cache,no-store,must-revalidate,max-age=-1,private') + request.set('Pragma', 'no-cache'); + + // set request timeout + request.timeout(this.timeout); + + var contentType = this.jsonPreferredMime(contentTypes); + if (contentType) { + // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) + if(contentType != 'multipart/form-data') { + request.type(contentType); + } + } else if (!request.header['Content-Type']) { + request.type('application/json'); + } + + if (contentType === 'application/x-www-form-urlencoded') { + request.send(this.normalizeParams(formParams)); + } else if (contentType == 'multipart/form-data') { + var _formParams = this.normalizeParams(formParams); + for (var key in _formParams) { + if (_formParams.hasOwnProperty(key)) { + if (this.isFileParam(_formParams[key])) { + // file field + request.attach(key, _formParams[key]); + } else { + request.field(key, _formParams[key]); + } + } + } + } else if (bodyParam) { + request.send(bodyParam); + } + + var accept = this.jsonPreferredMime(accepts); + if (accept) { + request.accept(accept); + } + + return new Promise(function(resolve, reject) { + request.end(function(error, response) { + if (error) { + reject(error); + } else { + var data = _this.deserialize(response, returnType); + resolve(data); + } + }); + }); + }; + +exports.prototype.callAuth = function callApi(path, httpMethod, pathParams, + queryParams, headerParams, formParams, bodyParam, contentTypes, accepts, + returnType) { + + var _this = this; + var url = _this.baseAuthPath.replace(/\/+$/, '') + path; + var request = superagent(httpMethod, url); + + // set query parameters + request.query(this.normalizeParams(queryParams)); + + // set header parameters + request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // dont cache response (guards against IE's aggressive caching) + request.set('X-Requested-With', 'XMLHttpRequest') + request.set('Expires', '-1') + request.set('Cache-Control', 'no-cache,no-store,must-revalidate,max-age=-1,private') + request.set('Pragma', 'no-cache'); + + // set request timeout + request.timeout(this.timeout); + + var contentType = this.jsonPreferredMime(contentTypes); + if (contentType) { + // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) + if(contentType != 'multipart/form-data') { + request.type(contentType); + } + } else if (!request.header['Content-Type']) { + request.type('application/json'); + } + + if (contentType == 'multipart/form-data') { + var _formParams = this.normalizeParams(formParams); + for (var key in _formParams) { + if (_formParams.hasOwnProperty(key)) { + if (this.isFileParam(_formParams[key])) { + // file field + request.attach(key, _formParams[key]); + } else { + request.field(key, _formParams[key]); + } + } + } + } else if (bodyParam) { + request.send(bodyParam); + } + + var accept = this.jsonPreferredMime(accepts); + if (accept) { + request.accept(accept); + } + + return new Promise(function(resolve, reject) { + request.end(function(error, response) { + if (error) { + reject(error); + } else { + var data = _this.deserialize(response, returnType); + resolve(data); + } + }); + }); + }; + + /** + * Parses an ISO-8601 string representation of a date value. + * @param {String} str The date value as a string. + * @returns {Date} The parsed date object. + */ + exports.parseDate = function(str) { + return new Date(str.replace(/T/i, ' ')); + }; + + /** + * Converts a value to the specified type. + * @param {(String|Object)} data The data to convert, as a string or object. + * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns An instance of the specified type. + */ + exports.convertToType = function(data, type) { + if (data === null) + return null; + switch (type) { + case 'Boolean': + return Boolean(data); + case 'Integer': + return parseInt(data, 10); + case 'Number': + return parseFloat(data); + case 'String': + return String(data); + case 'Date': + return this.parseDate(String(data)); + default: + if (type === Object) { + // generic object, return directly + return data; + } else if (typeof type === 'function') { + // for model type like: User + return type.constructFromObject(data); + } else if (Array.isArray(type)) { + // for array type like: ['String'] + var itemType = type[0]; + return data.map(function(item) { + return exports.convertToType(item, itemType); + }); + } else if (typeof type === 'object') { + // for plain object type like: {'String': 'Integer'} + var keyType, valueType; + for (var k in type) { + if (type.hasOwnProperty(k)) { + keyType = k; + valueType = type[k]; + break; + } + } + var result = {}; + for (var k in data) { + if (data.hasOwnProperty(k)) { + var key = exports.convertToType(k, keyType); + var value = exports.convertToType(data[k], valueType); + result[key] = value; + } + } + return result; + } else { + // for unknown type, return the data directly + return data; + } + } + }; + + /** + * Constructs a new map or array model from REST data. + * @param data {Object|Array} The REST data. + * @param obj {Object|Array} The target object or array. + */ + exports.constructFromObject = function(data, obj, itemType) { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + if (data.hasOwnProperty(i)) + obj[i] = exports.convertToType(data[i], itemType); + } + } else { + for (var k in data) { + if (data.hasOwnProperty(k)) + obj[k] = exports.convertToType(data[k], itemType); + } + } + }; + + /** + * The default API client implementation. + * @type {module:Sdk} + */ + exports.instance = new exports(); + + return exports; +})); + +}).call(this,require("buffer").Buffer) +},{"buffer":3,"fs":1,"superagent":7}],13:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/AddressAssignment', 'model/ListAddress', 'model/ListAddressAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Address'), require('../model/AddressAssignment'), require('../model/ListAddress'), require('../model/ListAddressAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Addresses = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.AddressAssignment, root.OrderCloud.ListAddress, root.OrderCloud.ListAddressAssignment); + } +}(this, function(Sdk, Address, AddressAssignment, ListAddress, ListAddressAssignment) { + 'use strict'; + + /** + * Address service. + * @module api/Addresses + */ + + /** + * Constructs a new Addresses. + * @alias module:api/Addresses + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Create = function(buyerID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/{addressID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} addressID ID of the address. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(buyerID, addressID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'addressID': addressID + }; + var queryParams = { + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/{addressID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Get = function(buyerID, addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/{addressID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddress} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListAddress; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.addressID ID of the address. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the address assignment. Possible values: User, Group, Company. + * @param {Boolean} opts.isShipping Is shipping of the address assignment. + * @param {Boolean} opts.isBilling Is billing of the address assignment. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddressAssignment} + */ + this.ListAssignments = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling ListAssignments"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'addressID': opts['addressID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'isShipping': opts['isShipping'], + 'isBilling': opts['isBilling'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListAddressAssignment; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} addressID ID of the address. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Patch = function(buyerID, addressID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Patch"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/{addressID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} addressID ID of the address. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Save = function(buyerID, addressID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Save"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/{addressID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/AddressAssignment} addressAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(buyerID, addressAssignment, accessToken ) { + var postBody = addressAssignment; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling SaveAssignment"); + } + + // verify the required parameter 'addressAssignment' is set + if (addressAssignment == undefined || addressAssignment == null) { + throw new Error("Missing the required parameter 'addressAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/addresses/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Address":52,"../model/AddressAssignment":53,"../model/ListAddress":79,"../model/ListAddressAssignment":80}],14:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/ListAddress'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Address'), require('../model/ListAddress')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.AdminAddresses = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.ListAddress); + } +}(this, function(Sdk, Address, ListAddress) { + 'use strict'; + + /** + * AdminAddress service. + * @module api/AdminAddresses + */ + + /** + * Constructs a new AdminAddresses. + * @alias module:api/AdminAddresses + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Create = function(address, accessToken ) { + var postBody = address; + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/addresses', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Delete"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/addresses/{addressID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Get = function(addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Get"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/addresses/{addressID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddress} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListAddress; + + return this.sdk.callApi( + '/addresses', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Patch = function(addressID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Patch"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling Patch"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/addresses/{addressID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Save = function(addressID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Save"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Save"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/addresses/{addressID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Address":52,"../model/ListAddress":79}],15:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListUserGroup', 'model/ListUserGroupAssignment', 'model/UserGroup', 'model/UserGroupAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListUserGroup'), require('../model/ListUserGroupAssignment'), require('../model/UserGroup'), require('../model/UserGroupAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.AdminUserGroups = factory(root.OrderCloud.Sdk, root.OrderCloud.ListUserGroup, root.OrderCloud.ListUserGroupAssignment, root.OrderCloud.UserGroup, root.OrderCloud.UserGroupAssignment); + } +}(this, function(Sdk, ListUserGroup, ListUserGroupAssignment, UserGroup, UserGroupAssignment) { + 'use strict'; + + /** + * AdminUserGroup service. + * @module api/AdminUserGroups + */ + + /** + * Constructs a new AdminUserGroups. + * @alias module:api/AdminUserGroups + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Create = function(userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/usergroups', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Delete"); + } + + + var pathParams = { + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/usergroups/{userGroupID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userGroupID ID of the user group. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteUserAssignment = function(userGroupID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling DeleteUserAssignment"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling DeleteUserAssignment"); + } + + + var pathParams = { + 'userGroupID': userGroupID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/usergroups/{userGroupID}/assignments/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Get = function(userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Get"); + } + + + var pathParams = { + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/usergroups/{userGroupID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroup} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroup; + + return this.sdk.callApi( + '/usergroups', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.userID ID of the user. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroupAssignment} + */ + this.ListUserAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'userGroupID': opts['userGroupID'], + 'userID': opts['userID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroupAssignment; + + return this.sdk.callApi( + '/usergroups/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} partialUserGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Patch = function(userGroupID, partialUserGroup, accessToken ) { + var postBody = partialUserGroup; + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Patch"); + } + + // verify the required parameter 'partialUserGroup' is set + if (partialUserGroup == undefined || partialUserGroup == null) { + throw new Error("Missing the required parameter 'partialUserGroup' when calling Patch"); + } + + + var pathParams = { + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/usergroups/{userGroupID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Save = function(userGroupID, userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Save"); + } + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Save"); + } + + + var pathParams = { + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/usergroups/{userGroupID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/UserGroupAssignment} userGroupAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveUserAssignment = function(userGroupAssignment, accessToken ) { + var postBody = userGroupAssignment; + + // verify the required parameter 'userGroupAssignment' is set + if (userGroupAssignment == undefined || userGroupAssignment == null) { + throw new Error("Missing the required parameter 'userGroupAssignment' when calling SaveUserAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/usergroups/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListUserGroup":129,"../model/ListUserGroupAssignment":130,"../model/UserGroup":212,"../model/UserGroupAssignment":213}],16:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListUser', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListUser'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.AdminUsers = factory(root.OrderCloud.Sdk, root.OrderCloud.ListUser, root.OrderCloud.User); + } +}(this, function(Sdk, ListUser, User) { + 'use strict'; + + /** + * AdminUser service. + * @module api/AdminUsers + */ + + /** + * Constructs a new AdminUsers. + * @alias module:api/AdminUsers + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Create = function(user, accessToken ) { + var postBody = user; + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/adminusers', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Delete"); + } + + + var pathParams = { + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/adminusers/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Get = function(userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Get"); + } + + + var pathParams = { + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/adminusers/{userID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUser} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUser; + + return this.sdk.callApi( + '/adminusers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userID ID of the user. + * @param {module:model/User} partialUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Patch = function(userID, partialUser, accessToken ) { + var postBody = partialUser; + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Patch"); + } + + // verify the required parameter 'partialUser' is set + if (partialUser == undefined || partialUser == null) { + throw new Error("Missing the required parameter 'partialUser' when calling Patch"); + } + + + var pathParams = { + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/adminusers/{userID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} userID ID of the user. + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Save = function(userID, user, accessToken ) { + var postBody = user; + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Save"); + } + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Save"); + } + + + var pathParams = { + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/adminusers/{userID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListUser":128,"../model/User":211}],17:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ApiClient', 'model/ApiClientAssignment', 'model/ListApiClient', 'model/ListApiClientAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ApiClient'), require('../model/ApiClientAssignment'), require('../model/ListApiClient'), require('../model/ListApiClientAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ApiClients = factory(root.OrderCloud.Sdk, root.OrderCloud.ApiClient, root.OrderCloud.ApiClientAssignment, root.OrderCloud.ListApiClient, root.OrderCloud.ListApiClientAssignment); + } +}(this, function(Sdk, ApiClient, ApiClientAssignment, ListApiClient, ListApiClientAssignment) { + 'use strict'; + + /** + * ApiClient service. + * @module api/ApiClients + */ + + /** + * Constructs a new ApiClients. + * @alias module:api/ApiClients + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/ApiClient} apiClient + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiClient} + */ + this.Create = function(apiClient, accessToken ) { + var postBody = apiClient; + + // verify the required parameter 'apiClient' is set + if (apiClient == undefined || apiClient == null) { + throw new Error("Missing the required parameter 'apiClient' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApiClient; + + return this.sdk.callApi( + '/apiclients', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(apiClientID, accessToken ) { + var postBody = null; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling Delete"); + } + + + var pathParams = { + 'apiClientID': apiClientID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/apiclients/{apiClientID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @param {String} buyerID ID of the buyer. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteBuyerAssignment = function(apiClientID, buyerID, accessToken ) { + var postBody = null; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling DeleteBuyerAssignment"); + } + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteBuyerAssignment"); + } + + + var pathParams = { + 'apiClientID': apiClientID, + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/ApiClients/Assignments/{apiClientID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @param {String} supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteSupplierAssignment = function(apiClientID, supplierID, accessToken ) { + var postBody = null; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling DeleteSupplierAssignment"); + } + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling DeleteSupplierAssignment"); + } + + + var pathParams = { + 'apiClientID': apiClientID, + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/ApiClients/Assignments/{apiClientID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiClient} + */ + this.Get = function(apiClientID, accessToken ) { + var postBody = null; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling Get"); + } + + + var pathParams = { + 'apiClientID': apiClientID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApiClient; + + return this.sdk.callApi( + '/apiclients/{apiClientID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListApiClient} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListApiClient; + + return this.sdk.callApi( + '/apiclients', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.apiClientID ID of the api client. + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.supplierID ID of the supplier. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListApiClientAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'apiClientID': opts['apiClientID'], + 'buyerID': opts['buyerID'], + 'supplierID': opts['supplierID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListApiClientAssignment; + + return this.sdk.callApi( + '/apiclients/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @param {module:model/ApiClient} partialApiClient + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiClient} + */ + this.Patch = function(apiClientID, partialApiClient, accessToken ) { + var postBody = partialApiClient; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling Patch"); + } + + // verify the required parameter 'partialApiClient' is set + if (partialApiClient == undefined || partialApiClient == null) { + throw new Error("Missing the required parameter 'partialApiClient' when calling Patch"); + } + + + var pathParams = { + 'apiClientID': apiClientID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApiClient; + + return this.sdk.callApi( + '/apiclients/{apiClientID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} apiClientID ID of the api client. + * @param {module:model/ApiClient} apiClient + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiClient} + */ + this.Save = function(apiClientID, apiClient, accessToken ) { + var postBody = apiClient; + + // verify the required parameter 'apiClientID' is set + if (apiClientID == undefined || apiClientID == null) { + throw new Error("Missing the required parameter 'apiClientID' when calling Save"); + } + + // verify the required parameter 'apiClient' is set + if (apiClient == undefined || apiClient == null) { + throw new Error("Missing the required parameter 'apiClient' when calling Save"); + } + + + var pathParams = { + 'apiClientID': apiClientID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApiClient; + + return this.sdk.callApi( + '/apiclients/{apiClientID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/ApiClientAssignment} apiClientAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(apiClientAssignment, accessToken ) { + var postBody = apiClientAssignment; + + // verify the required parameter 'apiClientAssignment' is set + if (apiClientAssignment == undefined || apiClientAssignment == null) { + throw new Error("Missing the required parameter 'apiClientAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/apiclients/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ApiClient":54,"../model/ApiClientAssignment":55,"../model/ListApiClient":81,"../model/ListApiClientAssignment":82}],18:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ApprovalRule', 'model/ListApprovalRule'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ApprovalRule'), require('../model/ListApprovalRule')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ApprovalRules = factory(root.OrderCloud.Sdk, root.OrderCloud.ApprovalRule, root.OrderCloud.ListApprovalRule); + } +}(this, function(Sdk, ApprovalRule, ListApprovalRule) { + 'use strict'; + + /** + * ApprovalRule service. + * @module api/ApprovalRules + */ + + /** + * Constructs a new ApprovalRules. + * @alias module:api/ApprovalRules + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/ApprovalRule} approvalRule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRule} + */ + this.Create = function(buyerID, approvalRule, accessToken ) { + var postBody = approvalRule; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'approvalRule' is set + if (approvalRule == undefined || approvalRule == null) { + throw new Error("Missing the required parameter 'approvalRule' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApprovalRule; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} approvalRuleID ID of the approval rule. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, approvalRuleID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'approvalRuleID' is set + if (approvalRuleID == undefined || approvalRuleID == null) { + throw new Error("Missing the required parameter 'approvalRuleID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'approvalRuleID': approvalRuleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules/{approvalRuleID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} approvalRuleID ID of the approval rule. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRule} + */ + this.Get = function(buyerID, approvalRuleID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'approvalRuleID' is set + if (approvalRuleID == undefined || approvalRuleID == null) { + throw new Error("Missing the required parameter 'approvalRuleID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'approvalRuleID': approvalRuleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApprovalRule; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules/{approvalRuleID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListApprovalRule} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListApprovalRule; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} approvalRuleID ID of the approval rule. + * @param {module:model/ApprovalRule} partialApprovalRule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRule} + */ + this.Patch = function(buyerID, approvalRuleID, partialApprovalRule, accessToken ) { + var postBody = partialApprovalRule; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'approvalRuleID' is set + if (approvalRuleID == undefined || approvalRuleID == null) { + throw new Error("Missing the required parameter 'approvalRuleID' when calling Patch"); + } + + // verify the required parameter 'partialApprovalRule' is set + if (partialApprovalRule == undefined || partialApprovalRule == null) { + throw new Error("Missing the required parameter 'partialApprovalRule' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'approvalRuleID': approvalRuleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApprovalRule; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules/{approvalRuleID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} approvalRuleID ID of the approval rule. + * @param {module:model/ApprovalRule} approvalRule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRule} + */ + this.Save = function(buyerID, approvalRuleID, approvalRule, accessToken ) { + var postBody = approvalRule; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'approvalRuleID' is set + if (approvalRuleID == undefined || approvalRuleID == null) { + throw new Error("Missing the required parameter 'approvalRuleID' when calling Save"); + } + + // verify the required parameter 'approvalRule' is set + if (approvalRule == undefined || approvalRule == null) { + throw new Error("Missing the required parameter 'approvalRule' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'approvalRuleID': approvalRuleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ApprovalRule; + + return this.sdk.callApi( + '/buyers/{buyerID}/approvalrules/{approvalRuleID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ApprovalRule":56,"../model/ListApprovalRule":83}],19:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + + +(function(root, factory) { + if (typeof define === 'function' && define.and) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/AccessToken'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/AccessToken')); + } else { + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Auth = factory(root.OrderCloud.Sdk, root.OrderCloud.AccessToken); + } +}(this, function(Sdk, AccessToken) { + 'use strict'; + + /** + * Auth service. + * @module api/Auth + */ + + /** + * Constructs a new Auth. + * @alias module:api/Auth + * @class + * @param {module:Sdk} sdk Optional SDK implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + /** + * @param {String} username of the user logging in + * @param {String} password of the user logging in + * @param {String} clientID of the application the user is logging into + * @param {Array.} scope is a string array of roles the application has access to + */ + this.Login = function(username, password, clientID, scope) { + if (username == undefined || username == null) { + throw new Error("Missing the required parameter 'username' when calling Login"); + } + + if (password == undefined || password == null) { + throw new Error("Missing the required parameter 'password' when calling Login"); + } + + if (clientID == undefined || clientID == null) { + throw new Error("Missing the required parameter 'clientID' when calling Login"); + } + + if (scope == undefined || scope == null) { + throw new Error("Missing the required parameter 'scope' when calling Login"); + } + + var postBody = 'grant_type=password&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID + '&username=' + username + '&password=' + password; + + var pathParams = {}; + var queryParams = {}; + var headerParams = {}; + var formParams = {}; + + var contentTypes = ['application/x-www-form-urlencoded']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callAuth( + '/oauth/token', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType + ); + } + + /** + * @param {String} clientSecret of the application + * @param {String} username of the user logging in + * @param {String} password of the user logging in + * @param {String} clientID of the application the user is logging into + * @param {Array.} scope is a string array of roles the application has access to + */ + this.ElevatedLogin= function(clientSecret, username, password, clientID, scope) { + if (clientSecret == undefined || clientSecret == null) { + throw new Error("Missing the required parameter 'clientSecret' when calling ElevatedLogin") + } + + if (username == undefined || username == null) { + throw new Error("Missing the required parameter 'username' when calling ElevatedLogin"); + } + + if (password == undefined || password == null) { + throw new Error("Missing the required parameter 'password' when calling ElevatedLogin"); + } + + if (clientID == undefined || clientID == null) { + throw new Error("Missing the required parameter 'clientID' when calling ElevatedLogin"); + } + + if (scope == undefined || scope == null) { + throw new Error("Missing the required parameter 'scope' when calling ElevatedLogin"); + } + + var postBody = 'grant_type=password&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID + '&username=' + username + '&password=' + password; + + var pathParams = {}; + var queryParams = {}; + var headerParams = {}; + var formParams = {}; + + var contentTypes = ['application/x-www-form-urlencoded']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callAuth( + '/oauth/token', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType + ); + } + + /** + * @param {String} clientSecret of the application + * @param {String} clientID of the application the user is logging into + * @param {Array.} scope is a string array of roles the application has access to + */ + this.ClientCredentials = function(clientSecret, clientID, scope) { + if (clientSecret == undefined || clientSecret == null) { + throw new Error("Missing the required parameter 'clientSecret' when calling ElevatedLogin") + } + + if (clientID == undefined || clientID == null) { + throw new Error("Missing the required parameter 'clientID' when calling ElevatedLogin"); + } + + if (scope == undefined || scope == null) { + throw new Error("Missing the required parameter 'scope' when calling ElevatedLogin"); + } + + var postBody = 'grant_type=client_credentials&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID; + + var pathParams = {}; + var queryParams = {}; + var headerParams = {}; + var formParams = {}; + + var contentTypes = ['application/x-www-form-urlencoded']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callAuth( + '/oauth/token', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType + ); + } + + /** + * @param {String} refreshToken of the application + * @param {String} clientID of the application the user is logging into + * @param {Array.} scope is a string array of roles the application has access to + */ + this.RefreshToken = function(refreshToken, clientID, scope) { + if (refreshToken == undefined || refreshToken == null) { + throw new Error("Missing the required parameter 'refreshToken' when calling RefreshToken") + } + + if (clientID == undefined || clientID == null) { + throw new Error("Missing the required parameter 'clientID' when calling RefreshToken"); + } + + if (scope == undefined || scope == null) { + throw new Error("Missing the required parameter 'scope' when calling RefreshToken"); + } + + var postBody = 'grant_type=refresh_token&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&refresh_token=' + refreshToken + '&client_id=' + clientID; + + var pathParams = {}; + var queryParams = {}; + var headerParams = {}; + var formParams = {}; + + var contentTypes = ['application/x-www-form-urlencoded']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callAuth( + '/oauth/token', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType + ); + } + + /** + * @param {String} clientID of the application the user is logging into + * @param {Array.} scope is a string array of roles the application has access to + */ + this.Anonymous = function(clientID, scope) { + if (clientID == undefined || clientID == null) { + throw new Error("Missing the required parameter 'clientID' when calling RefreshToken"); + } + + if (scope == undefined || scope == null) { + throw new Error("Missing the required parameter 'scope' when calling RefreshToken"); + } + + var postBody = 'grant_type=client_credentials&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID; + + var pathParams = {}; + var queryParams = {}; + var headerParams = {}; + var formParams = {}; + + var contentTypes = ['application/x-www-form-urlencoded']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callAuth( + '/oauth/token', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType + ); + } + }; + + return exports; +})); +},{"../Sdk":12,"../model/AccessToken":51}],20:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Buyer', 'model/ListBuyer'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Buyer'), require('../model/ListBuyer')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Buyers = factory(root.OrderCloud.Sdk, root.OrderCloud.Buyer, root.OrderCloud.ListBuyer); + } +}(this, function(Sdk, Buyer, ListBuyer) { + 'use strict'; + + /** + * Buyer service. + * @module api/Buyers + */ + + /** + * Constructs a new Buyers. + * @alias module:api/Buyers + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Buyer} buyer + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Buyer} + */ + this.Create = function(buyer, accessToken ) { + var postBody = buyer; + + // verify the required parameter 'buyer' is set + if (buyer == undefined || buyer == null) { + throw new Error("Missing the required parameter 'buyer' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Buyer; + + return this.sdk.callApi( + '/buyers', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Buyer} + */ + this.Get = function(buyerID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Buyer; + + return this.sdk.callApi( + '/buyers/{buyerID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBuyer} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListBuyer; + + return this.sdk.callApi( + '/buyers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/Buyer} partialBuyer + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Buyer} + */ + this.Patch = function(buyerID, partialBuyer, accessToken ) { + var postBody = partialBuyer; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'partialBuyer' is set + if (partialBuyer == undefined || partialBuyer == null) { + throw new Error("Missing the required parameter 'partialBuyer' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Buyer; + + return this.sdk.callApi( + '/buyers/{buyerID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/Buyer} buyer + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Buyer} + */ + this.Save = function(buyerID, buyer, accessToken ) { + var postBody = buyer; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'buyer' is set + if (buyer == undefined || buyer == null) { + throw new Error("Missing the required parameter 'buyer' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Buyer; + + return this.sdk.callApi( + '/buyers/{buyerID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Buyer":57,"../model/ListBuyer":84}],21:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Catalog', 'model/CatalogAssignment', 'model/ListCatalog', 'model/ListCatalogAssignment', 'model/ListProductCatalogAssignment', 'model/ProductCatalogAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Catalog'), require('../model/CatalogAssignment'), require('../model/ListCatalog'), require('../model/ListCatalogAssignment'), require('../model/ListProductCatalogAssignment'), require('../model/ProductCatalogAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Catalogs = factory(root.OrderCloud.Sdk, root.OrderCloud.Catalog, root.OrderCloud.CatalogAssignment, root.OrderCloud.ListCatalog, root.OrderCloud.ListCatalogAssignment, root.OrderCloud.ListProductCatalogAssignment, root.OrderCloud.ProductCatalogAssignment); + } +}(this, function(Sdk, Catalog, CatalogAssignment, ListCatalog, ListCatalogAssignment, ListProductCatalogAssignment, ProductCatalogAssignment) { + 'use strict'; + + /** + * Catalog service. + * @module api/Catalogs + */ + + /** + * Constructs a new Catalogs. + * @alias module:api/Catalogs + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Catalog} catalog + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Catalog} + */ + this.Create = function(catalog, accessToken ) { + var postBody = catalog; + + // verify the required parameter 'catalog' is set + if (catalog == undefined || catalog == null) { + throw new Error("Missing the required parameter 'catalog' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Catalog; + + return this.sdk.callApi( + '/catalogs', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(catalogID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Delete"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} buyerID ID of the buyer. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(catalogID, buyerID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling DeleteAssignment"); + } + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + 'buyerID': buyerID + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteProductAssignment = function(catalogID, productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling DeleteProductAssignment"); + } + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling DeleteProductAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/productassignments/{productID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Catalog} + */ + this.Get = function(catalogID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Get"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Catalog; + + return this.sdk.callApi( + '/catalogs/{catalogID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCatalog} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCatalog; + + return this.sdk.callApi( + '/catalogs', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.buyerID ID of the buyer. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCatalogAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'catalogID': opts['catalogID'], + 'buyerID': opts['buyerID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCatalogAssignment; + + return this.sdk.callApi( + '/catalogs/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.productID ID of the product. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListProductCatalogAssignment} + */ + this.ListProductAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'catalogID': opts['catalogID'], + 'productID': opts['productID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListProductCatalogAssignment; + + return this.sdk.callApi( + '/catalogs/productassignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {module:model/Catalog} partialCatalog + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Catalog} + */ + this.Patch = function(catalogID, partialCatalog, accessToken ) { + var postBody = partialCatalog; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Patch"); + } + + // verify the required parameter 'partialCatalog' is set + if (partialCatalog == undefined || partialCatalog == null) { + throw new Error("Missing the required parameter 'partialCatalog' when calling Patch"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Catalog; + + return this.sdk.callApi( + '/catalogs/{catalogID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {module:model/Catalog} catalog + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Catalog} + */ + this.Save = function(catalogID, catalog, accessToken ) { + var postBody = catalog; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Save"); + } + + // verify the required parameter 'catalog' is set + if (catalog == undefined || catalog == null) { + throw new Error("Missing the required parameter 'catalog' when calling Save"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Catalog; + + return this.sdk.callApi( + '/catalogs/{catalogID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/CatalogAssignment} catalogAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(catalogAssignment, accessToken ) { + var postBody = catalogAssignment; + + // verify the required parameter 'catalogAssignment' is set + if (catalogAssignment == undefined || catalogAssignment == null) { + throw new Error("Missing the required parameter 'catalogAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/ProductCatalogAssignment} productCatalogAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveProductAssignment = function(productCatalogAssignment, accessToken ) { + var postBody = productCatalogAssignment; + + // verify the required parameter 'productCatalogAssignment' is set + if (productCatalogAssignment == undefined || productCatalogAssignment == null) { + throw new Error("Missing the required parameter 'productCatalogAssignment' when calling SaveProductAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/productassignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Catalog":62,"../model/CatalogAssignment":63,"../model/ListCatalog":89,"../model/ListCatalogAssignment":90,"../model/ListProductCatalogAssignment":114,"../model/ProductCatalogAssignment":196}],22:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Category', 'model/CategoryAssignment', 'model/CategoryProductAssignment', 'model/ListCategory', 'model/ListCategoryAssignment', 'model/ListCategoryProductAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Category'), require('../model/CategoryAssignment'), require('../model/CategoryProductAssignment'), require('../model/ListCategory'), require('../model/ListCategoryAssignment'), require('../model/ListCategoryProductAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Categories = factory(root.OrderCloud.Sdk, root.OrderCloud.Category, root.OrderCloud.CategoryAssignment, root.OrderCloud.CategoryProductAssignment, root.OrderCloud.ListCategory, root.OrderCloud.ListCategoryAssignment, root.OrderCloud.ListCategoryProductAssignment); + } +}(this, function(Sdk, Category, CategoryAssignment, CategoryProductAssignment, ListCategory, ListCategoryAssignment, ListCategoryProductAssignment) { + 'use strict'; + + /** + * Category service. + * @module api/Categories + */ + + /** + * Constructs a new Categories. + * @alias module:api/Categories + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} catalogID ID of the catalog. + * @param {module:model/Category} category + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Category} + */ + this.Create = function(catalogID, category, accessToken ) { + var postBody = category; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Create"); + } + + // verify the required parameter 'category' is set + if (category == undefined || category == null) { + throw new Error("Missing the required parameter 'category' when calling Create"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Category; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(catalogID, categoryID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Delete"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling Delete"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(catalogID, categoryID, buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling DeleteAssignment"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling DeleteAssignment"); + } + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID + }; + var queryParams = { + 'buyerID': buyerID, + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteProductAssignment = function(catalogID, categoryID, productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling DeleteProductAssignment"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling DeleteProductAssignment"); + } + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling DeleteProductAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID, + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}/productassignments/{productID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Category} + */ + this.Get = function(catalogID, categoryID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Get"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling Get"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Category; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {Object} opts Optional parameters + * @param {String} opts.depth Depth of the category. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCategory} + */ + this.List = function(catalogID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling List"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + 'depth': opts['depth'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCategory; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {Object} opts Optional parameters + * @param {String} opts.categoryID ID of the category. + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the category assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCategoryAssignment} + */ + this.ListAssignments = function(catalogID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling ListAssignments"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + 'categoryID': opts['categoryID'], + 'buyerID': opts['buyerID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCategoryAssignment; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {Object} opts Optional parameters + * @param {String} opts.categoryID ID of the category. + * @param {String} opts.productID ID of the product. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCategoryProductAssignment} + */ + this.ListProductAssignments = function(catalogID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling ListProductAssignments"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + 'categoryID': opts['categoryID'], + 'productID': opts['productID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCategoryProductAssignment; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/productassignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @param {module:model/Category} partialCategory + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Category} + */ + this.Patch = function(catalogID, categoryID, partialCategory, accessToken ) { + var postBody = partialCategory; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Patch"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling Patch"); + } + + // verify the required parameter 'partialCategory' is set + if (partialCategory == undefined || partialCategory == null) { + throw new Error("Missing the required parameter 'partialCategory' when calling Patch"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Category; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {String} categoryID ID of the category. + * @param {module:model/Category} category + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Category} + */ + this.Save = function(catalogID, categoryID, category, accessToken ) { + var postBody = category; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling Save"); + } + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling Save"); + } + + // verify the required parameter 'category' is set + if (category == undefined || category == null) { + throw new Error("Missing the required parameter 'category' when calling Save"); + } + + + var pathParams = { + 'catalogID': catalogID, + 'categoryID': categoryID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Category; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/{categoryID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {module:model/CategoryAssignment} categoryAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(catalogID, categoryAssignment, accessToken ) { + var postBody = categoryAssignment; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling SaveAssignment"); + } + + // verify the required parameter 'categoryAssignment' is set + if (categoryAssignment == undefined || categoryAssignment == null) { + throw new Error("Missing the required parameter 'categoryAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @param {module:model/CategoryProductAssignment} categoryProductAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveProductAssignment = function(catalogID, categoryProductAssignment, accessToken ) { + var postBody = categoryProductAssignment; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling SaveProductAssignment"); + } + + // verify the required parameter 'categoryProductAssignment' is set + if (categoryProductAssignment == undefined || categoryProductAssignment == null) { + throw new Error("Missing the required parameter 'categoryProductAssignment' when calling SaveProductAssignment"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/catalogs/{catalogID}/categories/productassignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Category":64,"../model/CategoryAssignment":65,"../model/CategoryProductAssignment":66,"../model/ListCategory":91,"../model/ListCategoryAssignment":92,"../model/ListCategoryProductAssignment":93}],23:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CostCenter', 'model/CostCenterAssignment', 'model/ListCostCenter', 'model/ListCostCenterAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/CostCenter'), require('../model/CostCenterAssignment'), require('../model/ListCostCenter'), require('../model/ListCostCenterAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CostCenters = factory(root.OrderCloud.Sdk, root.OrderCloud.CostCenter, root.OrderCloud.CostCenterAssignment, root.OrderCloud.ListCostCenter, root.OrderCloud.ListCostCenterAssignment); + } +}(this, function(Sdk, CostCenter, CostCenterAssignment, ListCostCenter, ListCostCenterAssignment) { + 'use strict'; + + /** + * CostCenter service. + * @module api/CostCenters + */ + + /** + * Constructs a new CostCenters. + * @alias module:api/CostCenters + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/CostCenter} costCenter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CostCenter} + */ + this.Create = function(buyerID, costCenter, accessToken ) { + var postBody = costCenter; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'costCenter' is set + if (costCenter == undefined || costCenter == null) { + throw new Error("Missing the required parameter 'costCenter' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CostCenter; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} costCenterID ID of the cost center. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, costCenterID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'costCenterID' is set + if (costCenterID == undefined || costCenterID == null) { + throw new Error("Missing the required parameter 'costCenterID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'costCenterID': costCenterID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/{costCenterID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} costCenterID ID of the cost center. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(buyerID, costCenterID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + // verify the required parameter 'costCenterID' is set + if (costCenterID == undefined || costCenterID == null) { + throw new Error("Missing the required parameter 'costCenterID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'costCenterID': costCenterID + }; + var queryParams = { + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/{costCenterID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} costCenterID ID of the cost center. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CostCenter} + */ + this.Get = function(buyerID, costCenterID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'costCenterID' is set + if (costCenterID == undefined || costCenterID == null) { + throw new Error("Missing the required parameter 'costCenterID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'costCenterID': costCenterID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CostCenter; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/{costCenterID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCostCenter} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCostCenter; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.costCenterID ID of the cost center. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the cost center assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCostCenterAssignment} + */ + this.ListAssignments = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling ListAssignments"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'costCenterID': opts['costCenterID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCostCenterAssignment; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} costCenterID ID of the cost center. + * @param {module:model/CostCenter} partialCostCenter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CostCenter} + */ + this.Patch = function(buyerID, costCenterID, partialCostCenter, accessToken ) { + var postBody = partialCostCenter; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'costCenterID' is set + if (costCenterID == undefined || costCenterID == null) { + throw new Error("Missing the required parameter 'costCenterID' when calling Patch"); + } + + // verify the required parameter 'partialCostCenter' is set + if (partialCostCenter == undefined || partialCostCenter == null) { + throw new Error("Missing the required parameter 'partialCostCenter' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'costCenterID': costCenterID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CostCenter; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/{costCenterID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} costCenterID ID of the cost center. + * @param {module:model/CostCenter} costCenter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CostCenter} + */ + this.Save = function(buyerID, costCenterID, costCenter, accessToken ) { + var postBody = costCenter; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'costCenterID' is set + if (costCenterID == undefined || costCenterID == null) { + throw new Error("Missing the required parameter 'costCenterID' when calling Save"); + } + + // verify the required parameter 'costCenter' is set + if (costCenter == undefined || costCenter == null) { + throw new Error("Missing the required parameter 'costCenter' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'costCenterID': costCenterID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CostCenter; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/{costCenterID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/CostCenterAssignment} costCenterAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(buyerID, costCenterAssignment, accessToken ) { + var postBody = costCenterAssignment; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling SaveAssignment"); + } + + // verify the required parameter 'costCenterAssignment' is set + if (costCenterAssignment == undefined || costCenterAssignment == null) { + throw new Error("Missing the required parameter 'costCenterAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/costcenters/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/CostCenter":67,"../model/CostCenterAssignment":68,"../model/ListCostCenter":94,"../model/ListCostCenterAssignment":95}],24:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CreditCard', 'model/CreditCardAssignment', 'model/ListCreditCard', 'model/ListCreditCardAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/CreditCard'), require('../model/CreditCardAssignment'), require('../model/ListCreditCard'), require('../model/ListCreditCardAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CreditCards = factory(root.OrderCloud.Sdk, root.OrderCloud.CreditCard, root.OrderCloud.CreditCardAssignment, root.OrderCloud.ListCreditCard, root.OrderCloud.ListCreditCardAssignment); + } +}(this, function(Sdk, CreditCard, CreditCardAssignment, ListCreditCard, ListCreditCardAssignment) { + 'use strict'; + + /** + * CreditCard service. + * @module api/CreditCards + */ + + /** + * Constructs a new CreditCards. + * @alias module:api/CreditCards + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/CreditCard} creditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreditCard} + */ + this.Create = function(buyerID, creditCard, accessToken ) { + var postBody = creditCard; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'creditCard' is set + if (creditCard == undefined || creditCard == null) { + throw new Error("Missing the required parameter 'creditCard' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CreditCard; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} creditCardID ID of the credit card. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, creditCardID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'creditCardID' is set + if (creditCardID == undefined || creditCardID == null) { + throw new Error("Missing the required parameter 'creditCardID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'creditCardID': creditCardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/{creditCardID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} creditCardID ID of the credit card. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(buyerID, creditCardID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + // verify the required parameter 'creditCardID' is set + if (creditCardID == undefined || creditCardID == null) { + throw new Error("Missing the required parameter 'creditCardID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'creditCardID': creditCardID + }; + var queryParams = { + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/{creditCardID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} creditCardID ID of the credit card. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreditCard} + */ + this.Get = function(buyerID, creditCardID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'creditCardID' is set + if (creditCardID == undefined || creditCardID == null) { + throw new Error("Missing the required parameter 'creditCardID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'creditCardID': creditCardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CreditCard; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/{creditCardID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCreditCard} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCreditCard; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.creditCardID ID of the credit card. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the credit card assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCreditCardAssignment} + */ + this.ListAssignments = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling ListAssignments"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'creditCardID': opts['creditCardID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCreditCardAssignment; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} creditCardID ID of the credit card. + * @param {module:model/CreditCard} partialCreditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreditCard} + */ + this.Patch = function(buyerID, creditCardID, partialCreditCard, accessToken ) { + var postBody = partialCreditCard; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'creditCardID' is set + if (creditCardID == undefined || creditCardID == null) { + throw new Error("Missing the required parameter 'creditCardID' when calling Patch"); + } + + // verify the required parameter 'partialCreditCard' is set + if (partialCreditCard == undefined || partialCreditCard == null) { + throw new Error("Missing the required parameter 'partialCreditCard' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'creditCardID': creditCardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CreditCard; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/{creditCardID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} creditCardID ID of the credit card. + * @param {module:model/CreditCard} creditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreditCard} + */ + this.Save = function(buyerID, creditCardID, creditCard, accessToken ) { + var postBody = creditCard; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'creditCardID' is set + if (creditCardID == undefined || creditCardID == null) { + throw new Error("Missing the required parameter 'creditCardID' when calling Save"); + } + + // verify the required parameter 'creditCard' is set + if (creditCard == undefined || creditCard == null) { + throw new Error("Missing the required parameter 'creditCard' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'creditCardID': creditCardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = CreditCard; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/{creditCardID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/CreditCardAssignment} creditCardAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(buyerID, creditCardAssignment, accessToken ) { + var postBody = creditCardAssignment; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling SaveAssignment"); + } + + // verify the required parameter 'creditCardAssignment' is set + if (creditCardAssignment == undefined || creditCardAssignment == null) { + throw new Error("Missing the required parameter 'creditCardAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/creditcards/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/CreditCard":69,"../model/CreditCardAssignment":70,"../model/ListCreditCard":96,"../model/ListCreditCardAssignment":97}],25:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ImpersonationConfig', 'model/ListImpersonationConfig'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ImpersonationConfig'), require('../model/ListImpersonationConfig')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ImpersonationConfigs = factory(root.OrderCloud.Sdk, root.OrderCloud.ImpersonationConfig, root.OrderCloud.ListImpersonationConfig); + } +}(this, function(Sdk, ImpersonationConfig, ListImpersonationConfig) { + 'use strict'; + + /** + * ImpersonationConfig service. + * @module api/ImpersonationConfigs + */ + + /** + * Constructs a new ImpersonationConfigs. + * @alias module:api/ImpersonationConfigs + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/ImpersonationConfig} impersonationConfig + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ImpersonationConfig} + */ + this.Create = function(impersonationConfig, accessToken ) { + var postBody = impersonationConfig; + + // verify the required parameter 'impersonationConfig' is set + if (impersonationConfig == undefined || impersonationConfig == null) { + throw new Error("Missing the required parameter 'impersonationConfig' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ImpersonationConfig; + + return this.sdk.callApi( + '/impersonationconfig', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} impersonationConfigID ID of the impersonation config. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(impersonationConfigID, accessToken ) { + var postBody = null; + + // verify the required parameter 'impersonationConfigID' is set + if (impersonationConfigID == undefined || impersonationConfigID == null) { + throw new Error("Missing the required parameter 'impersonationConfigID' when calling Delete"); + } + + + var pathParams = { + 'impersonationConfigID': impersonationConfigID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/impersonationconfig/{impersonationConfigID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} impersonationConfigID ID of the impersonation config. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ImpersonationConfig} + */ + this.Get = function(impersonationConfigID, accessToken ) { + var postBody = null; + + // verify the required parameter 'impersonationConfigID' is set + if (impersonationConfigID == undefined || impersonationConfigID == null) { + throw new Error("Missing the required parameter 'impersonationConfigID' when calling Get"); + } + + + var pathParams = { + 'impersonationConfigID': impersonationConfigID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ImpersonationConfig; + + return this.sdk.callApi( + '/impersonationconfig/{impersonationConfigID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListImpersonationConfig} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListImpersonationConfig; + + return this.sdk.callApi( + '/impersonationconfig', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} impersonationConfigID ID of the impersonation config. + * @param {module:model/ImpersonationConfig} partialImpersonationConfig + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ImpersonationConfig} + */ + this.Patch = function(impersonationConfigID, partialImpersonationConfig, accessToken ) { + var postBody = partialImpersonationConfig; + + // verify the required parameter 'impersonationConfigID' is set + if (impersonationConfigID == undefined || impersonationConfigID == null) { + throw new Error("Missing the required parameter 'impersonationConfigID' when calling Patch"); + } + + // verify the required parameter 'partialImpersonationConfig' is set + if (partialImpersonationConfig == undefined || partialImpersonationConfig == null) { + throw new Error("Missing the required parameter 'partialImpersonationConfig' when calling Patch"); + } + + + var pathParams = { + 'impersonationConfigID': impersonationConfigID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ImpersonationConfig; + + return this.sdk.callApi( + '/impersonationconfig/{impersonationConfigID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} impersonationConfigID ID of the impersonation config. + * @param {module:model/ImpersonationConfig} impersonationConfig + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ImpersonationConfig} + */ + this.Save = function(impersonationConfigID, impersonationConfig, accessToken ) { + var postBody = impersonationConfig; + + // verify the required parameter 'impersonationConfigID' is set + if (impersonationConfigID == undefined || impersonationConfigID == null) { + throw new Error("Missing the required parameter 'impersonationConfigID' when calling Save"); + } + + // verify the required parameter 'impersonationConfig' is set + if (impersonationConfig == undefined || impersonationConfig == null) { + throw new Error("Missing the required parameter 'impersonationConfig' when calling Save"); + } + + + var pathParams = { + 'impersonationConfigID': impersonationConfigID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ImpersonationConfig; + + return this.sdk.callApi( + '/impersonationconfig/{impersonationConfigID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ImpersonationConfig":72,"../model/ListImpersonationConfig":100}],26:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Incrementor', 'model/ListIncrementor'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Incrementor'), require('../model/ListIncrementor')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Incrementors = factory(root.OrderCloud.Sdk, root.OrderCloud.Incrementor, root.OrderCloud.ListIncrementor); + } +}(this, function(Sdk, Incrementor, ListIncrementor) { + 'use strict'; + + /** + * Incrementor service. + * @module api/Incrementors + */ + + /** + * Constructs a new Incrementors. + * @alias module:api/Incrementors + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Incrementor} incrementor + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Incrementor} + */ + this.Create = function(incrementor, accessToken ) { + var postBody = incrementor; + + // verify the required parameter 'incrementor' is set + if (incrementor == undefined || incrementor == null) { + throw new Error("Missing the required parameter 'incrementor' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Incrementor; + + return this.sdk.callApi( + '/incrementors', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} incrementorID ID of the incrementor. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(incrementorID, accessToken ) { + var postBody = null; + + // verify the required parameter 'incrementorID' is set + if (incrementorID == undefined || incrementorID == null) { + throw new Error("Missing the required parameter 'incrementorID' when calling Delete"); + } + + + var pathParams = { + 'incrementorID': incrementorID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/incrementors/{incrementorID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} incrementorID ID of the incrementor. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Incrementor} + */ + this.Get = function(incrementorID, accessToken ) { + var postBody = null; + + // verify the required parameter 'incrementorID' is set + if (incrementorID == undefined || incrementorID == null) { + throw new Error("Missing the required parameter 'incrementorID' when calling Get"); + } + + + var pathParams = { + 'incrementorID': incrementorID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Incrementor; + + return this.sdk.callApi( + '/incrementors/{incrementorID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListIncrementor} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListIncrementor; + + return this.sdk.callApi( + '/incrementors', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} incrementorID ID of the incrementor. + * @param {module:model/Incrementor} partialIncrementor + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Incrementor} + */ + this.Patch = function(incrementorID, partialIncrementor, accessToken ) { + var postBody = partialIncrementor; + + // verify the required parameter 'incrementorID' is set + if (incrementorID == undefined || incrementorID == null) { + throw new Error("Missing the required parameter 'incrementorID' when calling Patch"); + } + + // verify the required parameter 'partialIncrementor' is set + if (partialIncrementor == undefined || partialIncrementor == null) { + throw new Error("Missing the required parameter 'partialIncrementor' when calling Patch"); + } + + + var pathParams = { + 'incrementorID': incrementorID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Incrementor; + + return this.sdk.callApi( + '/incrementors/{incrementorID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} incrementorID ID of the incrementor. + * @param {module:model/Incrementor} incrementor + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Incrementor} + */ + this.Save = function(incrementorID, incrementor, accessToken ) { + var postBody = incrementor; + + // verify the required parameter 'incrementorID' is set + if (incrementorID == undefined || incrementorID == null) { + throw new Error("Missing the required parameter 'incrementorID' when calling Save"); + } + + // verify the required parameter 'incrementor' is set + if (incrementor == undefined || incrementor == null) { + throw new Error("Missing the required parameter 'incrementor' when calling Save"); + } + + + var pathParams = { + 'incrementorID': incrementorID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Incrementor; + + return this.sdk.callApi( + '/incrementors/{incrementorID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Incrementor":73,"../model/ListIncrementor":101}],27:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/LineItem', 'model/ListLineItem'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Address'), require('../model/LineItem'), require('../model/ListLineItem')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.LineItems = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.LineItem, root.OrderCloud.ListLineItem); + } +}(this, function(Sdk, Address, LineItem, ListLineItem) { + 'use strict'; + + /** + * LineItem service. + * @module api/LineItems + */ + + /** + * Constructs a new LineItems. + * @alias module:api/LineItems + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/LineItem} lineItem + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.Create = function(direction, orderID, lineItem, accessToken ) { + var postBody = lineItem; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Create"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Create"); + } + + // verify the required parameter 'lineItem' is set + if (lineItem == undefined || lineItem == null) { + throw new Error("Missing the required parameter 'lineItem' when calling Create"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(direction, orderID, lineItemID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Delete"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Delete"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling Delete"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.Get = function(direction, orderID, lineItemID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Get"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Get"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling Get"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLineItem} + */ + this.List = function(direction, orderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling List"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling List"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListLineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @param {module:model/LineItem} partialLineItem + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.Patch = function(direction, orderID, lineItemID, partialLineItem, accessToken ) { + var postBody = partialLineItem; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Patch"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Patch"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling Patch"); + } + + // verify the required parameter 'partialLineItem' is set + if (partialLineItem == undefined || partialLineItem == null) { + throw new Error("Missing the required parameter 'partialLineItem' when calling Patch"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.PatchShippingAddress = function(direction, orderID, lineItemID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling PatchShippingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling PatchShippingAddress"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling PatchShippingAddress"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling PatchShippingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @param {module:model/LineItem} lineItem + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.Save = function(direction, orderID, lineItemID, lineItem, accessToken ) { + var postBody = lineItem; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Save"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Save"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling Save"); + } + + // verify the required parameter 'lineItem' is set + if (lineItem == undefined || lineItem == null) { + throw new Error("Missing the required parameter 'lineItem' when calling Save"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LineItem} + */ + this.SetShippingAddress = function(direction, orderID, lineItemID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling SetShippingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling SetShippingAddress"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling SetShippingAddress"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling SetShippingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = LineItem; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Address":52,"../model/LineItem":75,"../model/ListLineItem":102}],28:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/BuyerAddress', 'model/BuyerCreditCard', 'model/BuyerProduct', 'model/BuyerSpec', 'model/Catalog', 'model/Category', 'model/ListBuyerAddress', 'model/ListBuyerCreditCard', 'model/ListBuyerProduct', 'model/ListBuyerSpec', 'model/ListCatalog', 'model/ListCategory', 'model/ListCostCenter', 'model/ListOrder', 'model/ListPromotion', 'model/ListShipment', 'model/ListShipmentItem', 'model/ListSpendingAccount', 'model/ListUserGroup', 'model/MeUser', 'model/Promotion', 'model/Shipment', 'model/SpendingAccount', 'model/TokenPasswordReset'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/BuyerAddress'), require('../model/BuyerCreditCard'), require('../model/BuyerProduct'), require('../model/BuyerSpec'), require('../model/Catalog'), require('../model/Category'), require('../model/ListBuyerAddress'), require('../model/ListBuyerCreditCard'), require('../model/ListBuyerProduct'), require('../model/ListBuyerSpec'), require('../model/ListCatalog'), require('../model/ListCategory'), require('../model/ListCostCenter'), require('../model/ListOrder'), require('../model/ListPromotion'), require('../model/ListShipment'), require('../model/ListShipmentItem'), require('../model/ListSpendingAccount'), require('../model/ListUserGroup'), require('../model/MeUser'), require('../model/Promotion'), require('../model/Shipment'), require('../model/SpendingAccount'), require('../model/TokenPasswordReset')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Me = factory(root.OrderCloud.Sdk, root.OrderCloud.BuyerAddress, root.OrderCloud.BuyerCreditCard, root.OrderCloud.BuyerProduct, root.OrderCloud.BuyerSpec, root.OrderCloud.Catalog, root.OrderCloud.Category, root.OrderCloud.ListBuyerAddress, root.OrderCloud.ListBuyerCreditCard, root.OrderCloud.ListBuyerProduct, root.OrderCloud.ListBuyerSpec, root.OrderCloud.ListCatalog, root.OrderCloud.ListCategory, root.OrderCloud.ListCostCenter, root.OrderCloud.ListOrder, root.OrderCloud.ListPromotion, root.OrderCloud.ListShipment, root.OrderCloud.ListShipmentItem, root.OrderCloud.ListSpendingAccount, root.OrderCloud.ListUserGroup, root.OrderCloud.MeUser, root.OrderCloud.Promotion, root.OrderCloud.Shipment, root.OrderCloud.SpendingAccount, root.OrderCloud.TokenPasswordReset); + } +}(this, function(Sdk, BuyerAddress, BuyerCreditCard, BuyerProduct, BuyerSpec, Catalog, Category, ListBuyerAddress, ListBuyerCreditCard, ListBuyerProduct, ListBuyerSpec, ListCatalog, ListCategory, ListCostCenter, ListOrder, ListPromotion, ListShipment, ListShipmentItem, ListSpendingAccount, ListUserGroup, MeUser, Promotion, Shipment, SpendingAccount, TokenPasswordReset) { + 'use strict'; + + /** + * Me service. + * @module api/Me + */ + + /** + * Constructs a new Me. + * @alias module:api/Me + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/BuyerAddress} buyerAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerAddress} + */ + this.CreateAddress = function(buyerAddress, accessToken ) { + var postBody = buyerAddress; + + // verify the required parameter 'buyerAddress' is set + if (buyerAddress == undefined || buyerAddress == null) { + throw new Error("Missing the required parameter 'buyerAddress' when calling CreateAddress"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerAddress; + + return this.sdk.callApi( + '/me/addresses', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/BuyerCreditCard} buyerCreditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerCreditCard} + */ + this.CreateCreditCard = function(buyerCreditCard, accessToken ) { + var postBody = buyerCreditCard; + + // verify the required parameter 'buyerCreditCard' is set + if (buyerCreditCard == undefined || buyerCreditCard == null) { + throw new Error("Missing the required parameter 'buyerCreditCard' when calling CreateCreditCard"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerCreditCard; + + return this.sdk.callApi( + '/me/creditcards', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAddress = function(addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling DeleteAddress"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/addresses/{addressID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} creditcardID ID of the creditcard. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteCreditCard = function(creditcardID, accessToken ) { + var postBody = null; + + // verify the required parameter 'creditcardID' is set + if (creditcardID == undefined || creditcardID == null) { + throw new Error("Missing the required parameter 'creditcardID' when calling DeleteCreditCard"); + } + + + var pathParams = { + 'creditcardID': creditcardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/creditcards/{creditcardID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MeUser} + */ + this.Get = function( accessToken ) { + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MeUser; + + return this.sdk.callApi( + '/me', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerAddress} + */ + this.GetAddress = function(addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling GetAddress"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerAddress; + + return this.sdk.callApi( + '/me/addresses/{addressID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} catalogID ID of the catalog. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Catalog} + */ + this.GetCatalog = function(catalogID, accessToken ) { + var postBody = null; + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling GetCatalog"); + } + + + var pathParams = { + 'catalogID': catalogID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Catalog; + + return this.sdk.callApi( + '/me/catalogs/{catalogID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} categoryID ID of the category. + * @param {String} catalogID ID of the catalog. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Category} + */ + this.GetCategory = function(categoryID, catalogID, accessToken ) { + var postBody = null; + + // verify the required parameter 'categoryID' is set + if (categoryID == undefined || categoryID == null) { + throw new Error("Missing the required parameter 'categoryID' when calling GetCategory"); + } + + // verify the required parameter 'catalogID' is set + if (catalogID == undefined || catalogID == null) { + throw new Error("Missing the required parameter 'catalogID' when calling GetCategory"); + } + + + var pathParams = { + 'categoryID': categoryID + }; + var queryParams = { + 'catalogID': catalogID + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Category; + + return this.sdk.callApi( + '/me/categories/{categoryID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} creditcardID ID of the creditcard. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerCreditCard} + */ + this.GetCreditCard = function(creditcardID, accessToken ) { + var postBody = null; + + // verify the required parameter 'creditcardID' is set + if (creditcardID == undefined || creditcardID == null) { + throw new Error("Missing the required parameter 'creditcardID' when calling GetCreditCard"); + } + + + var pathParams = { + 'creditcardID': creditcardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerCreditCard; + + return this.sdk.callApi( + '/me/creditcards/{creditcardID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerProduct} + */ + this.GetProduct = function(productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling GetProduct"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerProduct; + + return this.sdk.callApi( + '/me/products/{productID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Promotion} + */ + this.GetPromotion = function(promotionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling GetPromotion"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Promotion; + + return this.sdk.callApi( + '/me/promotions/{promotionID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Shipment} + */ + this.GetShipment = function(shipmentID, accessToken ) { + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling GetShipment"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Shipment; + + return this.sdk.callApi( + '/me/shipments/{shipmentID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} specID ID of the spec. + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerSpec} + */ + this.GetSpec = function(productID, specID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling GetSpec"); + } + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling GetSpec"); + } + + + var pathParams = { + 'productID': productID, + 'specID': specID + }; + var queryParams = { + 'catalogID': opts['catalogID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerSpec; + + return this.sdk.callApi( + '/me/products/{productID}/specs/{specID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} spendingAccountID ID of the spending account. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpendingAccount} + */ + this.GetSpendingAccount = function(spendingAccountID, accessToken ) { + var postBody = null; + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling GetSpendingAccount"); + } + + + var pathParams = { + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpendingAccount; + + return this.sdk.callApi( + '/me/spendingaccounts/{spendingAccountID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBuyerAddress} + */ + this.ListAddresses = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListBuyerAddress; + + return this.sdk.callApi( + '/me/addresses', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). + * @param {String} opts.to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOrder} + */ + this.ListApprovableOrders = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'from': opts['from'], + 'to': opts['to'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOrder; + + return this.sdk.callApi( + '/me/orders/approvable', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCatalog} + */ + this.ListCatalogs = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCatalog; + + return this.sdk.callApi( + '/me/catalogs', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.depth Indicates how deep down the hierarchy to return results. Valid values are a number of 1 or greater, or 'all'. Relative to ParentID if specified. Default is 1. + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.productID ID of the product. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCategory} + */ + this.ListCategories = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'depth': opts['depth'], + 'catalogID': opts['catalogID'], + 'productID': opts['productID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCategory; + + return this.sdk.callApi( + '/me/categories', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCostCenter} + */ + this.ListCostCenters = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListCostCenter; + + return this.sdk.callApi( + '/me/costcenters', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBuyerCreditCard} + */ + this.ListCreditCards = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListBuyerCreditCard; + + return this.sdk.callApi( + '/me/creditcards', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). + * @param {String} opts.to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOrder} + */ + this.ListOrders = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'from': opts['from'], + 'to': opts['to'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOrder; + + return this.sdk.callApi( + '/me/orders', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.categoryID ID of the category. + * @param {String} opts.depth Indicates how deep down the category hierarchy to return results. Valid values are a number of 1 or greater, or 'all'. Relative to CategoryID if specified, otherwise top level of the Catalog. Default is 'all'. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBuyerProduct} + */ + this.ListProducts = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'catalogID': opts['catalogID'], + 'categoryID': opts['categoryID'], + 'depth': opts['depth'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListBuyerProduct; + + return this.sdk.callApi( + '/me/products', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPromotion} + */ + this.ListPromotions = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListPromotion; + + return this.sdk.callApi( + '/me/promotions', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {Object} opts Optional parameters + * @param {String} opts.orderID ID of the order. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListShipmentItem} + */ + this.ListShipmentItems = function(shipmentID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling ListShipmentItems"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + 'orderID': opts['orderID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListShipmentItem; + + return this.sdk.callApi( + '/me/shipments/{shipmentID}/items', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.orderID ID of the order. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListShipment} + */ + this.ListShipments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'orderID': opts['orderID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListShipment; + + return this.sdk.callApi( + '/me/shipments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBuyerSpec} + */ + this.ListSpecs = function(productID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling ListSpecs"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + 'catalogID': opts['catalogID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListBuyerSpec; + + return this.sdk.callApi( + '/me/products/{productID}/specs', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpendingAccount} + */ + this.ListSpendingAccounts = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpendingAccount; + + return this.sdk.callApi( + '/me/spendingAccounts', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroup} + */ + this.ListUserGroups = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroup; + + return this.sdk.callApi( + '/me/usergroups', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/MeUser} partialMeUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MeUser} + */ + this.Patch = function(partialMeUser, accessToken ) { + var postBody = partialMeUser; + + // verify the required parameter 'partialMeUser' is set + if (partialMeUser == undefined || partialMeUser == null) { + throw new Error("Missing the required parameter 'partialMeUser' when calling Patch"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MeUser; + + return this.sdk.callApi( + '/me', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @param {module:model/BuyerAddress} partialBuyerAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.PatchAddress = function(addressID, partialBuyerAddress, accessToken ) { + var postBody = partialBuyerAddress; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling PatchAddress"); + } + + // verify the required parameter 'partialBuyerAddress' is set + if (partialBuyerAddress == undefined || partialBuyerAddress == null) { + throw new Error("Missing the required parameter 'partialBuyerAddress' when calling PatchAddress"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/addresses/{addressID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} creditcardID ID of the creditcard. + * @param {module:model/BuyerCreditCard} partialBuyerCreditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.PatchCreditCard = function(creditcardID, partialBuyerCreditCard, accessToken ) { + var postBody = partialBuyerCreditCard; + + // verify the required parameter 'creditcardID' is set + if (creditcardID == undefined || creditcardID == null) { + throw new Error("Missing the required parameter 'creditcardID' when calling PatchCreditCard"); + } + + // verify the required parameter 'partialBuyerCreditCard' is set + if (partialBuyerCreditCard == undefined || partialBuyerCreditCard == null) { + throw new Error("Missing the required parameter 'partialBuyerCreditCard' when calling PatchCreditCard"); + } + + + var pathParams = { + 'creditcardID': creditcardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/creditcards/{creditcardID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} anonUserToken Anon user token of the user. + * @param {module:model/MeUser} meUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object} + */ + this.Register = function(anonUserToken, meUser, accessToken ) { + var postBody = meUser; + + // verify the required parameter 'anonUserToken' is set + if (anonUserToken == undefined || anonUserToken == null) { + throw new Error("Missing the required parameter 'anonUserToken' when calling Register"); + } + + // verify the required parameter 'meUser' is set + if (meUser == undefined || meUser == null) { + throw new Error("Missing the required parameter 'meUser' when calling Register"); + } + + + var pathParams = { + }; + var queryParams = { + 'anonUserToken': anonUserToken + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Object; + + return this.sdk.callApi( + '/me/register', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/TokenPasswordReset} tokenPasswordReset + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.ResetPasswordByToken = function(tokenPasswordReset, accessToken ) { + var postBody = tokenPasswordReset; + + // verify the required parameter 'tokenPasswordReset' is set + if (tokenPasswordReset == undefined || tokenPasswordReset == null) { + throw new Error("Missing the required parameter 'tokenPasswordReset' when calling ResetPasswordByToken"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/password', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/MeUser} meUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MeUser} + */ + this.Save = function(meUser, accessToken ) { + var postBody = meUser; + + // verify the required parameter 'meUser' is set + if (meUser == undefined || meUser == null) { + throw new Error("Missing the required parameter 'meUser' when calling Save"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MeUser; + + return this.sdk.callApi( + '/me', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} addressID ID of the address. + * @param {module:model/BuyerAddress} buyerAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerAddress} + */ + this.SaveAddress = function(addressID, buyerAddress, accessToken ) { + var postBody = buyerAddress; + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling SaveAddress"); + } + + // verify the required parameter 'buyerAddress' is set + if (buyerAddress == undefined || buyerAddress == null) { + throw new Error("Missing the required parameter 'buyerAddress' when calling SaveAddress"); + } + + + var pathParams = { + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerAddress; + + return this.sdk.callApi( + '/me/addresses/{addressID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} creditcardID ID of the creditcard. + * @param {module:model/BuyerCreditCard} buyerCreditCard + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BuyerCreditCard} + */ + this.SaveCreditCard = function(creditcardID, buyerCreditCard, accessToken ) { + var postBody = buyerCreditCard; + + // verify the required parameter 'creditcardID' is set + if (creditcardID == undefined || creditcardID == null) { + throw new Error("Missing the required parameter 'creditcardID' when calling SaveCreditCard"); + } + + // verify the required parameter 'buyerCreditCard' is set + if (buyerCreditCard == undefined || buyerCreditCard == null) { + throw new Error("Missing the required parameter 'buyerCreditCard' when calling SaveCreditCard"); + } + + + var pathParams = { + 'creditcardID': creditcardID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = BuyerCreditCard; + + return this.sdk.callApi( + '/me/creditcards/{creditcardID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} anonUserToken Anon user token of the me. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.TransferAnonUserOrder = function(anonUserToken, accessToken ) { + var postBody = null; + + // verify the required parameter 'anonUserToken' is set + if (anonUserToken == undefined || anonUserToken == null) { + throw new Error("Missing the required parameter 'anonUserToken' when calling TransferAnonUserOrder"); + } + + + var pathParams = { + }; + var queryParams = { + 'anonUserToken': anonUserToken + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/me/orders', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/BuyerAddress":58,"../model/BuyerCreditCard":59,"../model/BuyerProduct":60,"../model/BuyerSpec":61,"../model/Catalog":62,"../model/Category":64,"../model/ListBuyerAddress":85,"../model/ListBuyerCreditCard":86,"../model/ListBuyerProduct":87,"../model/ListBuyerSpec":88,"../model/ListCatalog":89,"../model/ListCategory":91,"../model/ListCostCenter":94,"../model/ListOrder":107,"../model/ListPromotion":116,"../model/ListShipment":120,"../model/ListShipmentItem":121,"../model/ListSpendingAccount":125,"../model/ListUserGroup":129,"../model/MeUser":136,"../model/Promotion":198,"../model/Shipment":202,"../model/SpendingAccount":207,"../model/TokenPasswordReset":210}],29:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListMessageCCListenerAssignment', 'model/ListMessageSender', 'model/ListMessageSenderAssignment', 'model/MessageCCListenerAssignment', 'model/MessageSender', 'model/MessageSenderAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListMessageCCListenerAssignment'), require('../model/ListMessageSender'), require('../model/ListMessageSenderAssignment'), require('../model/MessageCCListenerAssignment'), require('../model/MessageSender'), require('../model/MessageSenderAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MessageSenders = factory(root.OrderCloud.Sdk, root.OrderCloud.ListMessageCCListenerAssignment, root.OrderCloud.ListMessageSender, root.OrderCloud.ListMessageSenderAssignment, root.OrderCloud.MessageCCListenerAssignment, root.OrderCloud.MessageSender, root.OrderCloud.MessageSenderAssignment); + } +}(this, function(Sdk, ListMessageCCListenerAssignment, ListMessageSender, ListMessageSenderAssignment, MessageCCListenerAssignment, MessageSender, MessageSenderAssignment) { + 'use strict'; + + /** + * MessageSender service. + * @module api/MessageSenders + */ + + /** + * Constructs a new MessageSenders. + * @alias module:api/MessageSenders + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/MessageSender} messageSender + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MessageSender} + */ + this.Create = function(messageSender, accessToken ) { + var postBody = messageSender; + + // verify the required parameter 'messageSender' is set + if (messageSender == undefined || messageSender == null) { + throw new Error("Missing the required parameter 'messageSender' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MessageSender; + + return this.sdk.callApi( + '/messagesenders', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} messageSenderID ID of the message sender. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(messageSenderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'messageSenderID' is set + if (messageSenderID == undefined || messageSenderID == null) { + throw new Error("Missing the required parameter 'messageSenderID' when calling Delete"); + } + + + var pathParams = { + 'messageSenderID': messageSenderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/messagesenders/{messageSenderID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} messageSenderID ID of the message sender. + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(messageSenderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'messageSenderID' is set + if (messageSenderID == undefined || messageSenderID == null) { + throw new Error("Missing the required parameter 'messageSenderID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'messageSenderID': messageSenderID + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'supplierID': opts['supplierID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/messagesenders/{messageSenderID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} messageSenderID ID of the message sender. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MessageSender} + */ + this.Get = function(messageSenderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'messageSenderID' is set + if (messageSenderID == undefined || messageSenderID == null) { + throw new Error("Missing the required parameter 'messageSenderID' when calling Get"); + } + + + var pathParams = { + 'messageSenderID': messageSenderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MessageSender; + + return this.sdk.callApi( + '/messagesenders/{messageSenderID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMessageSender} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListMessageSender; + + return this.sdk.callApi( + '/messagesenders', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.messageSenderID ID of the message sender. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the message sender assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {String} opts.supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMessageSenderAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'messageSenderID': opts['messageSenderID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'supplierID': opts['supplierID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListMessageSenderAssignment; + + return this.sdk.callApi( + '/messagesenders/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMessageCCListenerAssignment} + */ + this.ListCCListenerAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListMessageCCListenerAssignment; + + return this.sdk.callApi( + '/messagesenders/CCListenerAssignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} messageSenderID ID of the message sender. + * @param {module:model/MessageSender} partialMessageSender + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MessageSender} + */ + this.Patch = function(messageSenderID, partialMessageSender, accessToken ) { + var postBody = partialMessageSender; + + // verify the required parameter 'messageSenderID' is set + if (messageSenderID == undefined || messageSenderID == null) { + throw new Error("Missing the required parameter 'messageSenderID' when calling Patch"); + } + + // verify the required parameter 'partialMessageSender' is set + if (partialMessageSender == undefined || partialMessageSender == null) { + throw new Error("Missing the required parameter 'partialMessageSender' when calling Patch"); + } + + + var pathParams = { + 'messageSenderID': messageSenderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MessageSender; + + return this.sdk.callApi( + '/messagesenders/{messageSenderID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} messageSenderID ID of the message sender. + * @param {module:model/MessageSender} messageSender + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MessageSender} + */ + this.Save = function(messageSenderID, messageSender, accessToken ) { + var postBody = messageSender; + + // verify the required parameter 'messageSenderID' is set + if (messageSenderID == undefined || messageSenderID == null) { + throw new Error("Missing the required parameter 'messageSenderID' when calling Save"); + } + + // verify the required parameter 'messageSender' is set + if (messageSender == undefined || messageSender == null) { + throw new Error("Missing the required parameter 'messageSender' when calling Save"); + } + + + var pathParams = { + 'messageSenderID': messageSenderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = MessageSender; + + return this.sdk.callApi( + '/messagesenders/{messageSenderID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/MessageSenderAssignment} messageSenderAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(messageSenderAssignment, accessToken ) { + var postBody = messageSenderAssignment; + + // verify the required parameter 'messageSenderAssignment' is set + if (messageSenderAssignment == undefined || messageSenderAssignment == null) { + throw new Error("Missing the required parameter 'messageSenderAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/messagesenders/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/MessageCCListenerAssignment} messageCCListenerAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveCCListenerAssignment = function(messageCCListenerAssignment, accessToken ) { + var postBody = messageCCListenerAssignment; + + // verify the required parameter 'messageCCListenerAssignment' is set + if (messageCCListenerAssignment == undefined || messageCCListenerAssignment == null) { + throw new Error("Missing the required parameter 'messageCCListenerAssignment' when calling SaveCCListenerAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/messagesenders/CCListenerAssignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListMessageCCListenerAssignment":103,"../model/ListMessageSender":104,"../model/ListMessageSenderAssignment":105,"../model/MessageCCListenerAssignment":137,"../model/MessageSender":138,"../model/MessageSenderAssignment":139}],30:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListOpenIdConnect', 'model/OpenIdConnect'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListOpenIdConnect'), require('../model/OpenIdConnect')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.OpenIdConnects = factory(root.OrderCloud.Sdk, root.OrderCloud.ListOpenIdConnect, root.OrderCloud.OpenIdConnect); + } +}(this, function(Sdk, ListOpenIdConnect, OpenIdConnect) { + 'use strict'; + + /** + * OpenIdConnect service. + * @module api/OpenIdConnects + */ + + /** + * Constructs a new OpenIdConnects. + * @alias module:api/OpenIdConnects + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/OpenIdConnect} openIdConnect + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenIdConnect} + */ + this.Create = function(openIdConnect, accessToken ) { + var postBody = openIdConnect; + + // verify the required parameter 'openIdConnect' is set + if (openIdConnect == undefined || openIdConnect == null) { + throw new Error("Missing the required parameter 'openIdConnect' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = OpenIdConnect; + + return this.sdk.callApi( + '/openidconnects', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} openidconnectID ID of the openidconnect. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(openidconnectID, accessToken ) { + var postBody = null; + + // verify the required parameter 'openidconnectID' is set + if (openidconnectID == undefined || openidconnectID == null) { + throw new Error("Missing the required parameter 'openidconnectID' when calling Delete"); + } + + + var pathParams = { + 'openidconnectID': openidconnectID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/openidconnects/{openidconnectID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} openidconnectID ID of the openidconnect. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenIdConnect} + */ + this.Get = function(openidconnectID, accessToken ) { + var postBody = null; + + // verify the required parameter 'openidconnectID' is set + if (openidconnectID == undefined || openidconnectID == null) { + throw new Error("Missing the required parameter 'openidconnectID' when calling Get"); + } + + + var pathParams = { + 'openidconnectID': openidconnectID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = OpenIdConnect; + + return this.sdk.callApi( + '/openidconnects/{openidconnectID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOpenIdConnect} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOpenIdConnect; + + return this.sdk.callApi( + '/openidconnects', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} openidconnectID ID of the openidconnect. + * @param {module:model/OpenIdConnect} partialOpenIdConnect + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenIdConnect} + */ + this.Patch = function(openidconnectID, partialOpenIdConnect, accessToken ) { + var postBody = partialOpenIdConnect; + + // verify the required parameter 'openidconnectID' is set + if (openidconnectID == undefined || openidconnectID == null) { + throw new Error("Missing the required parameter 'openidconnectID' when calling Patch"); + } + + // verify the required parameter 'partialOpenIdConnect' is set + if (partialOpenIdConnect == undefined || partialOpenIdConnect == null) { + throw new Error("Missing the required parameter 'partialOpenIdConnect' when calling Patch"); + } + + + var pathParams = { + 'openidconnectID': openidconnectID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = OpenIdConnect; + + return this.sdk.callApi( + '/openidconnects/{openidconnectID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} openidconnectID ID of the openidconnect. + * @param {module:model/OpenIdConnect} openIdConnect + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenIdConnect} + */ + this.Save = function(openidconnectID, openIdConnect, accessToken ) { + var postBody = openIdConnect; + + // verify the required parameter 'openidconnectID' is set + if (openidconnectID == undefined || openidconnectID == null) { + throw new Error("Missing the required parameter 'openidconnectID' when calling Save"); + } + + // verify the required parameter 'openIdConnect' is set + if (openIdConnect == undefined || openIdConnect == null) { + throw new Error("Missing the required parameter 'openIdConnect' when calling Save"); + } + + + var pathParams = { + 'openidconnectID': openidconnectID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = OpenIdConnect; + + return this.sdk.callApi( + '/openidconnects/{openidconnectID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListOpenIdConnect":106,"../model/OpenIdConnect":142}],31:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/ListOrder', 'model/ListOrderApproval', 'model/ListOrderPromotion', 'model/ListUser', 'model/Order', 'model/OrderApprovalInfo', 'model/OrderPromotion', 'model/Shipment', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Address'), require('../model/ListOrder'), require('../model/ListOrderApproval'), require('../model/ListOrderPromotion'), require('../model/ListUser'), require('../model/Order'), require('../model/OrderApprovalInfo'), require('../model/OrderPromotion'), require('../model/Shipment'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Orders = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.ListOrder, root.OrderCloud.ListOrderApproval, root.OrderCloud.ListOrderPromotion, root.OrderCloud.ListUser, root.OrderCloud.Order, root.OrderCloud.OrderApprovalInfo, root.OrderCloud.OrderPromotion, root.OrderCloud.Shipment, root.OrderCloud.User); + } +}(this, function(Sdk, Address, ListOrder, ListOrderApproval, ListOrderPromotion, ListUser, Order, OrderApprovalInfo, OrderPromotion, Shipment, User) { + 'use strict'; + + /** + * Order service. + * @module api/Orders + */ + + /** + * Constructs a new Orders. + * @alias module:api/Orders + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} promoCode Promo code of the order promotion. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OrderPromotion} + */ + this.AddPromotion = function(direction, orderID, promoCode, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling AddPromotion"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling AddPromotion"); + } + + // verify the required parameter 'promoCode' is set + if (promoCode == undefined || promoCode == null) { + throw new Error("Missing the required parameter 'promoCode' when calling AddPromotion"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'promoCode': promoCode + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = OrderPromotion; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/promotions/{promoCode}', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/OrderApprovalInfo} orderApprovalInfo + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Approve = function(direction, orderID, orderApprovalInfo, accessToken ) { + var postBody = orderApprovalInfo; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Approve"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Approve"); + } + + // verify the required parameter 'orderApprovalInfo' is set + if (orderApprovalInfo == undefined || orderApprovalInfo == null) { + throw new Error("Missing the required parameter 'orderApprovalInfo' when calling Approve"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/approve', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Cancel = function(direction, orderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Cancel"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Cancel"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/cancel', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {module:model/Order} order + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Create = function(direction, order, accessToken ) { + var postBody = order; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Create"); + } + + // verify the required parameter 'order' is set + if (order == undefined || order == null) { + throw new Error("Missing the required parameter 'order' when calling Create"); + } + + + var pathParams = { + 'direction': direction + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/OrderApprovalInfo} orderApprovalInfo + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Decline = function(direction, orderID, orderApprovalInfo, accessToken ) { + var postBody = orderApprovalInfo; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Decline"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Decline"); + } + + // verify the required parameter 'orderApprovalInfo' is set + if (orderApprovalInfo == undefined || orderApprovalInfo == null) { + throw new Error("Missing the required parameter 'orderApprovalInfo' when calling Decline"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/decline', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(direction, orderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Delete"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Delete"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Get = function(direction, orderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Get"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Get"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.supplierID ID of the supplier. + * @param {String} opts.from Lower bound of date range that the order was created. + * @param {String} opts.to Upper bound of date range that the order was created. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOrder} + */ + this.List = function(direction, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling List"); + } + + + var pathParams = { + 'direction': direction + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'supplierID': opts['supplierID'], + 'from': opts['from'], + 'to': opts['to'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOrder; + + return this.sdk.callApi( + '/orders/{direction}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOrderApproval} + */ + this.ListApprovals = function(direction, orderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling ListApprovals"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling ListApprovals"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOrderApproval; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/approvals', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUser} + */ + this.ListEligibleApprovers = function(direction, orderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling ListEligibleApprovers"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling ListEligibleApprovers"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUser; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/eligibleapprovers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListOrderPromotion} + */ + this.ListPromotions = function(direction, orderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling ListPromotions"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling ListPromotions"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListOrderPromotion; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/promotions', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Order} partialOrder + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Patch = function(direction, orderID, partialOrder, accessToken ) { + var postBody = partialOrder; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Patch"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Patch"); + } + + // verify the required parameter 'partialOrder' is set + if (partialOrder == undefined || partialOrder == null) { + throw new Error("Missing the required parameter 'partialOrder' when calling Patch"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.PatchBillingAddress = function(direction, orderID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling PatchBillingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling PatchBillingAddress"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling PatchBillingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/billto', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/User} partialUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.PatchFromUser = function(direction, orderID, partialUser, accessToken ) { + var postBody = partialUser; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling PatchFromUser"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling PatchFromUser"); + } + + // verify the required parameter 'partialUser' is set + if (partialUser == undefined || partialUser == null) { + throw new Error("Missing the required parameter 'partialUser' when calling PatchFromUser"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/fromuser', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.PatchShippingAddress = function(direction, orderID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling PatchShippingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling PatchShippingAddress"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling PatchShippingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/shipto', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} promoCode Promo code of the order. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.RemovePromotion = function(direction, orderID, promoCode, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling RemovePromotion"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling RemovePromotion"); + } + + // verify the required parameter 'promoCode' is set + if (promoCode == undefined || promoCode == null) { + throw new Error("Missing the required parameter 'promoCode' when calling RemovePromotion"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'promoCode': promoCode + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/promotions/{promoCode}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Order} order + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Save = function(direction, orderID, order, accessToken ) { + var postBody = order; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Save"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Save"); + } + + // verify the required parameter 'order' is set + if (order == undefined || order == null) { + throw new Error("Missing the required parameter 'order' when calling Save"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.SetBillingAddress = function(direction, orderID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling SetBillingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling SetBillingAddress"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling SetBillingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/billto', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.SetShippingAddress = function(direction, orderID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling SetShippingAddress"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling SetShippingAddress"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling SetShippingAddress"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/shipto', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Shipment} shipment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Ship = function(direction, orderID, shipment, accessToken ) { + var postBody = shipment; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Ship"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Ship"); + } + + // verify the required parameter 'shipment' is set + if (shipment == undefined || shipment == null) { + throw new Error("Missing the required parameter 'shipment' when calling Ship"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/ship', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} + */ + this.Submit = function(direction, orderID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Submit"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Submit"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Order; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/submit', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Address":52,"../model/ListOrder":107,"../model/ListOrderApproval":108,"../model/ListOrderPromotion":109,"../model/ListUser":128,"../model/Order":143,"../model/OrderApprovalInfo":145,"../model/OrderPromotion":146,"../model/Shipment":202,"../model/User":211}],32:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/PasswordReset', 'model/PasswordResetRequest'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/PasswordReset'), require('../model/PasswordResetRequest')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PasswordResets = factory(root.OrderCloud.Sdk, root.OrderCloud.PasswordReset, root.OrderCloud.PasswordResetRequest); + } +}(this, function(Sdk, PasswordReset, PasswordResetRequest) { + 'use strict'; + + /** + * PasswordReset service. + * @module api/PasswordResets + */ + + /** + * Constructs a new PasswordResets. + * @alias module:api/PasswordResets + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} verificationCode Verification code of the password reset. + * @param {module:model/PasswordReset} passwordReset + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.ResetPasswordByVerificationCode = function(verificationCode, passwordReset, accessToken ) { + var postBody = passwordReset; + + // verify the required parameter 'verificationCode' is set + if (verificationCode == undefined || verificationCode == null) { + throw new Error("Missing the required parameter 'verificationCode' when calling ResetPasswordByVerificationCode"); + } + + // verify the required parameter 'passwordReset' is set + if (passwordReset == undefined || passwordReset == null) { + throw new Error("Missing the required parameter 'passwordReset' when calling ResetPasswordByVerificationCode"); + } + + + var pathParams = { + 'verificationCode': verificationCode + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/password/reset/{verificationCode}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/PasswordResetRequest} passwordResetRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SendVerificationCode = function(passwordResetRequest, accessToken ) { + var postBody = passwordResetRequest; + + // verify the required parameter 'passwordResetRequest' is set + if (passwordResetRequest == undefined || passwordResetRequest == null) { + throw new Error("Missing the required parameter 'passwordResetRequest' when calling SendVerificationCode"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/password/reset', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/PasswordReset":188,"../model/PasswordResetRequest":189}],33:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListPayment', 'model/Payment', 'model/PaymentTransaction'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListPayment'), require('../model/Payment'), require('../model/PaymentTransaction')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Payments = factory(root.OrderCloud.Sdk, root.OrderCloud.ListPayment, root.OrderCloud.Payment, root.OrderCloud.PaymentTransaction); + } +}(this, function(Sdk, ListPayment, Payment, PaymentTransaction) { + 'use strict'; + + /** + * Payment service. + * @module api/Payments + */ + + /** + * Constructs a new Payments. + * @alias module:api/Payments + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {module:model/Payment} payment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Payment} + */ + this.Create = function(direction, orderID, payment, accessToken ) { + var postBody = payment; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Create"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Create"); + } + + // verify the required parameter 'payment' is set + if (payment == undefined || payment == null) { + throw new Error("Missing the required parameter 'payment' when calling Create"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Payment; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} paymentID ID of the payment. + * @param {module:model/PaymentTransaction} paymentTransaction + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Payment} + */ + this.CreateTransaction = function(direction, orderID, paymentID, paymentTransaction, accessToken ) { + var postBody = paymentTransaction; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling CreateTransaction"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling CreateTransaction"); + } + + // verify the required parameter 'paymentID' is set + if (paymentID == undefined || paymentID == null) { + throw new Error("Missing the required parameter 'paymentID' when calling CreateTransaction"); + } + + // verify the required parameter 'paymentTransaction' is set + if (paymentTransaction == undefined || paymentTransaction == null) { + throw new Error("Missing the required parameter 'paymentTransaction' when calling CreateTransaction"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'paymentID': paymentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Payment; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments/{paymentID}/transactions', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} paymentID ID of the payment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(direction, orderID, paymentID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Delete"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Delete"); + } + + // verify the required parameter 'paymentID' is set + if (paymentID == undefined || paymentID == null) { + throw new Error("Missing the required parameter 'paymentID' when calling Delete"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'paymentID': paymentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments/{paymentID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} paymentID ID of the payment. + * @param {String} transactionID ID of the transaction. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteTransaction = function(direction, orderID, paymentID, transactionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling DeleteTransaction"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling DeleteTransaction"); + } + + // verify the required parameter 'paymentID' is set + if (paymentID == undefined || paymentID == null) { + throw new Error("Missing the required parameter 'paymentID' when calling DeleteTransaction"); + } + + // verify the required parameter 'transactionID' is set + if (transactionID == undefined || transactionID == null) { + throw new Error("Missing the required parameter 'transactionID' when calling DeleteTransaction"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'paymentID': paymentID, + 'transactionID': transactionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments/{paymentID}/transactions/{transactionID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} paymentID ID of the payment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Payment} + */ + this.Get = function(direction, orderID, paymentID, accessToken ) { + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Get"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Get"); + } + + // verify the required parameter 'paymentID' is set + if (paymentID == undefined || paymentID == null) { + throw new Error("Missing the required parameter 'paymentID' when calling Get"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'paymentID': paymentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Payment; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments/{paymentID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPayment} + */ + this.List = function(direction, orderID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling List"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling List"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListPayment; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} direction Direction of the order, from the current user's perspective. Possible values: incoming, outgoing. + * @param {String} orderID ID of the order. + * @param {String} paymentID ID of the payment. + * @param {module:model/Payment} partialPayment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Payment} + */ + this.Patch = function(direction, orderID, paymentID, partialPayment, accessToken ) { + var postBody = partialPayment; + + // verify the required parameter 'direction' is set + if (direction == undefined || direction == null) { + throw new Error("Missing the required parameter 'direction' when calling Patch"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling Patch"); + } + + // verify the required parameter 'paymentID' is set + if (paymentID == undefined || paymentID == null) { + throw new Error("Missing the required parameter 'paymentID' when calling Patch"); + } + + // verify the required parameter 'partialPayment' is set + if (partialPayment == undefined || partialPayment == null) { + throw new Error("Missing the required parameter 'partialPayment' when calling Patch"); + } + + + var pathParams = { + 'direction': direction, + 'orderID': orderID, + 'paymentID': paymentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Payment; + + return this.sdk.callApi( + '/orders/{direction}/{orderID}/payments/{paymentID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListPayment":110,"../model/Payment":190,"../model/PaymentTransaction":191}],34:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListPriceSchedule', 'model/PriceBreak', 'model/PriceSchedule'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListPriceSchedule'), require('../model/PriceBreak'), require('../model/PriceSchedule')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PriceSchedules = factory(root.OrderCloud.Sdk, root.OrderCloud.ListPriceSchedule, root.OrderCloud.PriceBreak, root.OrderCloud.PriceSchedule); + } +}(this, function(Sdk, ListPriceSchedule, PriceBreak, PriceSchedule) { + 'use strict'; + + /** + * PriceSchedule service. + * @module api/PriceSchedules + */ + + /** + * Constructs a new PriceSchedules. + * @alias module:api/PriceSchedules + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/PriceSchedule} priceSchedule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PriceSchedule} + */ + this.Create = function(priceSchedule, accessToken ) { + var postBody = priceSchedule; + + // verify the required parameter 'priceSchedule' is set + if (priceSchedule == undefined || priceSchedule == null) { + throw new Error("Missing the required parameter 'priceSchedule' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = PriceSchedule; + + return this.sdk.callApi( + '/priceschedules', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(priceScheduleID, accessToken ) { + var postBody = null; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling Delete"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @param {Number} quantity Quantity of the price schedule. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeletePriceBreak = function(priceScheduleID, quantity, accessToken ) { + var postBody = null; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling DeletePriceBreak"); + } + + // verify the required parameter 'quantity' is set + if (quantity == undefined || quantity == null) { + throw new Error("Missing the required parameter 'quantity' when calling DeletePriceBreak"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + 'quantity': quantity + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}/PriceBreaks', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PriceSchedule} + */ + this.Get = function(priceScheduleID, accessToken ) { + var postBody = null; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling Get"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = PriceSchedule; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPriceSchedule} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListPriceSchedule; + + return this.sdk.callApi( + '/priceschedules', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @param {module:model/PriceSchedule} partialPriceSchedule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PriceSchedule} + */ + this.Patch = function(priceScheduleID, partialPriceSchedule, accessToken ) { + var postBody = partialPriceSchedule; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling Patch"); + } + + // verify the required parameter 'partialPriceSchedule' is set + if (partialPriceSchedule == undefined || partialPriceSchedule == null) { + throw new Error("Missing the required parameter 'partialPriceSchedule' when calling Patch"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = PriceSchedule; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @param {module:model/PriceSchedule} priceSchedule + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PriceSchedule} + */ + this.Save = function(priceScheduleID, priceSchedule, accessToken ) { + var postBody = priceSchedule; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling Save"); + } + + // verify the required parameter 'priceSchedule' is set + if (priceSchedule == undefined || priceSchedule == null) { + throw new Error("Missing the required parameter 'priceSchedule' when calling Save"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = PriceSchedule; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} priceScheduleID ID of the price schedule. + * @param {module:model/PriceBreak} priceBreak + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PriceSchedule} + */ + this.SavePriceBreak = function(priceScheduleID, priceBreak, accessToken ) { + var postBody = priceBreak; + + // verify the required parameter 'priceScheduleID' is set + if (priceScheduleID == undefined || priceScheduleID == null) { + throw new Error("Missing the required parameter 'priceScheduleID' when calling SavePriceBreak"); + } + + // verify the required parameter 'priceBreak' is set + if (priceBreak == undefined || priceBreak == null) { + throw new Error("Missing the required parameter 'priceBreak' when calling SavePriceBreak"); + } + + + var pathParams = { + 'priceScheduleID': priceScheduleID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = PriceSchedule; + + return this.sdk.callApi( + '/priceschedules/{priceScheduleID}/PriceBreaks', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListPriceSchedule":111,"../model/PriceBreak":192,"../model/PriceSchedule":193}],35:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListProductFacet', 'model/ProductFacet'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListProductFacet'), require('../model/ProductFacet')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ProductFacets = factory(root.OrderCloud.Sdk, root.OrderCloud.ListProductFacet, root.OrderCloud.ProductFacet); + } +}(this, function(Sdk, ListProductFacet, ProductFacet) { + 'use strict'; + + /** + * ProductFacet service. + * @module api/ProductFacets + */ + + /** + * Constructs a new ProductFacets. + * @alias module:api/ProductFacets + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/ProductFacet} productFacet + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProductFacet} + */ + this.Create = function(productFacet, accessToken ) { + var postBody = productFacet; + + // verify the required parameter 'productFacet' is set + if (productFacet == undefined || productFacet == null) { + throw new Error("Missing the required parameter 'productFacet' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ProductFacet; + + return this.sdk.callApi( + '/productfacets', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productFacetID ID of the product facet. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(productFacetID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productFacetID' is set + if (productFacetID == undefined || productFacetID == null) { + throw new Error("Missing the required parameter 'productFacetID' when calling Delete"); + } + + + var pathParams = { + 'productFacetID': productFacetID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/productfacets/{productFacetID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productFacetID ID of the product facet. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProductFacet} + */ + this.Get = function(productFacetID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productFacetID' is set + if (productFacetID == undefined || productFacetID == null) { + throw new Error("Missing the required parameter 'productFacetID' when calling Get"); + } + + + var pathParams = { + 'productFacetID': productFacetID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ProductFacet; + + return this.sdk.callApi( + '/productfacets/{productFacetID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListProductFacet} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListProductFacet; + + return this.sdk.callApi( + '/productfacets', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productFacetID ID of the product facet. + * @param {module:model/ProductFacet} partialProductFacet + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProductFacet} + */ + this.Patch = function(productFacetID, partialProductFacet, accessToken ) { + var postBody = partialProductFacet; + + // verify the required parameter 'productFacetID' is set + if (productFacetID == undefined || productFacetID == null) { + throw new Error("Missing the required parameter 'productFacetID' when calling Patch"); + } + + // verify the required parameter 'partialProductFacet' is set + if (partialProductFacet == undefined || partialProductFacet == null) { + throw new Error("Missing the required parameter 'partialProductFacet' when calling Patch"); + } + + + var pathParams = { + 'productFacetID': productFacetID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ProductFacet; + + return this.sdk.callApi( + '/productfacets/{productFacetID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productFacetID ID of the product facet. + * @param {module:model/ProductFacet} productFacet + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProductFacet} + */ + this.Save = function(productFacetID, productFacet, accessToken ) { + var postBody = productFacet; + + // verify the required parameter 'productFacetID' is set + if (productFacetID == undefined || productFacetID == null) { + throw new Error("Missing the required parameter 'productFacetID' when calling Save"); + } + + // verify the required parameter 'productFacet' is set + if (productFacet == undefined || productFacet == null) { + throw new Error("Missing the required parameter 'productFacet' when calling Save"); + } + + + var pathParams = { + 'productFacetID': productFacetID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ProductFacet; + + return this.sdk.callApi( + '/productfacets/{productFacetID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListProductFacet":115,"../model/ProductFacet":197}],36:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListProduct', 'model/ListProductAssignment', 'model/ListSupplier', 'model/ListVariant', 'model/Product', 'model/ProductAssignment', 'model/Variant'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListProduct'), require('../model/ListProductAssignment'), require('../model/ListSupplier'), require('../model/ListVariant'), require('../model/Product'), require('../model/ProductAssignment'), require('../model/Variant')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Products = factory(root.OrderCloud.Sdk, root.OrderCloud.ListProduct, root.OrderCloud.ListProductAssignment, root.OrderCloud.ListSupplier, root.OrderCloud.ListVariant, root.OrderCloud.Product, root.OrderCloud.ProductAssignment, root.OrderCloud.Variant); + } +}(this, function(Sdk, ListProduct, ListProductAssignment, ListSupplier, ListVariant, Product, ProductAssignment, Variant) { + 'use strict'; + + /** + * Product service. + * @module api/Products + */ + + /** + * Constructs a new Products. + * @alias module:api/Products + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Product} product + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product} + */ + this.Create = function(product, accessToken ) { + var postBody = product; + + // verify the required parameter 'product' is set + if (product == undefined || product == null) { + throw new Error("Missing the required parameter 'product' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Product; + + return this.sdk.callApi( + '/products', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling Delete"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/products/{productID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(productID, buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling DeleteAssignment"); + } + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'productID': productID, + 'buyerID': buyerID + }; + var queryParams = { + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/products/{productID}/assignments/{buyerID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {Object} opts Optional parameters + * @param {Boolean} opts.overwriteExisting Overwrite existing of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product} + */ + this.GenerateVariants = function(productID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling GenerateVariants"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + 'overwriteExisting': opts['overwriteExisting'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Product; + + return this.sdk.callApi( + '/products/{productID}/variants/generate', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product} + */ + this.Get = function(productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling Get"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Product; + + return this.sdk.callApi( + '/products/{productID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} variantID ID of the variant. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Variant} + */ + this.GetVariant = function(productID, variantID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling GetVariant"); + } + + // verify the required parameter 'variantID' is set + if (variantID == undefined || variantID == null) { + throw new Error("Missing the required parameter 'variantID' when calling GetVariant"); + } + + + var pathParams = { + 'productID': productID, + 'variantID': variantID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Variant; + + return this.sdk.callApi( + '/products/{productID}/variants/{variantID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.catalogID ID of the catalog. + * @param {String} opts.categoryID ID of the category. + * @param {String} opts.supplierID ID of the supplier. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListProduct} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'catalogID': opts['catalogID'], + 'categoryID': opts['categoryID'], + 'supplierID': opts['supplierID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListProduct; + + return this.sdk.callApi( + '/products', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.productID ID of the product. + * @param {String} opts.priceScheduleID ID of the price schedule. + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the product assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListProductAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'productID': opts['productID'], + 'priceScheduleID': opts['priceScheduleID'], + 'buyerID': opts['buyerID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListProductAssignment; + + return this.sdk.callApi( + '/products/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupplier} + */ + this.ListSuppliers = function(productID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling ListSuppliers"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSupplier; + + return this.sdk.callApi( + '/products/{productID}/suppliers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListVariant} + */ + this.ListVariants = function(productID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling ListVariants"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListVariant; + + return this.sdk.callApi( + '/products/{productID}/variants', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {module:model/Product} partialProduct + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product} + */ + this.Patch = function(productID, partialProduct, accessToken ) { + var postBody = partialProduct; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling Patch"); + } + + // verify the required parameter 'partialProduct' is set + if (partialProduct == undefined || partialProduct == null) { + throw new Error("Missing the required parameter 'partialProduct' when calling Patch"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Product; + + return this.sdk.callApi( + '/products/{productID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} variantID ID of the variant. + * @param {module:model/Variant} partialVariant + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Variant} + */ + this.PatchVariant = function(productID, variantID, partialVariant, accessToken ) { + var postBody = partialVariant; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling PatchVariant"); + } + + // verify the required parameter 'variantID' is set + if (variantID == undefined || variantID == null) { + throw new Error("Missing the required parameter 'variantID' when calling PatchVariant"); + } + + // verify the required parameter 'partialVariant' is set + if (partialVariant == undefined || partialVariant == null) { + throw new Error("Missing the required parameter 'partialVariant' when calling PatchVariant"); + } + + + var pathParams = { + 'productID': productID, + 'variantID': variantID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Variant; + + return this.sdk.callApi( + '/products/{productID}/variants/{variantID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.RemoveSupplier = function(productID, supplierID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling RemoveSupplier"); + } + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling RemoveSupplier"); + } + + + var pathParams = { + 'productID': productID, + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/products/{productID}/suppliers/{supplierID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {module:model/Product} product + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Product} + */ + this.Save = function(productID, product, accessToken ) { + var postBody = product; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling Save"); + } + + // verify the required parameter 'product' is set + if (product == undefined || product == null) { + throw new Error("Missing the required parameter 'product' when calling Save"); + } + + + var pathParams = { + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Product; + + return this.sdk.callApi( + '/products/{productID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/ProductAssignment} productAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(productAssignment, accessToken ) { + var postBody = productAssignment; + + // verify the required parameter 'productAssignment' is set + if (productAssignment == undefined || productAssignment == null) { + throw new Error("Missing the required parameter 'productAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/products/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveSupplier = function(productID, supplierID, accessToken ) { + var postBody = null; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling SaveSupplier"); + } + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling SaveSupplier"); + } + + + var pathParams = { + 'productID': productID, + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/products/{productID}/suppliers/{supplierID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} productID ID of the product. + * @param {String} variantID ID of the variant. + * @param {module:model/Variant} variant + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Variant} + */ + this.SaveVariant = function(productID, variantID, variant, accessToken ) { + var postBody = variant; + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling SaveVariant"); + } + + // verify the required parameter 'variantID' is set + if (variantID == undefined || variantID == null) { + throw new Error("Missing the required parameter 'variantID' when calling SaveVariant"); + } + + // verify the required parameter 'variant' is set + if (variant == undefined || variant == null) { + throw new Error("Missing the required parameter 'variant' when calling SaveVariant"); + } + + + var pathParams = { + 'productID': productID, + 'variantID': variantID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Variant; + + return this.sdk.callApi( + '/products/{productID}/variants/{variantID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListProduct":112,"../model/ListProductAssignment":113,"../model/ListSupplier":127,"../model/ListVariant":131,"../model/Product":194,"../model/ProductAssignment":195,"../model/Variant":214}],37:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListPromotion', 'model/ListPromotionAssignment', 'model/Promotion', 'model/PromotionAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListPromotion'), require('../model/ListPromotionAssignment'), require('../model/Promotion'), require('../model/PromotionAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Promotions = factory(root.OrderCloud.Sdk, root.OrderCloud.ListPromotion, root.OrderCloud.ListPromotionAssignment, root.OrderCloud.Promotion, root.OrderCloud.PromotionAssignment); + } +}(this, function(Sdk, ListPromotion, ListPromotionAssignment, Promotion, PromotionAssignment) { + 'use strict'; + + /** + * Promotion service. + * @module api/Promotions + */ + + /** + * Constructs a new Promotions. + * @alias module:api/Promotions + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Promotion} promotion + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Promotion} + */ + this.Create = function(promotion, accessToken ) { + var postBody = promotion; + + // verify the required parameter 'promotion' is set + if (promotion == undefined || promotion == null) { + throw new Error("Missing the required parameter 'promotion' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Promotion; + + return this.sdk.callApi( + '/promotions', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(promotionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling Delete"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/promotions/{promotionID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(promotionID, buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling DeleteAssignment"); + } + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + 'buyerID': buyerID, + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/promotions/{promotionID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Promotion} + */ + this.Get = function(promotionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling Get"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Promotion; + + return this.sdk.callApi( + '/promotions/{promotionID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPromotion} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListPromotion; + + return this.sdk.callApi( + '/promotions', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.promotionID ID of the promotion. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the promotion assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPromotionAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'promotionID': opts['promotionID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListPromotionAssignment; + + return this.sdk.callApi( + '/promotions/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @param {module:model/Promotion} partialPromotion + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Promotion} + */ + this.Patch = function(promotionID, partialPromotion, accessToken ) { + var postBody = partialPromotion; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling Patch"); + } + + // verify the required parameter 'partialPromotion' is set + if (partialPromotion == undefined || partialPromotion == null) { + throw new Error("Missing the required parameter 'partialPromotion' when calling Patch"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Promotion; + + return this.sdk.callApi( + '/promotions/{promotionID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} promotionID ID of the promotion. + * @param {module:model/Promotion} promotion + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Promotion} + */ + this.Save = function(promotionID, promotion, accessToken ) { + var postBody = promotion; + + // verify the required parameter 'promotionID' is set + if (promotionID == undefined || promotionID == null) { + throw new Error("Missing the required parameter 'promotionID' when calling Save"); + } + + // verify the required parameter 'promotion' is set + if (promotion == undefined || promotion == null) { + throw new Error("Missing the required parameter 'promotion' when calling Save"); + } + + + var pathParams = { + 'promotionID': promotionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Promotion; + + return this.sdk.callApi( + '/promotions/{promotionID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/PromotionAssignment} promotionAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(promotionAssignment, accessToken ) { + var postBody = promotionAssignment; + + // verify the required parameter 'promotionAssignment' is set + if (promotionAssignment == undefined || promotionAssignment == null) { + throw new Error("Missing the required parameter 'promotionAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/promotions/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListPromotion":116,"../model/ListPromotionAssignment":117,"../model/Promotion":198,"../model/PromotionAssignment":199}],38:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListSecurityProfile', 'model/ListSecurityProfileAssignment', 'model/SecurityProfile', 'model/SecurityProfileAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListSecurityProfile'), require('../model/ListSecurityProfileAssignment'), require('../model/SecurityProfile'), require('../model/SecurityProfileAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SecurityProfiles = factory(root.OrderCloud.Sdk, root.OrderCloud.ListSecurityProfile, root.OrderCloud.ListSecurityProfileAssignment, root.OrderCloud.SecurityProfile, root.OrderCloud.SecurityProfileAssignment); + } +}(this, function(Sdk, ListSecurityProfile, ListSecurityProfileAssignment, SecurityProfile, SecurityProfileAssignment) { + 'use strict'; + + /** + * SecurityProfile service. + * @module api/SecurityProfiles + */ + + /** + * Constructs a new SecurityProfiles. + * @alias module:api/SecurityProfiles + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} securityProfileID ID of the security profile. + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(securityProfileID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'securityProfileID' is set + if (securityProfileID == undefined || securityProfileID == null) { + throw new Error("Missing the required parameter 'securityProfileID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'securityProfileID': securityProfileID + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'supplierID': opts['supplierID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/securityprofiles/{securityProfileID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} securityProfileID ID of the security profile. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SecurityProfile} + */ + this.Get = function(securityProfileID, accessToken ) { + var postBody = null; + + // verify the required parameter 'securityProfileID' is set + if (securityProfileID == undefined || securityProfileID == null) { + throw new Error("Missing the required parameter 'securityProfileID' when calling Get"); + } + + + var pathParams = { + 'securityProfileID': securityProfileID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SecurityProfile; + + return this.sdk.callApi( + '/securityprofiles/{securityProfileID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSecurityProfile} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSecurityProfile; + + return this.sdk.callApi( + '/securityprofiles', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.buyerID ID of the buyer. + * @param {String} opts.supplierID ID of the supplier. + * @param {String} opts.securityProfileID ID of the security profile. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.commerceRole Commerce role of the security profile assignment. Possible values: Buyer, Seller, Supplier. + * @param {String} opts.level Level of the security profile assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSecurityProfileAssignment} + */ + this.ListAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'buyerID': opts['buyerID'], + 'supplierID': opts['supplierID'], + 'securityProfileID': opts['securityProfileID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'commerceRole': opts['commerceRole'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSecurityProfileAssignment; + + return this.sdk.callApi( + '/securityprofiles/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/SecurityProfileAssignment} securityProfileAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(securityProfileAssignment, accessToken ) { + var postBody = securityProfileAssignment; + + // verify the required parameter 'securityProfileAssignment' is set + if (securityProfileAssignment == undefined || securityProfileAssignment == null) { + throw new Error("Missing the required parameter 'securityProfileAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/securityprofiles/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListSecurityProfile":118,"../model/ListSecurityProfileAssignment":119,"../model/SecurityProfile":200,"../model/SecurityProfileAssignment":201}],39:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListShipment', 'model/ListShipmentItem', 'model/Shipment', 'model/ShipmentItem'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListShipment'), require('../model/ListShipmentItem'), require('../model/Shipment'), require('../model/ShipmentItem')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Shipments = factory(root.OrderCloud.Sdk, root.OrderCloud.ListShipment, root.OrderCloud.ListShipmentItem, root.OrderCloud.Shipment, root.OrderCloud.ShipmentItem); + } +}(this, function(Sdk, ListShipment, ListShipmentItem, Shipment, ShipmentItem) { + 'use strict'; + + /** + * Shipment service. + * @module api/Shipments + */ + + /** + * Constructs a new Shipments. + * @alias module:api/Shipments + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Shipment} shipment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Shipment} + */ + this.Create = function(shipment, accessToken ) { + var postBody = shipment; + + // verify the required parameter 'shipment' is set + if (shipment == undefined || shipment == null) { + throw new Error("Missing the required parameter 'shipment' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Shipment; + + return this.sdk.callApi( + '/shipments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(shipmentID, accessToken ) { + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling Delete"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/shipments/{shipmentID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteItem = function(shipmentID, orderID, lineItemID, accessToken ) { + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling DeleteItem"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling DeleteItem"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling DeleteItem"); + } + + + var pathParams = { + 'shipmentID': shipmentID, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/shipments/{shipmentID}/items/{orderID}/{lineItemID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Shipment} + */ + this.Get = function(shipmentID, accessToken ) { + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling Get"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Shipment; + + return this.sdk.callApi( + '/shipments/{shipmentID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {String} orderID ID of the order. + * @param {String} lineItemID ID of the line item. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShipmentItem} + */ + this.GetItem = function(shipmentID, orderID, lineItemID, accessToken ) { + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling GetItem"); + } + + // verify the required parameter 'orderID' is set + if (orderID == undefined || orderID == null) { + throw new Error("Missing the required parameter 'orderID' when calling GetItem"); + } + + // verify the required parameter 'lineItemID' is set + if (lineItemID == undefined || lineItemID == null) { + throw new Error("Missing the required parameter 'lineItemID' when calling GetItem"); + } + + + var pathParams = { + 'shipmentID': shipmentID, + 'orderID': orderID, + 'lineItemID': lineItemID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ShipmentItem; + + return this.sdk.callApi( + '/shipments/{shipmentID}/items/{orderID}/{lineItemID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.orderID ID of the order. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListShipment} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'orderID': opts['orderID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListShipment; + + return this.sdk.callApi( + '/shipments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListShipmentItem} + */ + this.ListItems = function(shipmentID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling ListItems"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListShipmentItem; + + return this.sdk.callApi( + '/shipments/{shipmentID}/items', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {module:model/Shipment} partialShipment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Shipment} + */ + this.Patch = function(shipmentID, partialShipment, accessToken ) { + var postBody = partialShipment; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling Patch"); + } + + // verify the required parameter 'partialShipment' is set + if (partialShipment == undefined || partialShipment == null) { + throw new Error("Missing the required parameter 'partialShipment' when calling Patch"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Shipment; + + return this.sdk.callApi( + '/shipments/{shipmentID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {module:model/Shipment} shipment + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Shipment} + */ + this.Save = function(shipmentID, shipment, accessToken ) { + var postBody = shipment; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling Save"); + } + + // verify the required parameter 'shipment' is set + if (shipment == undefined || shipment == null) { + throw new Error("Missing the required parameter 'shipment' when calling Save"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Shipment; + + return this.sdk.callApi( + '/shipments/{shipmentID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} shipmentID ID of the shipment. + * @param {module:model/ShipmentItem} shipmentItem + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShipmentItem} + */ + this.SaveItem = function(shipmentID, shipmentItem, accessToken ) { + var postBody = shipmentItem; + + // verify the required parameter 'shipmentID' is set + if (shipmentID == undefined || shipmentID == null) { + throw new Error("Missing the required parameter 'shipmentID' when calling SaveItem"); + } + + // verify the required parameter 'shipmentItem' is set + if (shipmentItem == undefined || shipmentItem == null) { + throw new Error("Missing the required parameter 'shipmentItem' when calling SaveItem"); + } + + + var pathParams = { + 'shipmentID': shipmentID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ShipmentItem; + + return this.sdk.callApi( + '/shipments/{shipmentID}/items', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListShipment":120,"../model/ListShipmentItem":121,"../model/Shipment":202,"../model/ShipmentItem":203}],40:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListSpec', 'model/ListSpecOption', 'model/ListSpecProductAssignment', 'model/Spec', 'model/SpecOption', 'model/SpecProductAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListSpec'), require('../model/ListSpecOption'), require('../model/ListSpecProductAssignment'), require('../model/Spec'), require('../model/SpecOption'), require('../model/SpecProductAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Specs = factory(root.OrderCloud.Sdk, root.OrderCloud.ListSpec, root.OrderCloud.ListSpecOption, root.OrderCloud.ListSpecProductAssignment, root.OrderCloud.Spec, root.OrderCloud.SpecOption, root.OrderCloud.SpecProductAssignment); + } +}(this, function(Sdk, ListSpec, ListSpecOption, ListSpecProductAssignment, Spec, SpecOption, SpecProductAssignment) { + 'use strict'; + + /** + * Spec service. + * @module api/Specs + */ + + /** + * Constructs a new Specs. + * @alias module:api/Specs + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Spec} spec + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Spec} + */ + this.Create = function(spec, accessToken ) { + var postBody = spec; + + // verify the required parameter 'spec' is set + if (spec == undefined || spec == null) { + throw new Error("Missing the required parameter 'spec' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Spec; + + return this.sdk.callApi( + '/specs', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {module:model/SpecOption} specOption + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpecOption} + */ + this.CreateOption = function(specID, specOption, accessToken ) { + var postBody = specOption; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling CreateOption"); + } + + // verify the required parameter 'specOption' is set + if (specOption == undefined || specOption == null) { + throw new Error("Missing the required parameter 'specOption' when calling CreateOption"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpecOption; + + return this.sdk.callApi( + '/specs/{specID}/options', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(specID, accessToken ) { + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling Delete"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/specs/{specID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {String} optionID ID of the option. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteOption = function(specID, optionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling DeleteOption"); + } + + // verify the required parameter 'optionID' is set + if (optionID == undefined || optionID == null) { + throw new Error("Missing the required parameter 'optionID' when calling DeleteOption"); + } + + + var pathParams = { + 'specID': specID, + 'optionID': optionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/specs/{specID}/options/{optionID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {String} productID ID of the product. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteProductAssignment = function(specID, productID, accessToken ) { + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling DeleteProductAssignment"); + } + + // verify the required parameter 'productID' is set + if (productID == undefined || productID == null) { + throw new Error("Missing the required parameter 'productID' when calling DeleteProductAssignment"); + } + + + var pathParams = { + 'specID': specID, + 'productID': productID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/specs/{specID}/productassignments/{productID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Spec} + */ + this.Get = function(specID, accessToken ) { + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling Get"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Spec; + + return this.sdk.callApi( + '/specs/{specID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {String} optionID ID of the option. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpecOption} + */ + this.GetOption = function(specID, optionID, accessToken ) { + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling GetOption"); + } + + // verify the required parameter 'optionID' is set + if (optionID == undefined || optionID == null) { + throw new Error("Missing the required parameter 'optionID' when calling GetOption"); + } + + + var pathParams = { + 'specID': specID, + 'optionID': optionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpecOption; + + return this.sdk.callApi( + '/specs/{specID}/options/{optionID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpec} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpec; + + return this.sdk.callApi( + '/specs', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpecOption} + */ + this.ListOptions = function(specID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling ListOptions"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpecOption; + + return this.sdk.callApi( + '/specs/{specID}/options', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpecProductAssignment} + */ + this.ListProductAssignments = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpecProductAssignment; + + return this.sdk.callApi( + '/specs/productassignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {module:model/Spec} partialSpec + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Spec} + */ + this.Patch = function(specID, partialSpec, accessToken ) { + var postBody = partialSpec; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling Patch"); + } + + // verify the required parameter 'partialSpec' is set + if (partialSpec == undefined || partialSpec == null) { + throw new Error("Missing the required parameter 'partialSpec' when calling Patch"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Spec; + + return this.sdk.callApi( + '/specs/{specID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {String} optionID ID of the option. + * @param {module:model/SpecOption} partialSpecOption + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpecOption} + */ + this.PatchOption = function(specID, optionID, partialSpecOption, accessToken ) { + var postBody = partialSpecOption; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling PatchOption"); + } + + // verify the required parameter 'optionID' is set + if (optionID == undefined || optionID == null) { + throw new Error("Missing the required parameter 'optionID' when calling PatchOption"); + } + + // verify the required parameter 'partialSpecOption' is set + if (partialSpecOption == undefined || partialSpecOption == null) { + throw new Error("Missing the required parameter 'partialSpecOption' when calling PatchOption"); + } + + + var pathParams = { + 'specID': specID, + 'optionID': optionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpecOption; + + return this.sdk.callApi( + '/specs/{specID}/options/{optionID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {module:model/Spec} spec + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Spec} + */ + this.Save = function(specID, spec, accessToken ) { + var postBody = spec; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling Save"); + } + + // verify the required parameter 'spec' is set + if (spec == undefined || spec == null) { + throw new Error("Missing the required parameter 'spec' when calling Save"); + } + + + var pathParams = { + 'specID': specID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Spec; + + return this.sdk.callApi( + '/specs/{specID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} specID ID of the spec. + * @param {String} optionID ID of the option. + * @param {module:model/SpecOption} specOption + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpecOption} + */ + this.SaveOption = function(specID, optionID, specOption, accessToken ) { + var postBody = specOption; + + // verify the required parameter 'specID' is set + if (specID == undefined || specID == null) { + throw new Error("Missing the required parameter 'specID' when calling SaveOption"); + } + + // verify the required parameter 'optionID' is set + if (optionID == undefined || optionID == null) { + throw new Error("Missing the required parameter 'optionID' when calling SaveOption"); + } + + // verify the required parameter 'specOption' is set + if (specOption == undefined || specOption == null) { + throw new Error("Missing the required parameter 'specOption' when calling SaveOption"); + } + + + var pathParams = { + 'specID': specID, + 'optionID': optionID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpecOption; + + return this.sdk.callApi( + '/specs/{specID}/options/{optionID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/SpecProductAssignment} specProductAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveProductAssignment = function(specProductAssignment, accessToken ) { + var postBody = specProductAssignment; + + // verify the required parameter 'specProductAssignment' is set + if (specProductAssignment == undefined || specProductAssignment == null) { + throw new Error("Missing the required parameter 'specProductAssignment' when calling SaveProductAssignment"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/specs/productassignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListSpec":122,"../model/ListSpecOption":123,"../model/ListSpecProductAssignment":124,"../model/Spec":204,"../model/SpecOption":205,"../model/SpecProductAssignment":206}],41:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListSpendingAccount', 'model/ListSpendingAccountAssignment', 'model/SpendingAccount', 'model/SpendingAccountAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListSpendingAccount'), require('../model/ListSpendingAccountAssignment'), require('../model/SpendingAccount'), require('../model/SpendingAccountAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SpendingAccounts = factory(root.OrderCloud.Sdk, root.OrderCloud.ListSpendingAccount, root.OrderCloud.ListSpendingAccountAssignment, root.OrderCloud.SpendingAccount, root.OrderCloud.SpendingAccountAssignment); + } +}(this, function(Sdk, ListSpendingAccount, ListSpendingAccountAssignment, SpendingAccount, SpendingAccountAssignment) { + 'use strict'; + + /** + * SpendingAccount service. + * @module api/SpendingAccounts + */ + + /** + * Constructs a new SpendingAccounts. + * @alias module:api/SpendingAccounts + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/SpendingAccount} spendingAccount + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpendingAccount} + */ + this.Create = function(buyerID, spendingAccount, accessToken ) { + var postBody = spendingAccount; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'spendingAccount' is set + if (spendingAccount == undefined || spendingAccount == null) { + throw new Error("Missing the required parameter 'spendingAccount' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpendingAccount; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} spendingAccountID ID of the spending account. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, spendingAccountID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/{spendingAccountID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} spendingAccountID ID of the spending account. + * @param {Object} opts Optional parameters + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteAssignment = function(buyerID, spendingAccountID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteAssignment"); + } + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling DeleteAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/{spendingAccountID}/assignments', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} spendingAccountID ID of the spending account. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpendingAccount} + */ + this.Get = function(buyerID, spendingAccountID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpendingAccount; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/{spendingAccountID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpendingAccount} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpendingAccount; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.spendingAccountID ID of the spending account. + * @param {String} opts.userID ID of the user. + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.level Level of the spending account assignment. Possible values: User, Group, Company. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSpendingAccountAssignment} + */ + this.ListAssignments = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling ListAssignments"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'spendingAccountID': opts['spendingAccountID'], + 'userID': opts['userID'], + 'userGroupID': opts['userGroupID'], + 'level': opts['level'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSpendingAccountAssignment; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} spendingAccountID ID of the spending account. + * @param {module:model/SpendingAccount} partialSpendingAccount + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpendingAccount} + */ + this.Patch = function(buyerID, spendingAccountID, partialSpendingAccount, accessToken ) { + var postBody = partialSpendingAccount; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling Patch"); + } + + // verify the required parameter 'partialSpendingAccount' is set + if (partialSpendingAccount == undefined || partialSpendingAccount == null) { + throw new Error("Missing the required parameter 'partialSpendingAccount' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpendingAccount; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/{spendingAccountID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} spendingAccountID ID of the spending account. + * @param {module:model/SpendingAccount} spendingAccount + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SpendingAccount} + */ + this.Save = function(buyerID, spendingAccountID, spendingAccount, accessToken ) { + var postBody = spendingAccount; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'spendingAccountID' is set + if (spendingAccountID == undefined || spendingAccountID == null) { + throw new Error("Missing the required parameter 'spendingAccountID' when calling Save"); + } + + // verify the required parameter 'spendingAccount' is set + if (spendingAccount == undefined || spendingAccount == null) { + throw new Error("Missing the required parameter 'spendingAccount' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'spendingAccountID': spendingAccountID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = SpendingAccount; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/{spendingAccountID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/SpendingAccountAssignment} spendingAccountAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveAssignment = function(buyerID, spendingAccountAssignment, accessToken ) { + var postBody = spendingAccountAssignment; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling SaveAssignment"); + } + + // verify the required parameter 'spendingAccountAssignment' is set + if (spendingAccountAssignment == undefined || spendingAccountAssignment == null) { + throw new Error("Missing the required parameter 'spendingAccountAssignment' when calling SaveAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/spendingaccounts/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListSpendingAccount":125,"../model/ListSpendingAccountAssignment":126,"../model/SpendingAccount":207,"../model/SpendingAccountAssignment":208}],42:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/ListAddress'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/Address'), require('../model/ListAddress')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SupplierAddresses = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.ListAddress); + } +}(this, function(Sdk, Address, ListAddress) { + 'use strict'; + + /** + * SupplierAddress service. + * @module api/SupplierAddresses + */ + + /** + * Constructs a new SupplierAddresses. + * @alias module:api/SupplierAddresses + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Create = function(supplierID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Create"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Create"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(supplierID, addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Delete"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Delete"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses/{addressID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} addressID ID of the address. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Get = function(supplierID, addressID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Get"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Get"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses/{addressID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddress} + */ + this.List = function(supplierID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling List"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListAddress; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} addressID ID of the address. + * @param {module:model/Address} partialAddress + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Patch = function(supplierID, addressID, partialAddress, accessToken ) { + var postBody = partialAddress; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Patch"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Patch"); + } + + // verify the required parameter 'partialAddress' is set + if (partialAddress == undefined || partialAddress == null) { + throw new Error("Missing the required parameter 'partialAddress' when calling Patch"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses/{addressID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} addressID ID of the address. + * @param {module:model/Address} address + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address} + */ + this.Save = function(supplierID, addressID, address, accessToken ) { + var postBody = address; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Save"); + } + + // verify the required parameter 'addressID' is set + if (addressID == undefined || addressID == null) { + throw new Error("Missing the required parameter 'addressID' when calling Save"); + } + + // verify the required parameter 'address' is set + if (address == undefined || address == null) { + throw new Error("Missing the required parameter 'address' when calling Save"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'addressID': addressID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Address; + + return this.sdk.callApi( + '/suppliers/{supplierID}/addresses/{addressID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/Address":52,"../model/ListAddress":79}],43:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListUserGroup', 'model/ListUserGroupAssignment', 'model/UserGroup', 'model/UserGroupAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListUserGroup'), require('../model/ListUserGroupAssignment'), require('../model/UserGroup'), require('../model/UserGroupAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SupplierUserGroups = factory(root.OrderCloud.Sdk, root.OrderCloud.ListUserGroup, root.OrderCloud.ListUserGroupAssignment, root.OrderCloud.UserGroup, root.OrderCloud.UserGroupAssignment); + } +}(this, function(Sdk, ListUserGroup, ListUserGroupAssignment, UserGroup, UserGroupAssignment) { + 'use strict'; + + /** + * SupplierUserGroup service. + * @module api/SupplierUserGroups + */ + + /** + * Constructs a new SupplierUserGroups. + * @alias module:api/SupplierUserGroups + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Create = function(supplierID, userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Create"); + } + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Create"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(supplierID, userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Delete"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Delete"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/{userGroupID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userGroupID ID of the user group. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteUserAssignment = function(supplierID, userGroupID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling DeleteUserAssignment"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling DeleteUserAssignment"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling DeleteUserAssignment"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userGroupID': userGroupID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/{userGroupID}/assignments/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Get = function(supplierID, userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Get"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Get"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/{userGroupID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroup} + */ + this.List = function(supplierID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling List"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroup; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {Object} opts Optional parameters + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.userID ID of the user. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroupAssignment} + */ + this.ListUserAssignments = function(supplierID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling ListUserAssignments"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + 'userGroupID': opts['userGroupID'], + 'userID': opts['userID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroupAssignment; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} partialUserGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Patch = function(supplierID, userGroupID, partialUserGroup, accessToken ) { + var postBody = partialUserGroup; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Patch"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Patch"); + } + + // verify the required parameter 'partialUserGroup' is set + if (partialUserGroup == undefined || partialUserGroup == null) { + throw new Error("Missing the required parameter 'partialUserGroup' when calling Patch"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/{userGroupID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Save = function(supplierID, userGroupID, userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Save"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Save"); + } + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Save"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/{userGroupID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/UserGroupAssignment} userGroupAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveUserAssignment = function(supplierID, userGroupAssignment, accessToken ) { + var postBody = userGroupAssignment; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling SaveUserAssignment"); + } + + // verify the required parameter 'userGroupAssignment' is set + if (userGroupAssignment == undefined || userGroupAssignment == null) { + throw new Error("Missing the required parameter 'userGroupAssignment' when calling SaveUserAssignment"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/usergroups/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListUserGroup":129,"../model/ListUserGroupAssignment":130,"../model/UserGroup":212,"../model/UserGroupAssignment":213}],44:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/AccessToken', 'model/ImpersonateTokenRequest', 'model/ListUser', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/AccessToken'), require('../model/ImpersonateTokenRequest'), require('../model/ListUser'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SupplierUsers = factory(root.OrderCloud.Sdk, root.OrderCloud.AccessToken, root.OrderCloud.ImpersonateTokenRequest, root.OrderCloud.ListUser, root.OrderCloud.User); + } +}(this, function(Sdk, AccessToken, ImpersonateTokenRequest, ListUser, User) { + 'use strict'; + + /** + * SupplierUser service. + * @module api/SupplierUsers + */ + + /** + * Constructs a new SupplierUsers. + * @alias module:api/SupplierUsers + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Create = function(supplierID, user, accessToken ) { + var postBody = user; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Create"); + } + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Create"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(supplierID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Delete"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Delete"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Get = function(supplierID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Get"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Get"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users/{userID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userID ID of the user. + * @param {module:model/ImpersonateTokenRequest} impersonateTokenRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccessToken} + */ + this.GetAccessToken = function(supplierID, userID, impersonateTokenRequest, accessToken ) { + var postBody = impersonateTokenRequest; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling GetAccessToken"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling GetAccessToken"); + } + + // verify the required parameter 'impersonateTokenRequest' is set + if (impersonateTokenRequest == undefined || impersonateTokenRequest == null) { + throw new Error("Missing the required parameter 'impersonateTokenRequest' when calling GetAccessToken"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users/{userID}/accesstoken', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {Object} opts Optional parameters + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUser} + */ + this.List = function(supplierID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling List"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + 'userGroupID': opts['userGroupID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUser; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userID ID of the user. + * @param {module:model/User} partialUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Patch = function(supplierID, userID, partialUser, accessToken ) { + var postBody = partialUser; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Patch"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Patch"); + } + + // verify the required parameter 'partialUser' is set + if (partialUser == undefined || partialUser == null) { + throw new Error("Missing the required parameter 'partialUser' when calling Patch"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users/{userID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {String} userID ID of the user. + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Save = function(supplierID, userID, user, accessToken ) { + var postBody = user; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Save"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Save"); + } + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Save"); + } + + + var pathParams = { + 'supplierID': supplierID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/suppliers/{supplierID}/users/{userID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/AccessToken":51,"../model/ImpersonateTokenRequest":71,"../model/ListUser":128,"../model/User":211}],45:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListSupplier', 'model/Supplier'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListSupplier'), require('../model/Supplier')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Suppliers = factory(root.OrderCloud.Sdk, root.OrderCloud.ListSupplier, root.OrderCloud.Supplier); + } +}(this, function(Sdk, ListSupplier, Supplier) { + 'use strict'; + + /** + * Supplier service. + * @module api/Suppliers + */ + + /** + * Constructs a new Suppliers. + * @alias module:api/Suppliers + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Supplier} supplier + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Supplier} + */ + this.Create = function(supplier, accessToken ) { + var postBody = supplier; + + // verify the required parameter 'supplier' is set + if (supplier == undefined || supplier == null) { + throw new Error("Missing the required parameter 'supplier' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Supplier; + + return this.sdk.callApi( + '/suppliers', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(supplierID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Delete"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/suppliers/{supplierID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Supplier} + */ + this.Get = function(supplierID, accessToken ) { + var postBody = null; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Get"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Supplier; + + return this.sdk.callApi( + '/suppliers/{supplierID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupplier} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListSupplier; + + return this.sdk.callApi( + '/suppliers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/Supplier} partialSupplier + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Supplier} + */ + this.Patch = function(supplierID, partialSupplier, accessToken ) { + var postBody = partialSupplier; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Patch"); + } + + // verify the required parameter 'partialSupplier' is set + if (partialSupplier == undefined || partialSupplier == null) { + throw new Error("Missing the required parameter 'partialSupplier' when calling Patch"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Supplier; + + return this.sdk.callApi( + '/suppliers/{supplierID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} supplierID ID of the supplier. + * @param {module:model/Supplier} supplier + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Supplier} + */ + this.Save = function(supplierID, supplier, accessToken ) { + var postBody = supplier; + + // verify the required parameter 'supplierID' is set + if (supplierID == undefined || supplierID == null) { + throw new Error("Missing the required parameter 'supplierID' when calling Save"); + } + + // verify the required parameter 'supplier' is set + if (supplier == undefined || supplier == null) { + throw new Error("Missing the required parameter 'supplier' when calling Save"); + } + + + var pathParams = { + 'supplierID': supplierID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Supplier; + + return this.sdk.callApi( + '/suppliers/{supplierID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListSupplier":127,"../model/Supplier":209}],46:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListUserGroup', 'model/ListUserGroupAssignment', 'model/UserGroup', 'model/UserGroupAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListUserGroup'), require('../model/ListUserGroupAssignment'), require('../model/UserGroup'), require('../model/UserGroupAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.UserGroups = factory(root.OrderCloud.Sdk, root.OrderCloud.ListUserGroup, root.OrderCloud.ListUserGroupAssignment, root.OrderCloud.UserGroup, root.OrderCloud.UserGroupAssignment); + } +}(this, function(Sdk, ListUserGroup, ListUserGroupAssignment, UserGroup, UserGroupAssignment) { + 'use strict'; + + /** + * UserGroup service. + * @module api/UserGroups + */ + + /** + * Constructs a new UserGroups. + * @alias module:api/UserGroups + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Create = function(buyerID, userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/{userGroupID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userGroupID ID of the user group. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.DeleteUserAssignment = function(buyerID, userGroupID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling DeleteUserAssignment"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling DeleteUserAssignment"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling DeleteUserAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userGroupID': userGroupID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/{userGroupID}/assignments/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userGroupID ID of the user group. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Get = function(buyerID, userGroupID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/{userGroupID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroup} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroup; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.userID ID of the user. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUserGroupAssignment} + */ + this.ListUserAssignments = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling ListUserAssignments"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'userGroupID': opts['userGroupID'], + 'userID': opts['userID'], + 'page': opts['page'], + 'pageSize': opts['pageSize'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUserGroupAssignment; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/assignments', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} partialUserGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Patch = function(buyerID, userGroupID, partialUserGroup, accessToken ) { + var postBody = partialUserGroup; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Patch"); + } + + // verify the required parameter 'partialUserGroup' is set + if (partialUserGroup == undefined || partialUserGroup == null) { + throw new Error("Missing the required parameter 'partialUserGroup' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/{userGroupID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userGroupID ID of the user group. + * @param {module:model/UserGroup} userGroup + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserGroup} + */ + this.Save = function(buyerID, userGroupID, userGroup, accessToken ) { + var postBody = userGroup; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'userGroupID' is set + if (userGroupID == undefined || userGroupID == null) { + throw new Error("Missing the required parameter 'userGroupID' when calling Save"); + } + + // verify the required parameter 'userGroup' is set + if (userGroup == undefined || userGroup == null) { + throw new Error("Missing the required parameter 'userGroup' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userGroupID': userGroupID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = UserGroup; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/{userGroupID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/UserGroupAssignment} userGroupAssignment + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.SaveUserAssignment = function(buyerID, userGroupAssignment, accessToken ) { + var postBody = userGroupAssignment; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling SaveUserAssignment"); + } + + // verify the required parameter 'userGroupAssignment' is set + if (userGroupAssignment == undefined || userGroupAssignment == null) { + throw new Error("Missing the required parameter 'userGroupAssignment' when calling SaveUserAssignment"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/usergroups/assignments', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListUserGroup":129,"../model/ListUserGroupAssignment":130,"../model/UserGroup":212,"../model/UserGroupAssignment":213}],47:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/AccessToken', 'model/ImpersonateTokenRequest', 'model/ListUser', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/AccessToken'), require('../model/ImpersonateTokenRequest'), require('../model/ListUser'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Users = factory(root.OrderCloud.Sdk, root.OrderCloud.AccessToken, root.OrderCloud.ImpersonateTokenRequest, root.OrderCloud.ListUser, root.OrderCloud.User); + } +}(this, function(Sdk, AccessToken, ImpersonateTokenRequest, ListUser, User) { + 'use strict'; + + /** + * User service. + * @module api/Users + */ + + /** + * Constructs a new Users. + * @alias module:api/Users + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} buyerID ID of the buyer. + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Create = function(buyerID, user, accessToken ) { + var postBody = user; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Create"); + } + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Create"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/buyers/{buyerID}/users', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(buyerID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Delete"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Delete"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Get = function(buyerID, userID, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Get"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Get"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @param {module:model/ImpersonateTokenRequest} impersonateTokenRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccessToken} + */ + this.GetAccessToken = function(buyerID, userID, impersonateTokenRequest, accessToken ) { + var postBody = impersonateTokenRequest; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling GetAccessToken"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling GetAccessToken"); + } + + // verify the required parameter 'impersonateTokenRequest' is set + if (impersonateTokenRequest == undefined || impersonateTokenRequest == null) { + throw new Error("Missing the required parameter 'impersonateTokenRequest' when calling GetAccessToken"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = AccessToken; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}/accesstoken', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {Object} opts Optional parameters + * @param {String} opts.userGroupID ID of the user group. + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUser} + */ + this.List = function(buyerID, opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling List"); + } + + + var pathParams = { + 'buyerID': buyerID + }; + var queryParams = { + 'userGroupID': opts['userGroupID'], + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListUser; + + return this.sdk.callApi( + '/buyers/{buyerID}/users', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @param {String} newBuyerID ID of the new buyer. + * @param {String} orders Orders of the user. Possible values: None, Unsubmitted, All. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Move = function(buyerID, userID, newBuyerID, orders, accessToken ) { + var postBody = null; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Move"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Move"); + } + + // verify the required parameter 'newBuyerID' is set + if (newBuyerID == undefined || newBuyerID == null) { + throw new Error("Missing the required parameter 'newBuyerID' when calling Move"); + } + + // verify the required parameter 'orders' is set + if (orders == undefined || orders == null) { + throw new Error("Missing the required parameter 'orders' when calling Move"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID, + 'newBuyerID': newBuyerID + }; + var queryParams = { + 'orders': orders + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}/moveto/{newBuyerID}', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @param {module:model/User} partialUser + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Patch = function(buyerID, userID, partialUser, accessToken ) { + var postBody = partialUser; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Patch"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Patch"); + } + + // verify the required parameter 'partialUser' is set + if (partialUser == undefined || partialUser == null) { + throw new Error("Missing the required parameter 'partialUser' when calling Patch"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} buyerID ID of the buyer. + * @param {String} userID ID of the user. + * @param {module:model/User} user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.Save = function(buyerID, userID, user, accessToken ) { + var postBody = user; + + // verify the required parameter 'buyerID' is set + if (buyerID == undefined || buyerID == null) { + throw new Error("Missing the required parameter 'buyerID' when calling Save"); + } + + // verify the required parameter 'userID' is set + if (userID == undefined || userID == null) { + throw new Error("Missing the required parameter 'userID' when calling Save"); + } + + // verify the required parameter 'user' is set + if (user == undefined || user == null) { + throw new Error("Missing the required parameter 'user' when calling Save"); + } + + + var pathParams = { + 'buyerID': buyerID, + 'userID': userID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = User; + + return this.sdk.callApi( + '/buyers/{buyerID}/users/{userID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/AccessToken":51,"../model/ImpersonateTokenRequest":71,"../model/ListUser":128,"../model/User":211}],48:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListWebhook', 'model/Webhook'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListWebhook'), require('../model/Webhook')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Webhooks = factory(root.OrderCloud.Sdk, root.OrderCloud.ListWebhook, root.OrderCloud.Webhook); + } +}(this, function(Sdk, ListWebhook, Webhook) { + 'use strict'; + + /** + * Webhook service. + * @module api/Webhooks + */ + + /** + * Constructs a new Webhooks. + * @alias module:api/Webhooks + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {module:model/Webhook} webhook + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook} + */ + this.Create = function(webhook, accessToken ) { + var postBody = webhook; + + // verify the required parameter 'webhook' is set + if (webhook == undefined || webhook == null) { + throw new Error("Missing the required parameter 'webhook' when calling Create"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Webhook; + + return this.sdk.callApi( + '/webhooks', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} webhookID ID of the webhook. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(webhookID, accessToken ) { + var postBody = null; + + // verify the required parameter 'webhookID' is set + if (webhookID == undefined || webhookID == null) { + throw new Error("Missing the required parameter 'webhookID' when calling Delete"); + } + + + var pathParams = { + 'webhookID': webhookID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/webhooks/{webhookID}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} webhookID ID of the webhook. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook} + */ + this.Get = function(webhookID, accessToken ) { + var postBody = null; + + // verify the required parameter 'webhookID' is set + if (webhookID == undefined || webhookID == null) { + throw new Error("Missing the required parameter 'webhookID' when calling Get"); + } + + + var pathParams = { + 'webhookID': webhookID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Webhook; + + return this.sdk.callApi( + '/webhooks/{webhookID}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWebhook} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListWebhook; + + return this.sdk.callApi( + '/webhooks', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} webhookID ID of the webhook. + * @param {module:model/Webhook} partialWebhook + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook} + */ + this.Patch = function(webhookID, partialWebhook, accessToken ) { + var postBody = partialWebhook; + + // verify the required parameter 'webhookID' is set + if (webhookID == undefined || webhookID == null) { + throw new Error("Missing the required parameter 'webhookID' when calling Patch"); + } + + // verify the required parameter 'partialWebhook' is set + if (partialWebhook == undefined || partialWebhook == null) { + throw new Error("Missing the required parameter 'partialWebhook' when calling Patch"); + } + + + var pathParams = { + 'webhookID': webhookID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Webhook; + + return this.sdk.callApi( + '/webhooks/{webhookID}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {String} webhookID ID of the webhook. + * @param {module:model/Webhook} webhook + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Webhook} + */ + this.Save = function(webhookID, webhook, accessToken ) { + var postBody = webhook; + + // verify the required parameter 'webhookID' is set + if (webhookID == undefined || webhookID == null) { + throw new Error("Missing the required parameter 'webhookID' when calling Save"); + } + + // verify the required parameter 'webhook' is set + if (webhook == undefined || webhook == null) { + throw new Error("Missing the required parameter 'webhook' when calling Save"); + } + + + var pathParams = { + 'webhookID': webhookID + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = Webhook; + + return this.sdk.callApi( + '/webhooks/{webhookID}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListWebhook":132,"../model/Webhook":216}],49:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListXpIndex', 'model/XpIndex'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('../model/ListXpIndex'), require('../model/XpIndex')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.XpIndexs = factory(root.OrderCloud.Sdk, root.OrderCloud.ListXpIndex, root.OrderCloud.XpIndex); + } +}(this, function(Sdk, ListXpIndex, XpIndex) { + 'use strict'; + + /** + * XpIndex service. + * @module api/XpIndexs + */ + + /** + * Constructs a new XpIndexs. + * @alias module:api/XpIndexs + * @class + * @param {module:Sdk} sdk Optional API client implementation to use, + * default to {@link module:Sdk#instance} if unspecified. + */ + var exports = function(sdk) { + this.sdk = sdk || Sdk.instance; + + + + /** + * @param {String} thingType Thing type of the xp index. Possible values: Product, Variant, Order, LineItem, Address, CostCenter, CreditCard, Payment, Spec, SpecOption, UserGroup, Company, Category, PriceSchedule, Shipment, SpendingAccount, User, Promotion, ApprovalRule, Catalog, ProductFacet, MessageSender. + * @param {String} key Key of the xp index. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Delete = function(thingType, key, accessToken ) { + var postBody = null; + + // verify the required parameter 'thingType' is set + if (thingType == undefined || thingType == null) { + throw new Error("Missing the required parameter 'thingType' when calling Delete"); + } + + // verify the required parameter 'key' is set + if (key == undefined || key == null) { + throw new Error("Missing the required parameter 'key' when calling Delete"); + } + + + var pathParams = { + 'thingType': thingType, + 'key': key + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/xpindices/{thingType}/{key}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.search Word or phrase to search for. + * @param {String} opts.searchOn Comma-delimited list of fields to search on. + * @param {String} opts.sortBy Comma-delimited list of fields to sort by. + * @param {Number} opts.page Page of results to return. Default: 1 + * @param {Number} opts.pageSize Number of results to return per page. Default: 20, max: 100. + * @param {Object.} opts.filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListXpIndex} + */ + this.List = function(opts, accessToken ) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'search': opts['search'], + 'searchOn': opts['searchOn'], + 'sortBy': opts['sortBy'], + 'page': opts['page'], + 'pageSize': opts['pageSize'], + 'filters': opts['filters'] + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = ListXpIndex; + + return this.sdk.callApi( + '/xpindices', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + + + /** + * @param {module:model/XpIndex} xpIndex + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.Put = function(xpIndex, accessToken ) { + var postBody = xpIndex; + + // verify the required parameter 'xpIndex' is set + if (xpIndex == undefined || xpIndex == null) { + throw new Error("Missing the required parameter 'xpIndex' when calling Put"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var contentTypes = ['application/json', 'text/plain; charset=utf-8']; + var accepts = ['application/json']; + var returnType = null; + + return this.sdk.callApi( + '/xpindices', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + contentTypes, accepts, returnType, accessToken + ); + } + }; + + return exports; +})); + +},{"../Sdk":12,"../model/ListXpIndex":133,"../model/XpIndex":218}],50:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/AccessToken', 'model/Address', 'model/AddressAssignment', 'model/ApiClient', 'model/ApiClientAssignment', 'model/ApprovalRule', 'model/Buyer', 'model/BuyerAddress', 'model/BuyerCreditCard', 'model/BuyerProduct', 'model/BuyerSpec', 'model/Catalog', 'model/CatalogAssignment', 'model/Category', 'model/CategoryAssignment', 'model/CategoryProductAssignment', 'model/CostCenter', 'model/CostCenterAssignment', 'model/CreditCard', 'model/CreditCardAssignment', 'model/ImpersonateTokenRequest', 'model/ImpersonationConfig', 'model/Incrementor', 'model/Inventory', 'model/LineItem', 'model/LineItemProduct', 'model/LineItemSpec', 'model/LineItemVariant', 'model/ListAddress', 'model/ListAddressAssignment', 'model/ListApiClient', 'model/ListApiClientAssignment', 'model/ListApprovalRule', 'model/ListBuyer', 'model/ListBuyerAddress', 'model/ListBuyerCreditCard', 'model/ListBuyerProduct', 'model/ListBuyerSpec', 'model/ListCatalog', 'model/ListCatalogAssignment', 'model/ListCategory', 'model/ListCategoryAssignment', 'model/ListCategoryProductAssignment', 'model/ListCostCenter', 'model/ListCostCenterAssignment', 'model/ListCreditCard', 'model/ListCreditCardAssignment', 'model/ListFacet', 'model/ListFacetValue', 'model/ListImpersonationConfig', 'model/ListIncrementor', 'model/ListLineItem', 'model/ListMessageCCListenerAssignment', 'model/ListMessageSender', 'model/ListMessageSenderAssignment', 'model/ListOpenIdConnect', 'model/ListOrder', 'model/ListOrderApproval', 'model/ListOrderPromotion', 'model/ListPayment', 'model/ListPriceSchedule', 'model/ListProduct', 'model/ListProductAssignment', 'model/ListProductCatalogAssignment', 'model/ListProductFacet', 'model/ListPromotion', 'model/ListPromotionAssignment', 'model/ListSecurityProfile', 'model/ListSecurityProfileAssignment', 'model/ListShipment', 'model/ListShipmentItem', 'model/ListSpec', 'model/ListSpecOption', 'model/ListSpecProductAssignment', 'model/ListSpendingAccount', 'model/ListSpendingAccountAssignment', 'model/ListSupplier', 'model/ListUser', 'model/ListUserGroup', 'model/ListUserGroupAssignment', 'model/ListVariant', 'model/ListWebhook', 'model/ListXpIndex', 'model/MeBuyer', 'model/MeSupplier', 'model/MeUser', 'model/MessageCCListenerAssignment', 'model/MessageSender', 'model/MessageSenderAssignment', 'model/Meta', 'model/MetaWithFacets', 'model/OpenIdConnect', 'model/Order', 'model/OrderApproval', 'model/OrderApprovalInfo', 'model/OrderPromotion', 'model/PartialAddress', 'model/PartialApiClient', 'model/PartialApprovalRule', 'model/PartialBuyer', 'model/PartialBuyerAddress', 'model/PartialBuyerCreditCard', 'model/PartialCatalog', 'model/PartialCategory', 'model/PartialCostCenter', 'model/PartialCreditCard', 'model/PartialImpersonationConfig', 'model/PartialIncrementor', 'model/PartialInventory', 'model/PartialLineItem', 'model/PartialLineItemProduct', 'model/PartialLineItemSpec', 'model/PartialLineItemVariant', 'model/PartialMeBuyer', 'model/PartialMeSupplier', 'model/PartialMeUser', 'model/PartialMessageSender', 'model/PartialOpenIdConnect', 'model/PartialOrder', 'model/PartialPayment', 'model/PartialPaymentTransaction', 'model/PartialPriceBreak', 'model/PartialPriceSchedule', 'model/PartialProduct', 'model/PartialProductFacet', 'model/PartialPromotion', 'model/PartialShipment', 'model/PartialSpec', 'model/PartialSpecOption', 'model/PartialSpendingAccount', 'model/PartialSupplier', 'model/PartialUser', 'model/PartialUserGroup', 'model/PartialVariant', 'model/PartialVariantInventory', 'model/PartialWebhook', 'model/PartialWebhookRoute', 'model/PasswordReset', 'model/PasswordResetRequest', 'model/Payment', 'model/PaymentTransaction', 'model/PriceBreak', 'model/PriceSchedule', 'model/Product', 'model/ProductAssignment', 'model/ProductCatalogAssignment', 'model/ProductFacet', 'model/Promotion', 'model/PromotionAssignment', 'model/SecurityProfile', 'model/SecurityProfileAssignment', 'model/Shipment', 'model/ShipmentItem', 'model/Spec', 'model/SpecOption', 'model/SpecProductAssignment', 'model/SpendingAccount', 'model/SpendingAccountAssignment', 'model/Supplier', 'model/TokenPasswordReset', 'model/User', 'model/UserGroup', 'model/UserGroupAssignment', 'model/Variant', 'model/VariantInventory', 'model/Webhook', 'model/WebhookRoute', 'model/XpIndex', 'api/Addresses', 'api/AdminAddresses', 'api/AdminUsers', 'api/AdminUserGroups', 'api/ApiClients', 'api/ApprovalRules', 'api/Buyers', 'api/Catalogs', 'api/Categories', 'api/CostCenters', 'api/CreditCards', 'api/ImpersonationConfigs', 'api/Incrementors', 'api/LineItems', 'api/Me', 'api/MessageSenders', 'api/OpenIdConnects', 'api/Orders', 'api/PasswordResets', 'api/Payments', 'api/PriceSchedules', 'api/Products', 'api/ProductFacets', 'api/Promotions', 'api/SecurityProfiles', 'api/Shipments', 'api/Specs', 'api/SpendingAccounts', 'api/Suppliers', 'api/SupplierAddresses', 'api/SupplierUsers', 'api/SupplierUserGroups', 'api/Users', 'api/UserGroups', 'api/Webhooks', 'api/XpIndexs', 'api/Auth'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('./Sdk'), require('./model/AccessToken'), require('./model/Address'), require('./model/AddressAssignment'), require('./model/ApiClient'), require('./model/ApiClientAssignment'), require('./model/ApprovalRule'), require('./model/Buyer'), require('./model/BuyerAddress'), require('./model/BuyerCreditCard'), require('./model/BuyerProduct'), require('./model/BuyerSpec'), require('./model/Catalog'), require('./model/CatalogAssignment'), require('./model/Category'), require('./model/CategoryAssignment'), require('./model/CategoryProductAssignment'), require('./model/CostCenter'), require('./model/CostCenterAssignment'), require('./model/CreditCard'), require('./model/CreditCardAssignment'), require('./model/ImpersonateTokenRequest'), require('./model/ImpersonationConfig'), require('./model/Incrementor'), require('./model/Inventory'), require('./model/LineItem'), require('./model/LineItemProduct'), require('./model/LineItemSpec'), require('./model/LineItemVariant'), require('./model/ListAddress'), require('./model/ListAddressAssignment'), require('./model/ListApiClient'), require('./model/ListApiClientAssignment'), require('./model/ListApprovalRule'), require('./model/ListBuyer'), require('./model/ListBuyerAddress'), require('./model/ListBuyerCreditCard'), require('./model/ListBuyerProduct'), require('./model/ListBuyerSpec'), require('./model/ListCatalog'), require('./model/ListCatalogAssignment'), require('./model/ListCategory'), require('./model/ListCategoryAssignment'), require('./model/ListCategoryProductAssignment'), require('./model/ListCostCenter'), require('./model/ListCostCenterAssignment'), require('./model/ListCreditCard'), require('./model/ListCreditCardAssignment'), require('./model/ListFacet'), require('./model/ListFacetValue'), require('./model/ListImpersonationConfig'), require('./model/ListIncrementor'), require('./model/ListLineItem'), require('./model/ListMessageCCListenerAssignment'), require('./model/ListMessageSender'), require('./model/ListMessageSenderAssignment'), require('./model/ListOpenIdConnect'), require('./model/ListOrder'), require('./model/ListOrderApproval'), require('./model/ListOrderPromotion'), require('./model/ListPayment'), require('./model/ListPriceSchedule'), require('./model/ListProduct'), require('./model/ListProductAssignment'), require('./model/ListProductCatalogAssignment'), require('./model/ListProductFacet'), require('./model/ListPromotion'), require('./model/ListPromotionAssignment'), require('./model/ListSecurityProfile'), require('./model/ListSecurityProfileAssignment'), require('./model/ListShipment'), require('./model/ListShipmentItem'), require('./model/ListSpec'), require('./model/ListSpecOption'), require('./model/ListSpecProductAssignment'), require('./model/ListSpendingAccount'), require('./model/ListSpendingAccountAssignment'), require('./model/ListSupplier'), require('./model/ListUser'), require('./model/ListUserGroup'), require('./model/ListUserGroupAssignment'), require('./model/ListVariant'), require('./model/ListWebhook'), require('./model/ListXpIndex'), require('./model/MeBuyer'), require('./model/MeSupplier'), require('./model/MeUser'), require('./model/MessageCCListenerAssignment'), require('./model/MessageSender'), require('./model/MessageSenderAssignment'), require('./model/Meta'), require('./model/MetaWithFacets'), require('./model/OpenIdConnect'), require('./model/Order'), require('./model/OrderApproval'), require('./model/OrderApprovalInfo'), require('./model/OrderPromotion'), require('./model/PartialAddress'), require('./model/PartialApiClient'), require('./model/PartialApprovalRule'), require('./model/PartialBuyer'), require('./model/PartialBuyerAddress'), require('./model/PartialBuyerCreditCard'), require('./model/PartialCatalog'), require('./model/PartialCategory'), require('./model/PartialCostCenter'), require('./model/PartialCreditCard'), require('./model/PartialImpersonationConfig'), require('./model/PartialIncrementor'), require('./model/PartialInventory'), require('./model/PartialLineItem'), require('./model/PartialLineItemProduct'), require('./model/PartialLineItemSpec'), require('./model/PartialLineItemVariant'), require('./model/PartialMeBuyer'), require('./model/PartialMeSupplier'), require('./model/PartialMeUser'), require('./model/PartialMessageSender'), require('./model/PartialOpenIdConnect'), require('./model/PartialOrder'), require('./model/PartialPayment'), require('./model/PartialPaymentTransaction'), require('./model/PartialPriceBreak'), require('./model/PartialPriceSchedule'), require('./model/PartialProduct'), require('./model/PartialProductFacet'), require('./model/PartialPromotion'), require('./model/PartialShipment'), require('./model/PartialSpec'), require('./model/PartialSpecOption'), require('./model/PartialSpendingAccount'), require('./model/PartialSupplier'), require('./model/PartialUser'), require('./model/PartialUserGroup'), require('./model/PartialVariant'), require('./model/PartialVariantInventory'), require('./model/PartialWebhook'), require('./model/PartialWebhookRoute'), require('./model/PasswordReset'), require('./model/PasswordResetRequest'), require('./model/Payment'), require('./model/PaymentTransaction'), require('./model/PriceBreak'), require('./model/PriceSchedule'), require('./model/Product'), require('./model/ProductAssignment'), require('./model/ProductCatalogAssignment'), require('./model/ProductFacet'), require('./model/Promotion'), require('./model/PromotionAssignment'), require('./model/SecurityProfile'), require('./model/SecurityProfileAssignment'), require('./model/Shipment'), require('./model/ShipmentItem'), require('./model/Spec'), require('./model/SpecOption'), require('./model/SpecProductAssignment'), require('./model/SpendingAccount'), require('./model/SpendingAccountAssignment'), require('./model/Supplier'), require('./model/TokenPasswordReset'), require('./model/User'), require('./model/UserGroup'), require('./model/UserGroupAssignment'), require('./model/Variant'), require('./model/VariantInventory'), require('./model/Webhook'), require('./model/WebhookRoute'), require('./model/XpIndex'), require('./api/Addresses'), require('./api/AdminAddresses'), require('./api/AdminUsers'), require('./api/AdminUserGroups'), require('./api/ApiClients'), require('./api/ApprovalRules'), require('./api/Buyers'), require('./api/Catalogs'), require('./api/Categories'), require('./api/CostCenters'), require('./api/CreditCards'), require('./api/ImpersonationConfigs'), require('./api/Incrementors'), require('./api/LineItems'), require('./api/Me'), require('./api/MessageSenders'), require('./api/OpenIdConnects'), require('./api/Orders'), require('./api/PasswordResets'), require('./api/Payments'), require('./api/PriceSchedules'), require('./api/Products'), require('./api/ProductFacets'), require('./api/Promotions'), require('./api/SecurityProfiles'), require('./api/Shipments'), require('./api/Specs'), require('./api/SpendingAccounts'), require('./api/Suppliers'), require('./api/SupplierAddresses'), require('./api/SupplierUsers'), require('./api/SupplierUserGroups'), require('./api/Users'), require('./api/UserGroups'), require('./api/Webhooks'), require('./api/XpIndexs'), require('./api/Auth')); + } +}(function(Sdk, AccessToken, Address, AddressAssignment, ApiClient, ApiClientAssignment, ApprovalRule, Buyer, BuyerAddress, BuyerCreditCard, BuyerProduct, BuyerSpec, Catalog, CatalogAssignment, Category, CategoryAssignment, CategoryProductAssignment, CostCenter, CostCenterAssignment, CreditCard, CreditCardAssignment, ImpersonateTokenRequest, ImpersonationConfig, Incrementor, Inventory, LineItem, LineItemProduct, LineItemSpec, LineItemVariant, ListAddress, ListAddressAssignment, ListApiClient, ListApiClientAssignment, ListApprovalRule, ListBuyer, ListBuyerAddress, ListBuyerCreditCard, ListBuyerProduct, ListBuyerSpec, ListCatalog, ListCatalogAssignment, ListCategory, ListCategoryAssignment, ListCategoryProductAssignment, ListCostCenter, ListCostCenterAssignment, ListCreditCard, ListCreditCardAssignment, ListFacet, ListFacetValue, ListImpersonationConfig, ListIncrementor, ListLineItem, ListMessageCCListenerAssignment, ListMessageSender, ListMessageSenderAssignment, ListOpenIdConnect, ListOrder, ListOrderApproval, ListOrderPromotion, ListPayment, ListPriceSchedule, ListProduct, ListProductAssignment, ListProductCatalogAssignment, ListProductFacet, ListPromotion, ListPromotionAssignment, ListSecurityProfile, ListSecurityProfileAssignment, ListShipment, ListShipmentItem, ListSpec, ListSpecOption, ListSpecProductAssignment, ListSpendingAccount, ListSpendingAccountAssignment, ListSupplier, ListUser, ListUserGroup, ListUserGroupAssignment, ListVariant, ListWebhook, ListXpIndex, MeBuyer, MeSupplier, MeUser, MessageCCListenerAssignment, MessageSender, MessageSenderAssignment, Meta, MetaWithFacets, OpenIdConnect, Order, OrderApproval, OrderApprovalInfo, OrderPromotion, PartialAddress, PartialApiClient, PartialApprovalRule, PartialBuyer, PartialBuyerAddress, PartialBuyerCreditCard, PartialCatalog, PartialCategory, PartialCostCenter, PartialCreditCard, PartialImpersonationConfig, PartialIncrementor, PartialInventory, PartialLineItem, PartialLineItemProduct, PartialLineItemSpec, PartialLineItemVariant, PartialMeBuyer, PartialMeSupplier, PartialMeUser, PartialMessageSender, PartialOpenIdConnect, PartialOrder, PartialPayment, PartialPaymentTransaction, PartialPriceBreak, PartialPriceSchedule, PartialProduct, PartialProductFacet, PartialPromotion, PartialShipment, PartialSpec, PartialSpecOption, PartialSpendingAccount, PartialSupplier, PartialUser, PartialUserGroup, PartialVariant, PartialVariantInventory, PartialWebhook, PartialWebhookRoute, PasswordReset, PasswordResetRequest, Payment, PaymentTransaction, PriceBreak, PriceSchedule, Product, ProductAssignment, ProductCatalogAssignment, ProductFacet, Promotion, PromotionAssignment, SecurityProfile, SecurityProfileAssignment, Shipment, ShipmentItem, Spec, SpecOption, SpecProductAssignment, SpendingAccount, SpendingAccountAssignment, Supplier, TokenPasswordReset, User, UserGroup, UserGroupAssignment, Variant, VariantInventory, Webhook, WebhookRoute, XpIndex, Addresses, AdminAddresses, AdminUsers, AdminUserGroups, ApiClients, ApprovalRules, Buyers, Catalogs, Categories, CostCenters, CreditCards, ImpersonationConfigs, Incrementors, LineItems, Me, MessageSenders, OpenIdConnects, Orders, PasswordResets, Payments, PriceSchedules, Products, ProductFacets, Promotions, SecurityProfiles, Shipments, Specs, SpendingAccounts, Suppliers, SupplierAddresses, SupplierUsers, SupplierUserGroups, Users, UserGroups, Webhooks, XpIndexs, Auth) { + 'use strict'; + + /** + * JavaScript SDK autogenerated from swagger spec using the Swagger-CodeGen project.
+ * The index module provides access to constructors for all the classes which comprise the public API. + *

+ * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: + *

+   * var OrderCloud = require('index'); // See note below*.
+   * var xxxSvc = new OrderCloud.XxxApi(); // Allocate the API class we're going to use.
+   * var yyyModel = new OrderCloud.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ * *NOTE: For a top-level AMD script, use require(['index'], function(){...}) + * and put the application logic within the callback function. + *

+ *

+ * A non-AMD browser application (discouraged) might do something like this: + *

+   * var xxxSvc = new OrderCloud.XxxApi(); // Allocate the API class we're going to use.
+   * var yyy = new OrderCloud.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ *

+ * @module index + * @version 3.3.6 + */ + var exports = { + /** + * The As impersonation service. + * @property {null} + */ + As: function() { + this.Sdk.instance.impersonation = true; + return this; + }, + /** + * The Auth service. + * @property {null} + */ + Auth: new Auth(), + /** + * The Sdk constructor. + * @property {module:Sdk} + */ + Sdk: Sdk, + /** + * The AccessToken model constructor. + * @property {module:model/AccessToken} + */ + AccessToken: AccessToken, + /** + * The Address model constructor. + * @property {module:model/Address} + */ + Address: Address, + /** + * The AddressAssignment model constructor. + * @property {module:model/AddressAssignment} + */ + AddressAssignment: AddressAssignment, + /** + * The ApiClient model constructor. + * @property {module:model/ApiClient} + */ + ApiClient: ApiClient, + /** + * The ApiClientAssignment model constructor. + * @property {module:model/ApiClientAssignment} + */ + ApiClientAssignment: ApiClientAssignment, + /** + * The ApprovalRule model constructor. + * @property {module:model/ApprovalRule} + */ + ApprovalRule: ApprovalRule, + /** + * The Buyer model constructor. + * @property {module:model/Buyer} + */ + Buyer: Buyer, + /** + * The BuyerAddress model constructor. + * @property {module:model/BuyerAddress} + */ + BuyerAddress: BuyerAddress, + /** + * The BuyerCreditCard model constructor. + * @property {module:model/BuyerCreditCard} + */ + BuyerCreditCard: BuyerCreditCard, + /** + * The BuyerProduct model constructor. + * @property {module:model/BuyerProduct} + */ + BuyerProduct: BuyerProduct, + /** + * The BuyerSpec model constructor. + * @property {module:model/BuyerSpec} + */ + BuyerSpec: BuyerSpec, + /** + * The Catalog model constructor. + * @property {module:model/Catalog} + */ + Catalog: Catalog, + /** + * The CatalogAssignment model constructor. + * @property {module:model/CatalogAssignment} + */ + CatalogAssignment: CatalogAssignment, + /** + * The Category model constructor. + * @property {module:model/Category} + */ + Category: Category, + /** + * The CategoryAssignment model constructor. + * @property {module:model/CategoryAssignment} + */ + CategoryAssignment: CategoryAssignment, + /** + * The CategoryProductAssignment model constructor. + * @property {module:model/CategoryProductAssignment} + */ + CategoryProductAssignment: CategoryProductAssignment, + /** + * The CostCenter model constructor. + * @property {module:model/CostCenter} + */ + CostCenter: CostCenter, + /** + * The CostCenterAssignment model constructor. + * @property {module:model/CostCenterAssignment} + */ + CostCenterAssignment: CostCenterAssignment, + /** + * The CreditCard model constructor. + * @property {module:model/CreditCard} + */ + CreditCard: CreditCard, + /** + * The CreditCardAssignment model constructor. + * @property {module:model/CreditCardAssignment} + */ + CreditCardAssignment: CreditCardAssignment, + /** + * The ImpersonateTokenRequest model constructor. + * @property {module:model/ImpersonateTokenRequest} + */ + ImpersonateTokenRequest: ImpersonateTokenRequest, + /** + * The ImpersonationConfig model constructor. + * @property {module:model/ImpersonationConfig} + */ + ImpersonationConfig: ImpersonationConfig, + /** + * The Incrementor model constructor. + * @property {module:model/Incrementor} + */ + Incrementor: Incrementor, + /** + * The Inventory model constructor. + * @property {module:model/Inventory} + */ + Inventory: Inventory, + /** + * The LineItem model constructor. + * @property {module:model/LineItem} + */ + LineItem: LineItem, + /** + * The LineItemProduct model constructor. + * @property {module:model/LineItemProduct} + */ + LineItemProduct: LineItemProduct, + /** + * The LineItemSpec model constructor. + * @property {module:model/LineItemSpec} + */ + LineItemSpec: LineItemSpec, + /** + * The LineItemVariant model constructor. + * @property {module:model/LineItemVariant} + */ + LineItemVariant: LineItemVariant, + /** + * The ListAddress model constructor. + * @property {module:model/ListAddress} + */ + ListAddress: ListAddress, + /** + * The ListAddressAssignment model constructor. + * @property {module:model/ListAddressAssignment} + */ + ListAddressAssignment: ListAddressAssignment, + /** + * The ListApiClient model constructor. + * @property {module:model/ListApiClient} + */ + ListApiClient: ListApiClient, + /** + * The ListApiClientAssignment model constructor. + * @property {module:model/ListApiClientAssignment} + */ + ListApiClientAssignment: ListApiClientAssignment, + /** + * The ListApprovalRule model constructor. + * @property {module:model/ListApprovalRule} + */ + ListApprovalRule: ListApprovalRule, + /** + * The ListBuyer model constructor. + * @property {module:model/ListBuyer} + */ + ListBuyer: ListBuyer, + /** + * The ListBuyerAddress model constructor. + * @property {module:model/ListBuyerAddress} + */ + ListBuyerAddress: ListBuyerAddress, + /** + * The ListBuyerCreditCard model constructor. + * @property {module:model/ListBuyerCreditCard} + */ + ListBuyerCreditCard: ListBuyerCreditCard, + /** + * The ListBuyerProduct model constructor. + * @property {module:model/ListBuyerProduct} + */ + ListBuyerProduct: ListBuyerProduct, + /** + * The ListBuyerSpec model constructor. + * @property {module:model/ListBuyerSpec} + */ + ListBuyerSpec: ListBuyerSpec, + /** + * The ListCatalog model constructor. + * @property {module:model/ListCatalog} + */ + ListCatalog: ListCatalog, + /** + * The ListCatalogAssignment model constructor. + * @property {module:model/ListCatalogAssignment} + */ + ListCatalogAssignment: ListCatalogAssignment, + /** + * The ListCategory model constructor. + * @property {module:model/ListCategory} + */ + ListCategory: ListCategory, + /** + * The ListCategoryAssignment model constructor. + * @property {module:model/ListCategoryAssignment} + */ + ListCategoryAssignment: ListCategoryAssignment, + /** + * The ListCategoryProductAssignment model constructor. + * @property {module:model/ListCategoryProductAssignment} + */ + ListCategoryProductAssignment: ListCategoryProductAssignment, + /** + * The ListCostCenter model constructor. + * @property {module:model/ListCostCenter} + */ + ListCostCenter: ListCostCenter, + /** + * The ListCostCenterAssignment model constructor. + * @property {module:model/ListCostCenterAssignment} + */ + ListCostCenterAssignment: ListCostCenterAssignment, + /** + * The ListCreditCard model constructor. + * @property {module:model/ListCreditCard} + */ + ListCreditCard: ListCreditCard, + /** + * The ListCreditCardAssignment model constructor. + * @property {module:model/ListCreditCardAssignment} + */ + ListCreditCardAssignment: ListCreditCardAssignment, + /** + * The ListFacet model constructor. + * @property {module:model/ListFacet} + */ + ListFacet: ListFacet, + /** + * The ListFacetValue model constructor. + * @property {module:model/ListFacetValue} + */ + ListFacetValue: ListFacetValue, + /** + * The ListImpersonationConfig model constructor. + * @property {module:model/ListImpersonationConfig} + */ + ListImpersonationConfig: ListImpersonationConfig, + /** + * The ListIncrementor model constructor. + * @property {module:model/ListIncrementor} + */ + ListIncrementor: ListIncrementor, + /** + * The ListLineItem model constructor. + * @property {module:model/ListLineItem} + */ + ListLineItem: ListLineItem, + /** + * The ListMessageCCListenerAssignment model constructor. + * @property {module:model/ListMessageCCListenerAssignment} + */ + ListMessageCCListenerAssignment: ListMessageCCListenerAssignment, + /** + * The ListMessageSender model constructor. + * @property {module:model/ListMessageSender} + */ + ListMessageSender: ListMessageSender, + /** + * The ListMessageSenderAssignment model constructor. + * @property {module:model/ListMessageSenderAssignment} + */ + ListMessageSenderAssignment: ListMessageSenderAssignment, + /** + * The ListOpenIdConnect model constructor. + * @property {module:model/ListOpenIdConnect} + */ + ListOpenIdConnect: ListOpenIdConnect, + /** + * The ListOrder model constructor. + * @property {module:model/ListOrder} + */ + ListOrder: ListOrder, + /** + * The ListOrderApproval model constructor. + * @property {module:model/ListOrderApproval} + */ + ListOrderApproval: ListOrderApproval, + /** + * The ListOrderPromotion model constructor. + * @property {module:model/ListOrderPromotion} + */ + ListOrderPromotion: ListOrderPromotion, + /** + * The ListPayment model constructor. + * @property {module:model/ListPayment} + */ + ListPayment: ListPayment, + /** + * The ListPriceSchedule model constructor. + * @property {module:model/ListPriceSchedule} + */ + ListPriceSchedule: ListPriceSchedule, + /** + * The ListProduct model constructor. + * @property {module:model/ListProduct} + */ + ListProduct: ListProduct, + /** + * The ListProductAssignment model constructor. + * @property {module:model/ListProductAssignment} + */ + ListProductAssignment: ListProductAssignment, + /** + * The ListProductCatalogAssignment model constructor. + * @property {module:model/ListProductCatalogAssignment} + */ + ListProductCatalogAssignment: ListProductCatalogAssignment, + /** + * The ListProductFacet model constructor. + * @property {module:model/ListProductFacet} + */ + ListProductFacet: ListProductFacet, + /** + * The ListPromotion model constructor. + * @property {module:model/ListPromotion} + */ + ListPromotion: ListPromotion, + /** + * The ListPromotionAssignment model constructor. + * @property {module:model/ListPromotionAssignment} + */ + ListPromotionAssignment: ListPromotionAssignment, + /** + * The ListSecurityProfile model constructor. + * @property {module:model/ListSecurityProfile} + */ + ListSecurityProfile: ListSecurityProfile, + /** + * The ListSecurityProfileAssignment model constructor. + * @property {module:model/ListSecurityProfileAssignment} + */ + ListSecurityProfileAssignment: ListSecurityProfileAssignment, + /** + * The ListShipment model constructor. + * @property {module:model/ListShipment} + */ + ListShipment: ListShipment, + /** + * The ListShipmentItem model constructor. + * @property {module:model/ListShipmentItem} + */ + ListShipmentItem: ListShipmentItem, + /** + * The ListSpec model constructor. + * @property {module:model/ListSpec} + */ + ListSpec: ListSpec, + /** + * The ListSpecOption model constructor. + * @property {module:model/ListSpecOption} + */ + ListSpecOption: ListSpecOption, + /** + * The ListSpecProductAssignment model constructor. + * @property {module:model/ListSpecProductAssignment} + */ + ListSpecProductAssignment: ListSpecProductAssignment, + /** + * The ListSpendingAccount model constructor. + * @property {module:model/ListSpendingAccount} + */ + ListSpendingAccount: ListSpendingAccount, + /** + * The ListSpendingAccountAssignment model constructor. + * @property {module:model/ListSpendingAccountAssignment} + */ + ListSpendingAccountAssignment: ListSpendingAccountAssignment, + /** + * The ListSupplier model constructor. + * @property {module:model/ListSupplier} + */ + ListSupplier: ListSupplier, + /** + * The ListUser model constructor. + * @property {module:model/ListUser} + */ + ListUser: ListUser, + /** + * The ListUserGroup model constructor. + * @property {module:model/ListUserGroup} + */ + ListUserGroup: ListUserGroup, + /** + * The ListUserGroupAssignment model constructor. + * @property {module:model/ListUserGroupAssignment} + */ + ListUserGroupAssignment: ListUserGroupAssignment, + /** + * The ListVariant model constructor. + * @property {module:model/ListVariant} + */ + ListVariant: ListVariant, + /** + * The ListWebhook model constructor. + * @property {module:model/ListWebhook} + */ + ListWebhook: ListWebhook, + /** + * The ListXpIndex model constructor. + * @property {module:model/ListXpIndex} + */ + ListXpIndex: ListXpIndex, + /** + * The MeBuyer model constructor. + * @property {module:model/MeBuyer} + */ + MeBuyer: MeBuyer, + /** + * The MeSupplier model constructor. + * @property {module:model/MeSupplier} + */ + MeSupplier: MeSupplier, + /** + * The MeUser model constructor. + * @property {module:model/MeUser} + */ + MeUser: MeUser, + /** + * The MessageCCListenerAssignment model constructor. + * @property {module:model/MessageCCListenerAssignment} + */ + MessageCCListenerAssignment: MessageCCListenerAssignment, + /** + * The MessageSender model constructor. + * @property {module:model/MessageSender} + */ + MessageSender: MessageSender, + /** + * The MessageSenderAssignment model constructor. + * @property {module:model/MessageSenderAssignment} + */ + MessageSenderAssignment: MessageSenderAssignment, + /** + * The Meta model constructor. + * @property {module:model/Meta} + */ + Meta: Meta, + /** + * The MetaWithFacets model constructor. + * @property {module:model/MetaWithFacets} + */ + MetaWithFacets: MetaWithFacets, + /** + * The OpenIdConnect model constructor. + * @property {module:model/OpenIdConnect} + */ + OpenIdConnect: OpenIdConnect, + /** + * The Order model constructor. + * @property {module:model/Order} + */ + Order: Order, + /** + * The OrderApproval model constructor. + * @property {module:model/OrderApproval} + */ + OrderApproval: OrderApproval, + /** + * The OrderApprovalInfo model constructor. + * @property {module:model/OrderApprovalInfo} + */ + OrderApprovalInfo: OrderApprovalInfo, + /** + * The OrderPromotion model constructor. + * @property {module:model/OrderPromotion} + */ + OrderPromotion: OrderPromotion, + /** + * The PartialAddress model constructor. + * @property {module:model/PartialAddress} + */ + PartialAddress: PartialAddress, + /** + * The PartialApiClient model constructor. + * @property {module:model/PartialApiClient} + */ + PartialApiClient: PartialApiClient, + /** + * The PartialApprovalRule model constructor. + * @property {module:model/PartialApprovalRule} + */ + PartialApprovalRule: PartialApprovalRule, + /** + * The PartialBuyer model constructor. + * @property {module:model/PartialBuyer} + */ + PartialBuyer: PartialBuyer, + /** + * The PartialBuyerAddress model constructor. + * @property {module:model/PartialBuyerAddress} + */ + PartialBuyerAddress: PartialBuyerAddress, + /** + * The PartialBuyerCreditCard model constructor. + * @property {module:model/PartialBuyerCreditCard} + */ + PartialBuyerCreditCard: PartialBuyerCreditCard, + /** + * The PartialCatalog model constructor. + * @property {module:model/PartialCatalog} + */ + PartialCatalog: PartialCatalog, + /** + * The PartialCategory model constructor. + * @property {module:model/PartialCategory} + */ + PartialCategory: PartialCategory, + /** + * The PartialCostCenter model constructor. + * @property {module:model/PartialCostCenter} + */ + PartialCostCenter: PartialCostCenter, + /** + * The PartialCreditCard model constructor. + * @property {module:model/PartialCreditCard} + */ + PartialCreditCard: PartialCreditCard, + /** + * The PartialImpersonationConfig model constructor. + * @property {module:model/PartialImpersonationConfig} + */ + PartialImpersonationConfig: PartialImpersonationConfig, + /** + * The PartialIncrementor model constructor. + * @property {module:model/PartialIncrementor} + */ + PartialIncrementor: PartialIncrementor, + /** + * The PartialInventory model constructor. + * @property {module:model/PartialInventory} + */ + PartialInventory: PartialInventory, + /** + * The PartialLineItem model constructor. + * @property {module:model/PartialLineItem} + */ + PartialLineItem: PartialLineItem, + /** + * The PartialLineItemProduct model constructor. + * @property {module:model/PartialLineItemProduct} + */ + PartialLineItemProduct: PartialLineItemProduct, + /** + * The PartialLineItemSpec model constructor. + * @property {module:model/PartialLineItemSpec} + */ + PartialLineItemSpec: PartialLineItemSpec, + /** + * The PartialLineItemVariant model constructor. + * @property {module:model/PartialLineItemVariant} + */ + PartialLineItemVariant: PartialLineItemVariant, + /** + * The PartialMeBuyer model constructor. + * @property {module:model/PartialMeBuyer} + */ + PartialMeBuyer: PartialMeBuyer, + /** + * The PartialMeSupplier model constructor. + * @property {module:model/PartialMeSupplier} + */ + PartialMeSupplier: PartialMeSupplier, + /** + * The PartialMeUser model constructor. + * @property {module:model/PartialMeUser} + */ + PartialMeUser: PartialMeUser, + /** + * The PartialMessageSender model constructor. + * @property {module:model/PartialMessageSender} + */ + PartialMessageSender: PartialMessageSender, + /** + * The PartialOpenIdConnect model constructor. + * @property {module:model/PartialOpenIdConnect} + */ + PartialOpenIdConnect: PartialOpenIdConnect, + /** + * The PartialOrder model constructor. + * @property {module:model/PartialOrder} + */ + PartialOrder: PartialOrder, + /** + * The PartialPayment model constructor. + * @property {module:model/PartialPayment} + */ + PartialPayment: PartialPayment, + /** + * The PartialPaymentTransaction model constructor. + * @property {module:model/PartialPaymentTransaction} + */ + PartialPaymentTransaction: PartialPaymentTransaction, + /** + * The PartialPriceBreak model constructor. + * @property {module:model/PartialPriceBreak} + */ + PartialPriceBreak: PartialPriceBreak, + /** + * The PartialPriceSchedule model constructor. + * @property {module:model/PartialPriceSchedule} + */ + PartialPriceSchedule: PartialPriceSchedule, + /** + * The PartialProduct model constructor. + * @property {module:model/PartialProduct} + */ + PartialProduct: PartialProduct, + /** + * The PartialProductFacet model constructor. + * @property {module:model/PartialProductFacet} + */ + PartialProductFacet: PartialProductFacet, + /** + * The PartialPromotion model constructor. + * @property {module:model/PartialPromotion} + */ + PartialPromotion: PartialPromotion, + /** + * The PartialShipment model constructor. + * @property {module:model/PartialShipment} + */ + PartialShipment: PartialShipment, + /** + * The PartialSpec model constructor. + * @property {module:model/PartialSpec} + */ + PartialSpec: PartialSpec, + /** + * The PartialSpecOption model constructor. + * @property {module:model/PartialSpecOption} + */ + PartialSpecOption: PartialSpecOption, + /** + * The PartialSpendingAccount model constructor. + * @property {module:model/PartialSpendingAccount} + */ + PartialSpendingAccount: PartialSpendingAccount, + /** + * The PartialSupplier model constructor. + * @property {module:model/PartialSupplier} + */ + PartialSupplier: PartialSupplier, + /** + * The PartialUser model constructor. + * @property {module:model/PartialUser} + */ + PartialUser: PartialUser, + /** + * The PartialUserGroup model constructor. + * @property {module:model/PartialUserGroup} + */ + PartialUserGroup: PartialUserGroup, + /** + * The PartialVariant model constructor. + * @property {module:model/PartialVariant} + */ + PartialVariant: PartialVariant, + /** + * The PartialVariantInventory model constructor. + * @property {module:model/PartialVariantInventory} + */ + PartialVariantInventory: PartialVariantInventory, + /** + * The PartialWebhook model constructor. + * @property {module:model/PartialWebhook} + */ + PartialWebhook: PartialWebhook, + /** + * The PartialWebhookRoute model constructor. + * @property {module:model/PartialWebhookRoute} + */ + PartialWebhookRoute: PartialWebhookRoute, + /** + * The PasswordReset model constructor. + * @property {module:model/PasswordReset} + */ + PasswordReset: PasswordReset, + /** + * The PasswordResetRequest model constructor. + * @property {module:model/PasswordResetRequest} + */ + PasswordResetRequest: PasswordResetRequest, + /** + * The Payment model constructor. + * @property {module:model/Payment} + */ + Payment: Payment, + /** + * The PaymentTransaction model constructor. + * @property {module:model/PaymentTransaction} + */ + PaymentTransaction: PaymentTransaction, + /** + * The PriceBreak model constructor. + * @property {module:model/PriceBreak} + */ + PriceBreak: PriceBreak, + /** + * The PriceSchedule model constructor. + * @property {module:model/PriceSchedule} + */ + PriceSchedule: PriceSchedule, + /** + * The Product model constructor. + * @property {module:model/Product} + */ + Product: Product, + /** + * The ProductAssignment model constructor. + * @property {module:model/ProductAssignment} + */ + ProductAssignment: ProductAssignment, + /** + * The ProductCatalogAssignment model constructor. + * @property {module:model/ProductCatalogAssignment} + */ + ProductCatalogAssignment: ProductCatalogAssignment, + /** + * The ProductFacet model constructor. + * @property {module:model/ProductFacet} + */ + ProductFacet: ProductFacet, + /** + * The Promotion model constructor. + * @property {module:model/Promotion} + */ + Promotion: Promotion, + /** + * The PromotionAssignment model constructor. + * @property {module:model/PromotionAssignment} + */ + PromotionAssignment: PromotionAssignment, + /** + * The SecurityProfile model constructor. + * @property {module:model/SecurityProfile} + */ + SecurityProfile: SecurityProfile, + /** + * The SecurityProfileAssignment model constructor. + * @property {module:model/SecurityProfileAssignment} + */ + SecurityProfileAssignment: SecurityProfileAssignment, + /** + * The Shipment model constructor. + * @property {module:model/Shipment} + */ + Shipment: Shipment, + /** + * The ShipmentItem model constructor. + * @property {module:model/ShipmentItem} + */ + ShipmentItem: ShipmentItem, + /** + * The Spec model constructor. + * @property {module:model/Spec} + */ + Spec: Spec, + /** + * The SpecOption model constructor. + * @property {module:model/SpecOption} + */ + SpecOption: SpecOption, + /** + * The SpecProductAssignment model constructor. + * @property {module:model/SpecProductAssignment} + */ + SpecProductAssignment: SpecProductAssignment, + /** + * The SpendingAccount model constructor. + * @property {module:model/SpendingAccount} + */ + SpendingAccount: SpendingAccount, + /** + * The SpendingAccountAssignment model constructor. + * @property {module:model/SpendingAccountAssignment} + */ + SpendingAccountAssignment: SpendingAccountAssignment, + /** + * The Supplier model constructor. + * @property {module:model/Supplier} + */ + Supplier: Supplier, + /** + * The TokenPasswordReset model constructor. + * @property {module:model/TokenPasswordReset} + */ + TokenPasswordReset: TokenPasswordReset, + /** + * The User model constructor. + * @property {module:model/User} + */ + User: User, + /** + * The UserGroup model constructor. + * @property {module:model/UserGroup} + */ + UserGroup: UserGroup, + /** + * The UserGroupAssignment model constructor. + * @property {module:model/UserGroupAssignment} + */ + UserGroupAssignment: UserGroupAssignment, + /** + * The Variant model constructor. + * @property {module:model/Variant} + */ + Variant: Variant, + /** + * The VariantInventory model constructor. + * @property {module:model/VariantInventory} + */ + VariantInventory: VariantInventory, + /** + * The Webhook model constructor. + * @property {module:model/Webhook} + */ + Webhook: Webhook, + /** + * The WebhookRoute model constructor. + * @property {module:model/WebhookRoute} + */ + WebhookRoute: WebhookRoute, + /** + * The XpIndex model constructor. + * @property {module:model/XpIndex} + */ + XpIndex: XpIndex, + /** + * The Addresses service. + * @property {module:api/Addresses} + */ + Addresses: new Addresses(), + /** + * The AdminAddresses service. + * @property {module:api/AdminAddresses} + */ + AdminAddresses: new AdminAddresses(), + /** + * The AdminUsers service. + * @property {module:api/AdminUsers} + */ + AdminUsers: new AdminUsers(), + /** + * The AdminUserGroups service. + * @property {module:api/AdminUserGroups} + */ + AdminUserGroups: new AdminUserGroups(), + /** + * The ApiClients service. + * @property {module:api/ApiClients} + */ + ApiClients: new ApiClients(), + /** + * The ApprovalRules service. + * @property {module:api/ApprovalRules} + */ + ApprovalRules: new ApprovalRules(), + /** + * The Buyers service. + * @property {module:api/Buyers} + */ + Buyers: new Buyers(), + /** + * The Catalogs service. + * @property {module:api/Catalogs} + */ + Catalogs: new Catalogs(), + /** + * The Categories service. + * @property {module:api/Categories} + */ + Categories: new Categories(), + /** + * The CostCenters service. + * @property {module:api/CostCenters} + */ + CostCenters: new CostCenters(), + /** + * The CreditCards service. + * @property {module:api/CreditCards} + */ + CreditCards: new CreditCards(), + /** + * The ImpersonationConfigs service. + * @property {module:api/ImpersonationConfigs} + */ + ImpersonationConfigs: new ImpersonationConfigs(), + /** + * The Incrementors service. + * @property {module:api/Incrementors} + */ + Incrementors: new Incrementors(), + /** + * The LineItems service. + * @property {module:api/LineItems} + */ + LineItems: new LineItems(), + /** + * The Me service. + * @property {module:api/Me} + */ + Me: new Me(), + /** + * The MessageSenders service. + * @property {module:api/MessageSenders} + */ + MessageSenders: new MessageSenders(), + /** + * The OpenIdConnects service. + * @property {module:api/OpenIdConnects} + */ + OpenIdConnects: new OpenIdConnects(), + /** + * The Orders service. + * @property {module:api/Orders} + */ + Orders: new Orders(), + /** + * The PasswordResets service. + * @property {module:api/PasswordResets} + */ + PasswordResets: new PasswordResets(), + /** + * The Payments service. + * @property {module:api/Payments} + */ + Payments: new Payments(), + /** + * The PriceSchedules service. + * @property {module:api/PriceSchedules} + */ + PriceSchedules: new PriceSchedules(), + /** + * The Products service. + * @property {module:api/Products} + */ + Products: new Products(), + /** + * The ProductFacets service. + * @property {module:api/ProductFacets} + */ + ProductFacets: new ProductFacets(), + /** + * The Promotions service. + * @property {module:api/Promotions} + */ + Promotions: new Promotions(), + /** + * The SecurityProfiles service. + * @property {module:api/SecurityProfiles} + */ + SecurityProfiles: new SecurityProfiles(), + /** + * The Shipments service. + * @property {module:api/Shipments} + */ + Shipments: new Shipments(), + /** + * The Specs service. + * @property {module:api/Specs} + */ + Specs: new Specs(), + /** + * The SpendingAccounts service. + * @property {module:api/SpendingAccounts} + */ + SpendingAccounts: new SpendingAccounts(), + /** + * The Suppliers service. + * @property {module:api/Suppliers} + */ + Suppliers: new Suppliers(), + /** + * The SupplierAddresses service. + * @property {module:api/SupplierAddresses} + */ + SupplierAddresses: new SupplierAddresses(), + /** + * The SupplierUsers service. + * @property {module:api/SupplierUsers} + */ + SupplierUsers: new SupplierUsers(), + /** + * The SupplierUserGroups service. + * @property {module:api/SupplierUserGroups} + */ + SupplierUserGroups: new SupplierUserGroups(), + /** + * The Users service. + * @property {module:api/Users} + */ + Users: new Users(), + /** + * The UserGroups service. + * @property {module:api/UserGroups} + */ + UserGroups: new UserGroups(), + /** + * The Webhooks service. + * @property {module:api/Webhooks} + */ + Webhooks: new Webhooks(), + /** + * The XpIndexs service. + * @property {module:api/XpIndexs} + */ + XpIndexs: new XpIndexs() + }; + + return exports; +})); + +},{"./Sdk":12,"./api/Addresses":13,"./api/AdminAddresses":14,"./api/AdminUserGroups":15,"./api/AdminUsers":16,"./api/ApiClients":17,"./api/ApprovalRules":18,"./api/Auth":19,"./api/Buyers":20,"./api/Catalogs":21,"./api/Categories":22,"./api/CostCenters":23,"./api/CreditCards":24,"./api/ImpersonationConfigs":25,"./api/Incrementors":26,"./api/LineItems":27,"./api/Me":28,"./api/MessageSenders":29,"./api/OpenIdConnects":30,"./api/Orders":31,"./api/PasswordResets":32,"./api/Payments":33,"./api/PriceSchedules":34,"./api/ProductFacets":35,"./api/Products":36,"./api/Promotions":37,"./api/SecurityProfiles":38,"./api/Shipments":39,"./api/Specs":40,"./api/SpendingAccounts":41,"./api/SupplierAddresses":42,"./api/SupplierUserGroups":43,"./api/SupplierUsers":44,"./api/Suppliers":45,"./api/UserGroups":46,"./api/Users":47,"./api/Webhooks":48,"./api/XpIndexs":49,"./model/AccessToken":51,"./model/Address":52,"./model/AddressAssignment":53,"./model/ApiClient":54,"./model/ApiClientAssignment":55,"./model/ApprovalRule":56,"./model/Buyer":57,"./model/BuyerAddress":58,"./model/BuyerCreditCard":59,"./model/BuyerProduct":60,"./model/BuyerSpec":61,"./model/Catalog":62,"./model/CatalogAssignment":63,"./model/Category":64,"./model/CategoryAssignment":65,"./model/CategoryProductAssignment":66,"./model/CostCenter":67,"./model/CostCenterAssignment":68,"./model/CreditCard":69,"./model/CreditCardAssignment":70,"./model/ImpersonateTokenRequest":71,"./model/ImpersonationConfig":72,"./model/Incrementor":73,"./model/Inventory":74,"./model/LineItem":75,"./model/LineItemProduct":76,"./model/LineItemSpec":77,"./model/LineItemVariant":78,"./model/ListAddress":79,"./model/ListAddressAssignment":80,"./model/ListApiClient":81,"./model/ListApiClientAssignment":82,"./model/ListApprovalRule":83,"./model/ListBuyer":84,"./model/ListBuyerAddress":85,"./model/ListBuyerCreditCard":86,"./model/ListBuyerProduct":87,"./model/ListBuyerSpec":88,"./model/ListCatalog":89,"./model/ListCatalogAssignment":90,"./model/ListCategory":91,"./model/ListCategoryAssignment":92,"./model/ListCategoryProductAssignment":93,"./model/ListCostCenter":94,"./model/ListCostCenterAssignment":95,"./model/ListCreditCard":96,"./model/ListCreditCardAssignment":97,"./model/ListFacet":98,"./model/ListFacetValue":99,"./model/ListImpersonationConfig":100,"./model/ListIncrementor":101,"./model/ListLineItem":102,"./model/ListMessageCCListenerAssignment":103,"./model/ListMessageSender":104,"./model/ListMessageSenderAssignment":105,"./model/ListOpenIdConnect":106,"./model/ListOrder":107,"./model/ListOrderApproval":108,"./model/ListOrderPromotion":109,"./model/ListPayment":110,"./model/ListPriceSchedule":111,"./model/ListProduct":112,"./model/ListProductAssignment":113,"./model/ListProductCatalogAssignment":114,"./model/ListProductFacet":115,"./model/ListPromotion":116,"./model/ListPromotionAssignment":117,"./model/ListSecurityProfile":118,"./model/ListSecurityProfileAssignment":119,"./model/ListShipment":120,"./model/ListShipmentItem":121,"./model/ListSpec":122,"./model/ListSpecOption":123,"./model/ListSpecProductAssignment":124,"./model/ListSpendingAccount":125,"./model/ListSpendingAccountAssignment":126,"./model/ListSupplier":127,"./model/ListUser":128,"./model/ListUserGroup":129,"./model/ListUserGroupAssignment":130,"./model/ListVariant":131,"./model/ListWebhook":132,"./model/ListXpIndex":133,"./model/MeBuyer":134,"./model/MeSupplier":135,"./model/MeUser":136,"./model/MessageCCListenerAssignment":137,"./model/MessageSender":138,"./model/MessageSenderAssignment":139,"./model/Meta":140,"./model/MetaWithFacets":141,"./model/OpenIdConnect":142,"./model/Order":143,"./model/OrderApproval":144,"./model/OrderApprovalInfo":145,"./model/OrderPromotion":146,"./model/PartialAddress":147,"./model/PartialApiClient":148,"./model/PartialApprovalRule":149,"./model/PartialBuyer":150,"./model/PartialBuyerAddress":151,"./model/PartialBuyerCreditCard":152,"./model/PartialCatalog":153,"./model/PartialCategory":154,"./model/PartialCostCenter":155,"./model/PartialCreditCard":156,"./model/PartialImpersonationConfig":157,"./model/PartialIncrementor":158,"./model/PartialInventory":159,"./model/PartialLineItem":160,"./model/PartialLineItemProduct":161,"./model/PartialLineItemSpec":162,"./model/PartialLineItemVariant":163,"./model/PartialMeBuyer":164,"./model/PartialMeSupplier":165,"./model/PartialMeUser":166,"./model/PartialMessageSender":167,"./model/PartialOpenIdConnect":168,"./model/PartialOrder":169,"./model/PartialPayment":170,"./model/PartialPaymentTransaction":171,"./model/PartialPriceBreak":172,"./model/PartialPriceSchedule":173,"./model/PartialProduct":174,"./model/PartialProductFacet":175,"./model/PartialPromotion":176,"./model/PartialShipment":177,"./model/PartialSpec":178,"./model/PartialSpecOption":179,"./model/PartialSpendingAccount":180,"./model/PartialSupplier":181,"./model/PartialUser":182,"./model/PartialUserGroup":183,"./model/PartialVariant":184,"./model/PartialVariantInventory":185,"./model/PartialWebhook":186,"./model/PartialWebhookRoute":187,"./model/PasswordReset":188,"./model/PasswordResetRequest":189,"./model/Payment":190,"./model/PaymentTransaction":191,"./model/PriceBreak":192,"./model/PriceSchedule":193,"./model/Product":194,"./model/ProductAssignment":195,"./model/ProductCatalogAssignment":196,"./model/ProductFacet":197,"./model/Promotion":198,"./model/PromotionAssignment":199,"./model/SecurityProfile":200,"./model/SecurityProfileAssignment":201,"./model/Shipment":202,"./model/ShipmentItem":203,"./model/Spec":204,"./model/SpecOption":205,"./model/SpecProductAssignment":206,"./model/SpendingAccount":207,"./model/SpendingAccountAssignment":208,"./model/Supplier":209,"./model/TokenPasswordReset":210,"./model/User":211,"./model/UserGroup":212,"./model/UserGroupAssignment":213,"./model/Variant":214,"./model/VariantInventory":215,"./model/Webhook":216,"./model/WebhookRoute":217,"./model/XpIndex":218}],51:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.AccessToken = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The AccessToken model module. + * @module model/AccessToken + */ + + /** + * Constructs a new AccessToken. + * @alias module:model/AccessToken + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a AccessToken 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/AccessToken} obj Optional instance to populate. + * @return {module:model/AccessToken} The populated AccessToken instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('access_token')) { + obj['access_token'] = Sdk.convertToType(data['access_token'], 'String'); + } + if (data.hasOwnProperty('expires_in')) { + obj['expires_in'] = Sdk.convertToType(data['expires_in'], 'Number'); + } + if (data.hasOwnProperty('token_type')) { + obj['token_type'] = Sdk.convertToType(data['token_type'], 'String'); + } + if (data.hasOwnProperty('refresh_token')) { + obj['refresh_token'] = Sdk.convertToType(data['refresh_token'], 'String'); + } + } + return obj; + } + + /** + * @member {String} access_token + */ + exports.prototype['access_token'] = undefined; + /** + * @member {Number} expires_in + */ + exports.prototype['expires_in'] = undefined; + /** + * @member {String} token_type + */ + exports.prototype['token_type'] = undefined; + /** + * @member {String} refresh_token + */ + exports.prototype['refresh_token'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],52:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Address = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Address model module. + * @module model/Address + */ + + /** + * Constructs a new Address. + * @alias module:model/Address + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a Address 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/Address} obj Optional instance to populate. + * @return {module:model/Address} The populated Address instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CompanyName')) { + obj['CompanyName'] = Sdk.convertToType(data['CompanyName'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Street1')) { + obj['Street1'] = Sdk.convertToType(data['Street1'], 'String'); + } + if (data.hasOwnProperty('Street2')) { + obj['Street2'] = Sdk.convertToType(data['Street2'], 'String'); + } + if (data.hasOwnProperty('City')) { + obj['City'] = Sdk.convertToType(data['City'], 'String'); + } + if (data.hasOwnProperty('State')) { + obj['State'] = Sdk.convertToType(data['State'], 'String'); + } + if (data.hasOwnProperty('Zip')) { + obj['Zip'] = Sdk.convertToType(data['Zip'], 'String'); + } + if (data.hasOwnProperty('Country')) { + obj['Country'] = Sdk.convertToType(data['Country'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('AddressName')) { + obj['AddressName'] = Sdk.convertToType(data['AddressName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CompanyName + */ + exports.prototype['CompanyName'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Street1 + */ + exports.prototype['Street1'] = undefined; + /** + * @member {String} Street2 + */ + exports.prototype['Street2'] = undefined; + /** + * @member {String} City + */ + exports.prototype['City'] = undefined; + /** + * @member {String} State + */ + exports.prototype['State'] = undefined; + /** + * @member {String} Zip + */ + exports.prototype['Zip'] = undefined; + /** + * @member {String} Country + */ + exports.prototype['Country'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} AddressName + */ + exports.prototype['AddressName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],53:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.AddressAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The AddressAssignment model module. + * @module model/AddressAssignment + */ + + /** + * Constructs a new AddressAssignment. + * @alias module:model/AddressAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a AddressAssignment 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/AddressAssignment} obj Optional instance to populate. + * @return {module:model/AddressAssignment} The populated AddressAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('AddressID')) { + obj['AddressID'] = Sdk.convertToType(data['AddressID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('IsShipping')) { + obj['IsShipping'] = Sdk.convertToType(data['IsShipping'], 'Boolean'); + } + if (data.hasOwnProperty('IsBilling')) { + obj['IsBilling'] = Sdk.convertToType(data['IsBilling'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {String} AddressID + */ + exports.prototype['AddressID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {Boolean} IsShipping + */ + exports.prototype['IsShipping'] = undefined; + /** + * @member {Boolean} IsBilling + */ + exports.prototype['IsBilling'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],54:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ApiClient = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ApiClient model module. + * @module model/ApiClient + */ + + /** + * Constructs a new ApiClient. + * @alias module:model/ApiClient + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a ApiClient 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/ApiClient} obj Optional instance to populate. + * @return {module:model/ApiClient} The populated ApiClient instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ClientSecret')) { + obj['ClientSecret'] = Sdk.convertToType(data['ClientSecret'], 'String'); + } + if (data.hasOwnProperty('AccessTokenDuration')) { + obj['AccessTokenDuration'] = Sdk.convertToType(data['AccessTokenDuration'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('AppName')) { + obj['AppName'] = Sdk.convertToType(data['AppName'], 'String'); + } + if (data.hasOwnProperty('RefreshTokenDuration')) { + obj['RefreshTokenDuration'] = Sdk.convertToType(data['RefreshTokenDuration'], 'Number'); + } + if (data.hasOwnProperty('DefaultContextUserName')) { + obj['DefaultContextUserName'] = Sdk.convertToType(data['DefaultContextUserName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AllowAnyBuyer')) { + obj['AllowAnyBuyer'] = Sdk.convertToType(data['AllowAnyBuyer'], 'Boolean'); + } + if (data.hasOwnProperty('AllowAnySupplier')) { + obj['AllowAnySupplier'] = Sdk.convertToType(data['AllowAnySupplier'], 'Boolean'); + } + if (data.hasOwnProperty('AllowSeller')) { + obj['AllowSeller'] = Sdk.convertToType(data['AllowSeller'], 'Boolean'); + } + if (data.hasOwnProperty('IsAnonBuyer')) { + obj['IsAnonBuyer'] = Sdk.convertToType(data['IsAnonBuyer'], 'Boolean'); + } + if (data.hasOwnProperty('AssignedBuyerCount')) { + obj['AssignedBuyerCount'] = Sdk.convertToType(data['AssignedBuyerCount'], 'Number'); + } + if (data.hasOwnProperty('AssignedSupplierCount')) { + obj['AssignedSupplierCount'] = Sdk.convertToType(data['AssignedSupplierCount'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ClientSecret + */ + exports.prototype['ClientSecret'] = undefined; + /** + * @member {Number} AccessTokenDuration + */ + exports.prototype['AccessTokenDuration'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {String} AppName + */ + exports.prototype['AppName'] = undefined; + /** + * @member {Number} RefreshTokenDuration + */ + exports.prototype['RefreshTokenDuration'] = undefined; + /** + * @member {String} DefaultContextUserName + */ + exports.prototype['DefaultContextUserName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Boolean} AllowAnyBuyer + */ + exports.prototype['AllowAnyBuyer'] = undefined; + /** + * @member {Boolean} AllowAnySupplier + */ + exports.prototype['AllowAnySupplier'] = undefined; + /** + * @member {Boolean} AllowSeller + */ + exports.prototype['AllowSeller'] = undefined; + /** + * @member {Boolean} IsAnonBuyer + */ + exports.prototype['IsAnonBuyer'] = undefined; + /** + * @member {Number} AssignedBuyerCount + */ + exports.prototype['AssignedBuyerCount'] = undefined; + /** + * @member {Number} AssignedSupplierCount + */ + exports.prototype['AssignedSupplierCount'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],55:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ApiClientAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ApiClientAssignment model module. + * @module model/ApiClientAssignment + */ + + /** + * Constructs a new ApiClientAssignment. + * @alias module:model/ApiClientAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a ApiClientAssignment 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/ApiClientAssignment} obj Optional instance to populate. + * @return {module:model/ApiClientAssignment} The populated ApiClientAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ApiClientID')) { + obj['ApiClientID'] = Sdk.convertToType(data['ApiClientID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ApiClientID + */ + exports.prototype['ApiClientID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],56:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ApprovalRule = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ApprovalRule model module. + * @module model/ApprovalRule + */ + + /** + * Constructs a new ApprovalRule. + * @alias module:model/ApprovalRule + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a ApprovalRule 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/ApprovalRule} obj Optional instance to populate. + * @return {module:model/ApprovalRule} The populated ApprovalRule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ApprovingGroupID')) { + obj['ApprovingGroupID'] = Sdk.convertToType(data['ApprovingGroupID'], 'String'); + } + if (data.hasOwnProperty('RuleExpression')) { + obj['RuleExpression'] = Sdk.convertToType(data['RuleExpression'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} ApprovingGroupID + */ + exports.prototype['ApprovingGroupID'] = undefined; + /** + * @member {String} RuleExpression + */ + exports.prototype['RuleExpression'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],57:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Buyer = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Buyer model module. + * @module model/Buyer + */ + + /** + * Constructs a new Buyer. + * @alias module:model/Buyer + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a Buyer 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/Buyer} obj Optional instance to populate. + * @return {module:model/Buyer} The populated Buyer instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('DefaultCatalogID')) { + obj['DefaultCatalogID'] = Sdk.convertToType(data['DefaultCatalogID'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} DefaultCatalogID + */ + exports.prototype['DefaultCatalogID'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],58:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.BuyerAddress = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The BuyerAddress model module. + * @module model/BuyerAddress + */ + + /** + * Constructs a new BuyerAddress. + * @alias module:model/BuyerAddress + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a BuyerAddress 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/BuyerAddress} obj Optional instance to populate. + * @return {module:model/BuyerAddress} The populated BuyerAddress instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Shipping')) { + obj['Shipping'] = Sdk.convertToType(data['Shipping'], 'Boolean'); + } + if (data.hasOwnProperty('Billing')) { + obj['Billing'] = Sdk.convertToType(data['Billing'], 'Boolean'); + } + if (data.hasOwnProperty('Editable')) { + obj['Editable'] = Sdk.convertToType(data['Editable'], 'Boolean'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CompanyName')) { + obj['CompanyName'] = Sdk.convertToType(data['CompanyName'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Street1')) { + obj['Street1'] = Sdk.convertToType(data['Street1'], 'String'); + } + if (data.hasOwnProperty('Street2')) { + obj['Street2'] = Sdk.convertToType(data['Street2'], 'String'); + } + if (data.hasOwnProperty('City')) { + obj['City'] = Sdk.convertToType(data['City'], 'String'); + } + if (data.hasOwnProperty('State')) { + obj['State'] = Sdk.convertToType(data['State'], 'String'); + } + if (data.hasOwnProperty('Zip')) { + obj['Zip'] = Sdk.convertToType(data['Zip'], 'String'); + } + if (data.hasOwnProperty('Country')) { + obj['Country'] = Sdk.convertToType(data['Country'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('AddressName')) { + obj['AddressName'] = Sdk.convertToType(data['AddressName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Boolean} Shipping + */ + exports.prototype['Shipping'] = undefined; + /** + * @member {Boolean} Billing + */ + exports.prototype['Billing'] = undefined; + /** + * @member {Boolean} Editable + */ + exports.prototype['Editable'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CompanyName + */ + exports.prototype['CompanyName'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Street1 + */ + exports.prototype['Street1'] = undefined; + /** + * @member {String} Street2 + */ + exports.prototype['Street2'] = undefined; + /** + * @member {String} City + */ + exports.prototype['City'] = undefined; + /** + * @member {String} State + */ + exports.prototype['State'] = undefined; + /** + * @member {String} Zip + */ + exports.prototype['Zip'] = undefined; + /** + * @member {String} Country + */ + exports.prototype['Country'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} AddressName + */ + exports.prototype['AddressName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],59:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.BuyerCreditCard = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The BuyerCreditCard model module. + * @module model/BuyerCreditCard + */ + + /** + * Constructs a new BuyerCreditCard. + * @alias module:model/BuyerCreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a BuyerCreditCard 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/BuyerCreditCard} obj Optional instance to populate. + * @return {module:model/BuyerCreditCard} The populated BuyerCreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Editable')) { + obj['Editable'] = Sdk.convertToType(data['Editable'], 'Boolean'); + } + if (data.hasOwnProperty('Token')) { + obj['Token'] = Sdk.convertToType(data['Token'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CardType')) { + obj['CardType'] = Sdk.convertToType(data['CardType'], 'String'); + } + if (data.hasOwnProperty('PartialAccountNumber')) { + obj['PartialAccountNumber'] = Sdk.convertToType(data['PartialAccountNumber'], 'String'); + } + if (data.hasOwnProperty('CardholderName')) { + obj['CardholderName'] = Sdk.convertToType(data['CardholderName'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Boolean} Editable + */ + exports.prototype['Editable'] = undefined; + /** + * @member {String} Token + */ + exports.prototype['Token'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CardType + */ + exports.prototype['CardType'] = undefined; + /** + * @member {String} PartialAccountNumber + */ + exports.prototype['PartialAccountNumber'] = undefined; + /** + * @member {String} CardholderName + */ + exports.prototype['CardholderName'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],60:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Inventory', 'model/PriceSchedule'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Inventory'), require('./PriceSchedule')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.BuyerProduct = factory(root.OrderCloud.Sdk, root.OrderCloud.Inventory, root.OrderCloud.PriceSchedule); + } +}(this, function(Sdk, Inventory, PriceSchedule) { + 'use strict'; + + + + + /** + * The BuyerProduct model module. + * @module model/BuyerProduct + */ + + /** + * Constructs a new BuyerProduct. + * @alias module:model/BuyerProduct + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a BuyerProduct 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/BuyerProduct} obj Optional instance to populate. + * @return {module:model/BuyerProduct} The populated BuyerProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('PriceSchedule')) { + obj['PriceSchedule'] = PriceSchedule.constructFromObject(data['PriceSchedule']); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('QuantityMultiplier')) { + obj['QuantityMultiplier'] = Sdk.convertToType(data['QuantityMultiplier'], 'Number'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('SpecCount')) { + obj['SpecCount'] = Sdk.convertToType(data['SpecCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('VariantCount')) { + obj['VariantCount'] = Sdk.convertToType(data['VariantCount'], 'Number'); + } + if (data.hasOwnProperty('ShipFromAddressID')) { + obj['ShipFromAddressID'] = Sdk.convertToType(data['ShipFromAddressID'], 'String'); + } + if (data.hasOwnProperty('Inventory')) { + obj['Inventory'] = Inventory.constructFromObject(data['Inventory']); + } + if (data.hasOwnProperty('DefaultSupplierID')) { + obj['DefaultSupplierID'] = Sdk.convertToType(data['DefaultSupplierID'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/PriceSchedule} PriceSchedule + */ + exports.prototype['PriceSchedule'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} QuantityMultiplier + */ + exports.prototype['QuantityMultiplier'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} SpecCount + */ + exports.prototype['SpecCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Number} VariantCount + */ + exports.prototype['VariantCount'] = undefined; + /** + * @member {String} ShipFromAddressID + */ + exports.prototype['ShipFromAddressID'] = undefined; + /** + * @member {module:model/Inventory} Inventory + */ + exports.prototype['Inventory'] = undefined; + /** + * @member {String} DefaultSupplierID + */ + exports.prototype['DefaultSupplierID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Inventory":74,"./PriceSchedule":193}],61:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/SpecOption'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./SpecOption')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.BuyerSpec = factory(root.OrderCloud.Sdk, root.OrderCloud.SpecOption); + } +}(this, function(Sdk, SpecOption) { + 'use strict'; + + + + + /** + * The BuyerSpec model module. + * @module model/BuyerSpec + */ + + /** + * Constructs a new BuyerSpec. + * @alias module:model/BuyerSpec + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a BuyerSpec 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/BuyerSpec} obj Optional instance to populate. + * @return {module:model/BuyerSpec} The populated BuyerSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Options')) { + obj['Options'] = Sdk.convertToType(data['Options'], [SpecOption]); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('DefaultValue')) { + obj['DefaultValue'] = Sdk.convertToType(data['DefaultValue'], 'String'); + } + if (data.hasOwnProperty('Required')) { + obj['Required'] = Sdk.convertToType(data['Required'], 'Boolean'); + } + if (data.hasOwnProperty('AllowOpenText')) { + obj['AllowOpenText'] = Sdk.convertToType(data['AllowOpenText'], 'Boolean'); + } + if (data.hasOwnProperty('DefaultOptionID')) { + obj['DefaultOptionID'] = Sdk.convertToType(data['DefaultOptionID'], 'String'); + } + if (data.hasOwnProperty('DefinesVariant')) { + obj['DefinesVariant'] = Sdk.convertToType(data['DefinesVariant'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {Array.} Options + */ + exports.prototype['Options'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} DefaultValue + */ + exports.prototype['DefaultValue'] = undefined; + /** + * @member {Boolean} Required + */ + exports.prototype['Required'] = undefined; + /** + * @member {Boolean} AllowOpenText + */ + exports.prototype['AllowOpenText'] = undefined; + /** + * @member {String} DefaultOptionID + */ + exports.prototype['DefaultOptionID'] = undefined; + /** + * @member {Boolean} DefinesVariant + */ + exports.prototype['DefinesVariant'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./SpecOption":205}],62:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Catalog = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Catalog model module. + * @module model/Catalog + */ + + /** + * Constructs a new Catalog. + * @alias module:model/Catalog + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a Catalog 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/Catalog} obj Optional instance to populate. + * @return {module:model/Catalog} The populated Catalog instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('CategoryCount')) { + obj['CategoryCount'] = Sdk.convertToType(data['CategoryCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} CategoryCount + */ + exports.prototype['CategoryCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],63:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CatalogAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CatalogAssignment model module. + * @module model/CatalogAssignment + */ + + /** + * Constructs a new CatalogAssignment. + * @alias module:model/CatalogAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a CatalogAssignment 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/CatalogAssignment} obj Optional instance to populate. + * @return {module:model/CatalogAssignment} The populated CatalogAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CatalogID')) { + obj['CatalogID'] = Sdk.convertToType(data['CatalogID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('ViewAllCategories')) { + obj['ViewAllCategories'] = Sdk.convertToType(data['ViewAllCategories'], 'Boolean'); + } + if (data.hasOwnProperty('ViewAllProducts')) { + obj['ViewAllProducts'] = Sdk.convertToType(data['ViewAllProducts'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {String} CatalogID + */ + exports.prototype['CatalogID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {Boolean} ViewAllCategories + */ + exports.prototype['ViewAllCategories'] = undefined; + /** + * @member {Boolean} ViewAllProducts + */ + exports.prototype['ViewAllProducts'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],64:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Category = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Category model module. + * @module model/Category + */ + + /** + * Constructs a new Category. + * @alias module:model/Category + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a Category 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/Category} obj Optional instance to populate. + * @return {module:model/Category} The populated Category instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('ParentID')) { + obj['ParentID'] = Sdk.convertToType(data['ParentID'], 'String'); + } + if (data.hasOwnProperty('ChildCount')) { + obj['ChildCount'] = Sdk.convertToType(data['ChildCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {String} ParentID + */ + exports.prototype['ParentID'] = undefined; + /** + * @member {Number} ChildCount + */ + exports.prototype['ChildCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],65:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CategoryAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CategoryAssignment model module. + * @module model/CategoryAssignment + */ + + /** + * Constructs a new CategoryAssignment. + * @alias module:model/CategoryAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a CategoryAssignment 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/CategoryAssignment} obj Optional instance to populate. + * @return {module:model/CategoryAssignment} The populated CategoryAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CategoryID')) { + obj['CategoryID'] = Sdk.convertToType(data['CategoryID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('Visible')) { + obj['Visible'] = Sdk.convertToType(data['Visible'], 'Boolean'); + } + if (data.hasOwnProperty('ViewAllProducts')) { + obj['ViewAllProducts'] = Sdk.convertToType(data['ViewAllProducts'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {String} CategoryID + */ + exports.prototype['CategoryID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {Boolean} Visible + */ + exports.prototype['Visible'] = undefined; + /** + * @member {Boolean} ViewAllProducts + */ + exports.prototype['ViewAllProducts'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],66:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CategoryProductAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CategoryProductAssignment model module. + * @module model/CategoryProductAssignment + */ + + /** + * Constructs a new CategoryProductAssignment. + * @alias module:model/CategoryProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a CategoryProductAssignment 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/CategoryProductAssignment} obj Optional instance to populate. + * @return {module:model/CategoryProductAssignment} The populated CategoryProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CategoryID')) { + obj['CategoryID'] = Sdk.convertToType(data['CategoryID'], 'String'); + } + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} CategoryID + */ + exports.prototype['CategoryID'] = undefined; + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],67:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CostCenter = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CostCenter model module. + * @module model/CostCenter + */ + + /** + * Constructs a new CostCenter. + * @alias module:model/CostCenter + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a CostCenter 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/CostCenter} obj Optional instance to populate. + * @return {module:model/CostCenter} The populated CostCenter instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],68:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CostCenterAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CostCenterAssignment model module. + * @module model/CostCenterAssignment + */ + + /** + * Constructs a new CostCenterAssignment. + * @alias module:model/CostCenterAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a CostCenterAssignment 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/CostCenterAssignment} obj Optional instance to populate. + * @return {module:model/CostCenterAssignment} The populated CostCenterAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CostCenterID')) { + obj['CostCenterID'] = Sdk.convertToType(data['CostCenterID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} CostCenterID + */ + exports.prototype['CostCenterID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],69:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CreditCard = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CreditCard model module. + * @module model/CreditCard + */ + + /** + * Constructs a new CreditCard. + * @alias module:model/CreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a CreditCard 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/CreditCard} obj Optional instance to populate. + * @return {module:model/CreditCard} The populated CreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Token')) { + obj['Token'] = Sdk.convertToType(data['Token'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CardType')) { + obj['CardType'] = Sdk.convertToType(data['CardType'], 'String'); + } + if (data.hasOwnProperty('PartialAccountNumber')) { + obj['PartialAccountNumber'] = Sdk.convertToType(data['PartialAccountNumber'], 'String'); + } + if (data.hasOwnProperty('CardholderName')) { + obj['CardholderName'] = Sdk.convertToType(data['CardholderName'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Token + */ + exports.prototype['Token'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CardType + */ + exports.prototype['CardType'] = undefined; + /** + * @member {String} PartialAccountNumber + */ + exports.prototype['PartialAccountNumber'] = undefined; + /** + * @member {String} CardholderName + */ + exports.prototype['CardholderName'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],70:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.CreditCardAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The CreditCardAssignment model module. + * @module model/CreditCardAssignment + */ + + /** + * Constructs a new CreditCardAssignment. + * @alias module:model/CreditCardAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a CreditCardAssignment 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/CreditCardAssignment} obj Optional instance to populate. + * @return {module:model/CreditCardAssignment} The populated CreditCardAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CreditCardID')) { + obj['CreditCardID'] = Sdk.convertToType(data['CreditCardID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} CreditCardID + */ + exports.prototype['CreditCardID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],71:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ImpersonateTokenRequest = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ImpersonateTokenRequest model module. + * @module model/ImpersonateTokenRequest + */ + + /** + * Constructs a new ImpersonateTokenRequest. + * @alias module:model/ImpersonateTokenRequest + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ImpersonateTokenRequest 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/ImpersonateTokenRequest} obj Optional instance to populate. + * @return {module:model/ImpersonateTokenRequest} The populated ImpersonateTokenRequest instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ClientID')) { + obj['ClientID'] = Sdk.convertToType(data['ClientID'], 'String'); + } + if (data.hasOwnProperty('Roles')) { + obj['Roles'] = Sdk.convertToType(data['Roles'], ['String']); + } + } + return obj; + } + + /** + * @member {String} ClientID + */ + exports.prototype['ClientID'] = undefined; + /** + * @member {Array.} Roles + */ + exports.prototype['Roles'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],72:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ImpersonationConfig = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ImpersonationConfig model module. + * @module model/ImpersonationConfig + */ + + /** + * Constructs a new ImpersonationConfig. + * @alias module:model/ImpersonationConfig + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a ImpersonationConfig 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/ImpersonationConfig} obj Optional instance to populate. + * @return {module:model/ImpersonationConfig} The populated ImpersonationConfig instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationBuyerID')) { + obj['ImpersonationBuyerID'] = Sdk.convertToType(data['ImpersonationBuyerID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationGroupID')) { + obj['ImpersonationGroupID'] = Sdk.convertToType(data['ImpersonationGroupID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationUserID')) { + obj['ImpersonationUserID'] = Sdk.convertToType(data['ImpersonationUserID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('GroupID')) { + obj['GroupID'] = Sdk.convertToType(data['GroupID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('SecurityProfileID')) { + obj['SecurityProfileID'] = Sdk.convertToType(data['SecurityProfileID'], 'String'); + } + if (data.hasOwnProperty('ClientID')) { + obj['ClientID'] = Sdk.convertToType(data['ClientID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ImpersonationBuyerID + */ + exports.prototype['ImpersonationBuyerID'] = undefined; + /** + * @member {String} ImpersonationGroupID + */ + exports.prototype['ImpersonationGroupID'] = undefined; + /** + * @member {String} ImpersonationUserID + */ + exports.prototype['ImpersonationUserID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} GroupID + */ + exports.prototype['GroupID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} SecurityProfileID + */ + exports.prototype['SecurityProfileID'] = undefined; + /** + * @member {String} ClientID + */ + exports.prototype['ClientID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],73:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Incrementor = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Incrementor model module. + * @module model/Incrementor + */ + + /** + * Constructs a new Incrementor. + * @alias module:model/Incrementor + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a Incrementor 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/Incrementor} obj Optional instance to populate. + * @return {module:model/Incrementor} The populated Incrementor instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('LastNumber')) { + obj['LastNumber'] = Sdk.convertToType(data['LastNumber'], 'Number'); + } + if (data.hasOwnProperty('LeftPaddingCount')) { + obj['LeftPaddingCount'] = Sdk.convertToType(data['LeftPaddingCount'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} LastNumber + */ + exports.prototype['LastNumber'] = undefined; + /** + * @member {Number} LeftPaddingCount + */ + exports.prototype['LeftPaddingCount'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],74:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Inventory = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Inventory model module. + * @module model/Inventory + */ + + /** + * Constructs a new Inventory. + * @alias module:model/Inventory + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a Inventory 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/Inventory} obj Optional instance to populate. + * @return {module:model/Inventory} The populated Inventory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Enabled')) { + obj['Enabled'] = Sdk.convertToType(data['Enabled'], 'Boolean'); + } + if (data.hasOwnProperty('NotificationPoint')) { + obj['NotificationPoint'] = Sdk.convertToType(data['NotificationPoint'], 'Number'); + } + if (data.hasOwnProperty('VariantLevelTracking')) { + obj['VariantLevelTracking'] = Sdk.convertToType(data['VariantLevelTracking'], 'Boolean'); + } + if (data.hasOwnProperty('OrderCanExceed')) { + obj['OrderCanExceed'] = Sdk.convertToType(data['OrderCanExceed'], 'Boolean'); + } + if (data.hasOwnProperty('QuantityAvailable')) { + obj['QuantityAvailable'] = Sdk.convertToType(data['QuantityAvailable'], 'Number'); + } + if (data.hasOwnProperty('LastUpdated')) { + obj['LastUpdated'] = Sdk.convertToType(data['LastUpdated'], 'String'); + } + } + return obj; + } + + /** + * @member {Boolean} Enabled + */ + exports.prototype['Enabled'] = undefined; + /** + * @member {Number} NotificationPoint + */ + exports.prototype['NotificationPoint'] = undefined; + /** + * @member {Boolean} VariantLevelTracking + */ + exports.prototype['VariantLevelTracking'] = undefined; + /** + * @member {Boolean} OrderCanExceed + */ + exports.prototype['OrderCanExceed'] = undefined; + /** + * @member {Number} QuantityAvailable + */ + exports.prototype['QuantityAvailable'] = undefined; + /** + * @member {String} LastUpdated + */ + exports.prototype['LastUpdated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],75:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/LineItemProduct', 'model/LineItemSpec', 'model/LineItemVariant'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address'), require('./LineItemProduct'), require('./LineItemSpec'), require('./LineItemVariant')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.LineItem = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.LineItemProduct, root.OrderCloud.LineItemSpec, root.OrderCloud.LineItemVariant); + } +}(this, function(Sdk, Address, LineItemProduct, LineItemSpec, LineItemVariant) { + 'use strict'; + + + + + /** + * The LineItem model module. + * @module model/LineItem + */ + + /** + * Constructs a new LineItem. + * @alias module:model/LineItem + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a LineItem 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/LineItem} obj Optional instance to populate. + * @return {module:model/LineItem} The populated LineItem instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + if (data.hasOwnProperty('Quantity')) { + obj['Quantity'] = Sdk.convertToType(data['Quantity'], 'Number'); + } + if (data.hasOwnProperty('DateAdded')) { + obj['DateAdded'] = Sdk.convertToType(data['DateAdded'], 'String'); + } + if (data.hasOwnProperty('QuantityShipped')) { + obj['QuantityShipped'] = Sdk.convertToType(data['QuantityShipped'], 'Number'); + } + if (data.hasOwnProperty('UnitPrice')) { + obj['UnitPrice'] = Sdk.convertToType(data['UnitPrice'], 'Number'); + } + if (data.hasOwnProperty('LineTotal')) { + obj['LineTotal'] = Sdk.convertToType(data['LineTotal'], 'Number'); + } + if (data.hasOwnProperty('CostCenter')) { + obj['CostCenter'] = Sdk.convertToType(data['CostCenter'], 'String'); + } + if (data.hasOwnProperty('DateNeeded')) { + obj['DateNeeded'] = Sdk.convertToType(data['DateNeeded'], 'String'); + } + if (data.hasOwnProperty('ShippingAccount')) { + obj['ShippingAccount'] = Sdk.convertToType(data['ShippingAccount'], 'String'); + } + if (data.hasOwnProperty('ShippingAddressID')) { + obj['ShippingAddressID'] = Sdk.convertToType(data['ShippingAddressID'], 'String'); + } + if (data.hasOwnProperty('ShipFromAddressID')) { + obj['ShipFromAddressID'] = Sdk.convertToType(data['ShipFromAddressID'], 'String'); + } + if (data.hasOwnProperty('Product')) { + obj['Product'] = LineItemProduct.constructFromObject(data['Product']); + } + if (data.hasOwnProperty('Variant')) { + obj['Variant'] = LineItemVariant.constructFromObject(data['Variant']); + } + if (data.hasOwnProperty('ShippingAddress')) { + obj['ShippingAddress'] = Address.constructFromObject(data['ShippingAddress']); + } + if (data.hasOwnProperty('ShipFromAddress')) { + obj['ShipFromAddress'] = Address.constructFromObject(data['ShipFromAddress']); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + if (data.hasOwnProperty('Specs')) { + obj['Specs'] = Sdk.convertToType(data['Specs'], [LineItemSpec]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + /** + * @member {Number} Quantity + */ + exports.prototype['Quantity'] = undefined; + /** + * @member {String} DateAdded + */ + exports.prototype['DateAdded'] = undefined; + /** + * @member {Number} QuantityShipped + */ + exports.prototype['QuantityShipped'] = undefined; + /** + * @member {Number} UnitPrice + */ + exports.prototype['UnitPrice'] = undefined; + /** + * @member {Number} LineTotal + */ + exports.prototype['LineTotal'] = undefined; + /** + * @member {String} CostCenter + */ + exports.prototype['CostCenter'] = undefined; + /** + * @member {String} DateNeeded + */ + exports.prototype['DateNeeded'] = undefined; + /** + * @member {String} ShippingAccount + */ + exports.prototype['ShippingAccount'] = undefined; + /** + * @member {String} ShippingAddressID + */ + exports.prototype['ShippingAddressID'] = undefined; + /** + * @member {String} ShipFromAddressID + */ + exports.prototype['ShipFromAddressID'] = undefined; + /** + * @member {module:model/LineItemProduct} Product + */ + exports.prototype['Product'] = undefined; + /** + * @member {module:model/LineItemVariant} Variant + */ + exports.prototype['Variant'] = undefined; + /** + * @member {module:model/Address} ShippingAddress + */ + exports.prototype['ShippingAddress'] = undefined; + /** + * @member {module:model/Address} ShipFromAddress + */ + exports.prototype['ShipFromAddress'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + /** + * @member {Array.} Specs + */ + exports.prototype['Specs'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52,"./LineItemProduct":76,"./LineItemSpec":77,"./LineItemVariant":78}],76:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.LineItemProduct = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The LineItemProduct model module. + * @module model/LineItemProduct + */ + + /** + * Constructs a new LineItemProduct. + * @alias module:model/LineItemProduct + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a LineItemProduct 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/LineItemProduct} obj Optional instance to populate. + * @return {module:model/LineItemProduct} The populated LineItemProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('QuantityMultiplier')) { + obj['QuantityMultiplier'] = Sdk.convertToType(data['QuantityMultiplier'], 'Number'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} QuantityMultiplier + */ + exports.prototype['QuantityMultiplier'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],77:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.LineItemSpec = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The LineItemSpec model module. + * @module model/LineItemSpec + */ + + /** + * Constructs a new LineItemSpec. + * @alias module:model/LineItemSpec + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a LineItemSpec 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/LineItemSpec} obj Optional instance to populate. + * @return {module:model/LineItemSpec} The populated LineItemSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('SpecID')) { + obj['SpecID'] = Sdk.convertToType(data['SpecID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('OptionID')) { + obj['OptionID'] = Sdk.convertToType(data['OptionID'], 'String'); + } + if (data.hasOwnProperty('Value')) { + obj['Value'] = Sdk.convertToType(data['Value'], 'String'); + } + } + return obj; + } + + /** + * @member {String} SpecID + */ + exports.prototype['SpecID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} OptionID + */ + exports.prototype['OptionID'] = undefined; + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],78:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.LineItemVariant = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The LineItemVariant model module. + * @module model/LineItemVariant + */ + + /** + * Constructs a new LineItemVariant. + * @alias module:model/LineItemVariant + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a LineItemVariant 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/LineItemVariant} obj Optional instance to populate. + * @return {module:model/LineItemVariant} The populated LineItemVariant instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],79:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListAddress = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.Meta); + } +}(this, function(Sdk, Address, Meta) { + 'use strict'; + + + + + /** + * The ListAddress model module. + * @module model/ListAddress + */ + + /** + * Constructs a new ListAddress. + * @alias module:model/ListAddress + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListAddress 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/ListAddress} obj Optional instance to populate. + * @return {module:model/ListAddress} The populated ListAddress instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Address]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52,"./Meta":140}],80:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/AddressAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./AddressAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListAddressAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.AddressAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, AddressAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListAddressAssignment model module. + * @module model/ListAddressAssignment + */ + + /** + * Constructs a new ListAddressAssignment. + * @alias module:model/ListAddressAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListAddressAssignment 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/ListAddressAssignment} obj Optional instance to populate. + * @return {module:model/ListAddressAssignment} The populated ListAddressAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [AddressAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./AddressAssignment":53,"./Meta":140}],81:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ApiClient', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ApiClient'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListApiClient = factory(root.OrderCloud.Sdk, root.OrderCloud.ApiClient, root.OrderCloud.Meta); + } +}(this, function(Sdk, ApiClient, Meta) { + 'use strict'; + + + + + /** + * The ListApiClient model module. + * @module model/ListApiClient + */ + + /** + * Constructs a new ListApiClient. + * @alias module:model/ListApiClient + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListApiClient 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/ListApiClient} obj Optional instance to populate. + * @return {module:model/ListApiClient} The populated ListApiClient instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ApiClient]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ApiClient":54,"./Meta":140}],82:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ApiClientAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ApiClientAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListApiClientAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.ApiClientAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, ApiClientAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListApiClientAssignment model module. + * @module model/ListApiClientAssignment + */ + + /** + * Constructs a new ListApiClientAssignment. + * @alias module:model/ListApiClientAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListApiClientAssignment 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/ListApiClientAssignment} obj Optional instance to populate. + * @return {module:model/ListApiClientAssignment} The populated ListApiClientAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ApiClientAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ApiClientAssignment":55,"./Meta":140}],83:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ApprovalRule', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ApprovalRule'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListApprovalRule = factory(root.OrderCloud.Sdk, root.OrderCloud.ApprovalRule, root.OrderCloud.Meta); + } +}(this, function(Sdk, ApprovalRule, Meta) { + 'use strict'; + + + + + /** + * The ListApprovalRule model module. + * @module model/ListApprovalRule + */ + + /** + * Constructs a new ListApprovalRule. + * @alias module:model/ListApprovalRule + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListApprovalRule 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/ListApprovalRule} obj Optional instance to populate. + * @return {module:model/ListApprovalRule} The populated ListApprovalRule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ApprovalRule]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ApprovalRule":56,"./Meta":140}],84:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Buyer', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Buyer'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListBuyer = factory(root.OrderCloud.Sdk, root.OrderCloud.Buyer, root.OrderCloud.Meta); + } +}(this, function(Sdk, Buyer, Meta) { + 'use strict'; + + + + + /** + * The ListBuyer model module. + * @module model/ListBuyer + */ + + /** + * Constructs a new ListBuyer. + * @alias module:model/ListBuyer + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListBuyer 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/ListBuyer} obj Optional instance to populate. + * @return {module:model/ListBuyer} The populated ListBuyer instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Buyer]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Buyer":57,"./Meta":140}],85:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/BuyerAddress', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./BuyerAddress'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListBuyerAddress = factory(root.OrderCloud.Sdk, root.OrderCloud.BuyerAddress, root.OrderCloud.Meta); + } +}(this, function(Sdk, BuyerAddress, Meta) { + 'use strict'; + + + + + /** + * The ListBuyerAddress model module. + * @module model/ListBuyerAddress + */ + + /** + * Constructs a new ListBuyerAddress. + * @alias module:model/ListBuyerAddress + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListBuyerAddress 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/ListBuyerAddress} obj Optional instance to populate. + * @return {module:model/ListBuyerAddress} The populated ListBuyerAddress instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [BuyerAddress]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./BuyerAddress":58,"./Meta":140}],86:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/BuyerCreditCard', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./BuyerCreditCard'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListBuyerCreditCard = factory(root.OrderCloud.Sdk, root.OrderCloud.BuyerCreditCard, root.OrderCloud.Meta); + } +}(this, function(Sdk, BuyerCreditCard, Meta) { + 'use strict'; + + + + + /** + * The ListBuyerCreditCard model module. + * @module model/ListBuyerCreditCard + */ + + /** + * Constructs a new ListBuyerCreditCard. + * @alias module:model/ListBuyerCreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListBuyerCreditCard 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/ListBuyerCreditCard} obj Optional instance to populate. + * @return {module:model/ListBuyerCreditCard} The populated ListBuyerCreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [BuyerCreditCard]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./BuyerCreditCard":59,"./Meta":140}],87:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/BuyerProduct', 'model/MetaWithFacets'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./BuyerProduct'), require('./MetaWithFacets')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListBuyerProduct = factory(root.OrderCloud.Sdk, root.OrderCloud.BuyerProduct, root.OrderCloud.MetaWithFacets); + } +}(this, function(Sdk, BuyerProduct, MetaWithFacets) { + 'use strict'; + + + + + /** + * The ListBuyerProduct model module. + * @module model/ListBuyerProduct + */ + + /** + * Constructs a new ListBuyerProduct. + * @alias module:model/ListBuyerProduct + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListBuyerProduct 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/ListBuyerProduct} obj Optional instance to populate. + * @return {module:model/ListBuyerProduct} The populated ListBuyerProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [BuyerProduct]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = MetaWithFacets.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/MetaWithFacets} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./BuyerProduct":60,"./MetaWithFacets":141}],88:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/BuyerSpec', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./BuyerSpec'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListBuyerSpec = factory(root.OrderCloud.Sdk, root.OrderCloud.BuyerSpec, root.OrderCloud.Meta); + } +}(this, function(Sdk, BuyerSpec, Meta) { + 'use strict'; + + + + + /** + * The ListBuyerSpec model module. + * @module model/ListBuyerSpec + */ + + /** + * Constructs a new ListBuyerSpec. + * @alias module:model/ListBuyerSpec + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListBuyerSpec 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/ListBuyerSpec} obj Optional instance to populate. + * @return {module:model/ListBuyerSpec} The populated ListBuyerSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [BuyerSpec]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./BuyerSpec":61,"./Meta":140}],89:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Catalog', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Catalog'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCatalog = factory(root.OrderCloud.Sdk, root.OrderCloud.Catalog, root.OrderCloud.Meta); + } +}(this, function(Sdk, Catalog, Meta) { + 'use strict'; + + + + + /** + * The ListCatalog model module. + * @module model/ListCatalog + */ + + /** + * Constructs a new ListCatalog. + * @alias module:model/ListCatalog + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCatalog 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/ListCatalog} obj Optional instance to populate. + * @return {module:model/ListCatalog} The populated ListCatalog instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Catalog]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Catalog":62,"./Meta":140}],90:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CatalogAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CatalogAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCatalogAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.CatalogAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, CatalogAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListCatalogAssignment model module. + * @module model/ListCatalogAssignment + */ + + /** + * Constructs a new ListCatalogAssignment. + * @alias module:model/ListCatalogAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCatalogAssignment 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/ListCatalogAssignment} obj Optional instance to populate. + * @return {module:model/ListCatalogAssignment} The populated ListCatalogAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CatalogAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CatalogAssignment":63,"./Meta":140}],91:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Category', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Category'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCategory = factory(root.OrderCloud.Sdk, root.OrderCloud.Category, root.OrderCloud.Meta); + } +}(this, function(Sdk, Category, Meta) { + 'use strict'; + + + + + /** + * The ListCategory model module. + * @module model/ListCategory + */ + + /** + * Constructs a new ListCategory. + * @alias module:model/ListCategory + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCategory 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/ListCategory} obj Optional instance to populate. + * @return {module:model/ListCategory} The populated ListCategory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Category]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Category":64,"./Meta":140}],92:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CategoryAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CategoryAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCategoryAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.CategoryAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, CategoryAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListCategoryAssignment model module. + * @module model/ListCategoryAssignment + */ + + /** + * Constructs a new ListCategoryAssignment. + * @alias module:model/ListCategoryAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCategoryAssignment 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/ListCategoryAssignment} obj Optional instance to populate. + * @return {module:model/ListCategoryAssignment} The populated ListCategoryAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CategoryAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CategoryAssignment":65,"./Meta":140}],93:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CategoryProductAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CategoryProductAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCategoryProductAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.CategoryProductAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, CategoryProductAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListCategoryProductAssignment model module. + * @module model/ListCategoryProductAssignment + */ + + /** + * Constructs a new ListCategoryProductAssignment. + * @alias module:model/ListCategoryProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCategoryProductAssignment 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/ListCategoryProductAssignment} obj Optional instance to populate. + * @return {module:model/ListCategoryProductAssignment} The populated ListCategoryProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CategoryProductAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CategoryProductAssignment":66,"./Meta":140}],94:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CostCenter', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CostCenter'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCostCenter = factory(root.OrderCloud.Sdk, root.OrderCloud.CostCenter, root.OrderCloud.Meta); + } +}(this, function(Sdk, CostCenter, Meta) { + 'use strict'; + + + + + /** + * The ListCostCenter model module. + * @module model/ListCostCenter + */ + + /** + * Constructs a new ListCostCenter. + * @alias module:model/ListCostCenter + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCostCenter 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/ListCostCenter} obj Optional instance to populate. + * @return {module:model/ListCostCenter} The populated ListCostCenter instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CostCenter]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CostCenter":67,"./Meta":140}],95:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CostCenterAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CostCenterAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCostCenterAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.CostCenterAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, CostCenterAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListCostCenterAssignment model module. + * @module model/ListCostCenterAssignment + */ + + /** + * Constructs a new ListCostCenterAssignment. + * @alias module:model/ListCostCenterAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCostCenterAssignment 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/ListCostCenterAssignment} obj Optional instance to populate. + * @return {module:model/ListCostCenterAssignment} The populated ListCostCenterAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CostCenterAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CostCenterAssignment":68,"./Meta":140}],96:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CreditCard', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CreditCard'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCreditCard = factory(root.OrderCloud.Sdk, root.OrderCloud.CreditCard, root.OrderCloud.Meta); + } +}(this, function(Sdk, CreditCard, Meta) { + 'use strict'; + + + + + /** + * The ListCreditCard model module. + * @module model/ListCreditCard + */ + + /** + * Constructs a new ListCreditCard. + * @alias module:model/ListCreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCreditCard 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/ListCreditCard} obj Optional instance to populate. + * @return {module:model/ListCreditCard} The populated ListCreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CreditCard]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CreditCard":69,"./Meta":140}],97:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/CreditCardAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./CreditCardAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListCreditCardAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.CreditCardAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, CreditCardAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListCreditCardAssignment model module. + * @module model/ListCreditCardAssignment + */ + + /** + * Constructs a new ListCreditCardAssignment. + * @alias module:model/ListCreditCardAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListCreditCardAssignment 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/ListCreditCardAssignment} obj Optional instance to populate. + * @return {module:model/ListCreditCardAssignment} The populated ListCreditCardAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [CreditCardAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./CreditCardAssignment":70,"./Meta":140}],98:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListFacetValue'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ListFacetValue')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListFacet = factory(root.OrderCloud.Sdk, root.OrderCloud.ListFacetValue); + } +}(this, function(Sdk, ListFacetValue) { + 'use strict'; + + + + + /** + * The ListFacet model module. + * @module model/ListFacet + */ + + /** + * Constructs a new ListFacet. + * @alias module:model/ListFacet + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a ListFacet 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/ListFacet} obj Optional instance to populate. + * @return {module:model/ListFacet} The populated ListFacet instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('XpPath')) { + obj['XpPath'] = Sdk.convertToType(data['XpPath'], 'String'); + } + if (data.hasOwnProperty('Values')) { + obj['Values'] = Sdk.convertToType(data['Values'], [ListFacetValue]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} XpPath + */ + exports.prototype['XpPath'] = undefined; + /** + * @member {Array.} Values + */ + exports.prototype['Values'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ListFacetValue":99}],99:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListFacetValue = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ListFacetValue model module. + * @module model/ListFacetValue + */ + + /** + * Constructs a new ListFacetValue. + * @alias module:model/ListFacetValue + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListFacetValue 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/ListFacetValue} obj Optional instance to populate. + * @return {module:model/ListFacetValue} The populated ListFacetValue instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Value')) { + obj['Value'] = Sdk.convertToType(data['Value'], 'String'); + } + if (data.hasOwnProperty('Count')) { + obj['Count'] = Sdk.convertToType(data['Count'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + /** + * @member {Number} Count + */ + exports.prototype['Count'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],100:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ImpersonationConfig', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ImpersonationConfig'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListImpersonationConfig = factory(root.OrderCloud.Sdk, root.OrderCloud.ImpersonationConfig, root.OrderCloud.Meta); + } +}(this, function(Sdk, ImpersonationConfig, Meta) { + 'use strict'; + + + + + /** + * The ListImpersonationConfig model module. + * @module model/ListImpersonationConfig + */ + + /** + * Constructs a new ListImpersonationConfig. + * @alias module:model/ListImpersonationConfig + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListImpersonationConfig 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/ListImpersonationConfig} obj Optional instance to populate. + * @return {module:model/ListImpersonationConfig} The populated ListImpersonationConfig instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ImpersonationConfig]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ImpersonationConfig":72,"./Meta":140}],101:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Incrementor', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Incrementor'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListIncrementor = factory(root.OrderCloud.Sdk, root.OrderCloud.Incrementor, root.OrderCloud.Meta); + } +}(this, function(Sdk, Incrementor, Meta) { + 'use strict'; + + + + + /** + * The ListIncrementor model module. + * @module model/ListIncrementor + */ + + /** + * Constructs a new ListIncrementor. + * @alias module:model/ListIncrementor + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListIncrementor 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/ListIncrementor} obj Optional instance to populate. + * @return {module:model/ListIncrementor} The populated ListIncrementor instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Incrementor]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Incrementor":73,"./Meta":140}],102:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/LineItem', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./LineItem'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListLineItem = factory(root.OrderCloud.Sdk, root.OrderCloud.LineItem, root.OrderCloud.Meta); + } +}(this, function(Sdk, LineItem, Meta) { + 'use strict'; + + + + + /** + * The ListLineItem model module. + * @module model/ListLineItem + */ + + /** + * Constructs a new ListLineItem. + * @alias module:model/ListLineItem + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListLineItem 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/ListLineItem} obj Optional instance to populate. + * @return {module:model/ListLineItem} The populated ListLineItem instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [LineItem]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./LineItem":75,"./Meta":140}],103:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MessageCCListenerAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MessageCCListenerAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListMessageCCListenerAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.MessageCCListenerAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, MessageCCListenerAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListMessageCCListenerAssignment model module. + * @module model/ListMessageCCListenerAssignment + */ + + /** + * Constructs a new ListMessageCCListenerAssignment. + * @alias module:model/ListMessageCCListenerAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListMessageCCListenerAssignment 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/ListMessageCCListenerAssignment} obj Optional instance to populate. + * @return {module:model/ListMessageCCListenerAssignment} The populated ListMessageCCListenerAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [MessageCCListenerAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MessageCCListenerAssignment":137,"./Meta":140}],104:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MessageSender', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MessageSender'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListMessageSender = factory(root.OrderCloud.Sdk, root.OrderCloud.MessageSender, root.OrderCloud.Meta); + } +}(this, function(Sdk, MessageSender, Meta) { + 'use strict'; + + + + + /** + * The ListMessageSender model module. + * @module model/ListMessageSender + */ + + /** + * Constructs a new ListMessageSender. + * @alias module:model/ListMessageSender + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListMessageSender 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/ListMessageSender} obj Optional instance to populate. + * @return {module:model/ListMessageSender} The populated ListMessageSender instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [MessageSender]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MessageSender":138,"./Meta":140}],105:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MessageSenderAssignment', 'model/Meta'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MessageSenderAssignment'), require('./Meta')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListMessageSenderAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.MessageSenderAssignment, root.OrderCloud.Meta); + } +}(this, function(Sdk, MessageSenderAssignment, Meta) { + 'use strict'; + + + + + /** + * The ListMessageSenderAssignment model module. + * @module model/ListMessageSenderAssignment + */ + + /** + * Constructs a new ListMessageSenderAssignment. + * @alias module:model/ListMessageSenderAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListMessageSenderAssignment 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/ListMessageSenderAssignment} obj Optional instance to populate. + * @return {module:model/ListMessageSenderAssignment} The populated ListMessageSenderAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [MessageSenderAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MessageSenderAssignment":139,"./Meta":140}],106:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/OpenIdConnect'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./OpenIdConnect')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListOpenIdConnect = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.OpenIdConnect); + } +}(this, function(Sdk, Meta, OpenIdConnect) { + 'use strict'; + + + + + /** + * The ListOpenIdConnect model module. + * @module model/ListOpenIdConnect + */ + + /** + * Constructs a new ListOpenIdConnect. + * @alias module:model/ListOpenIdConnect + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListOpenIdConnect 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/ListOpenIdConnect} obj Optional instance to populate. + * @return {module:model/ListOpenIdConnect} The populated ListOpenIdConnect instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [OpenIdConnect]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./OpenIdConnect":142}],107:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Order'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Order')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListOrder = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Order); + } +}(this, function(Sdk, Meta, Order) { + 'use strict'; + + + + + /** + * The ListOrder model module. + * @module model/ListOrder + */ + + /** + * Constructs a new ListOrder. + * @alias module:model/ListOrder + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListOrder 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/ListOrder} obj Optional instance to populate. + * @return {module:model/ListOrder} The populated ListOrder instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Order]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Order":143}],108:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/OrderApproval'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./OrderApproval')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListOrderApproval = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.OrderApproval); + } +}(this, function(Sdk, Meta, OrderApproval) { + 'use strict'; + + + + + /** + * The ListOrderApproval model module. + * @module model/ListOrderApproval + */ + + /** + * Constructs a new ListOrderApproval. + * @alias module:model/ListOrderApproval + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListOrderApproval 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/ListOrderApproval} obj Optional instance to populate. + * @return {module:model/ListOrderApproval} The populated ListOrderApproval instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [OrderApproval]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./OrderApproval":144}],109:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/OrderPromotion'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./OrderPromotion')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListOrderPromotion = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.OrderPromotion); + } +}(this, function(Sdk, Meta, OrderPromotion) { + 'use strict'; + + + + + /** + * The ListOrderPromotion model module. + * @module model/ListOrderPromotion + */ + + /** + * Constructs a new ListOrderPromotion. + * @alias module:model/ListOrderPromotion + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListOrderPromotion 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/ListOrderPromotion} obj Optional instance to populate. + * @return {module:model/ListOrderPromotion} The populated ListOrderPromotion instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [OrderPromotion]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./OrderPromotion":146}],110:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Payment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Payment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListPayment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Payment); + } +}(this, function(Sdk, Meta, Payment) { + 'use strict'; + + + + + /** + * The ListPayment model module. + * @module model/ListPayment + */ + + /** + * Constructs a new ListPayment. + * @alias module:model/ListPayment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListPayment 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/ListPayment} obj Optional instance to populate. + * @return {module:model/ListPayment} The populated ListPayment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Payment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Payment":190}],111:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/PriceSchedule'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./PriceSchedule')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListPriceSchedule = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.PriceSchedule); + } +}(this, function(Sdk, Meta, PriceSchedule) { + 'use strict'; + + + + + /** + * The ListPriceSchedule model module. + * @module model/ListPriceSchedule + */ + + /** + * Constructs a new ListPriceSchedule. + * @alias module:model/ListPriceSchedule + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListPriceSchedule 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/ListPriceSchedule} obj Optional instance to populate. + * @return {module:model/ListPriceSchedule} The populated ListPriceSchedule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [PriceSchedule]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./PriceSchedule":193}],112:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Product'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Product')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListProduct = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Product); + } +}(this, function(Sdk, Meta, Product) { + 'use strict'; + + + + + /** + * The ListProduct model module. + * @module model/ListProduct + */ + + /** + * Constructs a new ListProduct. + * @alias module:model/ListProduct + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListProduct 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/ListProduct} obj Optional instance to populate. + * @return {module:model/ListProduct} The populated ListProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Product]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Product":194}],113:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/ProductAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./ProductAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListProductAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.ProductAssignment); + } +}(this, function(Sdk, Meta, ProductAssignment) { + 'use strict'; + + + + + /** + * The ListProductAssignment model module. + * @module model/ListProductAssignment + */ + + /** + * Constructs a new ListProductAssignment. + * @alias module:model/ListProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListProductAssignment 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/ListProductAssignment} obj Optional instance to populate. + * @return {module:model/ListProductAssignment} The populated ListProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ProductAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./ProductAssignment":195}],114:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/ProductCatalogAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./ProductCatalogAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListProductCatalogAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.ProductCatalogAssignment); + } +}(this, function(Sdk, Meta, ProductCatalogAssignment) { + 'use strict'; + + + + + /** + * The ListProductCatalogAssignment model module. + * @module model/ListProductCatalogAssignment + */ + + /** + * Constructs a new ListProductCatalogAssignment. + * @alias module:model/ListProductCatalogAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListProductCatalogAssignment 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/ListProductCatalogAssignment} obj Optional instance to populate. + * @return {module:model/ListProductCatalogAssignment} The populated ListProductCatalogAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ProductCatalogAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./ProductCatalogAssignment":196}],115:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/ProductFacet'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./ProductFacet')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListProductFacet = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.ProductFacet); + } +}(this, function(Sdk, Meta, ProductFacet) { + 'use strict'; + + + + + /** + * The ListProductFacet model module. + * @module model/ListProductFacet + */ + + /** + * Constructs a new ListProductFacet. + * @alias module:model/ListProductFacet + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListProductFacet 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/ListProductFacet} obj Optional instance to populate. + * @return {module:model/ListProductFacet} The populated ListProductFacet instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ProductFacet]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./ProductFacet":197}],116:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Promotion'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Promotion')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListPromotion = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Promotion); + } +}(this, function(Sdk, Meta, Promotion) { + 'use strict'; + + + + + /** + * The ListPromotion model module. + * @module model/ListPromotion + */ + + /** + * Constructs a new ListPromotion. + * @alias module:model/ListPromotion + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListPromotion 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/ListPromotion} obj Optional instance to populate. + * @return {module:model/ListPromotion} The populated ListPromotion instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Promotion]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Promotion":198}],117:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/PromotionAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./PromotionAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListPromotionAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.PromotionAssignment); + } +}(this, function(Sdk, Meta, PromotionAssignment) { + 'use strict'; + + + + + /** + * The ListPromotionAssignment model module. + * @module model/ListPromotionAssignment + */ + + /** + * Constructs a new ListPromotionAssignment. + * @alias module:model/ListPromotionAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListPromotionAssignment 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/ListPromotionAssignment} obj Optional instance to populate. + * @return {module:model/ListPromotionAssignment} The populated ListPromotionAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [PromotionAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./PromotionAssignment":199}],118:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SecurityProfile'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SecurityProfile')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSecurityProfile = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SecurityProfile); + } +}(this, function(Sdk, Meta, SecurityProfile) { + 'use strict'; + + + + + /** + * The ListSecurityProfile model module. + * @module model/ListSecurityProfile + */ + + /** + * Constructs a new ListSecurityProfile. + * @alias module:model/ListSecurityProfile + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSecurityProfile 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/ListSecurityProfile} obj Optional instance to populate. + * @return {module:model/ListSecurityProfile} The populated ListSecurityProfile instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SecurityProfile]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SecurityProfile":200}],119:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SecurityProfileAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SecurityProfileAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSecurityProfileAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SecurityProfileAssignment); + } +}(this, function(Sdk, Meta, SecurityProfileAssignment) { + 'use strict'; + + + + + /** + * The ListSecurityProfileAssignment model module. + * @module model/ListSecurityProfileAssignment + */ + + /** + * Constructs a new ListSecurityProfileAssignment. + * @alias module:model/ListSecurityProfileAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSecurityProfileAssignment 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/ListSecurityProfileAssignment} obj Optional instance to populate. + * @return {module:model/ListSecurityProfileAssignment} The populated ListSecurityProfileAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SecurityProfileAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SecurityProfileAssignment":201}],120:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Shipment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Shipment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListShipment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Shipment); + } +}(this, function(Sdk, Meta, Shipment) { + 'use strict'; + + + + + /** + * The ListShipment model module. + * @module model/ListShipment + */ + + /** + * Constructs a new ListShipment. + * @alias module:model/ListShipment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListShipment 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/ListShipment} obj Optional instance to populate. + * @return {module:model/ListShipment} The populated ListShipment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Shipment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Shipment":202}],121:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/ShipmentItem'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./ShipmentItem')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListShipmentItem = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.ShipmentItem); + } +}(this, function(Sdk, Meta, ShipmentItem) { + 'use strict'; + + + + + /** + * The ListShipmentItem model module. + * @module model/ListShipmentItem + */ + + /** + * Constructs a new ListShipmentItem. + * @alias module:model/ListShipmentItem + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListShipmentItem 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/ListShipmentItem} obj Optional instance to populate. + * @return {module:model/ListShipmentItem} The populated ListShipmentItem instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [ShipmentItem]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./ShipmentItem":203}],122:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Spec'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Spec')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSpec = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Spec); + } +}(this, function(Sdk, Meta, Spec) { + 'use strict'; + + + + + /** + * The ListSpec model module. + * @module model/ListSpec + */ + + /** + * Constructs a new ListSpec. + * @alias module:model/ListSpec + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSpec 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/ListSpec} obj Optional instance to populate. + * @return {module:model/ListSpec} The populated ListSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Spec]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Spec":204}],123:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SpecOption'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SpecOption')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSpecOption = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SpecOption); + } +}(this, function(Sdk, Meta, SpecOption) { + 'use strict'; + + + + + /** + * The ListSpecOption model module. + * @module model/ListSpecOption + */ + + /** + * Constructs a new ListSpecOption. + * @alias module:model/ListSpecOption + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSpecOption 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/ListSpecOption} obj Optional instance to populate. + * @return {module:model/ListSpecOption} The populated ListSpecOption instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SpecOption]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SpecOption":205}],124:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SpecProductAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SpecProductAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSpecProductAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SpecProductAssignment); + } +}(this, function(Sdk, Meta, SpecProductAssignment) { + 'use strict'; + + + + + /** + * The ListSpecProductAssignment model module. + * @module model/ListSpecProductAssignment + */ + + /** + * Constructs a new ListSpecProductAssignment. + * @alias module:model/ListSpecProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSpecProductAssignment 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/ListSpecProductAssignment} obj Optional instance to populate. + * @return {module:model/ListSpecProductAssignment} The populated ListSpecProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SpecProductAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SpecProductAssignment":206}],125:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SpendingAccount'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SpendingAccount')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSpendingAccount = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SpendingAccount); + } +}(this, function(Sdk, Meta, SpendingAccount) { + 'use strict'; + + + + + /** + * The ListSpendingAccount model module. + * @module model/ListSpendingAccount + */ + + /** + * Constructs a new ListSpendingAccount. + * @alias module:model/ListSpendingAccount + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSpendingAccount 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/ListSpendingAccount} obj Optional instance to populate. + * @return {module:model/ListSpendingAccount} The populated ListSpendingAccount instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SpendingAccount]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SpendingAccount":207}],126:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/SpendingAccountAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./SpendingAccountAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSpendingAccountAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.SpendingAccountAssignment); + } +}(this, function(Sdk, Meta, SpendingAccountAssignment) { + 'use strict'; + + + + + /** + * The ListSpendingAccountAssignment model module. + * @module model/ListSpendingAccountAssignment + */ + + /** + * Constructs a new ListSpendingAccountAssignment. + * @alias module:model/ListSpendingAccountAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSpendingAccountAssignment 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/ListSpendingAccountAssignment} obj Optional instance to populate. + * @return {module:model/ListSpendingAccountAssignment} The populated ListSpendingAccountAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [SpendingAccountAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./SpendingAccountAssignment":208}],127:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Supplier'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Supplier')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListSupplier = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Supplier); + } +}(this, function(Sdk, Meta, Supplier) { + 'use strict'; + + + + + /** + * The ListSupplier model module. + * @module model/ListSupplier + */ + + /** + * Constructs a new ListSupplier. + * @alias module:model/ListSupplier + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListSupplier 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/ListSupplier} obj Optional instance to populate. + * @return {module:model/ListSupplier} The populated ListSupplier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Supplier]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Supplier":209}],128:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListUser = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.User); + } +}(this, function(Sdk, Meta, User) { + 'use strict'; + + + + + /** + * The ListUser model module. + * @module model/ListUser + */ + + /** + * Constructs a new ListUser. + * @alias module:model/ListUser + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListUser 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/ListUser} obj Optional instance to populate. + * @return {module:model/ListUser} The populated ListUser instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [User]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./User":211}],129:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/UserGroup'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./UserGroup')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListUserGroup = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.UserGroup); + } +}(this, function(Sdk, Meta, UserGroup) { + 'use strict'; + + + + + /** + * The ListUserGroup model module. + * @module model/ListUserGroup + */ + + /** + * Constructs a new ListUserGroup. + * @alias module:model/ListUserGroup + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListUserGroup 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/ListUserGroup} obj Optional instance to populate. + * @return {module:model/ListUserGroup} The populated ListUserGroup instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [UserGroup]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./UserGroup":212}],130:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/UserGroupAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./UserGroupAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListUserGroupAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.UserGroupAssignment); + } +}(this, function(Sdk, Meta, UserGroupAssignment) { + 'use strict'; + + + + + /** + * The ListUserGroupAssignment model module. + * @module model/ListUserGroupAssignment + */ + + /** + * Constructs a new ListUserGroupAssignment. + * @alias module:model/ListUserGroupAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListUserGroupAssignment 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/ListUserGroupAssignment} obj Optional instance to populate. + * @return {module:model/ListUserGroupAssignment} The populated ListUserGroupAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [UserGroupAssignment]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./UserGroupAssignment":213}],131:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Variant'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Variant')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListVariant = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Variant); + } +}(this, function(Sdk, Meta, Variant) { + 'use strict'; + + + + + /** + * The ListVariant model module. + * @module model/ListVariant + */ + + /** + * Constructs a new ListVariant. + * @alias module:model/ListVariant + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListVariant 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/ListVariant} obj Optional instance to populate. + * @return {module:model/ListVariant} The populated ListVariant instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Variant]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Variant":214}],132:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/Webhook'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./Webhook')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListWebhook = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.Webhook); + } +}(this, function(Sdk, Meta, Webhook) { + 'use strict'; + + + + + /** + * The ListWebhook model module. + * @module model/ListWebhook + */ + + /** + * Constructs a new ListWebhook. + * @alias module:model/ListWebhook + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListWebhook 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/ListWebhook} obj Optional instance to populate. + * @return {module:model/ListWebhook} The populated ListWebhook instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [Webhook]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./Webhook":216}],133:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Meta', 'model/XpIndex'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Meta'), require('./XpIndex')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ListXpIndex = factory(root.OrderCloud.Sdk, root.OrderCloud.Meta, root.OrderCloud.XpIndex); + } +}(this, function(Sdk, Meta, XpIndex) { + 'use strict'; + + + + + /** + * The ListXpIndex model module. + * @module model/ListXpIndex + */ + + /** + * Constructs a new ListXpIndex. + * @alias module:model/ListXpIndex + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ListXpIndex 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/ListXpIndex} obj Optional instance to populate. + * @return {module:model/ListXpIndex} The populated ListXpIndex instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Items')) { + obj['Items'] = Sdk.convertToType(data['Items'], [XpIndex]); + } + if (data.hasOwnProperty('Meta')) { + obj['Meta'] = Meta.constructFromObject(data['Meta']); + } + } + return obj; + } + + /** + * @member {Array.} Items + */ + exports.prototype['Items'] = undefined; + /** + * @member {module:model/Meta} Meta + */ + exports.prototype['Meta'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Meta":140,"./XpIndex":218}],134:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MeBuyer = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The MeBuyer model module. + * @module model/MeBuyer + */ + + /** + * Constructs a new MeBuyer. + * @alias module:model/MeBuyer + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a MeBuyer 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/MeBuyer} obj Optional instance to populate. + * @return {module:model/MeBuyer} The populated MeBuyer instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('DefaultCatalogID')) { + obj['DefaultCatalogID'] = Sdk.convertToType(data['DefaultCatalogID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} DefaultCatalogID + */ + exports.prototype['DefaultCatalogID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],135:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MeSupplier = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The MeSupplier model module. + * @module model/MeSupplier + */ + + /** + * Constructs a new MeSupplier. + * @alias module:model/MeSupplier + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a MeSupplier 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/MeSupplier} obj Optional instance to populate. + * @return {module:model/MeSupplier} The populated MeSupplier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],136:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MeBuyer', 'model/MeSupplier'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MeBuyer'), require('./MeSupplier')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MeUser = factory(root.OrderCloud.Sdk, root.OrderCloud.MeBuyer, root.OrderCloud.MeSupplier); + } +}(this, function(Sdk, MeBuyer, MeSupplier) { + 'use strict'; + + + + + /** + * The MeUser model module. + * @module model/MeUser + */ + + /** + * Constructs a new MeUser. + * @alias module:model/MeUser + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a MeUser 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/MeUser} obj Optional instance to populate. + * @return {module:model/MeUser} The populated MeUser instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Buyer')) { + obj['Buyer'] = MeBuyer.constructFromObject(data['Buyer']); + } + if (data.hasOwnProperty('Supplier')) { + obj['Supplier'] = MeSupplier.constructFromObject(data['Supplier']); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('Password')) { + obj['Password'] = Sdk.convertToType(data['Password'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Email')) { + obj['Email'] = Sdk.convertToType(data['Email'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('TermsAccepted')) { + obj['TermsAccepted'] = Sdk.convertToType(data['TermsAccepted'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AvailableRoles')) { + obj['AvailableRoles'] = Sdk.convertToType(data['AvailableRoles'], ['String']); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/MeBuyer} Buyer + */ + exports.prototype['Buyer'] = undefined; + /** + * @member {module:model/MeSupplier} Supplier + */ + exports.prototype['Supplier'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} Password + */ + exports.prototype['Password'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Email + */ + exports.prototype['Email'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} TermsAccepted + */ + exports.prototype['TermsAccepted'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} AvailableRoles + */ + exports.prototype['AvailableRoles'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MeBuyer":134,"./MeSupplier":135}],137:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MessageSenderAssignment'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MessageSenderAssignment')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MessageCCListenerAssignment = factory(root.OrderCloud.Sdk, root.OrderCloud.MessageSenderAssignment); + } +}(this, function(Sdk, MessageSenderAssignment) { + 'use strict'; + + + + + /** + * The MessageCCListenerAssignment model module. + * @module model/MessageCCListenerAssignment + */ + + /** + * Constructs a new MessageCCListenerAssignment. + * @alias module:model/MessageCCListenerAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a MessageCCListenerAssignment 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/MessageCCListenerAssignment} obj Optional instance to populate. + * @return {module:model/MessageCCListenerAssignment} The populated MessageCCListenerAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('MessageSenderAssignment')) { + obj['MessageSenderAssignment'] = MessageSenderAssignment.constructFromObject(data['MessageSenderAssignment']); + } + if (data.hasOwnProperty('MessageConfigName')) { + obj['MessageConfigName'] = Sdk.convertToType(data['MessageConfigName'], 'String'); + } + if (data.hasOwnProperty('MessageConfigDescription')) { + obj['MessageConfigDescription'] = Sdk.convertToType(data['MessageConfigDescription'], 'String'); + } + if (data.hasOwnProperty('MessageType')) { + obj['MessageType'] = Sdk.convertToType(data['MessageType'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/MessageSenderAssignment} MessageSenderAssignment + */ + exports.prototype['MessageSenderAssignment'] = undefined; + /** + * @member {String} MessageConfigName + */ + exports.prototype['MessageConfigName'] = undefined; + /** + * @member {String} MessageConfigDescription + */ + exports.prototype['MessageConfigDescription'] = undefined; + /** + * @member {String} MessageType + */ + exports.prototype['MessageType'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MessageSenderAssignment":139}],138:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MessageSender = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The MessageSender model module. + * @module model/MessageSender + */ + + /** + * Constructs a new MessageSender. + * @alias module:model/MessageSender + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a MessageSender 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/MessageSender} obj Optional instance to populate. + * @return {module:model/MessageSender} The populated MessageSender instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('MessageTypes')) { + obj['MessageTypes'] = Sdk.convertToType(data['MessageTypes'], ['String']); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('URL')) { + obj['URL'] = Sdk.convertToType(data['URL'], 'String'); + } + if (data.hasOwnProperty('ElevatedRoles')) { + obj['ElevatedRoles'] = Sdk.convertToType(data['ElevatedRoles'], ['String']); + } + if (data.hasOwnProperty('SharedKey')) { + obj['SharedKey'] = Sdk.convertToType(data['SharedKey'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Array.} MessageTypes + */ + exports.prototype['MessageTypes'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} URL + */ + exports.prototype['URL'] = undefined; + /** + * @member {Array.} ElevatedRoles + */ + exports.prototype['ElevatedRoles'] = undefined; + /** + * @member {String} SharedKey + */ + exports.prototype['SharedKey'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],139:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MessageSenderAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The MessageSenderAssignment model module. + * @module model/MessageSenderAssignment + */ + + /** + * Constructs a new MessageSenderAssignment. + * @alias module:model/MessageSenderAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a MessageSenderAssignment 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/MessageSenderAssignment} obj Optional instance to populate. + * @return {module:model/MessageSenderAssignment} The populated MessageSenderAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('MessageSenderID')) { + obj['MessageSenderID'] = Sdk.convertToType(data['MessageSenderID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('MessageConfigName')) { + obj['MessageConfigName'] = Sdk.convertToType(data['MessageConfigName'], 'String'); + } + if (data.hasOwnProperty('MessageConfigDescription')) { + obj['MessageConfigDescription'] = Sdk.convertToType(data['MessageConfigDescription'], 'String'); + } + } + return obj; + } + + /** + * @member {String} MessageSenderID + */ + exports.prototype['MessageSenderID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {String} MessageConfigName + */ + exports.prototype['MessageConfigName'] = undefined; + /** + * @member {String} MessageConfigDescription + */ + exports.prototype['MessageConfigDescription'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],140:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Meta = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Meta model module. + * @module model/Meta + */ + + /** + * Constructs a new Meta. + * @alias module:model/Meta + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a Meta 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/Meta} obj Optional instance to populate. + * @return {module:model/Meta} The populated Meta instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Page')) { + obj['Page'] = Sdk.convertToType(data['Page'], 'Number'); + } + if (data.hasOwnProperty('PageSize')) { + obj['PageSize'] = Sdk.convertToType(data['PageSize'], 'Number'); + } + if (data.hasOwnProperty('TotalCount')) { + obj['TotalCount'] = Sdk.convertToType(data['TotalCount'], 'Number'); + } + if (data.hasOwnProperty('TotalPages')) { + obj['TotalPages'] = Sdk.convertToType(data['TotalPages'], 'Number'); + } + if (data.hasOwnProperty('ItemRange')) { + obj['ItemRange'] = Sdk.convertToType(data['ItemRange'], ['Number']); + } + } + return obj; + } + + /** + * @member {Number} Page + */ + exports.prototype['Page'] = undefined; + /** + * @member {Number} PageSize + */ + exports.prototype['PageSize'] = undefined; + /** + * @member {Number} TotalCount + */ + exports.prototype['TotalCount'] = undefined; + /** + * @member {Number} TotalPages + */ + exports.prototype['TotalPages'] = undefined; + /** + * @member {Array.} ItemRange + */ + exports.prototype['ItemRange'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],141:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/ListFacet'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./ListFacet')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.MetaWithFacets = factory(root.OrderCloud.Sdk, root.OrderCloud.ListFacet); + } +}(this, function(Sdk, ListFacet) { + 'use strict'; + + + + + /** + * The MetaWithFacets model module. + * @module model/MetaWithFacets + */ + + /** + * Constructs a new MetaWithFacets. + * @alias module:model/MetaWithFacets + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a MetaWithFacets 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/MetaWithFacets} obj Optional instance to populate. + * @return {module:model/MetaWithFacets} The populated MetaWithFacets instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Facets')) { + obj['Facets'] = Sdk.convertToType(data['Facets'], [ListFacet]); + } + if (data.hasOwnProperty('Page')) { + obj['Page'] = Sdk.convertToType(data['Page'], 'Number'); + } + if (data.hasOwnProperty('PageSize')) { + obj['PageSize'] = Sdk.convertToType(data['PageSize'], 'Number'); + } + if (data.hasOwnProperty('TotalCount')) { + obj['TotalCount'] = Sdk.convertToType(data['TotalCount'], 'Number'); + } + if (data.hasOwnProperty('TotalPages')) { + obj['TotalPages'] = Sdk.convertToType(data['TotalPages'], 'Number'); + } + if (data.hasOwnProperty('ItemRange')) { + obj['ItemRange'] = Sdk.convertToType(data['ItemRange'], ['Number']); + } + } + return obj; + } + + /** + * @member {Array.} Facets + */ + exports.prototype['Facets'] = undefined; + /** + * @member {Number} Page + */ + exports.prototype['Page'] = undefined; + /** + * @member {Number} PageSize + */ + exports.prototype['PageSize'] = undefined; + /** + * @member {Number} TotalCount + */ + exports.prototype['TotalCount'] = undefined; + /** + * @member {Number} TotalPages + */ + exports.prototype['TotalPages'] = undefined; + /** + * @member {Array.} ItemRange + */ + exports.prototype['ItemRange'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./ListFacet":98}],142:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.OpenIdConnect = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The OpenIdConnect model module. + * @module model/OpenIdConnect + */ + + /** + * Constructs a new OpenIdConnect. + * @alias module:model/OpenIdConnect + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + }; + + /** + * Constructs a OpenIdConnect 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/OpenIdConnect} obj Optional instance to populate. + * @return {module:model/OpenIdConnect} The populated OpenIdConnect instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('OrderCloudApiClientID')) { + obj['OrderCloudApiClientID'] = Sdk.convertToType(data['OrderCloudApiClientID'], 'String'); + } + if (data.hasOwnProperty('ConnectClientID')) { + obj['ConnectClientID'] = Sdk.convertToType(data['ConnectClientID'], 'String'); + } + if (data.hasOwnProperty('ConnectClientSecret')) { + obj['ConnectClientSecret'] = Sdk.convertToType(data['ConnectClientSecret'], 'String'); + } + if (data.hasOwnProperty('AppStartUrl')) { + obj['AppStartUrl'] = Sdk.convertToType(data['AppStartUrl'], 'String'); + } + if (data.hasOwnProperty('AuthorizationEndpoint')) { + obj['AuthorizationEndpoint'] = Sdk.convertToType(data['AuthorizationEndpoint'], 'String'); + } + if (data.hasOwnProperty('TokenEndpoint')) { + obj['TokenEndpoint'] = Sdk.convertToType(data['TokenEndpoint'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} OrderCloudApiClientID + */ + exports.prototype['OrderCloudApiClientID'] = undefined; + /** + * @member {String} ConnectClientID + */ + exports.prototype['ConnectClientID'] = undefined; + /** + * @member {String} ConnectClientSecret + */ + exports.prototype['ConnectClientSecret'] = undefined; + /** + * @member {String} AppStartUrl + */ + exports.prototype['AppStartUrl'] = undefined; + /** + * @member {String} AuthorizationEndpoint + */ + exports.prototype['AuthorizationEndpoint'] = undefined; + /** + * @member {String} TokenEndpoint + */ + exports.prototype['TokenEndpoint'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],143:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address'), require('./User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Order = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.User); + } +}(this, function(Sdk, Address, User) { + 'use strict'; + + + + + /** + * The Order model module. + * @module model/Order + */ + + /** + * Constructs a new Order. + * @alias module:model/Order + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a Order 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/Order} obj Optional instance to populate. + * @return {module:model/Order} The populated Order instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('FromUser')) { + obj['FromUser'] = User.constructFromObject(data['FromUser']); + } + if (data.hasOwnProperty('FromCompanyID')) { + obj['FromCompanyID'] = Sdk.convertToType(data['FromCompanyID'], 'String'); + } + if (data.hasOwnProperty('FromUserID')) { + obj['FromUserID'] = Sdk.convertToType(data['FromUserID'], 'String'); + } + if (data.hasOwnProperty('BillingAddressID')) { + obj['BillingAddressID'] = Sdk.convertToType(data['BillingAddressID'], 'String'); + } + if (data.hasOwnProperty('BillingAddress')) { + obj['BillingAddress'] = Address.constructFromObject(data['BillingAddress']); + } + if (data.hasOwnProperty('ShippingAddressID')) { + obj['ShippingAddressID'] = Sdk.convertToType(data['ShippingAddressID'], 'String'); + } + if (data.hasOwnProperty('Comments')) { + obj['Comments'] = Sdk.convertToType(data['Comments'], 'String'); + } + if (data.hasOwnProperty('LineItemCount')) { + obj['LineItemCount'] = Sdk.convertToType(data['LineItemCount'], 'Number'); + } + if (data.hasOwnProperty('Status')) { + obj['Status'] = Sdk.convertToType(data['Status'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('DateSubmitted')) { + obj['DateSubmitted'] = Sdk.convertToType(data['DateSubmitted'], 'String'); + } + if (data.hasOwnProperty('DateApproved')) { + obj['DateApproved'] = Sdk.convertToType(data['DateApproved'], 'String'); + } + if (data.hasOwnProperty('DateDeclined')) { + obj['DateDeclined'] = Sdk.convertToType(data['DateDeclined'], 'String'); + } + if (data.hasOwnProperty('DateCanceled')) { + obj['DateCanceled'] = Sdk.convertToType(data['DateCanceled'], 'String'); + } + if (data.hasOwnProperty('DateCompleted')) { + obj['DateCompleted'] = Sdk.convertToType(data['DateCompleted'], 'String'); + } + if (data.hasOwnProperty('Subtotal')) { + obj['Subtotal'] = Sdk.convertToType(data['Subtotal'], 'Number'); + } + if (data.hasOwnProperty('ShippingCost')) { + obj['ShippingCost'] = Sdk.convertToType(data['ShippingCost'], 'Number'); + } + if (data.hasOwnProperty('TaxCost')) { + obj['TaxCost'] = Sdk.convertToType(data['TaxCost'], 'Number'); + } + if (data.hasOwnProperty('PromotionDiscount')) { + obj['PromotionDiscount'] = Sdk.convertToType(data['PromotionDiscount'], 'Number'); + } + if (data.hasOwnProperty('Total')) { + obj['Total'] = Sdk.convertToType(data['Total'], 'Number'); + } + if (data.hasOwnProperty('IsSubmitted')) { + obj['IsSubmitted'] = Sdk.convertToType(data['IsSubmitted'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {module:model/User} FromUser + */ + exports.prototype['FromUser'] = undefined; + /** + * @member {String} FromCompanyID + */ + exports.prototype['FromCompanyID'] = undefined; + /** + * @member {String} FromUserID + */ + exports.prototype['FromUserID'] = undefined; + /** + * @member {String} BillingAddressID + */ + exports.prototype['BillingAddressID'] = undefined; + /** + * @member {module:model/Address} BillingAddress + */ + exports.prototype['BillingAddress'] = undefined; + /** + * @member {String} ShippingAddressID + */ + exports.prototype['ShippingAddressID'] = undefined; + /** + * @member {String} Comments + */ + exports.prototype['Comments'] = undefined; + /** + * @member {Number} LineItemCount + */ + exports.prototype['LineItemCount'] = undefined; + /** + * @member {String} Status + */ + exports.prototype['Status'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} DateSubmitted + */ + exports.prototype['DateSubmitted'] = undefined; + /** + * @member {String} DateApproved + */ + exports.prototype['DateApproved'] = undefined; + /** + * @member {String} DateDeclined + */ + exports.prototype['DateDeclined'] = undefined; + /** + * @member {String} DateCanceled + */ + exports.prototype['DateCanceled'] = undefined; + /** + * @member {String} DateCompleted + */ + exports.prototype['DateCompleted'] = undefined; + /** + * @member {Number} Subtotal + */ + exports.prototype['Subtotal'] = undefined; + /** + * @member {Number} ShippingCost + */ + exports.prototype['ShippingCost'] = undefined; + /** + * @member {Number} TaxCost + */ + exports.prototype['TaxCost'] = undefined; + /** + * @member {Number} PromotionDiscount + */ + exports.prototype['PromotionDiscount'] = undefined; + /** + * @member {Number} Total + */ + exports.prototype['Total'] = undefined; + /** + * @member {Boolean} IsSubmitted + */ + exports.prototype['IsSubmitted'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52,"./User":211}],144:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.OrderApproval = factory(root.OrderCloud.Sdk, root.OrderCloud.User); + } +}(this, function(Sdk, User) { + 'use strict'; + + + + + /** + * The OrderApproval model module. + * @module model/OrderApproval + */ + + /** + * Constructs a new OrderApproval. + * @alias module:model/OrderApproval + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a OrderApproval 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/OrderApproval} obj Optional instance to populate. + * @return {module:model/OrderApproval} The populated OrderApproval instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ApprovalRuleID')) { + obj['ApprovalRuleID'] = Sdk.convertToType(data['ApprovalRuleID'], 'String'); + } + if (data.hasOwnProperty('ApprovingGroupID')) { + obj['ApprovingGroupID'] = Sdk.convertToType(data['ApprovingGroupID'], 'String'); + } + if (data.hasOwnProperty('Status')) { + obj['Status'] = Sdk.convertToType(data['Status'], 'String'); + } + if (data.hasOwnProperty('AllowResubmit')) { + obj['AllowResubmit'] = Sdk.convertToType(data['AllowResubmit'], 'Boolean'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('DateCompleted')) { + obj['DateCompleted'] = Sdk.convertToType(data['DateCompleted'], 'String'); + } + if (data.hasOwnProperty('Approver')) { + obj['Approver'] = User.constructFromObject(data['Approver']); + } + if (data.hasOwnProperty('Comments')) { + obj['Comments'] = Sdk.convertToType(data['Comments'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ApprovalRuleID + */ + exports.prototype['ApprovalRuleID'] = undefined; + /** + * @member {String} ApprovingGroupID + */ + exports.prototype['ApprovingGroupID'] = undefined; + /** + * @member {String} Status + */ + exports.prototype['Status'] = undefined; + /** + * @member {Boolean} AllowResubmit + */ + exports.prototype['AllowResubmit'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} DateCompleted + */ + exports.prototype['DateCompleted'] = undefined; + /** + * @member {module:model/User} Approver + */ + exports.prototype['Approver'] = undefined; + /** + * @member {String} Comments + */ + exports.prototype['Comments'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./User":211}],145:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.OrderApprovalInfo = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The OrderApprovalInfo model module. + * @module model/OrderApprovalInfo + */ + + /** + * Constructs a new OrderApprovalInfo. + * @alias module:model/OrderApprovalInfo + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a OrderApprovalInfo 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/OrderApprovalInfo} obj Optional instance to populate. + * @return {module:model/OrderApprovalInfo} The populated OrderApprovalInfo instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Comments')) { + obj['Comments'] = Sdk.convertToType(data['Comments'], 'String'); + } + if (data.hasOwnProperty('AllowResubmit')) { + obj['AllowResubmit'] = Sdk.convertToType(data['AllowResubmit'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {String} Comments + */ + exports.prototype['Comments'] = undefined; + /** + * @member {Boolean} AllowResubmit + */ + exports.prototype['AllowResubmit'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],146:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.OrderPromotion = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The OrderPromotion model module. + * @module model/OrderPromotion + */ + + /** + * Constructs a new OrderPromotion. + * @alias module:model/OrderPromotion + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a OrderPromotion 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/OrderPromotion} obj Optional instance to populate. + * @return {module:model/OrderPromotion} The populated OrderPromotion instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = Sdk.convertToType(data['Amount'], 'Number'); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Code')) { + obj['Code'] = Sdk.convertToType(data['Code'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('RedemptionLimit')) { + obj['RedemptionLimit'] = Sdk.convertToType(data['RedemptionLimit'], 'Number'); + } + if (data.hasOwnProperty('RedemptionLimitPerUser')) { + obj['RedemptionLimitPerUser'] = Sdk.convertToType(data['RedemptionLimitPerUser'], 'Number'); + } + if (data.hasOwnProperty('RedemptionCount')) { + obj['RedemptionCount'] = Sdk.convertToType(data['RedemptionCount'], 'Number'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('FinePrint')) { + obj['FinePrint'] = Sdk.convertToType(data['FinePrint'], 'String'); + } + if (data.hasOwnProperty('StartDate')) { + obj['StartDate'] = Sdk.convertToType(data['StartDate'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('EligibleExpression')) { + obj['EligibleExpression'] = Sdk.convertToType(data['EligibleExpression'], 'String'); + } + if (data.hasOwnProperty('ValueExpression')) { + obj['ValueExpression'] = Sdk.convertToType(data['ValueExpression'], 'String'); + } + if (data.hasOwnProperty('CanCombine')) { + obj['CanCombine'] = Sdk.convertToType(data['CanCombine'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {Number} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Code + */ + exports.prototype['Code'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} RedemptionLimit + */ + exports.prototype['RedemptionLimit'] = undefined; + /** + * @member {Number} RedemptionLimitPerUser + */ + exports.prototype['RedemptionLimitPerUser'] = undefined; + /** + * @member {Number} RedemptionCount + */ + exports.prototype['RedemptionCount'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} FinePrint + */ + exports.prototype['FinePrint'] = undefined; + /** + * @member {String} StartDate + */ + exports.prototype['StartDate'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {String} EligibleExpression + */ + exports.prototype['EligibleExpression'] = undefined; + /** + * @member {String} ValueExpression + */ + exports.prototype['ValueExpression'] = undefined; + /** + * @member {Boolean} CanCombine + */ + exports.prototype['CanCombine'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],147:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialAddress = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialAddress model module. + * @module model/PartialAddress + */ + + /** + * Constructs a new PartialAddress. + * @alias module:model/PartialAddress + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialAddress 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/PartialAddress} obj Optional instance to populate. + * @return {module:model/PartialAddress} The populated PartialAddress instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CompanyName')) { + obj['CompanyName'] = Sdk.convertToType(data['CompanyName'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Street1')) { + obj['Street1'] = Sdk.convertToType(data['Street1'], 'String'); + } + if (data.hasOwnProperty('Street2')) { + obj['Street2'] = Sdk.convertToType(data['Street2'], 'String'); + } + if (data.hasOwnProperty('City')) { + obj['City'] = Sdk.convertToType(data['City'], 'String'); + } + if (data.hasOwnProperty('State')) { + obj['State'] = Sdk.convertToType(data['State'], 'String'); + } + if (data.hasOwnProperty('Zip')) { + obj['Zip'] = Sdk.convertToType(data['Zip'], 'String'); + } + if (data.hasOwnProperty('Country')) { + obj['Country'] = Sdk.convertToType(data['Country'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('AddressName')) { + obj['AddressName'] = Sdk.convertToType(data['AddressName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CompanyName + */ + exports.prototype['CompanyName'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Street1 + */ + exports.prototype['Street1'] = undefined; + /** + * @member {String} Street2 + */ + exports.prototype['Street2'] = undefined; + /** + * @member {String} City + */ + exports.prototype['City'] = undefined; + /** + * @member {String} State + */ + exports.prototype['State'] = undefined; + /** + * @member {String} Zip + */ + exports.prototype['Zip'] = undefined; + /** + * @member {String} Country + */ + exports.prototype['Country'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} AddressName + */ + exports.prototype['AddressName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],148:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialApiClient = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialApiClient model module. + * @module model/PartialApiClient + */ + + /** + * Constructs a new PartialApiClient. + * @alias module:model/PartialApiClient + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialApiClient 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/PartialApiClient} obj Optional instance to populate. + * @return {module:model/PartialApiClient} The populated PartialApiClient instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ClientSecret')) { + obj['ClientSecret'] = Sdk.convertToType(data['ClientSecret'], 'String'); + } + if (data.hasOwnProperty('AccessTokenDuration')) { + obj['AccessTokenDuration'] = Sdk.convertToType(data['AccessTokenDuration'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('AppName')) { + obj['AppName'] = Sdk.convertToType(data['AppName'], 'String'); + } + if (data.hasOwnProperty('RefreshTokenDuration')) { + obj['RefreshTokenDuration'] = Sdk.convertToType(data['RefreshTokenDuration'], 'Number'); + } + if (data.hasOwnProperty('DefaultContextUserName')) { + obj['DefaultContextUserName'] = Sdk.convertToType(data['DefaultContextUserName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AllowAnyBuyer')) { + obj['AllowAnyBuyer'] = Sdk.convertToType(data['AllowAnyBuyer'], 'Boolean'); + } + if (data.hasOwnProperty('AllowAnySupplier')) { + obj['AllowAnySupplier'] = Sdk.convertToType(data['AllowAnySupplier'], 'Boolean'); + } + if (data.hasOwnProperty('AllowSeller')) { + obj['AllowSeller'] = Sdk.convertToType(data['AllowSeller'], 'Boolean'); + } + if (data.hasOwnProperty('IsAnonBuyer')) { + obj['IsAnonBuyer'] = Sdk.convertToType(data['IsAnonBuyer'], 'Boolean'); + } + if (data.hasOwnProperty('AssignedBuyerCount')) { + obj['AssignedBuyerCount'] = Sdk.convertToType(data['AssignedBuyerCount'], 'Number'); + } + if (data.hasOwnProperty('AssignedSupplierCount')) { + obj['AssignedSupplierCount'] = Sdk.convertToType(data['AssignedSupplierCount'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ClientSecret + */ + exports.prototype['ClientSecret'] = undefined; + /** + * @member {Number} AccessTokenDuration + */ + exports.prototype['AccessTokenDuration'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {String} AppName + */ + exports.prototype['AppName'] = undefined; + /** + * @member {Number} RefreshTokenDuration + */ + exports.prototype['RefreshTokenDuration'] = undefined; + /** + * @member {String} DefaultContextUserName + */ + exports.prototype['DefaultContextUserName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Boolean} AllowAnyBuyer + */ + exports.prototype['AllowAnyBuyer'] = undefined; + /** + * @member {Boolean} AllowAnySupplier + */ + exports.prototype['AllowAnySupplier'] = undefined; + /** + * @member {Boolean} AllowSeller + */ + exports.prototype['AllowSeller'] = undefined; + /** + * @member {Boolean} IsAnonBuyer + */ + exports.prototype['IsAnonBuyer'] = undefined; + /** + * @member {Number} AssignedBuyerCount + */ + exports.prototype['AssignedBuyerCount'] = undefined; + /** + * @member {Number} AssignedSupplierCount + */ + exports.prototype['AssignedSupplierCount'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],149:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialApprovalRule = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialApprovalRule model module. + * @module model/PartialApprovalRule + */ + + /** + * Constructs a new PartialApprovalRule. + * @alias module:model/PartialApprovalRule + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a PartialApprovalRule 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/PartialApprovalRule} obj Optional instance to populate. + * @return {module:model/PartialApprovalRule} The populated PartialApprovalRule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ApprovingGroupID')) { + obj['ApprovingGroupID'] = Sdk.convertToType(data['ApprovingGroupID'], 'String'); + } + if (data.hasOwnProperty('RuleExpression')) { + obj['RuleExpression'] = Sdk.convertToType(data['RuleExpression'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} ApprovingGroupID + */ + exports.prototype['ApprovingGroupID'] = undefined; + /** + * @member {String} RuleExpression + */ + exports.prototype['RuleExpression'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],150:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialBuyer = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialBuyer model module. + * @module model/PartialBuyer + */ + + /** + * Constructs a new PartialBuyer. + * @alias module:model/PartialBuyer + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a PartialBuyer 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/PartialBuyer} obj Optional instance to populate. + * @return {module:model/PartialBuyer} The populated PartialBuyer instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('DefaultCatalogID')) { + obj['DefaultCatalogID'] = Sdk.convertToType(data['DefaultCatalogID'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} DefaultCatalogID + */ + exports.prototype['DefaultCatalogID'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],151:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialBuyerAddress = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialBuyerAddress model module. + * @module model/PartialBuyerAddress + */ + + /** + * Constructs a new PartialBuyerAddress. + * @alias module:model/PartialBuyerAddress + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialBuyerAddress 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/PartialBuyerAddress} obj Optional instance to populate. + * @return {module:model/PartialBuyerAddress} The populated PartialBuyerAddress instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Shipping')) { + obj['Shipping'] = Sdk.convertToType(data['Shipping'], 'Boolean'); + } + if (data.hasOwnProperty('Billing')) { + obj['Billing'] = Sdk.convertToType(data['Billing'], 'Boolean'); + } + if (data.hasOwnProperty('Editable')) { + obj['Editable'] = Sdk.convertToType(data['Editable'], 'Boolean'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CompanyName')) { + obj['CompanyName'] = Sdk.convertToType(data['CompanyName'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Street1')) { + obj['Street1'] = Sdk.convertToType(data['Street1'], 'String'); + } + if (data.hasOwnProperty('Street2')) { + obj['Street2'] = Sdk.convertToType(data['Street2'], 'String'); + } + if (data.hasOwnProperty('City')) { + obj['City'] = Sdk.convertToType(data['City'], 'String'); + } + if (data.hasOwnProperty('State')) { + obj['State'] = Sdk.convertToType(data['State'], 'String'); + } + if (data.hasOwnProperty('Zip')) { + obj['Zip'] = Sdk.convertToType(data['Zip'], 'String'); + } + if (data.hasOwnProperty('Country')) { + obj['Country'] = Sdk.convertToType(data['Country'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('AddressName')) { + obj['AddressName'] = Sdk.convertToType(data['AddressName'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Boolean} Shipping + */ + exports.prototype['Shipping'] = undefined; + /** + * @member {Boolean} Billing + */ + exports.prototype['Billing'] = undefined; + /** + * @member {Boolean} Editable + */ + exports.prototype['Editable'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CompanyName + */ + exports.prototype['CompanyName'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Street1 + */ + exports.prototype['Street1'] = undefined; + /** + * @member {String} Street2 + */ + exports.prototype['Street2'] = undefined; + /** + * @member {String} City + */ + exports.prototype['City'] = undefined; + /** + * @member {String} State + */ + exports.prototype['State'] = undefined; + /** + * @member {String} Zip + */ + exports.prototype['Zip'] = undefined; + /** + * @member {String} Country + */ + exports.prototype['Country'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} AddressName + */ + exports.prototype['AddressName'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],152:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialBuyerCreditCard = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialBuyerCreditCard model module. + * @module model/PartialBuyerCreditCard + */ + + /** + * Constructs a new PartialBuyerCreditCard. + * @alias module:model/PartialBuyerCreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a PartialBuyerCreditCard 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/PartialBuyerCreditCard} obj Optional instance to populate. + * @return {module:model/PartialBuyerCreditCard} The populated PartialBuyerCreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Editable')) { + obj['Editable'] = Sdk.convertToType(data['Editable'], 'Boolean'); + } + if (data.hasOwnProperty('Token')) { + obj['Token'] = Sdk.convertToType(data['Token'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CardType')) { + obj['CardType'] = Sdk.convertToType(data['CardType'], 'String'); + } + if (data.hasOwnProperty('PartialAccountNumber')) { + obj['PartialAccountNumber'] = Sdk.convertToType(data['PartialAccountNumber'], 'String'); + } + if (data.hasOwnProperty('CardholderName')) { + obj['CardholderName'] = Sdk.convertToType(data['CardholderName'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Boolean} Editable + */ + exports.prototype['Editable'] = undefined; + /** + * @member {String} Token + */ + exports.prototype['Token'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CardType + */ + exports.prototype['CardType'] = undefined; + /** + * @member {String} PartialAccountNumber + */ + exports.prototype['PartialAccountNumber'] = undefined; + /** + * @member {String} CardholderName + */ + exports.prototype['CardholderName'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],153:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialCatalog = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialCatalog model module. + * @module model/PartialCatalog + */ + + /** + * Constructs a new PartialCatalog. + * @alias module:model/PartialCatalog + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a PartialCatalog 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/PartialCatalog} obj Optional instance to populate. + * @return {module:model/PartialCatalog} The populated PartialCatalog instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('CategoryCount')) { + obj['CategoryCount'] = Sdk.convertToType(data['CategoryCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} CategoryCount + */ + exports.prototype['CategoryCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],154:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialCategory = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialCategory model module. + * @module model/PartialCategory + */ + + /** + * Constructs a new PartialCategory. + * @alias module:model/PartialCategory + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialCategory 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/PartialCategory} obj Optional instance to populate. + * @return {module:model/PartialCategory} The populated PartialCategory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('ParentID')) { + obj['ParentID'] = Sdk.convertToType(data['ParentID'], 'String'); + } + if (data.hasOwnProperty('ChildCount')) { + obj['ChildCount'] = Sdk.convertToType(data['ChildCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {String} ParentID + */ + exports.prototype['ParentID'] = undefined; + /** + * @member {Number} ChildCount + */ + exports.prototype['ChildCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],155:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialCostCenter = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialCostCenter model module. + * @module model/PartialCostCenter + */ + + /** + * Constructs a new PartialCostCenter. + * @alias module:model/PartialCostCenter + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PartialCostCenter 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/PartialCostCenter} obj Optional instance to populate. + * @return {module:model/PartialCostCenter} The populated PartialCostCenter instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],156:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialCreditCard = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialCreditCard model module. + * @module model/PartialCreditCard + */ + + /** + * Constructs a new PartialCreditCard. + * @alias module:model/PartialCreditCard + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialCreditCard 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/PartialCreditCard} obj Optional instance to populate. + * @return {module:model/PartialCreditCard} The populated PartialCreditCard instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Token')) { + obj['Token'] = Sdk.convertToType(data['Token'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CardType')) { + obj['CardType'] = Sdk.convertToType(data['CardType'], 'String'); + } + if (data.hasOwnProperty('PartialAccountNumber')) { + obj['PartialAccountNumber'] = Sdk.convertToType(data['PartialAccountNumber'], 'String'); + } + if (data.hasOwnProperty('CardholderName')) { + obj['CardholderName'] = Sdk.convertToType(data['CardholderName'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Token + */ + exports.prototype['Token'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CardType + */ + exports.prototype['CardType'] = undefined; + /** + * @member {String} PartialAccountNumber + */ + exports.prototype['PartialAccountNumber'] = undefined; + /** + * @member {String} CardholderName + */ + exports.prototype['CardholderName'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],157:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialImpersonationConfig = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialImpersonationConfig model module. + * @module model/PartialImpersonationConfig + */ + + /** + * Constructs a new PartialImpersonationConfig. + * @alias module:model/PartialImpersonationConfig + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a PartialImpersonationConfig 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/PartialImpersonationConfig} obj Optional instance to populate. + * @return {module:model/PartialImpersonationConfig} The populated PartialImpersonationConfig instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationBuyerID')) { + obj['ImpersonationBuyerID'] = Sdk.convertToType(data['ImpersonationBuyerID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationGroupID')) { + obj['ImpersonationGroupID'] = Sdk.convertToType(data['ImpersonationGroupID'], 'String'); + } + if (data.hasOwnProperty('ImpersonationUserID')) { + obj['ImpersonationUserID'] = Sdk.convertToType(data['ImpersonationUserID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('GroupID')) { + obj['GroupID'] = Sdk.convertToType(data['GroupID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('SecurityProfileID')) { + obj['SecurityProfileID'] = Sdk.convertToType(data['SecurityProfileID'], 'String'); + } + if (data.hasOwnProperty('ClientID')) { + obj['ClientID'] = Sdk.convertToType(data['ClientID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ImpersonationBuyerID + */ + exports.prototype['ImpersonationBuyerID'] = undefined; + /** + * @member {String} ImpersonationGroupID + */ + exports.prototype['ImpersonationGroupID'] = undefined; + /** + * @member {String} ImpersonationUserID + */ + exports.prototype['ImpersonationUserID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} GroupID + */ + exports.prototype['GroupID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} SecurityProfileID + */ + exports.prototype['SecurityProfileID'] = undefined; + /** + * @member {String} ClientID + */ + exports.prototype['ClientID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],158:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialIncrementor = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialIncrementor model module. + * @module model/PartialIncrementor + */ + + /** + * Constructs a new PartialIncrementor. + * @alias module:model/PartialIncrementor + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PartialIncrementor 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/PartialIncrementor} obj Optional instance to populate. + * @return {module:model/PartialIncrementor} The populated PartialIncrementor instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('LastNumber')) { + obj['LastNumber'] = Sdk.convertToType(data['LastNumber'], 'Number'); + } + if (data.hasOwnProperty('LeftPaddingCount')) { + obj['LeftPaddingCount'] = Sdk.convertToType(data['LeftPaddingCount'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} LastNumber + */ + exports.prototype['LastNumber'] = undefined; + /** + * @member {Number} LeftPaddingCount + */ + exports.prototype['LeftPaddingCount'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],159:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialInventory = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialInventory model module. + * @module model/PartialInventory + */ + + /** + * Constructs a new PartialInventory. + * @alias module:model/PartialInventory + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a PartialInventory 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/PartialInventory} obj Optional instance to populate. + * @return {module:model/PartialInventory} The populated PartialInventory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Enabled')) { + obj['Enabled'] = Sdk.convertToType(data['Enabled'], 'Boolean'); + } + if (data.hasOwnProperty('NotificationPoint')) { + obj['NotificationPoint'] = Sdk.convertToType(data['NotificationPoint'], 'Number'); + } + if (data.hasOwnProperty('VariantLevelTracking')) { + obj['VariantLevelTracking'] = Sdk.convertToType(data['VariantLevelTracking'], 'Boolean'); + } + if (data.hasOwnProperty('OrderCanExceed')) { + obj['OrderCanExceed'] = Sdk.convertToType(data['OrderCanExceed'], 'Boolean'); + } + if (data.hasOwnProperty('QuantityAvailable')) { + obj['QuantityAvailable'] = Sdk.convertToType(data['QuantityAvailable'], 'Number'); + } + if (data.hasOwnProperty('LastUpdated')) { + obj['LastUpdated'] = Sdk.convertToType(data['LastUpdated'], 'String'); + } + } + return obj; + } + + /** + * @member {Boolean} Enabled + */ + exports.prototype['Enabled'] = undefined; + /** + * @member {Number} NotificationPoint + */ + exports.prototype['NotificationPoint'] = undefined; + /** + * @member {Boolean} VariantLevelTracking + */ + exports.prototype['VariantLevelTracking'] = undefined; + /** + * @member {Boolean} OrderCanExceed + */ + exports.prototype['OrderCanExceed'] = undefined; + /** + * @member {Number} QuantityAvailable + */ + exports.prototype['QuantityAvailable'] = undefined; + /** + * @member {String} LastUpdated + */ + exports.prototype['LastUpdated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],160:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/LineItemProduct', 'model/LineItemSpec', 'model/LineItemVariant'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address'), require('./LineItemProduct'), require('./LineItemSpec'), require('./LineItemVariant')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialLineItem = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.LineItemProduct, root.OrderCloud.LineItemSpec, root.OrderCloud.LineItemVariant); + } +}(this, function(Sdk, Address, LineItemProduct, LineItemSpec, LineItemVariant) { + 'use strict'; + + + + + /** + * The PartialLineItem model module. + * @module model/PartialLineItem + */ + + /** + * Constructs a new PartialLineItem. + * @alias module:model/PartialLineItem + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialLineItem 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/PartialLineItem} obj Optional instance to populate. + * @return {module:model/PartialLineItem} The populated PartialLineItem instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + if (data.hasOwnProperty('Quantity')) { + obj['Quantity'] = Sdk.convertToType(data['Quantity'], 'Number'); + } + if (data.hasOwnProperty('DateAdded')) { + obj['DateAdded'] = Sdk.convertToType(data['DateAdded'], 'String'); + } + if (data.hasOwnProperty('QuantityShipped')) { + obj['QuantityShipped'] = Sdk.convertToType(data['QuantityShipped'], 'Number'); + } + if (data.hasOwnProperty('UnitPrice')) { + obj['UnitPrice'] = Sdk.convertToType(data['UnitPrice'], 'Number'); + } + if (data.hasOwnProperty('LineTotal')) { + obj['LineTotal'] = Sdk.convertToType(data['LineTotal'], 'Number'); + } + if (data.hasOwnProperty('CostCenter')) { + obj['CostCenter'] = Sdk.convertToType(data['CostCenter'], 'String'); + } + if (data.hasOwnProperty('DateNeeded')) { + obj['DateNeeded'] = Sdk.convertToType(data['DateNeeded'], 'String'); + } + if (data.hasOwnProperty('ShippingAccount')) { + obj['ShippingAccount'] = Sdk.convertToType(data['ShippingAccount'], 'String'); + } + if (data.hasOwnProperty('ShippingAddressID')) { + obj['ShippingAddressID'] = Sdk.convertToType(data['ShippingAddressID'], 'String'); + } + if (data.hasOwnProperty('ShipFromAddressID')) { + obj['ShipFromAddressID'] = Sdk.convertToType(data['ShipFromAddressID'], 'String'); + } + if (data.hasOwnProperty('Product')) { + obj['Product'] = LineItemProduct.constructFromObject(data['Product']); + } + if (data.hasOwnProperty('Variant')) { + obj['Variant'] = LineItemVariant.constructFromObject(data['Variant']); + } + if (data.hasOwnProperty('ShippingAddress')) { + obj['ShippingAddress'] = Address.constructFromObject(data['ShippingAddress']); + } + if (data.hasOwnProperty('ShipFromAddress')) { + obj['ShipFromAddress'] = Address.constructFromObject(data['ShipFromAddress']); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + if (data.hasOwnProperty('Specs')) { + obj['Specs'] = Sdk.convertToType(data['Specs'], [LineItemSpec]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + /** + * @member {Number} Quantity + */ + exports.prototype['Quantity'] = undefined; + /** + * @member {String} DateAdded + */ + exports.prototype['DateAdded'] = undefined; + /** + * @member {Number} QuantityShipped + */ + exports.prototype['QuantityShipped'] = undefined; + /** + * @member {Number} UnitPrice + */ + exports.prototype['UnitPrice'] = undefined; + /** + * @member {Number} LineTotal + */ + exports.prototype['LineTotal'] = undefined; + /** + * @member {String} CostCenter + */ + exports.prototype['CostCenter'] = undefined; + /** + * @member {String} DateNeeded + */ + exports.prototype['DateNeeded'] = undefined; + /** + * @member {String} ShippingAccount + */ + exports.prototype['ShippingAccount'] = undefined; + /** + * @member {String} ShippingAddressID + */ + exports.prototype['ShippingAddressID'] = undefined; + /** + * @member {String} ShipFromAddressID + */ + exports.prototype['ShipFromAddressID'] = undefined; + /** + * @member {module:model/LineItemProduct} Product + */ + exports.prototype['Product'] = undefined; + /** + * @member {module:model/LineItemVariant} Variant + */ + exports.prototype['Variant'] = undefined; + /** + * @member {module:model/Address} ShippingAddress + */ + exports.prototype['ShippingAddress'] = undefined; + /** + * @member {module:model/Address} ShipFromAddress + */ + exports.prototype['ShipFromAddress'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + /** + * @member {Array.} Specs + */ + exports.prototype['Specs'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52,"./LineItemProduct":76,"./LineItemSpec":77,"./LineItemVariant":78}],161:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialLineItemProduct = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialLineItemProduct model module. + * @module model/PartialLineItemProduct + */ + + /** + * Constructs a new PartialLineItemProduct. + * @alias module:model/PartialLineItemProduct + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a PartialLineItemProduct 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/PartialLineItemProduct} obj Optional instance to populate. + * @return {module:model/PartialLineItemProduct} The populated PartialLineItemProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('QuantityMultiplier')) { + obj['QuantityMultiplier'] = Sdk.convertToType(data['QuantityMultiplier'], 'Number'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} QuantityMultiplier + */ + exports.prototype['QuantityMultiplier'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],162:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialLineItemSpec = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialLineItemSpec model module. + * @module model/PartialLineItemSpec + */ + + /** + * Constructs a new PartialLineItemSpec. + * @alias module:model/PartialLineItemSpec + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PartialLineItemSpec 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/PartialLineItemSpec} obj Optional instance to populate. + * @return {module:model/PartialLineItemSpec} The populated PartialLineItemSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('SpecID')) { + obj['SpecID'] = Sdk.convertToType(data['SpecID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('OptionID')) { + obj['OptionID'] = Sdk.convertToType(data['OptionID'], 'String'); + } + if (data.hasOwnProperty('Value')) { + obj['Value'] = Sdk.convertToType(data['Value'], 'String'); + } + } + return obj; + } + + /** + * @member {String} SpecID + */ + exports.prototype['SpecID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} OptionID + */ + exports.prototype['OptionID'] = undefined; + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],163:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialLineItemVariant = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialLineItemVariant model module. + * @module model/PartialLineItemVariant + */ + + /** + * Constructs a new PartialLineItemVariant. + * @alias module:model/PartialLineItemVariant + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialLineItemVariant 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/PartialLineItemVariant} obj Optional instance to populate. + * @return {module:model/PartialLineItemVariant} The populated PartialLineItemVariant instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],164:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialMeBuyer = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialMeBuyer model module. + * @module model/PartialMeBuyer + */ + + /** + * Constructs a new PartialMeBuyer. + * @alias module:model/PartialMeBuyer + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a PartialMeBuyer 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/PartialMeBuyer} obj Optional instance to populate. + * @return {module:model/PartialMeBuyer} The populated PartialMeBuyer instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('DefaultCatalogID')) { + obj['DefaultCatalogID'] = Sdk.convertToType(data['DefaultCatalogID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} DefaultCatalogID + */ + exports.prototype['DefaultCatalogID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],165:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialMeSupplier = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialMeSupplier model module. + * @module model/PartialMeSupplier + */ + + /** + * Constructs a new PartialMeSupplier. + * @alias module:model/PartialMeSupplier + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a PartialMeSupplier 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/PartialMeSupplier} obj Optional instance to populate. + * @return {module:model/PartialMeSupplier} The populated PartialMeSupplier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],166:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/MeBuyer', 'model/MeSupplier'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./MeBuyer'), require('./MeSupplier')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialMeUser = factory(root.OrderCloud.Sdk, root.OrderCloud.MeBuyer, root.OrderCloud.MeSupplier); + } +}(this, function(Sdk, MeBuyer, MeSupplier) { + 'use strict'; + + + + + /** + * The PartialMeUser model module. + * @module model/PartialMeUser + */ + + /** + * Constructs a new PartialMeUser. + * @alias module:model/PartialMeUser + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialMeUser 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/PartialMeUser} obj Optional instance to populate. + * @return {module:model/PartialMeUser} The populated PartialMeUser instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Buyer')) { + obj['Buyer'] = MeBuyer.constructFromObject(data['Buyer']); + } + if (data.hasOwnProperty('Supplier')) { + obj['Supplier'] = MeSupplier.constructFromObject(data['Supplier']); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('Password')) { + obj['Password'] = Sdk.convertToType(data['Password'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Email')) { + obj['Email'] = Sdk.convertToType(data['Email'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('TermsAccepted')) { + obj['TermsAccepted'] = Sdk.convertToType(data['TermsAccepted'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AvailableRoles')) { + obj['AvailableRoles'] = Sdk.convertToType(data['AvailableRoles'], ['String']); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/MeBuyer} Buyer + */ + exports.prototype['Buyer'] = undefined; + /** + * @member {module:model/MeSupplier} Supplier + */ + exports.prototype['Supplier'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} Password + */ + exports.prototype['Password'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Email + */ + exports.prototype['Email'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} TermsAccepted + */ + exports.prototype['TermsAccepted'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} AvailableRoles + */ + exports.prototype['AvailableRoles'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./MeBuyer":134,"./MeSupplier":135}],167:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialMessageSender = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialMessageSender model module. + * @module model/PartialMessageSender + */ + + /** + * Constructs a new PartialMessageSender. + * @alias module:model/PartialMessageSender + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialMessageSender 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/PartialMessageSender} obj Optional instance to populate. + * @return {module:model/PartialMessageSender} The populated PartialMessageSender instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('MessageTypes')) { + obj['MessageTypes'] = Sdk.convertToType(data['MessageTypes'], ['String']); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('URL')) { + obj['URL'] = Sdk.convertToType(data['URL'], 'String'); + } + if (data.hasOwnProperty('ElevatedRoles')) { + obj['ElevatedRoles'] = Sdk.convertToType(data['ElevatedRoles'], ['String']); + } + if (data.hasOwnProperty('SharedKey')) { + obj['SharedKey'] = Sdk.convertToType(data['SharedKey'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Array.} MessageTypes + */ + exports.prototype['MessageTypes'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} URL + */ + exports.prototype['URL'] = undefined; + /** + * @member {Array.} ElevatedRoles + */ + exports.prototype['ElevatedRoles'] = undefined; + /** + * @member {String} SharedKey + */ + exports.prototype['SharedKey'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],168:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialOpenIdConnect = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialOpenIdConnect model module. + * @module model/PartialOpenIdConnect + */ + + /** + * Constructs a new PartialOpenIdConnect. + * @alias module:model/PartialOpenIdConnect + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + }; + + /** + * Constructs a PartialOpenIdConnect 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/PartialOpenIdConnect} obj Optional instance to populate. + * @return {module:model/PartialOpenIdConnect} The populated PartialOpenIdConnect instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('OrderCloudApiClientID')) { + obj['OrderCloudApiClientID'] = Sdk.convertToType(data['OrderCloudApiClientID'], 'String'); + } + if (data.hasOwnProperty('ConnectClientID')) { + obj['ConnectClientID'] = Sdk.convertToType(data['ConnectClientID'], 'String'); + } + if (data.hasOwnProperty('ConnectClientSecret')) { + obj['ConnectClientSecret'] = Sdk.convertToType(data['ConnectClientSecret'], 'String'); + } + if (data.hasOwnProperty('AppStartUrl')) { + obj['AppStartUrl'] = Sdk.convertToType(data['AppStartUrl'], 'String'); + } + if (data.hasOwnProperty('AuthorizationEndpoint')) { + obj['AuthorizationEndpoint'] = Sdk.convertToType(data['AuthorizationEndpoint'], 'String'); + } + if (data.hasOwnProperty('TokenEndpoint')) { + obj['TokenEndpoint'] = Sdk.convertToType(data['TokenEndpoint'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} OrderCloudApiClientID + */ + exports.prototype['OrderCloudApiClientID'] = undefined; + /** + * @member {String} ConnectClientID + */ + exports.prototype['ConnectClientID'] = undefined; + /** + * @member {String} ConnectClientSecret + */ + exports.prototype['ConnectClientSecret'] = undefined; + /** + * @member {String} AppStartUrl + */ + exports.prototype['AppStartUrl'] = undefined; + /** + * @member {String} AuthorizationEndpoint + */ + exports.prototype['AuthorizationEndpoint'] = undefined; + /** + * @member {String} TokenEndpoint + */ + exports.prototype['TokenEndpoint'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],169:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address'), require('./User')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialOrder = factory(root.OrderCloud.Sdk, root.OrderCloud.Address, root.OrderCloud.User); + } +}(this, function(Sdk, Address, User) { + 'use strict'; + + + + + /** + * The PartialOrder model module. + * @module model/PartialOrder + */ + + /** + * Constructs a new PartialOrder. + * @alias module:model/PartialOrder + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialOrder 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/PartialOrder} obj Optional instance to populate. + * @return {module:model/PartialOrder} The populated PartialOrder instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('FromUser')) { + obj['FromUser'] = User.constructFromObject(data['FromUser']); + } + if (data.hasOwnProperty('FromCompanyID')) { + obj['FromCompanyID'] = Sdk.convertToType(data['FromCompanyID'], 'String'); + } + if (data.hasOwnProperty('FromUserID')) { + obj['FromUserID'] = Sdk.convertToType(data['FromUserID'], 'String'); + } + if (data.hasOwnProperty('BillingAddressID')) { + obj['BillingAddressID'] = Sdk.convertToType(data['BillingAddressID'], 'String'); + } + if (data.hasOwnProperty('BillingAddress')) { + obj['BillingAddress'] = Address.constructFromObject(data['BillingAddress']); + } + if (data.hasOwnProperty('ShippingAddressID')) { + obj['ShippingAddressID'] = Sdk.convertToType(data['ShippingAddressID'], 'String'); + } + if (data.hasOwnProperty('Comments')) { + obj['Comments'] = Sdk.convertToType(data['Comments'], 'String'); + } + if (data.hasOwnProperty('LineItemCount')) { + obj['LineItemCount'] = Sdk.convertToType(data['LineItemCount'], 'Number'); + } + if (data.hasOwnProperty('Status')) { + obj['Status'] = Sdk.convertToType(data['Status'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('DateSubmitted')) { + obj['DateSubmitted'] = Sdk.convertToType(data['DateSubmitted'], 'String'); + } + if (data.hasOwnProperty('DateApproved')) { + obj['DateApproved'] = Sdk.convertToType(data['DateApproved'], 'String'); + } + if (data.hasOwnProperty('DateDeclined')) { + obj['DateDeclined'] = Sdk.convertToType(data['DateDeclined'], 'String'); + } + if (data.hasOwnProperty('DateCanceled')) { + obj['DateCanceled'] = Sdk.convertToType(data['DateCanceled'], 'String'); + } + if (data.hasOwnProperty('DateCompleted')) { + obj['DateCompleted'] = Sdk.convertToType(data['DateCompleted'], 'String'); + } + if (data.hasOwnProperty('Subtotal')) { + obj['Subtotal'] = Sdk.convertToType(data['Subtotal'], 'Number'); + } + if (data.hasOwnProperty('ShippingCost')) { + obj['ShippingCost'] = Sdk.convertToType(data['ShippingCost'], 'Number'); + } + if (data.hasOwnProperty('TaxCost')) { + obj['TaxCost'] = Sdk.convertToType(data['TaxCost'], 'Number'); + } + if (data.hasOwnProperty('PromotionDiscount')) { + obj['PromotionDiscount'] = Sdk.convertToType(data['PromotionDiscount'], 'Number'); + } + if (data.hasOwnProperty('Total')) { + obj['Total'] = Sdk.convertToType(data['Total'], 'Number'); + } + if (data.hasOwnProperty('IsSubmitted')) { + obj['IsSubmitted'] = Sdk.convertToType(data['IsSubmitted'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {module:model/User} FromUser + */ + exports.prototype['FromUser'] = undefined; + /** + * @member {String} FromCompanyID + */ + exports.prototype['FromCompanyID'] = undefined; + /** + * @member {String} FromUserID + */ + exports.prototype['FromUserID'] = undefined; + /** + * @member {String} BillingAddressID + */ + exports.prototype['BillingAddressID'] = undefined; + /** + * @member {module:model/Address} BillingAddress + */ + exports.prototype['BillingAddress'] = undefined; + /** + * @member {String} ShippingAddressID + */ + exports.prototype['ShippingAddressID'] = undefined; + /** + * @member {String} Comments + */ + exports.prototype['Comments'] = undefined; + /** + * @member {Number} LineItemCount + */ + exports.prototype['LineItemCount'] = undefined; + /** + * @member {String} Status + */ + exports.prototype['Status'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} DateSubmitted + */ + exports.prototype['DateSubmitted'] = undefined; + /** + * @member {String} DateApproved + */ + exports.prototype['DateApproved'] = undefined; + /** + * @member {String} DateDeclined + */ + exports.prototype['DateDeclined'] = undefined; + /** + * @member {String} DateCanceled + */ + exports.prototype['DateCanceled'] = undefined; + /** + * @member {String} DateCompleted + */ + exports.prototype['DateCompleted'] = undefined; + /** + * @member {Number} Subtotal + */ + exports.prototype['Subtotal'] = undefined; + /** + * @member {Number} ShippingCost + */ + exports.prototype['ShippingCost'] = undefined; + /** + * @member {Number} TaxCost + */ + exports.prototype['TaxCost'] = undefined; + /** + * @member {Number} PromotionDiscount + */ + exports.prototype['PromotionDiscount'] = undefined; + /** + * @member {Number} Total + */ + exports.prototype['Total'] = undefined; + /** + * @member {Boolean} IsSubmitted + */ + exports.prototype['IsSubmitted'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52,"./User":211}],170:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/PaymentTransaction'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./PaymentTransaction')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialPayment = factory(root.OrderCloud.Sdk, root.OrderCloud.PaymentTransaction); + } +}(this, function(Sdk, PaymentTransaction) { + 'use strict'; + + + + + /** + * The PartialPayment model module. + * @module model/PartialPayment + */ + + /** + * Constructs a new PartialPayment. + * @alias module:model/PartialPayment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PartialPayment 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/PartialPayment} obj Optional instance to populate. + * @return {module:model/PartialPayment} The populated PartialPayment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = Sdk.convertToType(data['Type'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CreditCardID')) { + obj['CreditCardID'] = Sdk.convertToType(data['CreditCardID'], 'String'); + } + if (data.hasOwnProperty('SpendingAccountID')) { + obj['SpendingAccountID'] = Sdk.convertToType(data['SpendingAccountID'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = Sdk.convertToType(data['Amount'], 'Number'); + } + if (data.hasOwnProperty('Accepted')) { + obj['Accepted'] = Sdk.convertToType(data['Accepted'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('Transactions')) { + obj['Transactions'] = Sdk.convertToType(data['Transactions'], [PaymentTransaction]); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Type + */ + exports.prototype['Type'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CreditCardID + */ + exports.prototype['CreditCardID'] = undefined; + /** + * @member {String} SpendingAccountID + */ + exports.prototype['SpendingAccountID'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {Boolean} Accepted + */ + exports.prototype['Accepted'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} Transactions + */ + exports.prototype['Transactions'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./PaymentTransaction":191}],171:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialPaymentTransaction = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialPaymentTransaction model module. + * @module model/PartialPaymentTransaction + */ + + /** + * Constructs a new PartialPaymentTransaction. + * @alias module:model/PartialPaymentTransaction + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialPaymentTransaction 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/PartialPaymentTransaction} obj Optional instance to populate. + * @return {module:model/PartialPaymentTransaction} The populated PartialPaymentTransaction instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = Sdk.convertToType(data['Type'], 'String'); + } + if (data.hasOwnProperty('DateExecuted')) { + obj['DateExecuted'] = Sdk.convertToType(data['DateExecuted'], 'String'); + } + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = Sdk.convertToType(data['Amount'], 'Number'); + } + if (data.hasOwnProperty('Succeeded')) { + obj['Succeeded'] = Sdk.convertToType(data['Succeeded'], 'Boolean'); + } + if (data.hasOwnProperty('ResultCode')) { + obj['ResultCode'] = Sdk.convertToType(data['ResultCode'], 'String'); + } + if (data.hasOwnProperty('ResultMessage')) { + obj['ResultMessage'] = Sdk.convertToType(data['ResultMessage'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Type + */ + exports.prototype['Type'] = undefined; + /** + * @member {String} DateExecuted + */ + exports.prototype['DateExecuted'] = undefined; + /** + * @member {Number} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {Boolean} Succeeded + */ + exports.prototype['Succeeded'] = undefined; + /** + * @member {String} ResultCode + */ + exports.prototype['ResultCode'] = undefined; + /** + * @member {String} ResultMessage + */ + exports.prototype['ResultMessage'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],172:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialPriceBreak = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialPriceBreak model module. + * @module model/PartialPriceBreak + */ + + /** + * Constructs a new PartialPriceBreak. + * @alias module:model/PartialPriceBreak + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a PartialPriceBreak 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/PartialPriceBreak} obj Optional instance to populate. + * @return {module:model/PartialPriceBreak} The populated PartialPriceBreak instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Quantity')) { + obj['Quantity'] = Sdk.convertToType(data['Quantity'], 'Number'); + } + if (data.hasOwnProperty('Price')) { + obj['Price'] = Sdk.convertToType(data['Price'], 'Number'); + } + } + return obj; + } + + /** + * @member {Number} Quantity + */ + exports.prototype['Quantity'] = undefined; + /** + * @member {Number} Price + */ + exports.prototype['Price'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],173:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/PriceBreak'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./PriceBreak')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialPriceSchedule = factory(root.OrderCloud.Sdk, root.OrderCloud.PriceBreak); + } +}(this, function(Sdk, PriceBreak) { + 'use strict'; + + + + + /** + * The PartialPriceSchedule model module. + * @module model/PartialPriceSchedule + */ + + /** + * Constructs a new PartialPriceSchedule. + * @alias module:model/PartialPriceSchedule + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PartialPriceSchedule 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/PartialPriceSchedule} obj Optional instance to populate. + * @return {module:model/PartialPriceSchedule} The populated PartialPriceSchedule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('ApplyTax')) { + obj['ApplyTax'] = Sdk.convertToType(data['ApplyTax'], 'Boolean'); + } + if (data.hasOwnProperty('ApplyShipping')) { + obj['ApplyShipping'] = Sdk.convertToType(data['ApplyShipping'], 'Boolean'); + } + if (data.hasOwnProperty('MinQuantity')) { + obj['MinQuantity'] = Sdk.convertToType(data['MinQuantity'], 'Number'); + } + if (data.hasOwnProperty('MaxQuantity')) { + obj['MaxQuantity'] = Sdk.convertToType(data['MaxQuantity'], 'Number'); + } + if (data.hasOwnProperty('UseCumulativeQuantity')) { + obj['UseCumulativeQuantity'] = Sdk.convertToType(data['UseCumulativeQuantity'], 'Boolean'); + } + if (data.hasOwnProperty('RestrictedQuantity')) { + obj['RestrictedQuantity'] = Sdk.convertToType(data['RestrictedQuantity'], 'Boolean'); + } + if (data.hasOwnProperty('PriceBreaks')) { + obj['PriceBreaks'] = Sdk.convertToType(data['PriceBreaks'], [PriceBreak]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Boolean} ApplyTax + */ + exports.prototype['ApplyTax'] = undefined; + /** + * @member {Boolean} ApplyShipping + */ + exports.prototype['ApplyShipping'] = undefined; + /** + * @member {Number} MinQuantity + */ + exports.prototype['MinQuantity'] = undefined; + /** + * @member {Number} MaxQuantity + */ + exports.prototype['MaxQuantity'] = undefined; + /** + * @member {Boolean} UseCumulativeQuantity + */ + exports.prototype['UseCumulativeQuantity'] = undefined; + /** + * @member {Boolean} RestrictedQuantity + */ + exports.prototype['RestrictedQuantity'] = undefined; + /** + * @member {Array.} PriceBreaks + */ + exports.prototype['PriceBreaks'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./PriceBreak":192}],174:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Inventory'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Inventory')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialProduct = factory(root.OrderCloud.Sdk, root.OrderCloud.Inventory); + } +}(this, function(Sdk, Inventory) { + 'use strict'; + + + + + /** + * The PartialProduct model module. + * @module model/PartialProduct + */ + + /** + * Constructs a new PartialProduct. + * @alias module:model/PartialProduct + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialProduct 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/PartialProduct} obj Optional instance to populate. + * @return {module:model/PartialProduct} The populated PartialProduct instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('DefaultPriceScheduleID')) { + obj['DefaultPriceScheduleID'] = Sdk.convertToType(data['DefaultPriceScheduleID'], 'String'); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('QuantityMultiplier')) { + obj['QuantityMultiplier'] = Sdk.convertToType(data['QuantityMultiplier'], 'Number'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('SpecCount')) { + obj['SpecCount'] = Sdk.convertToType(data['SpecCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('VariantCount')) { + obj['VariantCount'] = Sdk.convertToType(data['VariantCount'], 'Number'); + } + if (data.hasOwnProperty('ShipFromAddressID')) { + obj['ShipFromAddressID'] = Sdk.convertToType(data['ShipFromAddressID'], 'String'); + } + if (data.hasOwnProperty('Inventory')) { + obj['Inventory'] = Inventory.constructFromObject(data['Inventory']); + } + if (data.hasOwnProperty('DefaultSupplierID')) { + obj['DefaultSupplierID'] = Sdk.convertToType(data['DefaultSupplierID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} DefaultPriceScheduleID + */ + exports.prototype['DefaultPriceScheduleID'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} QuantityMultiplier + */ + exports.prototype['QuantityMultiplier'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} SpecCount + */ + exports.prototype['SpecCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Number} VariantCount + */ + exports.prototype['VariantCount'] = undefined; + /** + * @member {String} ShipFromAddressID + */ + exports.prototype['ShipFromAddressID'] = undefined; + /** + * @member {module:model/Inventory} Inventory + */ + exports.prototype['Inventory'] = undefined; + /** + * @member {String} DefaultSupplierID + */ + exports.prototype['DefaultSupplierID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Inventory":74}],175:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialProductFacet = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialProductFacet model module. + * @module model/PartialProductFacet + */ + + /** + * Constructs a new PartialProductFacet. + * @alias module:model/PartialProductFacet + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a PartialProductFacet 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/PartialProductFacet} obj Optional instance to populate. + * @return {module:model/PartialProductFacet} The populated PartialProductFacet instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('XpPath')) { + obj['XpPath'] = Sdk.convertToType(data['XpPath'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('MinCount')) { + obj['MinCount'] = Sdk.convertToType(data['MinCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} XpPath + */ + exports.prototype['XpPath'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Number} MinCount + */ + exports.prototype['MinCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],176:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialPromotion = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialPromotion model module. + * @module model/PartialPromotion + */ + + /** + * Constructs a new PartialPromotion. + * @alias module:model/PartialPromotion + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialPromotion 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/PartialPromotion} obj Optional instance to populate. + * @return {module:model/PartialPromotion} The populated PartialPromotion instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Code')) { + obj['Code'] = Sdk.convertToType(data['Code'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('RedemptionLimit')) { + obj['RedemptionLimit'] = Sdk.convertToType(data['RedemptionLimit'], 'Number'); + } + if (data.hasOwnProperty('RedemptionLimitPerUser')) { + obj['RedemptionLimitPerUser'] = Sdk.convertToType(data['RedemptionLimitPerUser'], 'Number'); + } + if (data.hasOwnProperty('RedemptionCount')) { + obj['RedemptionCount'] = Sdk.convertToType(data['RedemptionCount'], 'Number'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('FinePrint')) { + obj['FinePrint'] = Sdk.convertToType(data['FinePrint'], 'String'); + } + if (data.hasOwnProperty('StartDate')) { + obj['StartDate'] = Sdk.convertToType(data['StartDate'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('EligibleExpression')) { + obj['EligibleExpression'] = Sdk.convertToType(data['EligibleExpression'], 'String'); + } + if (data.hasOwnProperty('ValueExpression')) { + obj['ValueExpression'] = Sdk.convertToType(data['ValueExpression'], 'String'); + } + if (data.hasOwnProperty('CanCombine')) { + obj['CanCombine'] = Sdk.convertToType(data['CanCombine'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Code + */ + exports.prototype['Code'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} RedemptionLimit + */ + exports.prototype['RedemptionLimit'] = undefined; + /** + * @member {Number} RedemptionLimitPerUser + */ + exports.prototype['RedemptionLimitPerUser'] = undefined; + /** + * @member {Number} RedemptionCount + */ + exports.prototype['RedemptionCount'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} FinePrint + */ + exports.prototype['FinePrint'] = undefined; + /** + * @member {String} StartDate + */ + exports.prototype['StartDate'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {String} EligibleExpression + */ + exports.prototype['EligibleExpression'] = undefined; + /** + * @member {String} ValueExpression + */ + exports.prototype['ValueExpression'] = undefined; + /** + * @member {Boolean} CanCombine + */ + exports.prototype['CanCombine'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],177:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialShipment = factory(root.OrderCloud.Sdk, root.OrderCloud.Address); + } +}(this, function(Sdk, Address) { + 'use strict'; + + + + + /** + * The PartialShipment model module. + * @module model/PartialShipment + */ + + /** + * Constructs a new PartialShipment. + * @alias module:model/PartialShipment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialShipment 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/PartialShipment} obj Optional instance to populate. + * @return {module:model/PartialShipment} The populated PartialShipment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('Shipper')) { + obj['Shipper'] = Sdk.convertToType(data['Shipper'], 'String'); + } + if (data.hasOwnProperty('DateShipped')) { + obj['DateShipped'] = Sdk.convertToType(data['DateShipped'], 'String'); + } + if (data.hasOwnProperty('DateDelivered')) { + obj['DateDelivered'] = Sdk.convertToType(data['DateDelivered'], 'String'); + } + if (data.hasOwnProperty('TrackingNumber')) { + obj['TrackingNumber'] = Sdk.convertToType(data['TrackingNumber'], 'String'); + } + if (data.hasOwnProperty('Cost')) { + obj['Cost'] = Sdk.convertToType(data['Cost'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('Account')) { + obj['Account'] = Sdk.convertToType(data['Account'], 'String'); + } + if (data.hasOwnProperty('FromAddressID')) { + obj['FromAddressID'] = Sdk.convertToType(data['FromAddressID'], 'String'); + } + if (data.hasOwnProperty('ToAddressID')) { + obj['ToAddressID'] = Sdk.convertToType(data['ToAddressID'], 'String'); + } + if (data.hasOwnProperty('FromAddress')) { + obj['FromAddress'] = Address.constructFromObject(data['FromAddress']); + } + if (data.hasOwnProperty('ToAddress')) { + obj['ToAddress'] = Address.constructFromObject(data['ToAddress']); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} Shipper + */ + exports.prototype['Shipper'] = undefined; + /** + * @member {String} DateShipped + */ + exports.prototype['DateShipped'] = undefined; + /** + * @member {String} DateDelivered + */ + exports.prototype['DateDelivered'] = undefined; + /** + * @member {String} TrackingNumber + */ + exports.prototype['TrackingNumber'] = undefined; + /** + * @member {Number} Cost + */ + exports.prototype['Cost'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {String} Account + */ + exports.prototype['Account'] = undefined; + /** + * @member {String} FromAddressID + */ + exports.prototype['FromAddressID'] = undefined; + /** + * @member {String} ToAddressID + */ + exports.prototype['ToAddressID'] = undefined; + /** + * @member {module:model/Address} FromAddress + */ + exports.prototype['FromAddress'] = undefined; + /** + * @member {module:model/Address} ToAddress + */ + exports.prototype['ToAddress'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52}],178:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialSpec = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialSpec model module. + * @module model/PartialSpec + */ + + /** + * Constructs a new PartialSpec. + * @alias module:model/PartialSpec + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PartialSpec 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/PartialSpec} obj Optional instance to populate. + * @return {module:model/PartialSpec} The populated PartialSpec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('OptionCount')) { + obj['OptionCount'] = Sdk.convertToType(data['OptionCount'], 'Number'); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('DefaultValue')) { + obj['DefaultValue'] = Sdk.convertToType(data['DefaultValue'], 'String'); + } + if (data.hasOwnProperty('Required')) { + obj['Required'] = Sdk.convertToType(data['Required'], 'Boolean'); + } + if (data.hasOwnProperty('AllowOpenText')) { + obj['AllowOpenText'] = Sdk.convertToType(data['AllowOpenText'], 'Boolean'); + } + if (data.hasOwnProperty('DefaultOptionID')) { + obj['DefaultOptionID'] = Sdk.convertToType(data['DefaultOptionID'], 'String'); + } + if (data.hasOwnProperty('DefinesVariant')) { + obj['DefinesVariant'] = Sdk.convertToType(data['DefinesVariant'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {Number} OptionCount + */ + exports.prototype['OptionCount'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} DefaultValue + */ + exports.prototype['DefaultValue'] = undefined; + /** + * @member {Boolean} Required + */ + exports.prototype['Required'] = undefined; + /** + * @member {Boolean} AllowOpenText + */ + exports.prototype['AllowOpenText'] = undefined; + /** + * @member {String} DefaultOptionID + */ + exports.prototype['DefaultOptionID'] = undefined; + /** + * @member {Boolean} DefinesVariant + */ + exports.prototype['DefinesVariant'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],179:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialSpecOption = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialSpecOption model module. + * @module model/PartialSpecOption + */ + + /** + * Constructs a new PartialSpecOption. + * @alias module:model/PartialSpecOption + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + }; + + /** + * Constructs a PartialSpecOption 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/PartialSpecOption} obj Optional instance to populate. + * @return {module:model/PartialSpecOption} The populated PartialSpecOption instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Value')) { + obj['Value'] = Sdk.convertToType(data['Value'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('IsOpenText')) { + obj['IsOpenText'] = Sdk.convertToType(data['IsOpenText'], 'Boolean'); + } + if (data.hasOwnProperty('PriceMarkupType')) { + obj['PriceMarkupType'] = Sdk.convertToType(data['PriceMarkupType'], 'String'); + } + if (data.hasOwnProperty('PriceMarkup')) { + obj['PriceMarkup'] = Sdk.convertToType(data['PriceMarkup'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Boolean} IsOpenText + */ + exports.prototype['IsOpenText'] = undefined; + /** + * @member {String} PriceMarkupType + */ + exports.prototype['PriceMarkupType'] = undefined; + /** + * @member {Number} PriceMarkup + */ + exports.prototype['PriceMarkup'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],180:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialSpendingAccount = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialSpendingAccount model module. + * @module model/PartialSpendingAccount + */ + + /** + * Constructs a new PartialSpendingAccount. + * @alias module:model/PartialSpendingAccount + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PartialSpendingAccount 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/PartialSpendingAccount} obj Optional instance to populate. + * @return {module:model/PartialSpendingAccount} The populated PartialSpendingAccount instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Balance')) { + obj['Balance'] = Sdk.convertToType(data['Balance'], 'Number'); + } + if (data.hasOwnProperty('AllowAsPaymentMethod')) { + obj['AllowAsPaymentMethod'] = Sdk.convertToType(data['AllowAsPaymentMethod'], 'Boolean'); + } + if (data.hasOwnProperty('RedemptionCode')) { + obj['RedemptionCode'] = Sdk.convertToType(data['RedemptionCode'], 'String'); + } + if (data.hasOwnProperty('StartDate')) { + obj['StartDate'] = Sdk.convertToType(data['StartDate'], 'String'); + } + if (data.hasOwnProperty('EndDate')) { + obj['EndDate'] = Sdk.convertToType(data['EndDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} Balance + */ + exports.prototype['Balance'] = undefined; + /** + * @member {Boolean} AllowAsPaymentMethod + */ + exports.prototype['AllowAsPaymentMethod'] = undefined; + /** + * @member {String} RedemptionCode + */ + exports.prototype['RedemptionCode'] = undefined; + /** + * @member {String} StartDate + */ + exports.prototype['StartDate'] = undefined; + /** + * @member {String} EndDate + */ + exports.prototype['EndDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],181:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialSupplier = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialSupplier model module. + * @module model/PartialSupplier + */ + + /** + * Constructs a new PartialSupplier. + * @alias module:model/PartialSupplier + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PartialSupplier 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/PartialSupplier} obj Optional instance to populate. + * @return {module:model/PartialSupplier} The populated PartialSupplier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],182:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialUser = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialUser model module. + * @module model/PartialUser + */ + + /** + * Constructs a new PartialUser. + * @alias module:model/PartialUser + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + }; + + /** + * Constructs a PartialUser 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/PartialUser} obj Optional instance to populate. + * @return {module:model/PartialUser} The populated PartialUser instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('Password')) { + obj['Password'] = Sdk.convertToType(data['Password'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Email')) { + obj['Email'] = Sdk.convertToType(data['Email'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('TermsAccepted')) { + obj['TermsAccepted'] = Sdk.convertToType(data['TermsAccepted'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AvailableRoles')) { + obj['AvailableRoles'] = Sdk.convertToType(data['AvailableRoles'], ['String']); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} Password + */ + exports.prototype['Password'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Email + */ + exports.prototype['Email'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} TermsAccepted + */ + exports.prototype['TermsAccepted'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} AvailableRoles + */ + exports.prototype['AvailableRoles'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],183:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialUserGroup = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialUserGroup model module. + * @module model/PartialUserGroup + */ + + /** + * Constructs a new PartialUserGroup. + * @alias module:model/PartialUserGroup + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PartialUserGroup 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/PartialUserGroup} obj Optional instance to populate. + * @return {module:model/PartialUserGroup} The populated PartialUserGroup instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],184:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/VariantInventory'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./VariantInventory')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialVariant = factory(root.OrderCloud.Sdk, root.OrderCloud.VariantInventory); + } +}(this, function(Sdk, VariantInventory) { + 'use strict'; + + + + + /** + * The PartialVariant model module. + * @module model/PartialVariant + */ + + /** + * Constructs a new PartialVariant. + * @alias module:model/PartialVariant + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PartialVariant 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/PartialVariant} obj Optional instance to populate. + * @return {module:model/PartialVariant} The populated PartialVariant instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('Inventory')) { + obj['Inventory'] = VariantInventory.constructFromObject(data['Inventory']); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {module:model/VariantInventory} Inventory + */ + exports.prototype['Inventory'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./VariantInventory":215}],185:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialVariantInventory = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialVariantInventory model module. + * @module model/PartialVariantInventory + */ + + /** + * Constructs a new PartialVariantInventory. + * @alias module:model/PartialVariantInventory + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a PartialVariantInventory 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/PartialVariantInventory} obj Optional instance to populate. + * @return {module:model/PartialVariantInventory} The populated PartialVariantInventory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('QuantityAvailable')) { + obj['QuantityAvailable'] = Sdk.convertToType(data['QuantityAvailable'], 'Number'); + } + if (data.hasOwnProperty('LastUpdated')) { + obj['LastUpdated'] = Sdk.convertToType(data['LastUpdated'], 'String'); + } + } + return obj; + } + + /** + * @member {Number} QuantityAvailable + */ + exports.prototype['QuantityAvailable'] = undefined; + /** + * @member {String} LastUpdated + */ + exports.prototype['LastUpdated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],186:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/WebhookRoute'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./WebhookRoute')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialWebhook = factory(root.OrderCloud.Sdk, root.OrderCloud.WebhookRoute); + } +}(this, function(Sdk, WebhookRoute) { + 'use strict'; + + + + + /** + * The PartialWebhook model module. + * @module model/PartialWebhook + */ + + /** + * Constructs a new PartialWebhook. + * @alias module:model/PartialWebhook + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PartialWebhook 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/PartialWebhook} obj Optional instance to populate. + * @return {module:model/PartialWebhook} The populated PartialWebhook instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Url')) { + obj['Url'] = Sdk.convertToType(data['Url'], 'String'); + } + if (data.hasOwnProperty('HashKey')) { + obj['HashKey'] = Sdk.convertToType(data['HashKey'], 'String'); + } + if (data.hasOwnProperty('ElevatedRoles')) { + obj['ElevatedRoles'] = Sdk.convertToType(data['ElevatedRoles'], ['String']); + } + if (data.hasOwnProperty('ConfigData')) { + obj['ConfigData'] = Sdk.convertToType(data['ConfigData'], Object); + } + if (data.hasOwnProperty('BeforeProcessRequest')) { + obj['BeforeProcessRequest'] = Sdk.convertToType(data['BeforeProcessRequest'], 'Boolean'); + } + if (data.hasOwnProperty('ApiClientIDs')) { + obj['ApiClientIDs'] = Sdk.convertToType(data['ApiClientIDs'], ['String']); + } + if (data.hasOwnProperty('WebhookRoutes')) { + obj['WebhookRoutes'] = Sdk.convertToType(data['WebhookRoutes'], [WebhookRoute]); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} Url + */ + exports.prototype['Url'] = undefined; + /** + * @member {String} HashKey + */ + exports.prototype['HashKey'] = undefined; + /** + * @member {Array.} ElevatedRoles + */ + exports.prototype['ElevatedRoles'] = undefined; + /** + * @member {Object} ConfigData + */ + exports.prototype['ConfigData'] = undefined; + /** + * @member {Boolean} BeforeProcessRequest + */ + exports.prototype['BeforeProcessRequest'] = undefined; + /** + * @member {Array.} ApiClientIDs + */ + exports.prototype['ApiClientIDs'] = undefined; + /** + * @member {Array.} WebhookRoutes + */ + exports.prototype['WebhookRoutes'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./WebhookRoute":217}],187:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PartialWebhookRoute = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PartialWebhookRoute model module. + * @module model/PartialWebhookRoute + */ + + /** + * Constructs a new PartialWebhookRoute. + * @alias module:model/PartialWebhookRoute + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a PartialWebhookRoute 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/PartialWebhookRoute} obj Optional instance to populate. + * @return {module:model/PartialWebhookRoute} The populated PartialWebhookRoute instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Route')) { + obj['Route'] = Sdk.convertToType(data['Route'], 'String'); + } + if (data.hasOwnProperty('Verb')) { + obj['Verb'] = Sdk.convertToType(data['Verb'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Route + */ + exports.prototype['Route'] = undefined; + /** + * @member {String} Verb + */ + exports.prototype['Verb'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],188:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PasswordReset = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PasswordReset model module. + * @module model/PasswordReset + */ + + /** + * Constructs a new PasswordReset. + * @alias module:model/PasswordReset + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a PasswordReset 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/PasswordReset} obj Optional instance to populate. + * @return {module:model/PasswordReset} The populated PasswordReset instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ClientID')) { + obj['ClientID'] = Sdk.convertToType(data['ClientID'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('Password')) { + obj['Password'] = Sdk.convertToType(data['Password'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ClientID + */ + exports.prototype['ClientID'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} Password + */ + exports.prototype['Password'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],189:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PasswordResetRequest = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PasswordResetRequest model module. + * @module model/PasswordResetRequest + */ + + /** + * Constructs a new PasswordResetRequest. + * @alias module:model/PasswordResetRequest + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a PasswordResetRequest 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/PasswordResetRequest} obj Optional instance to populate. + * @return {module:model/PasswordResetRequest} The populated PasswordResetRequest instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ClientID')) { + obj['ClientID'] = Sdk.convertToType(data['ClientID'], 'String'); + } + if (data.hasOwnProperty('Email')) { + obj['Email'] = Sdk.convertToType(data['Email'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('URL')) { + obj['URL'] = Sdk.convertToType(data['URL'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ClientID + */ + exports.prototype['ClientID'] = undefined; + /** + * @member {String} Email + */ + exports.prototype['Email'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} URL + */ + exports.prototype['URL'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],190:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/PaymentTransaction'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./PaymentTransaction')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Payment = factory(root.OrderCloud.Sdk, root.OrderCloud.PaymentTransaction); + } +}(this, function(Sdk, PaymentTransaction) { + 'use strict'; + + + + + /** + * The Payment model module. + * @module model/Payment + */ + + /** + * Constructs a new Payment. + * @alias module:model/Payment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a Payment 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/Payment} obj Optional instance to populate. + * @return {module:model/Payment} The populated Payment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = Sdk.convertToType(data['Type'], 'String'); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + if (data.hasOwnProperty('CreditCardID')) { + obj['CreditCardID'] = Sdk.convertToType(data['CreditCardID'], 'String'); + } + if (data.hasOwnProperty('SpendingAccountID')) { + obj['SpendingAccountID'] = Sdk.convertToType(data['SpendingAccountID'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = Sdk.convertToType(data['Amount'], 'Number'); + } + if (data.hasOwnProperty('Accepted')) { + obj['Accepted'] = Sdk.convertToType(data['Accepted'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('Transactions')) { + obj['Transactions'] = Sdk.convertToType(data['Transactions'], [PaymentTransaction]); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Type + */ + exports.prototype['Type'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + /** + * @member {String} CreditCardID + */ + exports.prototype['CreditCardID'] = undefined; + /** + * @member {String} SpendingAccountID + */ + exports.prototype['SpendingAccountID'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {Boolean} Accepted + */ + exports.prototype['Accepted'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} Transactions + */ + exports.prototype['Transactions'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./PaymentTransaction":191}],191:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PaymentTransaction = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PaymentTransaction model module. + * @module model/PaymentTransaction + */ + + /** + * Constructs a new PaymentTransaction. + * @alias module:model/PaymentTransaction + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a PaymentTransaction 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/PaymentTransaction} obj Optional instance to populate. + * @return {module:model/PaymentTransaction} The populated PaymentTransaction instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = Sdk.convertToType(data['Type'], 'String'); + } + if (data.hasOwnProperty('DateExecuted')) { + obj['DateExecuted'] = Sdk.convertToType(data['DateExecuted'], 'String'); + } + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = Sdk.convertToType(data['Amount'], 'Number'); + } + if (data.hasOwnProperty('Succeeded')) { + obj['Succeeded'] = Sdk.convertToType(data['Succeeded'], 'Boolean'); + } + if (data.hasOwnProperty('ResultCode')) { + obj['ResultCode'] = Sdk.convertToType(data['ResultCode'], 'String'); + } + if (data.hasOwnProperty('ResultMessage')) { + obj['ResultMessage'] = Sdk.convertToType(data['ResultMessage'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Type + */ + exports.prototype['Type'] = undefined; + /** + * @member {String} DateExecuted + */ + exports.prototype['DateExecuted'] = undefined; + /** + * @member {Number} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {Boolean} Succeeded + */ + exports.prototype['Succeeded'] = undefined; + /** + * @member {String} ResultCode + */ + exports.prototype['ResultCode'] = undefined; + /** + * @member {String} ResultMessage + */ + exports.prototype['ResultMessage'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],192:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PriceBreak = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PriceBreak model module. + * @module model/PriceBreak + */ + + /** + * Constructs a new PriceBreak. + * @alias module:model/PriceBreak + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a PriceBreak 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/PriceBreak} obj Optional instance to populate. + * @return {module:model/PriceBreak} The populated PriceBreak instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Quantity')) { + obj['Quantity'] = Sdk.convertToType(data['Quantity'], 'Number'); + } + if (data.hasOwnProperty('Price')) { + obj['Price'] = Sdk.convertToType(data['Price'], 'Number'); + } + } + return obj; + } + + /** + * @member {Number} Quantity + */ + exports.prototype['Quantity'] = undefined; + /** + * @member {Number} Price + */ + exports.prototype['Price'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],193:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/PriceBreak'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./PriceBreak')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PriceSchedule = factory(root.OrderCloud.Sdk, root.OrderCloud.PriceBreak); + } +}(this, function(Sdk, PriceBreak) { + 'use strict'; + + + + + /** + * The PriceSchedule model module. + * @module model/PriceSchedule + */ + + /** + * Constructs a new PriceSchedule. + * @alias module:model/PriceSchedule + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a PriceSchedule 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/PriceSchedule} obj Optional instance to populate. + * @return {module:model/PriceSchedule} The populated PriceSchedule instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('ApplyTax')) { + obj['ApplyTax'] = Sdk.convertToType(data['ApplyTax'], 'Boolean'); + } + if (data.hasOwnProperty('ApplyShipping')) { + obj['ApplyShipping'] = Sdk.convertToType(data['ApplyShipping'], 'Boolean'); + } + if (data.hasOwnProperty('MinQuantity')) { + obj['MinQuantity'] = Sdk.convertToType(data['MinQuantity'], 'Number'); + } + if (data.hasOwnProperty('MaxQuantity')) { + obj['MaxQuantity'] = Sdk.convertToType(data['MaxQuantity'], 'Number'); + } + if (data.hasOwnProperty('UseCumulativeQuantity')) { + obj['UseCumulativeQuantity'] = Sdk.convertToType(data['UseCumulativeQuantity'], 'Boolean'); + } + if (data.hasOwnProperty('RestrictedQuantity')) { + obj['RestrictedQuantity'] = Sdk.convertToType(data['RestrictedQuantity'], 'Boolean'); + } + if (data.hasOwnProperty('PriceBreaks')) { + obj['PriceBreaks'] = Sdk.convertToType(data['PriceBreaks'], [PriceBreak]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Boolean} ApplyTax + */ + exports.prototype['ApplyTax'] = undefined; + /** + * @member {Boolean} ApplyShipping + */ + exports.prototype['ApplyShipping'] = undefined; + /** + * @member {Number} MinQuantity + */ + exports.prototype['MinQuantity'] = undefined; + /** + * @member {Number} MaxQuantity + */ + exports.prototype['MaxQuantity'] = undefined; + /** + * @member {Boolean} UseCumulativeQuantity + */ + exports.prototype['UseCumulativeQuantity'] = undefined; + /** + * @member {Boolean} RestrictedQuantity + */ + exports.prototype['RestrictedQuantity'] = undefined; + /** + * @member {Array.} PriceBreaks + */ + exports.prototype['PriceBreaks'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./PriceBreak":192}],194:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Inventory'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Inventory')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Product = factory(root.OrderCloud.Sdk, root.OrderCloud.Inventory); + } +}(this, function(Sdk, Inventory) { + 'use strict'; + + + + + /** + * The Product model module. + * @module model/Product + */ + + /** + * Constructs a new Product. + * @alias module:model/Product + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + + + }; + + /** + * Constructs a Product 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/Product} obj Optional instance to populate. + * @return {module:model/Product} The populated Product instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('DefaultPriceScheduleID')) { + obj['DefaultPriceScheduleID'] = Sdk.convertToType(data['DefaultPriceScheduleID'], 'String'); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('QuantityMultiplier')) { + obj['QuantityMultiplier'] = Sdk.convertToType(data['QuantityMultiplier'], 'Number'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('SpecCount')) { + obj['SpecCount'] = Sdk.convertToType(data['SpecCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('VariantCount')) { + obj['VariantCount'] = Sdk.convertToType(data['VariantCount'], 'Number'); + } + if (data.hasOwnProperty('ShipFromAddressID')) { + obj['ShipFromAddressID'] = Sdk.convertToType(data['ShipFromAddressID'], 'String'); + } + if (data.hasOwnProperty('Inventory')) { + obj['Inventory'] = Inventory.constructFromObject(data['Inventory']); + } + if (data.hasOwnProperty('DefaultSupplierID')) { + obj['DefaultSupplierID'] = Sdk.convertToType(data['DefaultSupplierID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} DefaultPriceScheduleID + */ + exports.prototype['DefaultPriceScheduleID'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Number} QuantityMultiplier + */ + exports.prototype['QuantityMultiplier'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} SpecCount + */ + exports.prototype['SpecCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Number} VariantCount + */ + exports.prototype['VariantCount'] = undefined; + /** + * @member {String} ShipFromAddressID + */ + exports.prototype['ShipFromAddressID'] = undefined; + /** + * @member {module:model/Inventory} Inventory + */ + exports.prototype['Inventory'] = undefined; + /** + * @member {String} DefaultSupplierID + */ + exports.prototype['DefaultSupplierID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Inventory":74}],195:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ProductAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ProductAssignment model module. + * @module model/ProductAssignment + */ + + /** + * Constructs a new ProductAssignment. + * @alias module:model/ProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a ProductAssignment 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/ProductAssignment} obj Optional instance to populate. + * @return {module:model/ProductAssignment} The populated ProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('PriceScheduleID')) { + obj['PriceScheduleID'] = Sdk.convertToType(data['PriceScheduleID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {String} PriceScheduleID + */ + exports.prototype['PriceScheduleID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],196:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ProductCatalogAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ProductCatalogAssignment model module. + * @module model/ProductCatalogAssignment + */ + + /** + * Constructs a new ProductCatalogAssignment. + * @alias module:model/ProductCatalogAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a ProductCatalogAssignment 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/ProductCatalogAssignment} obj Optional instance to populate. + * @return {module:model/ProductCatalogAssignment} The populated ProductCatalogAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('CatalogID')) { + obj['CatalogID'] = Sdk.convertToType(data['CatalogID'], 'String'); + } + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} CatalogID + */ + exports.prototype['CatalogID'] = undefined; + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],197:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ProductFacet = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The ProductFacet model module. + * @module model/ProductFacet + */ + + /** + * Constructs a new ProductFacet. + * @alias module:model/ProductFacet + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a ProductFacet 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/ProductFacet} obj Optional instance to populate. + * @return {module:model/ProductFacet} The populated ProductFacet instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('XpPath')) { + obj['XpPath'] = Sdk.convertToType(data['XpPath'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('MinCount')) { + obj['MinCount'] = Sdk.convertToType(data['MinCount'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} XpPath + */ + exports.prototype['XpPath'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Number} MinCount + */ + exports.prototype['MinCount'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],198:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Promotion = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Promotion model module. + * @module model/Promotion + */ + + /** + * Constructs a new Promotion. + * @alias module:model/Promotion + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + + }; + + /** + * Constructs a Promotion 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/Promotion} obj Optional instance to populate. + * @return {module:model/Promotion} The populated Promotion instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Code')) { + obj['Code'] = Sdk.convertToType(data['Code'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('RedemptionLimit')) { + obj['RedemptionLimit'] = Sdk.convertToType(data['RedemptionLimit'], 'Number'); + } + if (data.hasOwnProperty('RedemptionLimitPerUser')) { + obj['RedemptionLimitPerUser'] = Sdk.convertToType(data['RedemptionLimitPerUser'], 'Number'); + } + if (data.hasOwnProperty('RedemptionCount')) { + obj['RedemptionCount'] = Sdk.convertToType(data['RedemptionCount'], 'Number'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('FinePrint')) { + obj['FinePrint'] = Sdk.convertToType(data['FinePrint'], 'String'); + } + if (data.hasOwnProperty('StartDate')) { + obj['StartDate'] = Sdk.convertToType(data['StartDate'], 'String'); + } + if (data.hasOwnProperty('ExpirationDate')) { + obj['ExpirationDate'] = Sdk.convertToType(data['ExpirationDate'], 'String'); + } + if (data.hasOwnProperty('EligibleExpression')) { + obj['EligibleExpression'] = Sdk.convertToType(data['EligibleExpression'], 'String'); + } + if (data.hasOwnProperty('ValueExpression')) { + obj['ValueExpression'] = Sdk.convertToType(data['ValueExpression'], 'String'); + } + if (data.hasOwnProperty('CanCombine')) { + obj['CanCombine'] = Sdk.convertToType(data['CanCombine'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Code + */ + exports.prototype['Code'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} RedemptionLimit + */ + exports.prototype['RedemptionLimit'] = undefined; + /** + * @member {Number} RedemptionLimitPerUser + */ + exports.prototype['RedemptionLimitPerUser'] = undefined; + /** + * @member {Number} RedemptionCount + */ + exports.prototype['RedemptionCount'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} FinePrint + */ + exports.prototype['FinePrint'] = undefined; + /** + * @member {String} StartDate + */ + exports.prototype['StartDate'] = undefined; + /** + * @member {String} ExpirationDate + */ + exports.prototype['ExpirationDate'] = undefined; + /** + * @member {String} EligibleExpression + */ + exports.prototype['EligibleExpression'] = undefined; + /** + * @member {String} ValueExpression + */ + exports.prototype['ValueExpression'] = undefined; + /** + * @member {Boolean} CanCombine + */ + exports.prototype['CanCombine'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],199:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.PromotionAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The PromotionAssignment model module. + * @module model/PromotionAssignment + */ + + /** + * Constructs a new PromotionAssignment. + * @alias module:model/PromotionAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a PromotionAssignment 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/PromotionAssignment} obj Optional instance to populate. + * @return {module:model/PromotionAssignment} The populated PromotionAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('PromotionID')) { + obj['PromotionID'] = Sdk.convertToType(data['PromotionID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} PromotionID + */ + exports.prototype['PromotionID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],200:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SecurityProfile = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SecurityProfile model module. + * @module model/SecurityProfile + */ + + /** + * Constructs a new SecurityProfile. + * @alias module:model/SecurityProfile + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a SecurityProfile 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/SecurityProfile} obj Optional instance to populate. + * @return {module:model/SecurityProfile} The populated SecurityProfile instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Roles')) { + obj['Roles'] = Sdk.convertToType(data['Roles'], ['String']); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Array.} Roles + */ + exports.prototype['Roles'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],201:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SecurityProfileAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SecurityProfileAssignment model module. + * @module model/SecurityProfileAssignment + */ + + /** + * Constructs a new SecurityProfileAssignment. + * @alias module:model/SecurityProfileAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + }; + + /** + * Constructs a SecurityProfileAssignment 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/SecurityProfileAssignment} obj Optional instance to populate. + * @return {module:model/SecurityProfileAssignment} The populated SecurityProfileAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('SecurityProfileID')) { + obj['SecurityProfileID'] = Sdk.convertToType(data['SecurityProfileID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('SupplierID')) { + obj['SupplierID'] = Sdk.convertToType(data['SupplierID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} SecurityProfileID + */ + exports.prototype['SecurityProfileID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} SupplierID + */ + exports.prototype['SupplierID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],202:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/Address'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./Address')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Shipment = factory(root.OrderCloud.Sdk, root.OrderCloud.Address); + } +}(this, function(Sdk, Address) { + 'use strict'; + + + + + /** + * The Shipment model module. + * @module model/Shipment + */ + + /** + * Constructs a new Shipment. + * @alias module:model/Shipment + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + + }; + + /** + * Constructs a Shipment 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/Shipment} obj Optional instance to populate. + * @return {module:model/Shipment} The populated Shipment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('BuyerID')) { + obj['BuyerID'] = Sdk.convertToType(data['BuyerID'], 'String'); + } + if (data.hasOwnProperty('Shipper')) { + obj['Shipper'] = Sdk.convertToType(data['Shipper'], 'String'); + } + if (data.hasOwnProperty('DateShipped')) { + obj['DateShipped'] = Sdk.convertToType(data['DateShipped'], 'String'); + } + if (data.hasOwnProperty('DateDelivered')) { + obj['DateDelivered'] = Sdk.convertToType(data['DateDelivered'], 'String'); + } + if (data.hasOwnProperty('TrackingNumber')) { + obj['TrackingNumber'] = Sdk.convertToType(data['TrackingNumber'], 'String'); + } + if (data.hasOwnProperty('Cost')) { + obj['Cost'] = Sdk.convertToType(data['Cost'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('Account')) { + obj['Account'] = Sdk.convertToType(data['Account'], 'String'); + } + if (data.hasOwnProperty('FromAddressID')) { + obj['FromAddressID'] = Sdk.convertToType(data['FromAddressID'], 'String'); + } + if (data.hasOwnProperty('ToAddressID')) { + obj['ToAddressID'] = Sdk.convertToType(data['ToAddressID'], 'String'); + } + if (data.hasOwnProperty('FromAddress')) { + obj['FromAddress'] = Address.constructFromObject(data['FromAddress']); + } + if (data.hasOwnProperty('ToAddress')) { + obj['ToAddress'] = Address.constructFromObject(data['ToAddress']); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} BuyerID + */ + exports.prototype['BuyerID'] = undefined; + /** + * @member {String} Shipper + */ + exports.prototype['Shipper'] = undefined; + /** + * @member {String} DateShipped + */ + exports.prototype['DateShipped'] = undefined; + /** + * @member {String} DateDelivered + */ + exports.prototype['DateDelivered'] = undefined; + /** + * @member {String} TrackingNumber + */ + exports.prototype['TrackingNumber'] = undefined; + /** + * @member {Number} Cost + */ + exports.prototype['Cost'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {String} Account + */ + exports.prototype['Account'] = undefined; + /** + * @member {String} FromAddressID + */ + exports.prototype['FromAddressID'] = undefined; + /** + * @member {String} ToAddressID + */ + exports.prototype['ToAddressID'] = undefined; + /** + * @member {module:model/Address} FromAddress + */ + exports.prototype['FromAddress'] = undefined; + /** + * @member {module:model/Address} ToAddress + */ + exports.prototype['ToAddress'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./Address":52}],203:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/LineItemProduct', 'model/LineItemSpec', 'model/LineItemVariant'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./LineItemProduct'), require('./LineItemSpec'), require('./LineItemVariant')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.ShipmentItem = factory(root.OrderCloud.Sdk, root.OrderCloud.LineItemProduct, root.OrderCloud.LineItemSpec, root.OrderCloud.LineItemVariant); + } +}(this, function(Sdk, LineItemProduct, LineItemSpec, LineItemVariant) { + 'use strict'; + + + + + /** + * The ShipmentItem model module. + * @module model/ShipmentItem + */ + + /** + * Constructs a new ShipmentItem. + * @alias module:model/ShipmentItem + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a ShipmentItem 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/ShipmentItem} obj Optional instance to populate. + * @return {module:model/ShipmentItem} The populated ShipmentItem instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('OrderID')) { + obj['OrderID'] = Sdk.convertToType(data['OrderID'], 'String'); + } + if (data.hasOwnProperty('LineItemID')) { + obj['LineItemID'] = Sdk.convertToType(data['LineItemID'], 'String'); + } + if (data.hasOwnProperty('QuantityShipped')) { + obj['QuantityShipped'] = Sdk.convertToType(data['QuantityShipped'], 'Number'); + } + if (data.hasOwnProperty('UnitPrice')) { + obj['UnitPrice'] = Sdk.convertToType(data['UnitPrice'], 'Number'); + } + if (data.hasOwnProperty('CostCenter')) { + obj['CostCenter'] = Sdk.convertToType(data['CostCenter'], 'String'); + } + if (data.hasOwnProperty('DateNeeded')) { + obj['DateNeeded'] = Sdk.convertToType(data['DateNeeded'], 'String'); + } + if (data.hasOwnProperty('Product')) { + obj['Product'] = LineItemProduct.constructFromObject(data['Product']); + } + if (data.hasOwnProperty('Variant')) { + obj['Variant'] = LineItemVariant.constructFromObject(data['Variant']); + } + if (data.hasOwnProperty('Specs')) { + obj['Specs'] = Sdk.convertToType(data['Specs'], [LineItemSpec]); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} OrderID + */ + exports.prototype['OrderID'] = undefined; + /** + * @member {String} LineItemID + */ + exports.prototype['LineItemID'] = undefined; + /** + * @member {Number} QuantityShipped + */ + exports.prototype['QuantityShipped'] = undefined; + /** + * @member {Number} UnitPrice + */ + exports.prototype['UnitPrice'] = undefined; + /** + * @member {String} CostCenter + */ + exports.prototype['CostCenter'] = undefined; + /** + * @member {String} DateNeeded + */ + exports.prototype['DateNeeded'] = undefined; + /** + * @member {module:model/LineItemProduct} Product + */ + exports.prototype['Product'] = undefined; + /** + * @member {module:model/LineItemVariant} Variant + */ + exports.prototype['Variant'] = undefined; + /** + * @member {Array.} Specs + */ + exports.prototype['Specs'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./LineItemProduct":76,"./LineItemSpec":77,"./LineItemVariant":78}],204:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Spec = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Spec model module. + * @module model/Spec + */ + + /** + * Constructs a new Spec. + * @alias module:model/Spec + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a Spec 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/Spec} obj Optional instance to populate. + * @return {module:model/Spec} The populated Spec instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('OptionCount')) { + obj['OptionCount'] = Sdk.convertToType(data['OptionCount'], 'Number'); + } + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('DefaultValue')) { + obj['DefaultValue'] = Sdk.convertToType(data['DefaultValue'], 'String'); + } + if (data.hasOwnProperty('Required')) { + obj['Required'] = Sdk.convertToType(data['Required'], 'Boolean'); + } + if (data.hasOwnProperty('AllowOpenText')) { + obj['AllowOpenText'] = Sdk.convertToType(data['AllowOpenText'], 'Boolean'); + } + if (data.hasOwnProperty('DefaultOptionID')) { + obj['DefaultOptionID'] = Sdk.convertToType(data['DefaultOptionID'], 'String'); + } + if (data.hasOwnProperty('DefinesVariant')) { + obj['DefinesVariant'] = Sdk.convertToType(data['DefinesVariant'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {Number} OptionCount + */ + exports.prototype['OptionCount'] = undefined; + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} DefaultValue + */ + exports.prototype['DefaultValue'] = undefined; + /** + * @member {Boolean} Required + */ + exports.prototype['Required'] = undefined; + /** + * @member {Boolean} AllowOpenText + */ + exports.prototype['AllowOpenText'] = undefined; + /** + * @member {String} DefaultOptionID + */ + exports.prototype['DefaultOptionID'] = undefined; + /** + * @member {Boolean} DefinesVariant + */ + exports.prototype['DefinesVariant'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],205:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SpecOption = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SpecOption model module. + * @module model/SpecOption + */ + + /** + * Constructs a new SpecOption. + * @alias module:model/SpecOption + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + }; + + /** + * Constructs a SpecOption 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/SpecOption} obj Optional instance to populate. + * @return {module:model/SpecOption} The populated SpecOption instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Value')) { + obj['Value'] = Sdk.convertToType(data['Value'], 'String'); + } + if (data.hasOwnProperty('ListOrder')) { + obj['ListOrder'] = Sdk.convertToType(data['ListOrder'], 'Number'); + } + if (data.hasOwnProperty('IsOpenText')) { + obj['IsOpenText'] = Sdk.convertToType(data['IsOpenText'], 'Boolean'); + } + if (data.hasOwnProperty('PriceMarkupType')) { + obj['PriceMarkupType'] = Sdk.convertToType(data['PriceMarkupType'], 'String'); + } + if (data.hasOwnProperty('PriceMarkup')) { + obj['PriceMarkup'] = Sdk.convertToType(data['PriceMarkup'], 'Number'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + /** + * @member {Number} ListOrder + */ + exports.prototype['ListOrder'] = undefined; + /** + * @member {Boolean} IsOpenText + */ + exports.prototype['IsOpenText'] = undefined; + /** + * @member {String} PriceMarkupType + */ + exports.prototype['PriceMarkupType'] = undefined; + /** + * @member {Number} PriceMarkup + */ + exports.prototype['PriceMarkup'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],206:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SpecProductAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SpecProductAssignment model module. + * @module model/SpecProductAssignment + */ + + /** + * Constructs a new SpecProductAssignment. + * @alias module:model/SpecProductAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a SpecProductAssignment 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/SpecProductAssignment} obj Optional instance to populate. + * @return {module:model/SpecProductAssignment} The populated SpecProductAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('SpecID')) { + obj['SpecID'] = Sdk.convertToType(data['SpecID'], 'String'); + } + if (data.hasOwnProperty('ProductID')) { + obj['ProductID'] = Sdk.convertToType(data['ProductID'], 'String'); + } + if (data.hasOwnProperty('DefaultValue')) { + obj['DefaultValue'] = Sdk.convertToType(data['DefaultValue'], 'String'); + } + if (data.hasOwnProperty('DefaultOptionID')) { + obj['DefaultOptionID'] = Sdk.convertToType(data['DefaultOptionID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} SpecID + */ + exports.prototype['SpecID'] = undefined; + /** + * @member {String} ProductID + */ + exports.prototype['ProductID'] = undefined; + /** + * @member {String} DefaultValue + */ + exports.prototype['DefaultValue'] = undefined; + /** + * @member {String} DefaultOptionID + */ + exports.prototype['DefaultOptionID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],207:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SpendingAccount = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SpendingAccount model module. + * @module model/SpendingAccount + */ + + /** + * Constructs a new SpendingAccount. + * @alias module:model/SpendingAccount + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + }; + + /** + * Constructs a SpendingAccount 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/SpendingAccount} obj Optional instance to populate. + * @return {module:model/SpendingAccount} The populated SpendingAccount instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Balance')) { + obj['Balance'] = Sdk.convertToType(data['Balance'], 'Number'); + } + if (data.hasOwnProperty('AllowAsPaymentMethod')) { + obj['AllowAsPaymentMethod'] = Sdk.convertToType(data['AllowAsPaymentMethod'], 'Boolean'); + } + if (data.hasOwnProperty('RedemptionCode')) { + obj['RedemptionCode'] = Sdk.convertToType(data['RedemptionCode'], 'String'); + } + if (data.hasOwnProperty('StartDate')) { + obj['StartDate'] = Sdk.convertToType(data['StartDate'], 'String'); + } + if (data.hasOwnProperty('EndDate')) { + obj['EndDate'] = Sdk.convertToType(data['EndDate'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Number} Balance + */ + exports.prototype['Balance'] = undefined; + /** + * @member {Boolean} AllowAsPaymentMethod + */ + exports.prototype['AllowAsPaymentMethod'] = undefined; + /** + * @member {String} RedemptionCode + */ + exports.prototype['RedemptionCode'] = undefined; + /** + * @member {String} StartDate + */ + exports.prototype['StartDate'] = undefined; + /** + * @member {String} EndDate + */ + exports.prototype['EndDate'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],208:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.SpendingAccountAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The SpendingAccountAssignment model module. + * @module model/SpendingAccountAssignment + */ + + /** + * Constructs a new SpendingAccountAssignment. + * @alias module:model/SpendingAccountAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a SpendingAccountAssignment 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/SpendingAccountAssignment} obj Optional instance to populate. + * @return {module:model/SpendingAccountAssignment} The populated SpendingAccountAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('SpendingAccountID')) { + obj['SpendingAccountID'] = Sdk.convertToType(data['SpendingAccountID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('AllowExceed')) { + obj['AllowExceed'] = Sdk.convertToType(data['AllowExceed'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {String} SpendingAccountID + */ + exports.prototype['SpendingAccountID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {Boolean} AllowExceed + */ + exports.prototype['AllowExceed'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],209:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Supplier = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The Supplier model module. + * @module model/Supplier + */ + + /** + * Constructs a new Supplier. + * @alias module:model/Supplier + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a Supplier 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/Supplier} obj Optional instance to populate. + * @return {module:model/Supplier} The populated Supplier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],210:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.TokenPasswordReset = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The TokenPasswordReset model module. + * @module model/TokenPasswordReset + */ + + /** + * Constructs a new TokenPasswordReset. + * @alias module:model/TokenPasswordReset + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a TokenPasswordReset 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/TokenPasswordReset} obj Optional instance to populate. + * @return {module:model/TokenPasswordReset} The populated TokenPasswordReset instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('NewPassword')) { + obj['NewPassword'] = Sdk.convertToType(data['NewPassword'], 'String'); + } + } + return obj; + } + + /** + * @member {String} NewPassword + */ + exports.prototype['NewPassword'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],211:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.User = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The User model module. + * @module model/User + */ + + /** + * Constructs a new User. + * @alias module:model/User + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + + + }; + + /** + * Constructs a User 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/User} obj Optional instance to populate. + * @return {module:model/User} The populated User instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Username')) { + obj['Username'] = Sdk.convertToType(data['Username'], 'String'); + } + if (data.hasOwnProperty('Password')) { + obj['Password'] = Sdk.convertToType(data['Password'], 'String'); + } + if (data.hasOwnProperty('FirstName')) { + obj['FirstName'] = Sdk.convertToType(data['FirstName'], 'String'); + } + if (data.hasOwnProperty('LastName')) { + obj['LastName'] = Sdk.convertToType(data['LastName'], 'String'); + } + if (data.hasOwnProperty('Email')) { + obj['Email'] = Sdk.convertToType(data['Email'], 'String'); + } + if (data.hasOwnProperty('Phone')) { + obj['Phone'] = Sdk.convertToType(data['Phone'], 'String'); + } + if (data.hasOwnProperty('TermsAccepted')) { + obj['TermsAccepted'] = Sdk.convertToType(data['TermsAccepted'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + if (data.hasOwnProperty('AvailableRoles')) { + obj['AvailableRoles'] = Sdk.convertToType(data['AvailableRoles'], ['String']); + } + if (data.hasOwnProperty('DateCreated')) { + obj['DateCreated'] = Sdk.convertToType(data['DateCreated'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Username + */ + exports.prototype['Username'] = undefined; + /** + * @member {String} Password + */ + exports.prototype['Password'] = undefined; + /** + * @member {String} FirstName + */ + exports.prototype['FirstName'] = undefined; + /** + * @member {String} LastName + */ + exports.prototype['LastName'] = undefined; + /** + * @member {String} Email + */ + exports.prototype['Email'] = undefined; + /** + * @member {String} Phone + */ + exports.prototype['Phone'] = undefined; + /** + * @member {String} TermsAccepted + */ + exports.prototype['TermsAccepted'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + /** + * @member {Array.} AvailableRoles + */ + exports.prototype['AvailableRoles'] = undefined; + /** + * @member {String} DateCreated + */ + exports.prototype['DateCreated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],212:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.UserGroup = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The UserGroup model module. + * @module model/UserGroup + */ + + /** + * Constructs a new UserGroup. + * @alias module:model/UserGroup + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a UserGroup 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/UserGroup} obj Optional instance to populate. + * @return {module:model/UserGroup} The populated UserGroup instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],213:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.UserGroupAssignment = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The UserGroupAssignment model module. + * @module model/UserGroupAssignment + */ + + /** + * Constructs a new UserGroupAssignment. + * @alias module:model/UserGroupAssignment + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a UserGroupAssignment 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/UserGroupAssignment} obj Optional instance to populate. + * @return {module:model/UserGroupAssignment} The populated UserGroupAssignment instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('UserGroupID')) { + obj['UserGroupID'] = Sdk.convertToType(data['UserGroupID'], 'String'); + } + if (data.hasOwnProperty('UserID')) { + obj['UserID'] = Sdk.convertToType(data['UserID'], 'String'); + } + } + return obj; + } + + /** + * @member {String} UserGroupID + */ + exports.prototype['UserGroupID'] = undefined; + /** + * @member {String} UserID + */ + exports.prototype['UserID'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],214:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/VariantInventory'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./VariantInventory')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Variant = factory(root.OrderCloud.Sdk, root.OrderCloud.VariantInventory); + } +}(this, function(Sdk, VariantInventory) { + 'use strict'; + + + + + /** + * The Variant model module. + * @module model/Variant + */ + + /** + * Constructs a new Variant. + * @alias module:model/Variant + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a Variant 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/Variant} obj Optional instance to populate. + * @return {module:model/Variant} The populated Variant instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Active')) { + obj['Active'] = Sdk.convertToType(data['Active'], 'Boolean'); + } + if (data.hasOwnProperty('ShipWeight')) { + obj['ShipWeight'] = Sdk.convertToType(data['ShipWeight'], 'Number'); + } + if (data.hasOwnProperty('ShipHeight')) { + obj['ShipHeight'] = Sdk.convertToType(data['ShipHeight'], 'Number'); + } + if (data.hasOwnProperty('ShipWidth')) { + obj['ShipWidth'] = Sdk.convertToType(data['ShipWidth'], 'Number'); + } + if (data.hasOwnProperty('ShipLength')) { + obj['ShipLength'] = Sdk.convertToType(data['ShipLength'], 'Number'); + } + if (data.hasOwnProperty('Inventory')) { + obj['Inventory'] = VariantInventory.constructFromObject(data['Inventory']); + } + if (data.hasOwnProperty('xp')) { + obj['xp'] = Sdk.convertToType(data['xp'], Object); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {Boolean} Active + */ + exports.prototype['Active'] = undefined; + /** + * @member {Number} ShipWeight + */ + exports.prototype['ShipWeight'] = undefined; + /** + * @member {Number} ShipHeight + */ + exports.prototype['ShipHeight'] = undefined; + /** + * @member {Number} ShipWidth + */ + exports.prototype['ShipWidth'] = undefined; + /** + * @member {Number} ShipLength + */ + exports.prototype['ShipLength'] = undefined; + /** + * @member {module:model/VariantInventory} Inventory + */ + exports.prototype['Inventory'] = undefined; + /** + * @member {Object} xp + */ + exports.prototype['xp'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./VariantInventory":215}],215:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.VariantInventory = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The VariantInventory model module. + * @module model/VariantInventory + */ + + /** + * Constructs a new VariantInventory. + * @alias module:model/VariantInventory + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a VariantInventory 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/VariantInventory} obj Optional instance to populate. + * @return {module:model/VariantInventory} The populated VariantInventory instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('QuantityAvailable')) { + obj['QuantityAvailable'] = Sdk.convertToType(data['QuantityAvailable'], 'Number'); + } + if (data.hasOwnProperty('LastUpdated')) { + obj['LastUpdated'] = Sdk.convertToType(data['LastUpdated'], 'String'); + } + } + return obj; + } + + /** + * @member {Number} QuantityAvailable + */ + exports.prototype['QuantityAvailable'] = undefined; + /** + * @member {String} LastUpdated + */ + exports.prototype['LastUpdated'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],216:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk', 'model/WebhookRoute'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk'), require('./WebhookRoute')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.Webhook = factory(root.OrderCloud.Sdk, root.OrderCloud.WebhookRoute); + } +}(this, function(Sdk, WebhookRoute) { + 'use strict'; + + + + + /** + * The Webhook model module. + * @module model/Webhook + */ + + /** + * Constructs a new Webhook. + * @alias module:model/Webhook + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + + }; + + /** + * Constructs a Webhook 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/Webhook} obj Optional instance to populate. + * @return {module:model/Webhook} The populated Webhook instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ID')) { + obj['ID'] = Sdk.convertToType(data['ID'], 'String'); + } + if (data.hasOwnProperty('Name')) { + obj['Name'] = Sdk.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Description')) { + obj['Description'] = Sdk.convertToType(data['Description'], 'String'); + } + if (data.hasOwnProperty('Url')) { + obj['Url'] = Sdk.convertToType(data['Url'], 'String'); + } + if (data.hasOwnProperty('HashKey')) { + obj['HashKey'] = Sdk.convertToType(data['HashKey'], 'String'); + } + if (data.hasOwnProperty('ElevatedRoles')) { + obj['ElevatedRoles'] = Sdk.convertToType(data['ElevatedRoles'], ['String']); + } + if (data.hasOwnProperty('ConfigData')) { + obj['ConfigData'] = Sdk.convertToType(data['ConfigData'], Object); + } + if (data.hasOwnProperty('BeforeProcessRequest')) { + obj['BeforeProcessRequest'] = Sdk.convertToType(data['BeforeProcessRequest'], 'Boolean'); + } + if (data.hasOwnProperty('ApiClientIDs')) { + obj['ApiClientIDs'] = Sdk.convertToType(data['ApiClientIDs'], ['String']); + } + if (data.hasOwnProperty('WebhookRoutes')) { + obj['WebhookRoutes'] = Sdk.convertToType(data['WebhookRoutes'], [WebhookRoute]); + } + } + return obj; + } + + /** + * @member {String} ID + */ + exports.prototype['ID'] = undefined; + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Description + */ + exports.prototype['Description'] = undefined; + /** + * @member {String} Url + */ + exports.prototype['Url'] = undefined; + /** + * @member {String} HashKey + */ + exports.prototype['HashKey'] = undefined; + /** + * @member {Array.} ElevatedRoles + */ + exports.prototype['ElevatedRoles'] = undefined; + /** + * @member {Object} ConfigData + */ + exports.prototype['ConfigData'] = undefined; + /** + * @member {Boolean} BeforeProcessRequest + */ + exports.prototype['BeforeProcessRequest'] = undefined; + /** + * @member {Array.} ApiClientIDs + */ + exports.prototype['ApiClientIDs'] = undefined; + /** + * @member {Array.} WebhookRoutes + */ + exports.prototype['WebhookRoutes'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12,"./WebhookRoute":217}],217:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.WebhookRoute = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The WebhookRoute model module. + * @module model/WebhookRoute + */ + + /** + * Constructs a new WebhookRoute. + * @alias module:model/WebhookRoute + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a WebhookRoute 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/WebhookRoute} obj Optional instance to populate. + * @return {module:model/WebhookRoute} The populated WebhookRoute instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Route')) { + obj['Route'] = Sdk.convertToType(data['Route'], 'String'); + } + if (data.hasOwnProperty('Verb')) { + obj['Verb'] = Sdk.convertToType(data['Verb'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Route + */ + exports.prototype['Route'] = undefined; + /** + * @member {String} Verb + */ + exports.prototype['Verb'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}],218:[function(require,module,exports){ +/** + * OrderCloud + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: ordercloud@four51.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. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['Sdk'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../Sdk')); + } else { + // Browser globals (root is window) + if (!root.OrderCloud) { + root.OrderCloud = {}; + } + root.OrderCloud.XpIndex = factory(root.OrderCloud.Sdk); + } +}(this, function(Sdk) { + 'use strict'; + + + + + /** + * The XpIndex model module. + * @module model/XpIndex + */ + + /** + * Constructs a new XpIndex. + * @alias module:model/XpIndex + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a XpIndex 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/XpIndex} obj Optional instance to populate. + * @return {module:model/XpIndex} The populated XpIndex instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('ThingType')) { + obj['ThingType'] = Sdk.convertToType(data['ThingType'], 'String'); + } + if (data.hasOwnProperty('Key')) { + obj['Key'] = Sdk.convertToType(data['Key'], 'String'); + } + } + return obj; + } + + /** + * @member {String} ThingType + */ + exports.prototype['ThingType'] = undefined; + /** + * @member {String} Key + */ + exports.prototype['Key'] = undefined; + + + + return exports; +})); + + + +},{"../Sdk":12}]},{},[50])(50) }); diff --git a/dist/ordercloud-javascript-sdk.min.js b/dist/ordercloud-javascript-sdk.min.js index 16fa2500..08042e72 100644 --- a/dist/ordercloud-javascript-sdk.min.js +++ b/dist/ordercloud-javascript-sdk.min.js @@ -1,13 +1,14 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.OrderCloudSDK=e()}}(function(){var e,t,r;return function(){function e(t,r,o){function n(s,a){if(!r[s]){if(!t[s]){var p="function"==typeof require&&require;if(!a&&p)return p(s,!0);if(i)return i(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return n(r||e)},l,l.exports,e,t,r,o)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function n(e){var t=o(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function i(e,t,r){return 3*(t+r)/4-r}function s(e){for(var t,r=o(e),n=r[0],s=r[1],a=new c(i(e,n,s)),p=0,d=s>0?n-4:n,l=0;l>16&255,a[p++]=t>>8&255,a[p++]=255&t;return 2===s&&(t=u[e.charCodeAt(l)]<<2|u[e.charCodeAt(l+1)]>>4,a[p++]=255&t),1===s&&(t=u[e.charCodeAt(l)]<<10|u[e.charCodeAt(l+1)]<<4|u[e.charCodeAt(l+2)]>>2,a[p++]=t>>8&255,a[p++]=255&t),a}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function p(e,t,r){for(var o,n=[],i=t;ia?a:s+i));return 1===o?(t=e[r-1],n.push(l[t>>2]+l[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],n.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),n.join("")}r.byteLength=n,r.toByteArray=s,r.fromByteArray=d;for(var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;yK)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return l(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return i.from(o,t,r);var n=h(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function d(e){return a(e),n(e<0?0:0|y(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),o=n(r),s=o.write(e,t);return s!==r&&(o=o.slice(0,s)),o}function u(e){for(var t=e.length<0?0:0|y(e.length),r=n(t),o=0;o=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function f(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return o?-1:R(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}function w(e,t,r,o,n){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,W(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=i.from(t,o)),i.isBuffer(t))return 0===t.length?-1:S(e,t,r,o,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):S(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function S(e,t,r,o,n){function i(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,p=t.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;s=2,a/=2,p/=2,r/=2}var d;if(n){var l=-1;for(d=r;da&&(r=a-p),d=r;d>=0;d--){for(var u=!0,c=0;cn&&(o=n)):o=n;var i=t.length;o>i/2&&(o=i/2);for(var s=0;s239?4:i>223?3:i>191?2:1;if(n+a<=r){var p,d,l,u;switch(a){case 1:i<128&&(s=i);break;case 2:p=e[n+1],128===(192&p)&&(u=(31&i)<<6|63&p,u>127&&(s=u));break;case 3:p=e[n+1],d=e[n+2],128===(192&p)&&128===(192&d)&&(u=(15&i)<<12|(63&p)<<6|63&d,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:p=e[n+1],d=e[n+2],l=e[n+3],128===(192&p)&&128===(192&d)&&128===(192&l)&&(u=(15&i)<<18|(63&p)<<12|(63&d)<<6|63&l,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|1023&s),o.push(s),n+=a}return b(o)}function b(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",o=0;oo)&&(r=o);for(var n="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,o,n,s){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function B(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,o,23,4),r+4}function N(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,o,52,8),r+8}function G(e){if(e=e.split("=")[0],e=e.trim().replace(J,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(e,t){t=t||1/0;for(var r,o=e.length,n=null,i=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function _(e){for(var t=[],r=0;r>8,n=r%256,i.push(n),i.push(o);return i}function z(e){return X.toByteArray(G(e))}function H(e,t,r,o){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!==e}var X=e("base64-js"),Z=e("ieee754");r.Buffer=i,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50;var K=2147483647;r.kMaxLength=K,i.TYPED_ARRAY_SUPPORT=o(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return p(e,t,r)},i.allocUnsafe=function(e){return d(e)},i.allocUnsafeSlow=function(e){return d(e)},i.isBuffer=function e(t){return null!=t&&t._isBuffer===!0&&t!==i.prototype},i.compare=function e(t,r){if(Q(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),Q(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var o=t.length,n=r.length,s=0,a=Math.min(o,n);so&&(t+=" ... "),""},i.prototype.compare=function e(t,r,o,n,s){if(Q(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===o&&(o=t?t.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),r<0||o>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&r>=o)return 0;if(n>=s)return-1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,s>>>=0,this===t)return 0;for(var a=s-n,p=o-r,d=Math.min(a,p),l=this.slice(n,s),u=t.slice(r,o),c=0;c>>=0,isFinite(o)?(o>>>=0,void 0===n&&(n="utf8")):(n=o,o=void 0)}var i=this.length-r;if((void 0===o||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return O(this,t,r,o);case"utf8":case"utf-8":return D(this,t,r,o);case"ascii":return I(this,t,r,o);case"latin1":case"binary":return C(this,t,r,o);case"base64":return T(this,t,r,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function e(t,r){var o=this.length;t=~~t,r=void 0===r?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},i.prototype.readUInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),this[t]},i.prototype.readUInt16LE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s=i&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=r,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s},i.prototype.readInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t]|this[t+1]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt16BE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t+1]|this[t]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function e(t,r){return t>>>=0,r||L(t,4,this.length),Z.read(this,t,!0,23,4)},i.prototype.readFloatBE=function e(t,r){return t>>>=0,r||L(t,4,this.length),Z.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function e(t,r){return t>>>=0,r||L(t,8,this.length),Z.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function e(t,r){return t>>>=0,r||L(t,8,this.length),Z.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=1,a=0;for(this[r]=255&t;++a>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=o-1,a=1;for(this[r+s]=255&t;--s>=0&&(a*=256);)this[r+s]=t/a&255;return r+o},i.prototype.writeUInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,255,0),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeUInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeUInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},i.prototype.writeUInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=0,a=1,p=0;for(this[r]=255&t;++s>0)-p&255;return r+o},i.prototype.writeIntBE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=o-1,a=1,p=0;for(this[r+s]=255&t;--s>=0&&(a*=256);)t<0&&0===p&&0!==this[r+s+1]&&(p=1),this[r+s]=(t/a>>0)-p&255;return r+o},i.prototype.writeInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},i.prototype.writeInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeFloatLE=function e(t,r,o){return U(this,t,r,!0,o)},i.prototype.writeFloatBE=function e(t,r,o){return U(this,t,r,!1,o)},i.prototype.writeDoubleLE=function e(t,r,o){return N(this,t,r,!0,o)},i.prototype.writeDoubleBE=function e(t,r,o){return N(this,t,r,!1,o)},i.prototype.copy=function e(t,r,o,n){if(!i.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--a)t[a+r]=this[a+o];else Uint8Array.prototype.set.call(t,this.subarray(o,n),r);return s},i.prototype.fill=function e(t,r,o,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,o=this.length):"string"==typeof o&&(n=o,o=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var s=t.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(t=s)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,o=void 0===o?this.length:o>>>0,t||(t=0);var a;if("number"==typeof t)for(a=r;a>1,l=-7,u=r?n-1:0,c=r?-1:1,h=e[t+u];for(u+=c,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+u],u+=c,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=c,l-=8);if(0===i)i=1-d;else{if(i===p)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,o),i-=d}return(h?-1:1)*s*Math.pow(2,i-o)},r.write=function(e,t,r,o,n,i){var s,a,p,d=8*i-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,y=o?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-s))<1&&(s--,p*=2),t+=s+u>=1?c/p:c*Math.pow(2,1-u),t*p>=2&&(s++,p/=2),s+u>=l?(a=0,s=l):s+u>=1?(a=(t*p-1)*Math.pow(2,n),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=255&a,h+=y,a/=256,n-=8);for(s=s<0;e[r+h]=255&s,h+=y,s/=256,d-=8);e[r+h-y]|=128*m}},{}],5:[function(e,t,r){function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}"undefined"!=typeof t&&(t.exports=o),o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o,n=0;n=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var o;try{o=t.status}catch(e){o=0}if(!o){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var o=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=o.bind(null,"download"),t.upload&&(t.upload.onprogress=o.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var n=this._header["content-type"],i=this._serializer||g.serialize[n?n.split(";")[0]:""];!i&&p(n)&&(i=g.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&t.setRequestHeader(s,this.header[s]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send("undefined"!=typeof r?r:null),this},g.agent=function(){return new v},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){v.prototype[e.toLowerCase()]=function(t,r){var o=new g.Request(e,t);return this._setDefaults(o),r&&o.end(r),o}}),v.prototype.del=v.prototype.delete,g.get=function(e,t,r){var o=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.head=function(e,t,r){var o=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.options=function(e,t,r){var o=g("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.del=u,g.delete=u,g.patch=function(e,t,r){var o=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.post=function(e,t,r){var o=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.put=function(e,t,r){var o=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(e,t,r){"use strict";function o(e){return null!==e&&"object"==typeof e}t.exports=o},{}],9:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./is-object");t.exports=o,o.prototype.clearTimeout=function e(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function e(t){return this._parser=t,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function e(t){return this._serializer=t,this},o.prototype.timeout=function e(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var r in t)switch(r){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",r)}return this},o.prototype.retry=function e(t,r){return 0!==arguments.length&&t!==!0||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=r,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(r===!0)return!0;if(r===!1)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function e(t,r){if(!this._fullfilledPromise){var o=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){o.end(function(r,o){r?t(r):e(o)})})}return this._fullfilledPromise.then(t,r)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function e(t){return t(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(i(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)this.field(e,t[o]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},o.prototype._auth=function(e,t,r,o){switch(r.type){case"basic":this.set("Authorization","Basic "+o(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=i(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var o in e)this._data[o]=e[o];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)},o.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var o=new Error(e+t+"ms exceeded");o.timeout=t,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.abort(),this.callback(o)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./utils");t.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var r=i.params(t);for(var o in r)this[o]=r[o];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},{"./utils":11}],11:[function(e,t,r){"use strict";r.type=function(e){return e.split(/ *; */).shift()},r.params=function(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),o=r.shift(),n=r.shift();return o&&n&&(e[o]=n),e},{})},r.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var r=t.split(/ *; */),o=r[0].slice(1,-1),n=r[1].split(/ *= */)[1].slice(1,-1);return e[n]=o,e},{})},r.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},{}],12:[function(t,r,o){(function(o){!function(o,n){"function"==typeof e&&e.amd?e(["superagent"],n):"object"==typeof r&&r.exports?r.exports=n(t("superagent")):(o.OrderCloud||(o.OrderCloud={}),o.OrderCloud.Sdk=n(o.superagent))}(this,function(e){"use strict";var r=function(){this.baseApiPath="https://api.ordercloud.io/v1".replace(/\/+$/,""),this.baseAuthPath="https://auth.ordercloud.io".replace(/\/+$/,""),this.authentications={oauth2:{type:"oauth2"}},this.defaultHeaders={},this.timeout=6e4};return r.prototype.paramToString=function(e){return void 0==e||null==e?"":e instanceof Date?e.toJSON():e.toString()},r.prototype.buildUrl=function(e,t){e.match(/^\//)||(e="/"+e);var r=this,o=r.baseApiPath+e;return o=o.replace(/\{([\w-]+)\}/g,function(e,o){var n;return n=t.hasOwnProperty(o)?r.paramToString(t[o]):e,encodeURIComponent(n)})},r.prototype.isJsonMime=function(e){return Boolean(null!=e&&e.match(/^application\/json(;.*)?$/i))},r.prototype.jsonPreferredMime=function(e){for(var t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function n(e){var t=o(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function i(e,t,r){return 3*(t+r)/4-r}function s(e){for(var t,r=o(e),n=r[0],s=r[1],a=new c(i(e,n,s)),p=0,d=s>0?n-4:n,l=0;l>16&255,a[p++]=t>>8&255,a[p++]=255&t;return 2===s&&(t=u[e.charCodeAt(l)]<<2|u[e.charCodeAt(l+1)]>>4,a[p++]=255&t),1===s&&(t=u[e.charCodeAt(l)]<<10|u[e.charCodeAt(l+1)]<<4|u[e.charCodeAt(l+2)]>>2,a[p++]=t>>8&255,a[p++]=255&t),a}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function p(e,t,r){for(var o,n=[],i=t;ia?a:s+i));return 1===o?(t=e[r-1],n.push(l[t>>2]+l[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],n.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),n.join("")}r.byteLength=n,r.toByteArray=s,r.fromByteArray=d;for(var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;yZ)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return l(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return i.from(o,t,r);var n=h(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function d(e){return a(e),n(e<0?0:0|y(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|v(e,t),o=n(r),s=o.write(e,t);return s!==r&&(o=o.slice(0,s)),o}function u(e){for(var t=e.length<0?0:0|y(e.length),r=n(t),o=0;o=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function v(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return o?-1:R(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,r){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}function w(e,t,r,o,n){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Q(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=i.from(t,o)),i.isBuffer(t))return 0===t.length?-1:S(e,t,r,o,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):S(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function S(e,t,r,o,n){function i(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,p=t.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;s=2,a/=2,p/=2,r/=2}var d;if(n){var l=-1;for(d=r;da&&(r=a-p),d=r;d>=0;d--){for(var u=!0,c=0;cn&&(o=n)):o=n;var i=t.length;o>i/2&&(o=i/2);for(var s=0;s239?4:i>223?3:i>191?2:1;if(n+a<=r){var p,d,l,u;switch(a){case 1:i<128&&(s=i);break;case 2:p=e[n+1],128===(192&p)&&(u=(31&i)<<6|63&p,u>127&&(s=u));break;case 3:p=e[n+1],d=e[n+2],128===(192&p)&&128===(192&d)&&(u=(15&i)<<12|(63&p)<<6|63&d,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:p=e[n+1],d=e[n+2],l=e[n+3],128===(192&p)&&128===(192&d)&&128===(192&l)&&(u=(15&i)<<18|(63&p)<<12|(63&d)<<6|63&l,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|1023&s),o.push(s),n+=a}return b(o)}function b(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",o=0;oo)&&(r=o);for(var n="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,o,n,s){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function B(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(e,t,r,o,23,4),r+4}function N(e,t,r,o,n){return t=+t,r>>>=0,n||B(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(e,t,r,o,52,8),r+8}function G(e){if(e=e.split("=")[0],e=e.trim().replace(J,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(e,t){t=t||1/0;for(var r,o=e.length,n=null,i=[],s=0;s55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function _(e){for(var t=[],r=0;r>8,n=r%256,i.push(n),i.push(o);return i}function z(e){return X.toByteArray(G(e))}function W(e,t,r,o){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!==e}var X=e("base64-js"),K=e("ieee754");r.Buffer=i,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50;var Z=2147483647;r.kMaxLength=Z,i.TYPED_ARRAY_SUPPORT=o(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return p(e,t,r)},i.allocUnsafe=function(e){return d(e)},i.allocUnsafeSlow=function(e){return d(e)},i.isBuffer=function e(t){return null!=t&&t._isBuffer===!0&&t!==i.prototype},i.compare=function e(t,r){if(H(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),H(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var o=t.length,n=r.length,s=0,a=Math.min(o,n);so&&(t+=" ... "),""},i.prototype.compare=function e(t,r,o,n,s){if(H(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===o&&(o=t?t.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),r<0||o>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&r>=o)return 0;if(n>=s)return-1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,s>>>=0,this===t)return 0;for(var a=s-n,p=o-r,d=Math.min(a,p),l=this.slice(n,s),u=t.slice(r,o),c=0;c>>=0,isFinite(o)?(o>>>=0,void 0===n&&(n="utf8")):(n=o,o=void 0)}var i=this.length-r;if((void 0===o||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return O(this,t,r,o);case"utf8":case"utf-8":return D(this,t,r,o);case"ascii":return C(this,t,r,o);case"latin1":case"binary":return I(this,t,r,o);case"base64":return T(this,t,r,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function e(t,r){var o=this.length;t=~~t,r=void 0===r?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},i.prototype.readUInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),this[t]},i.prototype.readUInt16LE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function e(t,r){return t>>>=0,r||L(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=this[t],i=1,s=0;++s=i&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function e(t,r,o){t>>>=0,r>>>=0,o||L(t,r,this.length);for(var n=r,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s},i.prototype.readInt8=function e(t,r){return t>>>=0,r||L(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},i.prototype.readInt16LE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t]|this[t+1]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt16BE=function e(t,r){t>>>=0,r||L(t,2,this.length);var o=this[t+1]|this[t]<<8;return 32768&o?4294901760|o:o},i.prototype.readInt32LE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function e(t,r){return t>>>=0,r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function e(t,r){return t>>>=0,r||L(t,4,this.length),K.read(this,t,!0,23,4)},i.prototype.readFloatBE=function e(t,r){return t>>>=0,r||L(t,4,this.length),K.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function e(t,r){return t>>>=0,r||L(t,8,this.length),K.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function e(t,r){return t>>>=0,r||L(t,8,this.length),K.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=1,a=0;for(this[r]=255&t;++a>>=0,o>>>=0,!n){var i=Math.pow(2,8*o)-1;q(this,t,r,o,i,0)}var s=o-1,a=1;for(this[r+s]=255&t;--s>=0&&(a*=256);)this[r+s]=t/a&255;return r+o},i.prototype.writeUInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,255,0),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeUInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeUInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},i.prototype.writeUInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeIntLE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=0,a=1,p=0;for(this[r]=255&t;++s>0)-p&255;return r+o},i.prototype.writeIntBE=function e(t,r,o,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*o-1);q(this,t,r,o,i-1,-i)}var s=o-1,a=1,p=0;for(this[r+s]=255&t;--s>=0&&(a*=256);)t<0&&0===p&&0!==this[r+s+1]&&(p=1),this[r+s]=(t/a>>0)-p&255;return r+o},i.prototype.writeInt8=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeInt16BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeInt32LE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},i.prototype.writeInt32BE=function e(t,r,o){return t=+t,r>>>=0,o||q(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeFloatLE=function e(t,r,o){return U(this,t,r,!0,o)},i.prototype.writeFloatBE=function e(t,r,o){return U(this,t,r,!1,o)},i.prototype.writeDoubleLE=function e(t,r,o){return N(this,t,r,!0,o)},i.prototype.writeDoubleBE=function e(t,r,o){return N(this,t,r,!1,o)},i.prototype.copy=function e(t,r,o,n){if(!i.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--a)t[a+r]=this[a+o];else Uint8Array.prototype.set.call(t,this.subarray(o,n),r);return s},i.prototype.fill=function e(t,r,o,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,o=this.length):"string"==typeof o&&(n=o,o=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var s=t.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(t=s)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,o=void 0===o?this.length:o>>>0,t||(t=0);var a;if("number"==typeof t)for(a=r;a>1,l=-7,u=r?n-1:0,c=r?-1:1,h=e[t+u];for(u+=c,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+u],u+=c,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=c,l-=8);if(0===i)i=1-d;else{if(i===p)return s?NaN:(h?-1:1)*(1/0);s+=Math.pow(2,o),i-=d}return(h?-1:1)*s*Math.pow(2,i-o)},r.write=function(e,t,r,o,n,i){var s,a,p,d=8*i-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,y=o?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-s))<1&&(s--,p*=2),t+=s+u>=1?c/p:c*Math.pow(2,1-u),t*p>=2&&(s++,p/=2),s+u>=l?(a=0,s=l):s+u>=1?(a=(t*p-1)*Math.pow(2,n),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=255&a,h+=y,a/=256,n-=8);for(s=s<0;e[r+h]=255&s,h+=y,s/=256,d-=8);e[r+h-y]|=128*m}},{}],5:[function(e,t,r){function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}"undefined"!=typeof t&&(t.exports=o),o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o,n=0;n=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var o;try{o=t.status}catch(e){o=0}if(!o){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var o=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=o.bind(null,"download"),t.upload&&(t.upload.onprogress=o.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0); +}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var n=this._header["content-type"],i=this._serializer||g.serialize[n?n.split(";")[0]:""];!i&&p(n)&&(i=g.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&t.setRequestHeader(s,this.header[s]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send("undefined"!=typeof r?r:null),this},g.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){f.prototype[e.toLowerCase()]=function(t,r){var o=new g.Request(e,t);return this._setDefaults(o),r&&o.end(r),o}}),f.prototype.del=f.prototype.delete,g.get=function(e,t,r){var o=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.head=function(e,t,r){var o=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&o.query(t),r&&o.end(r),o},g.options=function(e,t,r){var o=g("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.del=u,g.delete=u,g.patch=function(e,t,r){var o=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.post=function(e,t,r){var o=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o},g.put=function(e,t,r){var o=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&o.send(t),r&&o.end(r),o}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":5}],8:[function(e,t,r){"use strict";function o(e){return null!==e&&"object"==typeof e}t.exports=o},{}],9:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./is-object");t.exports=o,o.prototype.clearTimeout=function e(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},o.prototype.parse=function e(t){return this._parser=t,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function e(t){return this._serializer=t,this},o.prototype.timeout=function e(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var r in t)switch(r){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",r)}return this},o.prototype.retry=function e(t,r){return 0!==arguments.length&&t!==!0||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=r,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(r===!0)return!0;if(r===!1)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},o.prototype.then=function e(t,r){if(!this._fullfilledPromise){var o=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){o.end(function(r,o){r?t(r):e(o)})})}return this._fullfilledPromise.then(t,r)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function e(t){return t(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(i(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)this.field(e,t[o]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},o.prototype._auth=function(e,t,r,o){switch(r.type){case"basic":this.set("Authorization","Basic "+o(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},o.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=i(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&i(this._data))for(var o in e)this._data[o]=e[o];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)},o.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},o.prototype._appendQueryString=function(){console.trace("Unsupported")},o.prototype._timeoutError=function(e,t,r){if(!this._aborted){var o=new Error(e+t+"ms exceeded");o.timeout=t,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.abort(),this.callback(o)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(e,t,r){"use strict";function o(e){if(e)return n(e)}function n(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}var i=e("./utils");t.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var r=i.params(t);for(var o in r)this[o]=r[o];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},{"./utils":11}],11:[function(e,t,r){"use strict";r.type=function(e){return e.split(/ *; */).shift()},r.params=function(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),o=r.shift(),n=r.shift();return o&&n&&(e[o]=n),e},{})},r.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var r=t.split(/ *; */),o=r[0].slice(1,-1),n=r[1].split(/ *= */)[1].slice(1,-1);return e[n]=o,e},{})},r.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},{}],12:[function(t,r,o){(function(o){!function(o,n){"function"==typeof e&&e.amd?e(["superagent"],n):"object"==typeof r&&r.exports?r.exports=n(t("superagent")):(o.OrderCloud||(o.OrderCloud={}),o.OrderCloud.Sdk=n(o.superagent))}(this,function(e){"use strict";var r=function(){this.baseApiPath="https://api.ordercloud.io/v1".replace(/\/+$/,""),this.baseAuthPath="https://auth.ordercloud.io".replace(/\/+$/,""),this.authentications={oauth2:{type:"oauth2"}},this.defaultHeaders={},this.timeout=6e4};return r.prototype.paramToString=function(e){return void 0==e||null==e?"":e instanceof Date?e.toJSON():e.toString()},r.prototype.buildUrl=function(e,t){e.match(/^\//)||(e="/"+e);var r=this,o=r.baseApiPath+e;return o=o.replace(/\{([\w-]+)\}/g,function(e,o){var n;return n=t.hasOwnProperty(o)?r.paramToString(t[o]):e,encodeURIComponent(n)})},r.prototype.isJsonMime=function(e){return Boolean(null!=e&&e.match(/^application\/json(;.*)?$/i))},r.prototype.jsonPreferredMime=function(e){for(var t=0;t", "license": "MIT", diff --git a/src/index.js b/src/index.js index 3ea13a4d..4741cbc9 100644 --- a/src/index.js +++ b/src/index.js @@ -51,7 +51,7 @@ * *

* @module index - * @version 3.3.5 + * @version 3.3.6 */ var exports = { /**