@huckleberry-inc/valuecommerce-advertiser
v1.0.3
Published
ValueCommerce node client for advertiser
Downloads
2
Readme
Welcome to @huckleberry-inc/valuecommerce-advertiser 👋
ValueCommerce node client for advertiser
🏠 Homepage
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