npm install vuori-request-gn
or
yarn add vuori-request-gn
{ RequestGn, Database } = require('vuori-request-gn');
const dbConfig = {
endpoint: "http://dynamo:8000'", // Connect to localhost
};
await Database.dbConnect(dbConfig);
const requestGn = new RequestGn({
GN_PASSWORD: process.env.GN_PASSWORD,
GN_USER: process.env.GN_USER,
baseURL: process.env.GN_URL,
});
requestGn.setup();
response = await requestGn.getProductsByAgent('AG 145');
{ RequestGn, Database } = require('vuori-request-gn');
const AWS = require('aws-sdk');
Database.useDb(new AWS.DynamoDB({
apiVersion: '2012-08-10',
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY
}));
const requestGn = new RequestGn({
GN_PASSWORD: process.env.GN_PASSWORD,
GN_USER: process.env.GN_USER,
baseURL: process.env.GN_URL,
});
requestGn.setup();
response = await requestGn.getProductsByAgent('AG 145');
- getProductsByAgent(agentCode)
- saveClient(clientData)
- getClient(cpf)
- editClient(clientData)
- saveTransaction(transactionData)
- saveDeliveryAddress(deliveryAddressData)