2.4.0 • Published 6 years ago

@pgprojectx/open-commerce-sdk v2.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

open-commerce-sdk

Client library for interacting with SalesForce Open Commerce api.

Installation

npm install @pgprojectx/open-commerce-sdk

Usage

const ocSDK = require('@pgprojectx/open-commerce-sdk');
OpenCommerceSDK.ApiClient.instance = new OpenCommerceSDK.ApiClient({ basePath: basePath, clientId: clientId });

const productApi = new OpenCommerceSDK.Product();

development

  1. Set environment variables appropriate to running a Open Commerce deployment (see olay-api-serverless/config).

    NOTE: If you do not set your environment properly, the repl will not start:

λ ./src/repl.js
> init()
missing env OC_API_HOST
missing env OC_CLIENT_ID
Error: invalid config, abort
  1. Start the repl via ./src/repl.js. Once the repl starts, you may init(), this loads two references on the repl context: config and oc:
> init()
> ProductApi
ProductApi.getProduct('075609195518').then(d => data = d);
> data
{ _v: '17.8',
  _type: 'product',
  ... }
2.4.0

6 years ago

2.3.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.13

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago