Service - Sell Offer Price
Revision as of 14:03, 22 November 2021 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Standard pricing config that can be shared by many sellOffers. Can create other pricing services in the future, each SellOffer Handler service chooses which pric...")
Overview
Standard pricing config that can be shared by many sellOffers. Can create other pricing services in the future, each SellOffer Handler service chooses which pricing service it uses (or many if it wants).
Repository
https://bitbucket.org/izara-market-products/izara-market-products-sell-offer-plan
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configTag: "ProductGraphServiceName"
configKey: "ProductGraphServiceName"
configValue: xxx // eg: "ProductGraph"
}
Graph database
Service - Products Graph
Nodes
.... continue here
{
nodeLabel: "{SellOfferPlanLib.SELLOFFERPLAN_GRAPH_NODE_LABEL}", // "sellOfferPlan"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
sellOfferPlanId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
userId: {
immutable: true, // a sellOfferPlan can only be used by one user (because links to their userPaymentMethods)
},
currencyId: {
immutable: true, // all added deliveryMethods must match
},
},
}
}
{
nodeLabel: "{SellOfferPlanLib.SELLOFFERPLAN_DELIVERYMETHODLINK_GRAPH_NODE_LABEL}", // "sellOfferPlanDeliveryMethodLink"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
sellOfferPlanDeliveryMethodLinkId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
},
}
}
{
nodeLabel: "{SellOfferPlanLib.SELLOFFERPLAN_USERPAYMENTMETHODLINK_GRAPH_NODE_LABEL}", // "sellOfferPlanUserPaymentMethodLink"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
sellOfferPlanUserPaymentMethodLinkId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
},
}
}
Versioned data
sellOfferPriceSettings
{
properties: {
minimumQuantity: xx,
prices: {
sellOfferQuantity: [ // sellOfferQuantity type price settings, ordered low to high
{
upToValue: "xx.xx",
price: "xx.xx",
},
// ...
],
orderQuantity: [ // orderQuantity type price settings, ordered low to high
{
upToValue: "xx.xx",
price: "xx.xx",
},
// ...
]
orderValue: [ // orderValue type price settings, ordered low to high
{
upToValue: "xx.xx",
price: "xx.xx",
},
// ...
]
},
},
}