0.2.5 • Published 2 years ago
@lomii/lomi-sdk v0.2.5
Lomi-sdk
This is our Lomi main library, it has abstractions of some of our commonly used flows
Promotions endpoint
Access to Promotions V1 Endpoint flexible promotions
Delivery promotions
Get all promotions avaible relationed to delivery and shipments
import { Promotions } from '@lomii/lomi-sdk'
Promotions.getPromotionsOfCart(cart.data.attributes).then((promotions)=>{
/**
* {
* currentDeliveryPromotion: Promotion | Null if not reachead one
* nextPromotion: Promotion | Null if current is last goal
* }
* **/
doSomethingWithPromotions(promotions)
})
function doSomethingWithPromotions(promotions){
console.log(`Actualmente tu carrito tiene la siguiente promocion activa : ${promotions.currentDeliveryPromotion.name}`);
console.log(`Te faltan ${promotions.nextPromotion.amountToReach} pesos para alcanzar la siguiente meta`)
}
0.2.1
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.0-release
3 years ago
0.1.0
3 years ago
0.1.3-1
3 years ago
0.1.2
3 years ago
0.2.0
3 years ago
0.1.1
3 years ago
0.0.8
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago