lob 6.6.2 → 6.6.3
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/CHANGELOG.md +9 -1
- package/README.md +7 -2
- package/lib/index.js +1 -1
- package/lib/resources/campaigns.js +34 -0
- package/lib/resources/index.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
### 6.6.
|
|
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)
|
|
2
10
|
##### Maintenance
|
|
3
11
|
* bump minimist from 1.2.0 to 1.2.6
|
|
4
12
|
* bump moment from 2.29.1 to 2.29.2
|
package/README.md
CHANGED
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [](https://travis-ci.org/lob/lob-node) [](https://david-dm.org/lob/lob-node) [](https://david-dm.org/lob/lob-node) [](https://coveralls.io/r/lob/lob-node?branch=master)
|
|
12
12
|
|
|
13
|
-
Node.js wrapper for the [Lob.com](https://lob.com) API. See full Lob.com documentation [here](https://lob.com/docs/node).
|
|
13
|
+
Node.js wrapper for the [Lob.com](https://lob.com) API. See full Lob.com documentation [here](https://lob.com/docs/node).
|
|
14
|
+
******
|
|
15
|
+
Starting a new project, we recommend using our <a href="https://github.com/lob/lob-typescript-sdk"><strong>TypeScript SDK</strong></a>!
|
|
16
|
+
|
|
17
|
+
Move your existing project from lob-node to lob-typescript-sdk? <a href="https://github.com/lob/lob-typescript-sdk/blob/main/Migration.md">Checkout this migration guide.</a>
|
|
18
|
+
******
|
|
14
19
|
|
|
15
20
|
## Table of Contents
|
|
16
21
|
|
|
@@ -109,7 +114,7 @@ We've provided various examples for you to try out [here](https://github.com/lob
|
|
|
109
114
|
|
|
110
115
|
There are simple scripts to demonstrate how to create all the core Lob objects (checks, letters, postcards. etc.) as well as more complex examples that utilize other libraries and external files.
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
### Accessing Response Headers
|
|
113
118
|
|
|
114
119
|
You can access response headers via a hidden `_response` property.
|
|
115
120
|
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const ClientVersion = require('../package.json').version;
|
|
4
4
|
const Resources = require('./resources');
|
|
5
5
|
|
|
6
|
-
const LOB_HOST = 'https://api.lob.com/v1/';
|
|
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
9
|
const Lob = function (apiKey, options) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ResourceBase = require('./resourceBase');
|
|
4
|
+
|
|
5
|
+
class Campaigns extends ResourceBase {
|
|
6
|
+
|
|
7
|
+
constructor (config) {
|
|
8
|
+
super('campaigns', config);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
list (options, callback) {
|
|
12
|
+
if (typeof options === 'function') {
|
|
13
|
+
callback = options;
|
|
14
|
+
options = {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return this._transmit('GET', null, options, null, callback);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
retrieve (id, callback) {
|
|
21
|
+
return this._transmit('GET', id, null, null, callback);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
delete (id, callback) {
|
|
25
|
+
return this._transmit('DELETE', id, null, null, callback);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
create (params, callback) {
|
|
29
|
+
return this._transmit('POST', null, null, params, callback);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = Campaigns;
|
package/lib/resources/index.js
CHANGED
|
@@ -5,6 +5,7 @@ module.exports = {
|
|
|
5
5
|
bankAccounts: require('./bankAccounts'),
|
|
6
6
|
bulkIntlVerifications: require('./bulkIntlVerifications'),
|
|
7
7
|
bulkUSVerifications: require('./bulkUSVerifications'),
|
|
8
|
+
campaigns: require('./campaigns'),
|
|
8
9
|
cards: require('./cards'),
|
|
9
10
|
cardOrders: require('./cardOrders'),
|
|
10
11
|
checks: require('./checks'),
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"Lob.com",
|
|
11
11
|
"printing"
|
|
12
12
|
],
|
|
13
|
-
"version": "6.6.
|
|
13
|
+
"version": "6.6.3",
|
|
14
14
|
"homepage": "https://github.com/lob/lob-node",
|
|
15
15
|
"author": "Lob <support@lob.com> (https://lob.com/)",
|
|
16
16
|
"dependencies": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"cross-env": "^5.2.0",
|
|
24
24
|
"csv-parse": "^4.4.6",
|
|
25
25
|
"eslint": "^8.6.0",
|
|
26
|
-
"eslint-config-lob": "^
|
|
26
|
+
"eslint-config-lob": "^5.2.0",
|
|
27
27
|
"generate-changelog": "^1.0.0",
|
|
28
28
|
"json-2-csv": "^3.15.1",
|
|
29
|
-
"mocha": "^
|
|
29
|
+
"mocha": "^10.0.0",
|
|
30
30
|
"moment": "^2.22.1",
|
|
31
31
|
"nyc": "^15.1.0",
|
|
32
32
|
"p-map": "^2.1.0",
|