Actieve - Node Library for Rics Access
npm install node-ricsbash
npm install node-rics
`
TypeSript Usage
`typescript
Get a value for a gift card
import { Rics, GiftCardsResponse } from 'node-rics';
const API_TOKEN = 'Your Token';
var giftCardNumber = '1234';
var rics = new Rics(API_TOKEN);
var data = await rics.GetGiftCardByNumber(giftCardNumber) as GiftCardsResponse;
console.log(data.GiftCards[0].GiftCardValue);
`
JavaScript Usage
`javascript
var ricsLibrary = require('node-rics');
const API_TOKEN = 'Your Token';
var rics = new ricsLibrary.Rics(API_TOKEN);
var query = new ricsLibrary.ProductDetailQuery();
query.SKU = "123046P";
rics.GetProduct(query).then((data) => {
console.log(data);
});
`
Functions
`typescript
Returns the AR Customer Credit Limit
GetArCustomerCreditLimit(customerId: string): Promise;
Returns the custom entries that match the query
GetCustomEntry(types: CustomEntryType[], tagTypes: TagType[]): Promise;
Get a single customer given an email address
GetCustomersByEMail(email: string): Promise;
Get a single customer given the identifier
GetCustomerById(customerId: string): Promise;
Returns the results of a full customer query
GetCustomer(query: CustomerQuery): Promise;
Returns the Customer Details from a Customer Detail Query
GetCustomerDetails(query: CustomerDetailQuery): Promise;
Returns the customer purchase details
GetCustomerPurchaseHistory(customerId: string, take?: Number, skip?: Number): Promise;
Save customer information to the system
SaveCustomer(customer: CustomerInfo): Promise;
List the various discounts in the system
GetDiscountReason(): Promise;
Query for a users frequency rewards
GetFrequentBuyerRewards(customerId: string): Promise;
Look up buyer activity for frequent customers
GetFrequentBuyerActivity(query: BuyerActivityQuery): Promise;
Look up gift card information based on the unique identifier
GetGiftCardById(cardId: string): Promise;
Search for a gift card by a number
GetGiftCardByNumber(cardNumber: string): Promise;
Get the gift card transactions from the Rics System
GetGiftCardTransaction(query: GiftCardTransactionQuery): Promise;
Save the updated information to Rics
SaveGiftCard(info: GiftCardInfo): Promise;
Check the Rics system for inventory
GetInventoryOnHand(query: InventoryQuery): Promise;
Get a list of inventory transactions matching the defined query
GetInventoryTransaction(query: InventoryTransactionQuery): Promise;
Return a list of non sellable batch records
GetNonSellableBatch(query: NonSellableBatchQuery): Promise;
Return a list of non sellable batch details
GetNonSellableBatchDetails(query: NonSellableBatchDetailsQuery): Promise;
Query the system for POS Transactions
GetPOSTransaction(query: PosTransactionQuery): Promise;
Get a list of products that match the query
GetProduct(query: ProductQuery): Promise;
Get a list of product details that match the query
GetProductDetails(query: ProductDetailQuery): Promise;
Search for Purchase Orders
GetPurchaseOrder(query: PurchaseOrderQuery): Promise;
Saves the purchase order to the system
SavePurchaseOrder(po: PurchaseOrder): Promise;
Get any Receipt information from a list of TicketNumbers
GetReceipt(ticketNumbers: string[]): Promise;
Search for sales on a particular salesman
GetSalesBySalesperson(startDate: Date, endDate: Date, salesPersonUsername?: string, sortBy?: SortBy, storeCode?: Number, skip?: Number, take?: Number): Promise;
Search for sales on a particular sku
GetSalesBySKU(startDate: Date, endDate: Date, sku?: string, sortBy?: SortBy, storeCode?: Number, skip?: Number, take?: Number): Promise;
Search for sales for a store code between two dates
GetSalesByStoreCode(startDate: Date, endDate: Date, storeCode: Number, skip?: Number, take?: Number): Promise;
Search for sales for a store code between two dates at a particular time
GetSalesByTimeOfDay(startDate: Date, endDate: Date, storeCode: Number): Promise;
Search for tags assigned to customers
GetCustomerTags(customerId: string[]): Promise;
Query for organized tags in the system
GetOrganizationTags(tagType: string): Promise;
``