rejoiner 2.11.0 → 2.11.1

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.
@@ -15,7 +15,7 @@ const customerEndpoint = (client) => {
15
15
  unsubscribe: (email) => postEmail(`${endpoint}/unsubscribe/`, email),
16
16
  optIn: (email) => postEmail(`${endpoint}/opt_in/`, email),
17
17
  get: (email) => {
18
- switch (client.version) {
18
+ switch (client.apiVersion) {
19
19
  case 1:
20
20
  return dispatchReturnData('get')(`customers/${email}/`)
21
21
  case 2:
@@ -23,17 +23,17 @@ const customerEndpoint = (client) => {
23
23
  params: { email },
24
24
  })
25
25
  default:
26
- throw new Error(`Invalid API version: ${client.version}`)
26
+ throw new Error(`Invalid API version: ${client.apiVersion}`)
27
27
  }
28
28
  },
29
29
  update: (data) => {
30
- switch (client.version) {
30
+ switch (client.apiVersion) {
31
31
  case 1:
32
32
  return putEmail(`customers/${data.email}/`, data)
33
33
  case 2:
34
34
  return postEmail('/customers/', data)
35
35
  default:
36
- throw new Error(`Invalid API version: ${client.version}`)
36
+ throw new Error(`Invalid API version: ${client.apiVersion}`)
37
37
  }
38
38
  },
39
39
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rejoiner",
3
3
  "description": "Rejoiner REST API client wrapper for Node.js",
4
- "version": "2.11.0",
4
+ "version": "2.11.1",
5
5
  "main": "lib/rejoiner.js",
6
6
  "author": "Sascha Bratton <sascha@brattonbratton.com>",
7
7
  "license": "MIT",