1.1.1 • Published 4 years ago

clover-client v1.1.1

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
4 years ago

Clover Client

Usage

import CloverClient, { METHODS } from 'clover-client';

const MERCHANT_ID = 'abc';
const API_TOKEN = 'xyz';

const client = new CloverClient({ isProduction: true });

(async () => {
  const response = await client.request({
    endpoint: `merchants/${MERCHANT_ID}`,
    method: METHODS.POST,
    query: {
      expand: ['employees'],
    },
    body: {
      name: 'Merchant Name',
      owner: {
        name: 'Owner Name',
      },
    },
    apiToken: API_TOKEN,
  });

  console.dir(response);
})();

const customClient = new CloverClient({
  isProduction = true,
  retryLimit = 5,
  timeout = 5000,
  rateLimits = {
    app: 20,
    token: 10,
  },
  concurrencyLimits = {
    app: 20,
    token: 10,
  },
});
1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago