Skip to content

huckleberry-inc/valuecommerce-advertiser

Repository files navigation

Welcome to @huckleberry-inc/valuecommerce-advertiser 👋

Version License: MIT build and test

ValueCommerce node client for advertiser

API docs

Usage

import { Client } from '@huckleberry-inc/valuecommerce-advertiser'

const client = new Client();

(async () => {
  // Create Token
  const clientKey = 'CLIENT_KEY';
  const clientSecret = 'CLIENT_SECRET';
  const token = await client.token({ clientKey, clientSecret });

  const bearerToken = token.resultSet.rowData.bearer_token

  // Fetch transactions
  const transactions = await client.transaction(bearerToken);

  // Update transaction's status
  const statusMap = new Map<string, boolean>();
  statusMap.set(transactions[0].resultSet.rowData.orderId, false);

  await client.transactionStatus(
    bearerToken,
    statusMap,
  );
})();

Install

yarn add @huckleberry-inc/valuecommerce-advertiser
yarn

Run tests

VCR_MODE=cache yarn test 

Author

👤 Huckleberry, inc. [email protected]

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

About

ValueCommerce node client for advertiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages