Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightrail-client

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightrail-client - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/model/Transaction.d.ts

3

dist/cards.d.ts

@@ -10,2 +10,4 @@ import * as valueStores from "./valueStores";

import { Contact } from "./model/Contact";
import { Transaction } from "./model/Transaction";
import { CreateTransactionParams } from "./params/CreateTransactionParams";
export { valueStores };

@@ -22,2 +24,3 @@ export declare function createCard(params: CreateCardParams): Promise<Card>;

export declare function updateCard(card: string | Card, params: UpdateCardParams): Promise<Card>;
export declare function createTransaction(card: string | Card, params: CreateTransactionParams): Promise<Transaction>;
export declare function getCardId(card: string | Card): string;

@@ -102,2 +102,19 @@ "use strict";

exports.updateCard = updateCard;
function createTransaction(card, params) {
return __awaiter(this, void 0, void 0, function* () {
if (!params) {
throw new Error("params not set");
}
else if (!params.userSuppliedId) {
throw new Error("params.userSuppliedId not set");
}
const cardId = getCardId(card);
const resp = yield lightrail.request("POST", `cards/${encodeURIComponent(cardId)}/transactions`).send(params);
if (resp.status === 200) {
return resp.body.transaction;
}
throw new LightrailRequestError_1.LightrailRequestError(resp);
});
}
exports.createTransaction = createTransaction;
function getCardId(card) {

@@ -104,0 +121,0 @@ if (!card) {

2

package.json
{
"name": "lightrail-client",
"version": "0.0.2",
"version": "0.0.3",
"description": "A Javascript and Typescript client for Lightrail",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc