Service - Sell Offer Price: Difference between revisions
Jump to navigation
Jump to search
(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...") |
No edit summary |
||
Line 26: | Line 26: | ||
=== Nodes === | === Nodes === | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
nodeLabel: "{ | nodeLabel: "{SellOfferPriceLib.SELLOFFERPRICE_GRAPH_NODE_LABEL}", // "sellOfferPrice" | ||
schema: { | schema: { | ||
identifier: true, | identifier: true, | ||
Line 38: | Line 35: | ||
restrictRelationships: true, | restrictRelationships: true, | ||
properties: { | properties: { | ||
sellOfferPriceId: { | |||
identifier: true, // create unique id from request params and uniqueMessageId | identifier: true, // create unique id from request params and uniqueMessageId | ||
}, | }, | ||
userId: { | userId: { | ||
immutable: true, // a sellOfferPlan can only be used by one user (because links to their userPaymentMethods) | immutable: true, // a sellOfferPlan can only be used by one user (because links to their userPaymentMethods) | ||
}, | }, | ||
}, | }, |
Revision as of 14:05, 22 November 2021
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
{
nodeLabel: "{SellOfferPriceLib.SELLOFFERPRICE_GRAPH_NODE_LABEL}", // "sellOfferPrice"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
sellOfferPriceId: {
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)
},
},
}
}
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",
},
// ...
]
},
},
}