lightrail-client
Advanced tools
Comparing version 3.0.1 to 3.0.2
# Changelog | ||
## 3.0.2 | ||
[Fixed Delete Currency Params](https://github.com/Giftbit/lightrail-client-javascript/pull/24) | ||
- Fixed Typo in DeleteCurrencyParams file name | ||
- Fixed Response definition, DeleteCurrencyRequest to DeleteCurrencyResponse | ||
- Fixed validateRequiredParams method to to avoid issues with valid falsy values (ie: 0) | ||
## 3.0.0 | ||
@@ -4,0 +11,0 @@ [Deprecation updates and minor naming bug fixes.](https://github.com/Giftbit/lightrail-client-javascript/pull/22) |
@@ -6,3 +6,3 @@ import { CreateCurrencyParams, CreateCurrencyResponse } from "./params/currencies/CreateCurrencyParams"; | ||
import { UpdateCurrencyParams, UpdateCurrencyResponse } from "./params/currencies/UpdateCurrencyParams"; | ||
import { DeleteCurrencyRequest } from "./params/currencies/DeleteCurrencyParms"; | ||
import { DeleteCurrencyResponse } from "./params/currencies/DeleteCurrencyParams"; | ||
export declare function createCurrency(params: CreateCurrencyParams): Promise<CreateCurrencyResponse>; | ||
@@ -12,3 +12,3 @@ export declare function listCurrencies(): Promise<ListCurreniesResponse>; | ||
export declare function updateCurrency(currency: string | Currency, params: UpdateCurrencyParams): Promise<UpdateCurrencyResponse>; | ||
export declare function deleteCurrency(currency: string | Currency): Promise<DeleteCurrencyRequest>; | ||
export declare function deleteCurrency(currency: string | Currency): Promise<DeleteCurrencyResponse>; | ||
/** | ||
@@ -15,0 +15,0 @@ * Get currency code from the string (as the ID itself) or Currency object. |
@@ -96,4 +96,4 @@ "use strict"; | ||
function getCurrencyCode(currency) { | ||
if (!currency) { | ||
throw new Error("currency issuance not set"); | ||
if (currency == null || currency === undefined) { | ||
throw new Error("currency not set"); | ||
} | ||
@@ -107,5 +107,5 @@ else if (typeof currency === "string") { | ||
else { | ||
throw new Error("issuance must be a string for issuanceId or a Issuance object"); | ||
throw new Error("currency must be a string or Currency object"); | ||
} | ||
} | ||
exports.getCurrencyCode = getCurrencyCode; |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.validateRequiredParams = (keys, params) => keys.every(key => { | ||
if (!params[key]) { | ||
if (params[key] === undefined || params[key] === null) { | ||
throw new Error("params." + key + " not set"); | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "lightrail-client", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A Javascript and Typescript client for Lightrail", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76674