reshuffle-fastspring-connector
Code | npm | Code sample
npm install reshuffle-fastspring-connector
Reshuffle FastSpring Connector
This package contains a Resshufle connector to fastspring.com. It can be used to configure and manage online store and purchases, and privdes access to the full FastSpring API.
This example gets the product list from Fast Spring:
const Reshuffle = const FastSpringConnector = ;async { const app = const fs = app username: processenvFASTSPRING_USERNAME password: processenvFASTSPRING_PASSWORD const products = await fs console}
Table of Contents
Configuration Configuration options
Connector actions:
deleteProduct Delete a product
getLocalizedPrice Get price in a specific country
getProductInfo Get product information
getProductList Get a list of available products
updateProduct Create or update one product
updateProducts Create or update multiple products
updateSimpleProduct Simplified create/update action
REST:
DELETE Direct REST DELETE
GET Direct REST GET
POST Direct REST POST
Configuration options
const app = const fastSpringConnector = app
Connector actions
Delete Product action
Definition:
productID: string, void
Usage:
await fastSpringConnector
Delete a product from the store.
Get Localized Price action
Definition:
productID: string, countryCode?: string, // optional number
Usage:
const usd = await fastSpringConnector
Get the price for a product in a specific country. If a price in local currency was not defined for the product, then the stored price is automaically converted into local currency.
Get Product Info action
Definition:
productID: string, Object
Usage:
const info = await fastSpringConnector
Get the full product information. See updateProduct below for details.
Get Product List action
Definition:
string
Usage:
const list = await fastSpringConnector
Get a list of product IDs for all the products in your store.
Update Product action
Definition:
productID: string, info: Object, void
Usage:
await fastSpringConnector
Create or update a product with a specified ID. A full description of the product information object can be found here.
Update is an additive operation, i.e. fields that are not included in the
info
object are not removed from the object record. Rather new fields are
added and new values for exsiting fields are updated.
If no product with the specified ID exists, then a new object is created.
Update Products action
Definition:
info: Object, void
Usage:
await fastSpringConnector
Create or update multiple products using product info objects. A full description of the product information object can be found here.
Update Simple Product action
Definition:
productID: string, englishDisplay: string, // display name usd: number, // price in USD void
Usage:
await fastSpringConnector
A simplified interface for creating or updating product information. For full control over product info, use updateSimpleProduct above.
REST
DELETE action
Definition:
path: string, object | text
Usage:
const response = await fastSpringConnector
Send a DELETE request. Returns a JavaScript object for JSON responses or text string otherwise. Throws an exception if a non-2xx HTTP code is returned.
GET action
Definition:
path: string, object | text
Usage:
const response = await fastSpringConnector
Send a GET request. Returns a JavaScript object for JSON responses or text string otherwise. Throws an exception if a non-2xx HTTP code is returned.
POST action
Definition:
path: string, body: object, object | text
Usage:
const response = await fastSpringConnector
Send a POST request. Returns a JavaScript object for JSON responses or text string otherwise. Throws an exception if a non-2xx HTTP code is returned.