@como/como-client
Advanced tools
Comparing version 0.7.93 to 0.7.94
{ | ||
"name": "@como/como-client", | ||
"version": "0.7.93", | ||
"version": "0.7.94", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -307,2 +307,19 @@ const moment = require('moment-timezone'); | ||
/** | ||
* @param {string} language language code | ||
*/ | ||
async updateLanguage(language) { | ||
const { api } = this.comoData; | ||
try { | ||
const data = await api.updateLanguage(language); | ||
return data; | ||
} catch (error) { | ||
if (error.response && error.response.data) { | ||
const { code, message } = error.response.data; | ||
throw new Error(code || message); | ||
} | ||
throw error; | ||
} | ||
} | ||
/** | ||
* | ||
@@ -309,0 +326,0 @@ * @param {string} unsubscribeSms unsubscribe user at location |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
231840
4933
1