Service - Sell Offer Price: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
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). | 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). | ||
A user can point their sellOffer standard to any | A user can point their sellOffer standard to any sellOfferPricing, even ones created by other users, but only the user who created the sellOfferPrice can change it. | ||
= Repository = | = Repository = | ||
Line 9: | Line 9: | ||
https://bitbucket.org/izara-market-products/izara-market-products-sell-offer-price/ | https://bitbucket.org/izara-market-products/izara-market-products-sell-offer-price/ | ||
= | = Object Schemas = | ||
; Additional Information: [[Per Service Schemas]] | |||
=== | == objType == | ||
=== sellOfferPricing === | |||
* Groups many sellOfferPrice together | |||
* sellOfferPricing have only one priceType of ''sellOfferQuantity'' or ''orderQuantity'' or ''orderValue'' | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
objectType: "sellOfferPricing", | |||
canDelete: false, | |||
complexFilterServiceTag: "ComplexFilter", | |||
overWriteHandlers: { // optional, if not set will create default handlers, if empty will not create handler and main function | |||
create: ['hdrApi', 'hdrSqs'], // default: ['hdrApi', 'hdrSqs'] | |||
update: ['hdrSqs'], // default: ['hdrApi', 'hdrSqs'] | |||
get: [], // default: ['hdrApi', 'hdrInv'] | |||
delete: [], // default: ['hdrApi', 'hdrSqs'] | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
fieldNames: { | |||
sellOfferPricingId: { | |||
type: "string", | |||
randomOnCreate: true, | |||
canUpdate: false, | |||
validation: { | |||
pattern: pattern | |||
}, | |||
storageResourceTags: ['myGraph'] | |||
}, | |||
priceType: { | |||
type: "string", | |||
requiredOnCreate: true, | |||
validation: { | |||
pattern: pattern | |||
}, | |||
storageResourceTags: ['myGraph'] | |||
}, | |||
minimumQuantity: { | |||
type: "number", | |||
requiredOnCreate: true, | |||
validation: { | |||
pattern: pattern | |||
}, | |||
storageResourceTags: ['myGraph'] | |||
} | |||
}, | |||
identifiers: [ | |||
{ | |||
type: "identifier", | |||
fieldName: "sellOfferPricingId" | |||
} | |||
] | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= | ==== fieldNames ==== | ||
; priceType | |||
: ''sellOfferQuantity''|''orderQuantity''|''orderValue'' | |||
=== | === sellOfferPrice === | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
objectType: "sellOfferPrice", | |||
canDelete: false, | |||
complexFilterServiceTag: "ComplexFilter", | |||
overWriteHandlers: { // optional, if not set will create default handlers, if empty will not create handler and main function | |||
create: ['hdrApi', 'hdrSqs'], // default: ['hdrApi', 'hdrSqs'] | |||
update: [], // default: ['hdrApi', 'hdrSqs'] | |||
sellOfferPriceId: { | get: [], // default: ['hdrApi', 'hdrInv'] | ||
delete: [], // default: ['hdrApi', 'hdrSqs'] | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
fieldNames: { | |||
sellOfferPriceId: { | |||
type: "string", | |||
randomOnCreate: true, | |||
canUpdate: false, | |||
validation: { | |||
pattern: pattern | |||
}, | }, | ||
storageResourceTags: ['myGraph'] | |||
}, | |||
uptoValue: { | |||
type: "number", | |||
requiredOnCreate: true, | |||
validation: { | |||
pattern: pattern | |||
}, | }, | ||
storageResourceTags: ['myGraph'] | |||
}, | }, | ||
} | price: { | ||
type: "number", | |||
requiredOnCreate: true, | |||
validation: { | |||
pattern: pattern | |||
}, | |||
storageResourceTags: ['myGraph'] | |||
} | |||
}, | |||
identifiers: [ | |||
{ | |||
type: "identifier", | |||
fieldName: "sellOfferPriceId" | |||
} | |||
] | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == Object Relationships == | ||
==== | === hasSellOfferPricing === | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
"hasSellOfferPricing": { | |||
fieldNames: { | |||
"originTimestamp": { | |||
type: "number", // "string" | "number" ... | |||
requiredOnCreate: true, // default = false | |||
canUpdate: false, // default = true | |||
validation: {} // ajv syntax | |||
} | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "graphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferManager", | |||
objectType: "sellOffer" | |||
}, | |||
linkType: "many", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPricing" | |||
}, | |||
linkType: "many", | |||
handler: true | |||
} | |||
} | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== disabledSellOfferPricing === | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"disabledSellOfferPricing": { | |||
fieldNames: { | |||
"originTimestamp": { | |||
type: "number", // "string" | "number" ... | |||
{ | requiredOnCreate: true, // default = false | ||
canUpdate: false, // default = true | |||
validation: {} // ajv syntax | |||
} | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "graphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferManager", | |||
objectType: "sellOffer" | |||
}, | |||
linkType: "many", | |||
}, | }, | ||
// ... | to: { | ||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
{ | objectType: "sellOfferPricing" | ||
}, | |||
linkType: "many", | |||
handler: true | |||
} | |||
} | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== hasSellOfferPrice === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
"hasSellOfferPrice": { | |||
fieldNames: { | |||
"originTimestamp": { | |||
type: "number", // "string" | "number" ... | |||
requiredOnCreate: true, // default = false | |||
canUpdate: false, // default = true | |||
validation: {} // ajv syntax | |||
} | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "graphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPricing" | |||
}, | |||
linkType: "one", | |||
handler: true | |||
}, | }, | ||
// ... | to: { | ||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
{ | objectType: "sellOfferPrice" | ||
}, | |||
requiredOnCreate: true, | |||
linkType: "many", | |||
handler: true | |||
} | |||
} | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== disabledSellOfferPrice === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
"disabledSellOfferPrice": { | |||
fieldNames: { | |||
"originTimestamp": { | |||
type: "number", // "string" | "number" ... | |||
requiredOnCreate: true, // default = false | |||
canUpdate: false, // default = true | |||
validation: {} // ajv syntax | |||
} | |||
}, | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "graphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPricing" | |||
}, | |||
linkType: "one", | |||
handler: true | |||
}, | }, | ||
to: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPrice" | |||
} | }, | ||
linkType: "many", | |||
handler: true | |||
} | |||
} | |||
] | |||
} | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Working documents = | = Working documents = |
Latest revision as of 05:41, 19 November 2024
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).
A user can point their sellOffer standard to any sellOfferPricing, even ones created by other users, but only the user who created the sellOfferPrice can change it.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-sell-offer-price/
Object Schemas
- Additional Information
- Per Service Schemas
objType
sellOfferPricing
- Groups many sellOfferPrice together
- sellOfferPricing have only one priceType of sellOfferQuantity or orderQuantity or orderValue
{
objectType: "sellOfferPricing",
canDelete: false,
complexFilterServiceTag: "ComplexFilter",
overWriteHandlers: { // optional, if not set will create default handlers, if empty will not create handler and main function
create: ['hdrApi', 'hdrSqs'], // default: ['hdrApi', 'hdrSqs']
update: ['hdrSqs'], // default: ['hdrApi', 'hdrSqs']
get: [], // default: ['hdrApi', 'hdrInv']
delete: [], // default: ['hdrApi', 'hdrSqs']
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
fieldNames: {
sellOfferPricingId: {
type: "string",
randomOnCreate: true,
canUpdate: false,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
},
priceType: {
type: "string",
requiredOnCreate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
},
minimumQuantity: {
type: "number",
requiredOnCreate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
}
},
identifiers: [
{
type: "identifier",
fieldName: "sellOfferPricingId"
}
]
}
fieldNames
- priceType
- sellOfferQuantity|orderQuantity|orderValue
sellOfferPrice
{
objectType: "sellOfferPrice",
canDelete: false,
complexFilterServiceTag: "ComplexFilter",
overWriteHandlers: { // optional, if not set will create default handlers, if empty will not create handler and main function
create: ['hdrApi', 'hdrSqs'], // default: ['hdrApi', 'hdrSqs']
update: [], // default: ['hdrApi', 'hdrSqs']
get: [], // default: ['hdrApi', 'hdrInv']
delete: [], // default: ['hdrApi', 'hdrSqs']
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
fieldNames: {
sellOfferPriceId: {
type: "string",
randomOnCreate: true,
canUpdate: false,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
},
uptoValue: {
type: "number",
requiredOnCreate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
},
price: {
type: "number",
requiredOnCreate: true,
validation: {
pattern: pattern
},
storageResourceTags: ['myGraph']
}
},
identifiers: [
{
type: "identifier",
fieldName: "sellOfferPriceId"
}
]
}
Object Relationships
hasSellOfferPricing
{
"hasSellOfferPricing": {
fieldNames: {
"originTimestamp": {
type: "number", // "string" | "number" ...
requiredOnCreate: true, // default = false
canUpdate: false, // default = true
validation: {} // ajv syntax
}
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferManager",
objectType: "sellOffer"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "many",
handler: true
}
}
]
}
}
disabledSellOfferPricing
{
"disabledSellOfferPricing": {
fieldNames: {
"originTimestamp": {
type: "number", // "string" | "number" ...
requiredOnCreate: true, // default = false
canUpdate: false, // default = true
validation: {} // ajv syntax
}
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferManager",
objectType: "sellOffer"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "many",
handler: true
}
}
]
}
}
hasSellOfferPrice
{
"hasSellOfferPrice": {
fieldNames: {
"originTimestamp": {
type: "number", // "string" | "number" ...
requiredOnCreate: true, // default = false
canUpdate: false, // default = true
validation: {} // ajv syntax
}
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "one",
handler: true
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPrice"
},
requiredOnCreate: true,
linkType: "many",
handler: true
}
}
]
}
}
disabledSellOfferPrice
{
"disabledSellOfferPrice": {
fieldNames: {
"originTimestamp": {
type: "number", // "string" | "number" ...
requiredOnCreate: true, // default = false
canUpdate: false, // default = true
validation: {} // ajv syntax
}
},
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "one",
handler: true
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPrice"
},
linkType: "many",
handler: true
}
}
]
}
}