lob 6.6.3 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -146,16 +146,22 @@ To contribute, please see the [CONTRIBUTING.md](https://github.com/lob/lob-node/
146
146
 
147
147
  ## Testing
148
148
 
149
- To run the tests with coverage:
149
+ To run unit tests with coverage:
150
150
 
151
151
  ```
152
- LOB_API_KEY=YOUR_TEST_API_KEY npm test
152
+ npm test
153
153
  ```
154
154
 
155
- To run the tests without coverage:
155
+ To run integration tests (requires API keys):
156
156
 
157
157
  ```
158
- LOB_API_KEY=YOUR_TEST_API_KEY npm run test-no-cover
158
+ TEST_API_KEY=your_test_key npm run test:integration
159
+ ```
160
+
161
+ Some integration tests require a live API key:
162
+
163
+ ```
164
+ TEST_API_KEY=your_test_key LIVE_API_KEY=your_live_key npm run test:integration
159
165
  ```
160
166
 
161
167
  =======================
package/lib/index.js CHANGED
@@ -6,10 +6,10 @@ const Resources = require('./resources');
6
6
  const LOB_HOST = process.env.LOB_HOST || 'https://api.lob.com/v1/';
7
7
  const LOB_USERAGENT = `Lob/v1 NodeBindings/${ClientVersion}`;
8
8
 
9
- const Lob = function (apiKey, options) {
9
+ const LobClient = function (apiKey, options) {
10
10
 
11
- if (!(this instanceof Lob)) {
12
- return new Lob(apiKey, options);
11
+ if (!(this instanceof LobClient)) {
12
+ return new LobClient(apiKey, options);
13
13
  }
14
14
 
15
15
  this.resourceBase = require('./resources/resourceBase');
@@ -28,7 +28,7 @@ const Lob = function (apiKey, options) {
28
28
 
29
29
  if (options && typeof options === 'object') {
30
30
 
31
- if (Object.prototype.hasOwnProperty.call(options, 'apiVersion')) {
31
+ if (Reflect.apply(Object.prototype.hasOwnProperty, options, ['apiVersion'])) {
32
32
  this.options.headers['Lob-Version'] = options.apiVersion;
33
33
  }
34
34
 
@@ -41,7 +41,7 @@ const Lob = function (apiKey, options) {
41
41
  this._initResources();
42
42
  };
43
43
 
44
- (function () {
44
+ Reflect.apply(function () {
45
45
 
46
46
  this._initResources = function () {
47
47
  const services = Object.keys(Resources);
@@ -52,6 +52,6 @@ const Lob = function (apiKey, options) {
52
52
  }
53
53
  };
54
54
 
55
- }).call(Lob.prototype);
55
+ }, LobClient.prototype, []);
56
56
 
57
- module.exports = Lob;
57
+ module.exports = LobClient;
@@ -30,7 +30,7 @@ class BankAccounts extends ResourceBase {
30
30
  }
31
31
 
32
32
  verify (id, params, callback) {
33
- return this._transmit('POST', `${id}/verify`, null, params, callback);
33
+ return this._transmit('POST', `${encodeURIComponent(id)}/verify`, null, params, callback);
34
34
  }
35
35
 
36
36
  }
@@ -69,7 +69,7 @@ class Cards extends ResourceBase {
69
69
  params[`${p}[${key}]`] = params[p][key];
70
70
  }
71
71
 
72
- delete params[p];
72
+ Reflect.deleteProperty(params, p);
73
73
  }
74
74
 
75
75
  return this._transmit('POST', null, null, params, headers, callback);
@@ -55,7 +55,7 @@ class Letters extends ResourceBase {
55
55
  params[`${p}[${key}]`] = params[p][key];
56
56
  }
57
57
 
58
- delete params[p];
58
+ Reflect.deleteProperty(params, p);
59
59
  }
60
60
 
61
61
  return this._transmit('POST', null, null, params, headers, callback);
@@ -66,7 +66,7 @@ class Postcards extends ResourceBase {
66
66
  params[`${p}[${key}]`] = params[p][key];
67
67
  }
68
68
 
69
- delete params[p];
69
+ Reflect.deleteProperty(params, p);
70
70
  }
71
71
 
72
72
  return this._transmit('POST', null, null, params, headers, callback);
@@ -1,7 +1,14 @@
1
1
  'use strict';
2
2
 
3
- const Request = require('request');
4
- const Stream = require('stream');
3
+ const axios = require('axios');
4
+ const FormDataLib = require('form-data');
5
+ const Stream = require('stream');
6
+
7
+ // Helper to create a compatibility response object from axios response
8
+ const createCompatResponse = (axiosResp) => Object.assign({}, axiosResp, {
9
+ statusCode: axiosResp.status,
10
+ statusMessage: axiosResp.statusText
11
+ });
5
12
 
6
13
  class ResourceBase {
7
14
 
@@ -20,94 +27,149 @@ class ResourceBase {
20
27
 
21
28
  const allHeaders = Object.assign({}, this.config.headers, headers);
22
29
 
23
- const opts = {
24
- url: `${this.uri}${uri ? `/${uri}` : ''}`,
30
+ // Encode URI to prevent path traversal, but only for simple IDs
31
+ // Composite paths (containing /) should be encoded by the caller
32
+ const encodedUri = uri && !uri.includes('/') ? encodeURIComponent(uri) : uri;
33
+
34
+ const config = {
35
+ url: `${this.uri}${encodedUri ? `/${encodedUri}` : ''}`,
25
36
  method,
26
- auth: { user: this.config.apiKey, password: '' },
37
+ auth: { username: this.config.apiKey, password: '' },
27
38
  headers: allHeaders,
28
- json: true
39
+ validateStatus: () => true
29
40
  };
30
41
 
31
42
  if (this.config.agent) {
32
- opts.agent = this.config.agent;
43
+ const isHttps = this.uri.startsWith('https');
44
+ if (isHttps) {
45
+ config.httpsAgent = this.config.agent;
46
+ } else {
47
+ config.httpAgent = this.config.agent;
48
+ }
33
49
  }
34
50
 
35
51
  let isMultiPartForm = false;
52
+ let requiresJson = false;
36
53
 
37
- for (const key in form) {
54
+ Object.keys(form || {}).forEach((key) => {
38
55
  if (form[key] === undefined) {
39
- delete form[key];
56
+ Reflect.deleteProperty(form, key);
40
57
  }
41
58
  if (form[key] === true || form[key] === false) {
42
59
  form[key] = form[key].toString();
43
60
  }
44
- }
61
+ });
45
62
 
46
- for (const param in form) {
63
+ Object.keys(form || {}).forEach((param) => {
47
64
  const val = form[param];
48
65
 
49
66
  if (val instanceof Stream.Stream) {
50
67
  isMultiPartForm = true;
51
- break;
52
68
  }
53
69
 
54
- if (val !== undefined && val !== null && Object.prototype.hasOwnProperty.call(val, 'value')) {
70
+ if (val !== undefined && val !== null && Reflect.apply(Object.prototype.hasOwnProperty, val, ['value'])) {
55
71
  isMultiPartForm = true;
56
- break;
57
72
  }
58
- }
73
+
74
+ // Check if array contains objects (requires JSON encoding)
75
+ if (Array.isArray(val) && val.length > 0 && typeof val[0] === 'object') {
76
+ requiresJson = true;
77
+ }
78
+ });
59
79
 
60
80
  if (qs) {
61
- opts.qs = qs;
81
+ config.params = qs;
62
82
  }
63
83
 
64
84
  if (form) {
65
85
  if (isMultiPartForm) {
66
- opts.formData = form;
86
+ const formData = new FormDataLib();
87
+
88
+ Object.keys(form).forEach((key) => {
89
+ const val = form[key];
90
+
91
+ if (val instanceof Stream.Stream) {
92
+ formData.append(key, val);
93
+ } else if (val !== undefined && val !== null && Reflect.apply(Object.prototype.hasOwnProperty, val, ['value'])) {
94
+ formData.append(key, val.value, val.options);
95
+ } else if (val !== undefined && val !== null) {
96
+ formData.append(key, val);
97
+ }
98
+ });
99
+
100
+ config.data = formData;
101
+ config.headers = Object.assign({}, config.headers, formData.getHeaders());
102
+ } else if (requiresJson) {
103
+ // Use JSON for requests with nested objects (e.g., bulk verifications)
104
+ config.data = form;
105
+ config.headers['Content-Type'] = 'application/json';
67
106
  } else {
68
- opts.form = form;
107
+ const params = new URLSearchParams();
108
+ Object.keys(form).forEach((key) => {
109
+ const val = form[key];
110
+ if (val !== undefined && val !== null) {
111
+ if (Array.isArray(val)) {
112
+ // Handle arrays: amounts[0]=23&amounts[1]=34
113
+ val.forEach((item, index) => {
114
+ params.append(`${key}[${index}]`, item);
115
+ });
116
+ } else {
117
+ params.append(key, val);
118
+ }
119
+ }
120
+ });
121
+ config.data = params;
122
+ config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
69
123
  }
70
124
  }
71
125
 
72
- const promise = new Promise((resolve, reject) => {
73
- Request(opts, (err, resp, body) => {
126
+ const promise = axios(config)
127
+ .then((resp) => {
74
128
  /* istanbul ignore next */
75
- body = body || {};
76
-
77
- /* istanbul ignore next */
78
- if (err) {
79
- return reject(err);
80
- }
129
+ const body = resp.data || {};
81
130
 
82
131
  if (body && body.error) {
83
132
  const error = new Error(body.error.message);
84
133
  error.status_code = body.error.status_code;
85
- error._response = resp;
86
- return reject(error);
134
+ error._response = createCompatResponse(resp);
135
+ throw error;
87
136
  }
88
137
 
89
- if (resp && resp.statusCode >= 500) {
90
- const error = new Error(resp.statusMessage);
91
- error.status_code = resp.statusCode;
92
- error._response = resp;
93
- return reject(error);
138
+ if (resp.status >= 500) {
139
+ const error = new Error(resp.statusText);
140
+ error.status_code = resp.status;
141
+ error._response = createCompatResponse(resp);
142
+ throw error;
94
143
  }
95
144
 
96
- Object.defineProperty(body, '_response', {
145
+ const compatResponse = createCompatResponse(resp);
146
+
147
+ Reflect.defineProperty(body, '_response', {
97
148
  enumerable: false,
98
149
  writable: false,
99
- value: resp
150
+ value: compatResponse
100
151
  });
101
152
 
102
- return resolve(body);
153
+ return body;
154
+ })
155
+ .catch((err) => {
156
+ // Re-throw errors that were already processed in .then() block
157
+ // (they have _response attached)
158
+ /* istanbul ignore next */
159
+ if (err._response) {
160
+ throw err;
161
+ }
162
+
163
+ // Network errors (no response from server) - just re-throw
164
+ // Note: HTTP status errors are handled in .then() since validateStatus: () => true
165
+ throw err;
103
166
  });
104
- })
105
167
 
106
168
  if (callback) {
107
- promise.then(body => callback(null, body), err => callback(err));
169
+ promise.then((body) => callback(null, body), (err) => callback(err));
108
170
  }
109
171
 
110
- return promise
172
+ return promise;
111
173
  }
112
174
 
113
175
  }
@@ -66,7 +66,7 @@ class SelfMailers extends ResourceBase {
66
66
  params[`${p}[${key}]`] = params[p][key];
67
67
  }
68
68
 
69
- delete params[p];
69
+ Reflect.deleteProperty(params, p);
70
70
  }
71
71
 
72
72
  return this._transmit('POST', null, null, params, headers, callback);
@@ -4,7 +4,7 @@ const ResourceBase = require('./resourceBase');
4
4
 
5
5
  class Template extends ResourceBase {
6
6
  constructor (config) {
7
- super('templates', config);
7
+ super('templates', config);
8
8
  }
9
9
 
10
10
  list (options, callback) {
@@ -29,4 +29,4 @@ class Template extends ResourceBase {
29
29
  }
30
30
  }
31
31
 
32
- module.exports = Template;
32
+ module.exports = Template;
@@ -14,4 +14,4 @@ class USReverseGeocodeLookups extends ResourceBase {
14
14
 
15
15
  }
16
16
 
17
- module.exports = USReverseGeocodeLookups;
17
+ module.exports = USReverseGeocodeLookups;
package/package.json CHANGED
@@ -10,11 +10,12 @@
10
10
  "Lob.com",
11
11
  "printing"
12
12
  ],
13
- "version": "6.6.3",
13
+ "version": "7.1.0",
14
14
  "homepage": "https://github.com/lob/lob-node",
15
15
  "author": "Lob <support@lob.com> (https://lob.com/)",
16
16
  "dependencies": {
17
- "request": "^2.88.0"
17
+ "axios": "^1.13.2",
18
+ "form-data": "^4.0.5"
18
19
  },
19
20
  "devDependencies": {
20
21
  "agentkeepalive": "^4.1.0",
@@ -28,6 +29,7 @@
28
29
  "json-2-csv": "^3.15.1",
29
30
  "mocha": "^10.0.0",
30
31
  "moment": "^2.22.1",
32
+ "nock": "^14.0.10",
31
33
  "nyc": "^15.1.0",
32
34
  "p-map": "^2.1.0",
33
35
  "uuid": "^3.1.0"
@@ -39,11 +41,13 @@
39
41
  "bugs:": "https://github.com/lob/lob-node/issues",
40
42
  "main": "./lib/index",
41
43
  "engines": {
42
- "node": ">= 10.0.0"
44
+ "node": ">= 20.0.0",
45
+ "npm": ">= 11.5.1"
43
46
  },
44
47
  "scripts": {
45
- "test": "cross-env NODE_ENV=test nyc mocha test --recursive --timeout 30000",
46
- "test-no-cover": "cross-env NODE_ENV=test mocha test --recursive --timeout 30000",
48
+ "test": "cross-env NODE_ENV=test nyc mocha test",
49
+ "test:integration": "mocha --config test/integration/.mocharc.json",
50
+ "test-no-cover": "cross-env NODE_ENV=test mocha test",
47
51
  "coverage": "nyc report --reporter=text",
48
52
  "enforce": "nyc check-coverage --statements 100 --lines 100 --functions 100 --branches 100",
49
53
  "test-lcov": "nyc report --reporter=lcov",
package/CHANGELOG.md DELETED
@@ -1,305 +0,0 @@
1
- ### 6.6.3 (2022-08-24)
2
- ##### Features
3
- * **campaigns** add support for campaigns endpoint ([PR_275](https://github.com/lob/lob-node/pull/275))
4
-
5
- ##### Maintenance
6
- * bump mocha from 9.1.3 to 10.0.0
7
- * bump eslint-config-lob from 1.0.1 to 5.2.0
8
-
9
- ### 6.6.2 (2022-04-11)
10
- ##### Maintenance
11
- * bump minimist from 1.2.0 to 1.2.6
12
- * bump moment from 2.29.1 to 2.29.2
13
-
14
- ### 6.6.1 (2022-04-05)
15
- ##### Maintenance
16
- * **autocomplete** add query param for address casing
17
- * Update dependency version
18
- * Updates to CI process
19
- * Updates to Repo branch naming
20
-
21
- ### 6.5.5 (2022-01-14)
22
- ##### Maintenance
23
- * Removed Bluebird dependency and replaced with p-map
24
- * Updated 4 out of date dev dependencies
25
- * Updated min required version of NodeJS to 10
26
- * Removed package-lock.json from gitignore - it is now included in the repo.
27
-
28
- ### 6.5.3 (2022-01-04)
29
-
30
- ##### Features
31
- * **templates** add support for HTML templates endpoint ([PR_258](https://github.com/lob/lob-node/pull/258))
32
-
33
- ### 6.5.2 (2021-10-18)
34
-
35
- ##### Bug Fix
36
- * **cards:** adds card update route to expose cards update endpoint in SDK. ([PR_256](https://github.com/lob/lob-node/pull/256)) ([6870842](https://github.com/lob/lob-node/pull/256/commits/68708423b03c40c277a183285920b1408d234e4b))
37
-
38
- ### 6.5.1 (2021-10-14)
39
-
40
- ##### Bug Fix
41
- * **card orders:** updates the card orders "quantity_ordered" field to "quantity" in the integration test & example to reflect the recent change in Lob API endpoint for creating card orders. ([PR_254](https://github.com/lob/lob-node/pull/254)) ([9d3a261](https://github.com/lob/lob-node/commit/9d3a261ea3e9dace1e5cd79f43c5cdb40568f6c2))
42
-
43
- ### 6.5.0 (2021-10-13)
44
-
45
- ##### Features
46
- * **cards:** add support for cards endpoint ([PR_252](https://github.com/lob/lob-node/pull/252)) ([e744da5](https://github.com/lob/lob-node/pull/252/commits/e744da5a96543ef4df8245a554e2cf325b79bdfd))
47
- * **card_orders:** add support for card orders endpoint ([PR_252](https://github.com/lob/lob-node/pull/252)) ([35bc050](https://github.com/lob/lob-node/pull/252/commits/35bc05046e2cd06029dec6e8799f82481cd2078a))
48
- * **examples:** add examples for creating a card and card order ([PR_252](https://github.com/lob/lob-node/pull/252)) ([1c41494](https://github.com/lob/lob-node/pull/252/commits/1c41494d6a46414f2f9bd5bcd26ed589cff39a06))
49
-
50
- ### 6.4.0 (2021-09-21)
51
-
52
- ##### New Features
53
-
54
- * **us_verifications:** Reverse Geocoding endpoint ([#250](https://github.com/lob/lob-node/pull/250)) ([ea1e49df](https://github.com/lob/lob-node/commit/ea1e49df8cace3938acd34811100e8df553a8180))
55
- * **examples:** added a bunch of examples which WERE in the old docs ([#249](https://github.com/lob/lob-node/pull/249)) ([bba10957](https://github.com/lob/lob-node/commit/bba109573d379c09f4e6445da263b163ee7184f6))
56
-
57
- ### 6.3.0 (2021-08-27)
58
-
59
- #### 6.2.1 (2021-07-28)
60
-
61
- ##### Chores
62
-
63
- * **deps:**
64
- * bump hosted-git-info from 2.1.4 to 2.8.9 ([#241](https://github.com/lob/lob-node/pull/241)) ([a10ed786](https://github.com/lob/lob-node/commit/a10ed786b04ecf4f4380656b2f808996fd7537bb))
65
- * bump lodash from 4.17.19 to 4.17.21 ([#239](https://github.com/lob/lob-node/pull/239)) ([b38f7e5e](https://github.com/lob/lob-node/commit/b38f7e5e818385d1435724d23de19513110a11e1))
66
- * bump handlebars from 4.5.3 to 4.7.7 ([#238](https://github.com/lob/lob-node/pull/238)) ([72198ab6](https://github.com/lob/lob-node/commit/72198ab65555c8b28c7199570b171aa497e043d7))
67
- * bump acorn from 6.2.0 to 6.4.2 ([#233](https://github.com/lob/lob-node/pull/233)) ([533d8309](https://github.com/lob/lob-node/commit/533d83096b50402a579ea8ef5da82915518454cc))
68
- * bump yargs-parser from 13.1.1 to 13.1.2 ([#230](https://github.com/lob/lob-node/pull/230)) ([96cd091c](https://github.com/lob/lob-node/commit/96cd091ce6bf5c93dd1dde6855c1734ce2067112))
69
- * bump lodash from 4.17.14 to 4.17.19 ([#228](https://github.com/lob/lob-node/pull/228)) ([48e444d1](https://github.com/lob/lob-node/commit/48e444d11a49815f685e11675e307821e4ee12f1))
70
- * **node14:** add node14 for travis ([#240](https://github.com/lob/lob-node/pull/240)) ([15d83747](https://github.com/lob/lob-node/commit/15d8374798a9f9c79dd6a5db9d566ac285b84b95))
71
-
72
- #### 6.2.0 (2021-05-03)
73
-
74
- ##### New Features
75
-
76
- * **self-mailers:** Add support for Self Mailers ([#236](https://github.com/lob/lob-node/pull/236))
77
-
78
- ##### Chores
79
-
80
- * **deps:** bump y18n from 4.0.0 to 4.0.1 ([#235](https://github.com/lob/lob-node/pull/235)) ([81cbe7b0](https://github.com/lob/lob-node/commit/81cbe7b09f9b86a02502f6c2de0c8b6471826410))
81
-
82
- ##### Bug Fixes
83
-
84
- * **README:** correct Bank Accounts documentation link ([#234](https://github.com/lob/lob-node/pull/234)) ([f7f7609d](https://github.com/lob/lob-node/commit/f7f7609d439f1a6187af2b4f7f7a8765f3d47ea5))
85
-
86
- #### 6.1.1 (2020-11-06)
87
-
88
- ##### Bug Fixes
89
-
90
- * **merge-variables:** convert merge variables to JSON ([#232](https://github.com/lob/lob-node/pull/232)) ([5352dea7](https://github.com/lob/lob-node/commit/5352dea7bbb9ddba12da82967a317edcfda0bfca))
91
-
92
- ### 6.1.0 (2020-04-15)
93
-
94
- ##### Chores
95
-
96
- * **deps:**
97
- * csv-parse@4.4.6, travis node v12, docs (#222) ([7ca4eb05](https://github.com/lob/lob-node/commit/7ca4eb05c8fb149bfdbf3c4fd3e9ed119e73e7d1))
98
- * bump eslint-utils from 1.4.0 to 1.4.2 (#217) ([212789c8](https://github.com/lob/lob-node/commit/212789c894189544e8710c0ec1619d6fcd76b3d4))
99
-
100
- ##### New Features
101
-
102
- * **resource:** add ability to specify custom HTTP agent (#224) ([bf925b1c](https://github.com/lob/lob-node/commit/bf925b1c3e54babdd9151de0d1b46ed97b4d61cb))
103
-
104
- ##### Bug Fixes
105
-
106
- * **intl-verifications:** fixed failing test (#219) ([f2b712ad](https://github.com/lob/lob-node/commit/f2b712ad93af4237a4dbb1ba565bc034a9856710))
107
-
108
- ##### Tests
109
-
110
- * **plc:** add tests for new versions (template syntax and cursor pagination) (#226) ([d5806217](https://github.com/lob/lob-node/commit/d580621732acec840bb28532ecb8eb9132e64b3b))
111
-
112
- #### 6.0.6 (2019-07-19)
113
-
114
- ##### Chores
115
-
116
- * **deps:**
117
- * upgrade vulnerable packages ([#216](https://github.com/lob/lob-node/pull/216)) ([a938fc23](https://github.com/lob/lob-node/commit/a938fc23caf38b87ea6791219d4883e862cdd1c9))
118
- * bump lodash from 4.17.11 to 4.17.14 ([#215](https://github.com/lob/lob-node/pull/215)) ([6d6b0436](https://github.com/lob/lob-node/commit/6d6b0436c8caa15d65bfe0534752842c08ee555d))
119
-
120
- #### 6.0.5 (2019-02-14)
121
-
122
- ##### Chores
123
-
124
- * **lib:** fixed npm scripts on windows, moved from istanbul to nyc ([#213](https://github.com/lob/lob-node/pull/213)) ([be91922d](https://github.com/lob/lob-node/commit/be91922d59e4fa9cc747c0e8ae2523b6f5d319c6))
125
-
126
- #### 6.0.4 (2019-01-30)
127
-
128
- ##### New Features
129
-
130
- * **postcards:** add ability to modify concurrency ([4a3bbf37](https://github.com/lob/lob-node/commit/4a3bbf373727c7c2bd9098b8425988a4adfd70d8))
131
-
132
- ##### Bug Fixes
133
-
134
- * **resource-base:** handle undefined multipart form value ([#212](https://github.com/lob/lob-node/pull/212)) ([711261dc](https://github.com/lob/lob-node/commit/711261dc23d9f09e8ae7050248068219775fb6eb))
135
-
136
- #### 6.0.3 (2019-1-7)
137
-
138
- ##### Chores
139
-
140
- * **assets:** update links ([5d7f66f0](https://github.com/lob/lob-node/commit/5d7f66f0487151a3b50b8d4581fe5b2cfa9474a9))
141
-
142
- ##### Tests
143
-
144
- * **api-key:**
145
- * remove lob api key from tests and examples ([93fee77a](https://github.com/lob/lob-node/commit/93fee77a156c53eb9454fc0be3a4d220e1943d08))
146
- * remove lob api key from tests and examples ([062022b3](https://github.com/lob/lob-node/commit/062022b3cc89b921db4a1dec863d687d0db9dabb))
147
-
148
- #### 6.0.2 (2018-12-3)
149
-
150
- ##### Bug Fixes
151
-
152
- * **resource-base:** default body to empty object ([70f9c804](https://github.com/lob/lob-node/commit/70f9c804e1dabd2360afcf307e2e98b4787d46d9))
153
- * **deps:**
154
- * upgrade rest of vulnerable deps ([3b84d7e0](https://github.com/lob/lob-node/commit/3b84d7e09b29b7cbd4718396f8fba7d74bc5b7ec))
155
- * upgrade mocha (and growl) version ([95bdf700](https://github.com/lob/lob-node/commit/95bdf700d99986d03cb85ad09d300df1557e8abf))
156
- * **addresses:** fix broken test (#202) ([e560d6bc](https://github.com/lob/lob-node/commit/e560d6bc207f8d5964470ce1b9b9883829f198e3))
157
-
158
- #### 6.0.1 (2018-8-7)
159
-
160
- ##### Bug Fixes
161
-
162
- * **headers:** don't save request specific headers in configs (#201) ([cfa0fb19](https://github.com/lob/lob-node/commit/cfa0fb191581aef2aa4a42c8ca554446700956d8))
163
-
164
- ## 6.0.0 (2018-07-02)
165
-
166
- ##### New Features
167
-
168
- * **area-mail:** remove areas and routes resources ([a17d234d](https://github.com/lob/lob-node/commit/a17d234da61f38c9a254642109a85aa6a5622810))
169
-
170
- ### 5.3.0 (2018-05-21)
171
-
172
- ##### New Features
173
-
174
- * **us-autocompletions:** add USAutocompletions ([b64b02db](https://github.com/lob/lob-node/commit/b64b02db3712d92a6934c37629c804debdfcb42c))
175
-
176
- ##### Bug Fixes
177
-
178
- * **readme:** replace dependency status badge and upgrade vulnerable deps ([#198](https://github.com/lob/lob-node/pull/198)) ([b758c76d](https://github.com/lob/lob-node/commit/b758c76d3cdd24d379c13ad5189dce4e28efe45e))
179
-
180
- ### 5.2.0 (2018-3-13)
181
-
182
- ##### New Features
183
-
184
- * **us-verifications:** allow passing queries in verification creation (#197) ([84b9a44a](https://github.com/lob/lob-node/commit/84b9a44a0044eccc33bc8e1a839c54f9ae5cb067))
185
-
186
- ### 5.1.0 (2018-02-22)
187
-
188
- ##### Refactors
189
-
190
- * **resources:** remove dynamic requires ([#196](https://github.com/lob/lob-node/pull/196)) ([4036cdda](https://github.com/lob/lob-node/commit/4036cdda417fc859dbe737eef48c78d97e38c1a8))
191
-
192
- ## 5.0.0 (2017-12-11)
193
-
194
- ##### Chores
195
-
196
- * **lib:**
197
- * use es6 classes ([38ee703e](https://github.com/lob/lob-node/commit/38ee703e2e03703d4029a922144db53d51320c01))
198
- * es6 ify resource and test files ([fbd106f3](https://github.com/lob/lob-node/commit/fbd106f3554dafefc6c0e99d24959eaf7970b6fb))
199
- * **deprecate:** Deprecate support for 0.10 and 0.12 ([#187](https://github.com/lob/lob-node/pull/187)) ([bd0130d3](https://github.com/lob/lob-node/commit/bd0130d31ff7df699d423043098385cdbec362a7))
200
-
201
- ##### Bug Fixes
202
-
203
- * **test:** fix US verification test ([a0f10925](https://github.com/lob/lob-node/commit/a0f10925bd4e244d69c53c1e9097f3c04f70f5e5))
204
- * **auto-verify:** update tests to manage auto-verify ([107eeae3](https://github.com/lob/lob-node/commit/107eeae3702290174438fd38ef0ab6d9193b3725))
205
-
206
- ##### Other Changes
207
-
208
- * **postcards:** Remove message field from postcard ([c298fe4c](https://github.com/lob/lob-node/commit/c298fe4c5eace7d746b0215b3f7e5958ae0d18c8))
209
-
210
- ##### Refactors
211
-
212
- * **object:** Use Object.prototype.call, instead of assuming objects inherit from Object.prototype ([#191](https://github.com/lob/lob-node/pull/191)) ([8648cb0c](https://github.com/lob/lob-node/commit/8648cb0cc192650352a061a8c110d09d7345ccf3))
213
-
214
- ##### Tests
215
-
216
- * **intl:** Update international verifications tests ([5f38b3d3](https://github.com/lob/lob-node/commit/5f38b3d3df4b0d44bedd5bbbf5969a5279590b57))
217
-
218
- #### 4.1.1 (2017-08-09)
219
-
220
- ##### Chores
221
-
222
- * **examples:**
223
- * update to use merge_variables ([cc6c2d3c](https://github.com/lob/lob-node/commit/cc6c2d3c96492f52e0c6a173380985fa691ee86b))
224
- * Fix examples to use new us_verifications endpoint ([b6096944](https://github.com/lob/lob-node/commit/b6096944843d1a9ee67632ee6a27688bb3da381a))
225
-
226
- ##### New Features
227
-
228
- * **idempotency-key:** Add optional headers argument to create() methods to support idempotency-key ([99ef7e92](https://github.com/lob/lob-node/commit/99ef7e92cc8e57608553abdd3b8acd38abe08cf3))
229
- * **us-zip-lookups:** Add US Zip Code Lookup ([d51e8c8b](https://github.com/lob/lob-node/commit/d51e8c8b8f6a9facb1df94d80b230a2387a9e05f))
230
- * **delete:** Add delete method to postcards, letters, and checks chore(ignore): ignore Sublime files ([aa340b57](https://github.com/lob/lob-node/commit/aa340b579cc87999dc7c0ed1cc571e30cefafbda))
231
-
232
- ##### Bug Fixes
233
-
234
- * **readme:** update documentation ([73afa906](https://github.com/lob/lob-node/commit/73afa906bd393097a3a4d18988e80f8bf6c4308b))
235
-
236
- #### 4.1.1 (2017-08-09)
237
-
238
- ##### Chores
239
-
240
- * **examples:**
241
- * update to use merge_variables ([cc6c2d3c](https://github.com/lob/lob-node/commit/cc6c2d3c96492f52e0c6a173380985fa691ee86b))
242
- * Fix examples to use new us_verifications endpoint ([b6096944](https://github.com/lob/lob-node/commit/b6096944843d1a9ee67632ee6a27688bb3da381a))
243
-
244
- ##### New Features
245
-
246
- * **idempotency-key:** Add optional headers argument to create() methods to support idempotency-key ([99ef7e92](https://github.com/lob/lob-node/commit/99ef7e92cc8e57608553abdd3b8acd38abe08cf3))
247
- * **us-zip-lookups:** Add US Zip Code Lookup ([d51e8c8b](https://github.com/lob/lob-node/commit/d51e8c8b8f6a9facb1df94d80b230a2387a9e05f))
248
- * **delete:** Add delete method to postcards, letters, and checks chore(ignore): ignore Sublime files ([aa340b57](https://github.com/lob/lob-node/commit/aa340b579cc87999dc7c0ed1cc571e30cefafbda))
249
-
250
- ##### Bug Fixes
251
-
252
- * **readme:** update documentation ([73afa906](https://github.com/lob/lob-node/commit/73afa906bd393097a3a4d18988e80f8bf6c4308b))
253
-
254
- ## 4.0.0 (2017-5-17)
255
-
256
- ##### Chores
257
-
258
- * **mock:** use mock.lob.com ([1fed1c75](https://github.com/lob/lob-node/commit/1fed1c753eeb4f6a0ec15ee4f3619c2758d7c08e))
259
- * **jobs:** removes jobs, objects, settings endpoints ([bbfd446e](https://github.com/lob/lob-node/commit/bbfd446e85f43f870d1c40ed76f6ec7d9ffc8281))
260
-
261
- ##### Documentation Changes
262
-
263
- * **contributing:** changed out-of-date link to valid ([96e21cff](https://github.com/lob/lob-node/commit/96e21cffa16efbe5c5cb3473368ca0362dfbb057))
264
-
265
- ##### New Features
266
-
267
- * **verifications:** add us and intl verification endpoints ENG-2769 ([13f5ed8c](https://github.com/lob/lob-node/commit/13f5ed8c3b1297707f077116d5770dea35c283fa))
268
- * **version:** support Node versions 0.12, 4, 5, and 6. ([7754b22f](https://github.com/lob/lob-node/commit/7754b22f020343b5adb93e4b9c2a5e8241023cfc))
269
-
270
- ##### Bug Fixes
271
-
272
- * **test:** fixes broken address test ([f22dcf8d](https://github.com/lob/lob-node/commit/f22dcf8d6041c58e5dc766dbf0196d8d62a22130))
273
- * **examples:** fix typo ([50bb5487](https://github.com/lob/lob-node/commit/50bb5487ea392d16dd5782b3f51fd398a911684a))
274
-
275
- ### 3.9.0 (2016-4-15)
276
-
277
- ##### New Features
278
-
279
- * **response:** allow access to response headers ([3c4d6514](https://github.com/lob/lob-node/commit/3c4d65149a133b196385849a1296d55b360cc202))
280
- * **api-version:** support 2016-03-21 ([a304c9cf](https://github.com/lob/lob-node/commit/a304c9cfe927138b8b37345c7ffd2c1fb9f0518f))
281
-
282
- ### 3.8.0 (2016-2-2)
283
-
284
- ##### Chores
285
-
286
- * **release:** add release scripts ([7cc243eb](https://github.com/lob/lob-node/commit/7cc243eb))
287
-
288
- ##### New Features
289
-
290
- * **version:** support api version 2016-01-19 ([6cb6cec0](https://github.com/lob/lob-node/commit/6cb6cec0))
291
- * **bank-accounts:** standardize verify function ([1d0b37c2](https://github.com/lob/lob-node/commit/1d0b37c2))
292
- * **deps:** remove gulp ([a2c164a7](https://github.com/lob/lob-node/commit/a2c164a7))
293
-
294
- ##### Bug Fixes
295
-
296
- * **errors:** always throw Error object ([41c88f97](https://github.com/lob/lob-node/commit/41c88f97))
297
- * **readme:** update testing instructions ([f193cb0a](https://github.com/lob/lob-node/commit/f193cb0a))
298
-
299
- ##### Tests
300
-
301
- * **resources:** standardize and remove unnecessary tests ([ad0e45ed](https://github.com/lob/lob-node/commit/ad0e45ed))
302
- * **setup:** use global expect, api key, Lob ([6e44ce0b](https://github.com/lob/lob-node/commit/6e44ce0b))
303
-
304
- ## [**2.6.2**](https://github.com/lob/lob-node/releases/tag/v2.6.2)
305
- - [**#88**] (https://github.com/lob/lob-node/pull/88) changed asset URLs to use lob-assets bucket