Service - Delivery Method Rate Table: Difference between revisions
Jump to navigation
Jump to search
Line 49: | Line 49: | ||
==== rateTableRates ==== | ==== rateTableRates ==== | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | { | ||
properties: { | properties: { | ||
Line 67: | Line 68: | ||
}, | }, | ||
} | } | ||
</syntaxhighlight> | |||
=== Relationships === | === Relationships === |
Revision as of 13:53, 23 October 2021
Overview
Manages delivery rate tables for delivery methods (possible other objects). Rate tables combine set rates at a certain value with increment settings to easily maintain rate table calculations.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-delivery-method-rate-table
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configTag: "ProductGraphServiceName"
configKey: "ProductGraphServiceName"
configValue: xxx // eg: "ProductGraph"
}
Graph database
Service - Products Graph
Nodes
{
nodeLabel: "{DeliveryMethodRateTableLib.RATETABLE_GRAPH_NODE_LABEL}", // "rateTable"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
rateTableId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
},
}
}
- see DataSchemaLib
Versioned data
rateTableRates
{
properties: {
rates: [
{
type: "setRate",
upToValue: xx, // numeric value that this setRate goes up to
rate: xx, // numeric rate
},
{
type: "increment",
upToValue: xx, // numeric value that this setRate goes up to
ratePerIncrement: xx, // numeric amount that rate increases per increment
increment: xx, // numeric incremental amount
},
// ..
],
},
}
Relationships
Data structure notes
- multiple deliveryMethods could point to a single rateTable