Service - Payment Method Generic: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= Overview = Handler service for any otherwise un-handled payment methods. = Repository = https://bitbucket.org/izara-market-products/izara-market-products-payment-method-g...") |
No edit summary |
||
Line 85: | Line 85: | ||
* adds a node between a user and a payment method | * adds a node between a user and a payment method | ||
* this is the node linked to by sellOffers | * this is the node linked to by sellOffers | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel", | |||
} | |||
{ | |||
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property", | |||
} | |||
</syntaxhighlight> | |||
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]] | |||
=== Relationships === | === Relationships === | ||
Line 101: | Line 111: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
relationshipType: "has_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property", | |||
} | |||
{ | |||
relationshipType: "disabled_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property", | |||
} | |||
{ | |||
relationshipType: "is_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel", | |||
} | |||
</syntaxhighlight> | |||
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]] | |||
== Basic node schemas == | |||
Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]] | |||
# paymentMethodPropertyLabel | |||
#* [[Service - Translations Graph]] | |||
# paymentMethodProperty | |||
#* [[Service - Translations Graph]] | |||
= Working documents = | = Working documents = |
Revision as of 09:47, 18 October 2021
Overview
Handler service for any otherwise un-handled payment methods.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-payment-method-generic/src/master/
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configTag: "PaymentMethodHandlerServiceNameTag"
configKey: "PaymentMethodHandlerServiceNameTag"
configValue: xxx // this own services ServiceNameTag, eg "PaymentMethodGeneric"
}
{
configTag: "ProductGraphServiceName"
configKey: "ProductGraphServiceName"
configValue: xxx // eg: "ProductGraph"
}
{
configTag: "PaymentMethodManagerServiceName"
configKey: "PaymentMethodManagerServiceName"
configValue: xxx // eg: "PaymentMethodManager"
}
Graph database
Service - Products Graph
Nodes
{
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}", // "paymentMethod"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
paymentMethodId: {
identifier: true, // create unique id from translation
},
paymentMethodHandlerServiceNameTag: {
immutable: true,
},
},
}
}
{
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}", // "userPaymentMethod"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
userPaymentMethodId: {
identifier: true, // create unique id from user and uniqueMessageId
},
paymentMethodHandlerServiceNameTag: {
immutable: true,
},
paymentMethodId: { // stored here to reduce queries finding matching methods, eg sellOffers
immutable: true,
},
},
}
}
- adds a node between a user and a payment method
- this is the node linked to by sellOffers
{
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}
{
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
}
- see DataSchemaLib
Relationships
{
relationshipType: "{PaymentMethodGenericLib.createIsPaymentMethodGraphRelationshipType()}", // "isPaymentMethod"
schema: {
elementCanBeRemoved: false,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
{
relationshipType: "has_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
}
{
relationshipType: "disabled_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
}
{
relationshipType: "is_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}
- see DataSchemaLib
Basic node schemas
Schema comes from BasicNodeSchemaLib
- paymentMethodPropertyLabel
- paymentMethodProperty