Service - Sell Offer Price: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 139: | Line 139: | ||
{ | { | ||
"hasSellOfferPricing": { | "hasSellOfferPricing": { | ||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"SellOfferPrice", | |||
relationshipTag: "disabledSellOfferPricing" | |||
}, | |||
], | |||
} | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 158: | Line 156: | ||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "SellOfferStandard", | ||
objectType: " | objectType: "sellOfferStandard" | ||
}, | }, | ||
linkType: "many", | linkType: "many", | ||
| Line 171: | Line 169: | ||
handler: true | handler: true | ||
} | } | ||
} | }, | ||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferReservedSales", | |||
objectType: "sellOfferReservedSale" | |||
}, | |||
linkType: "many", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPricing" | |||
}, | |||
linkType: "many", | |||
handler: true | |||
} | |||
}, | |||
] | ] | ||
} | } | ||
| Line 181: | Line 197: | ||
{ | { | ||
"disabledSellOfferPricing": { | "disabledSellOfferPricing": { | ||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"SellOfferPrice", | |||
relationshipTag: "hasSellOfferPricing" | |||
}, | |||
], | |||
} | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 200: | Line 214: | ||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "SellOfferStandard", | ||
objectType: " | objectType: "SellOfferStandard" | ||
}, | }, | ||
linkType: "many", | linkType: "many", | ||
| Line 213: | Line 227: | ||
handler: true | handler: true | ||
} | } | ||
} | }, | ||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "SellOfferReservedSales", | |||
objectType: "sellOfferReservedSale" | |||
}, | |||
linkType: "many", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "SellOfferPrice", | |||
objectType: "sellOfferPricing" | |||
}, | |||
linkType: "many", | |||
handler: true | |||
} | |||
}, | |||
] | ] | ||
} | } | ||
Latest revision as of 00:19, 17 August 2025
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": {
canChangeToRelTypes: [
{
serviceTag:"SellOfferPrice",
relationshipTag: "disabledSellOfferPricing"
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferStandard",
objectType: "sellOfferStandard"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "many",
handler: true
}
},
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferReservedSales",
objectType: "sellOfferReservedSale"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "many",
handler: true
}
},
]
}
}
disabledSellOfferPricing
{
"disabledSellOfferPricing": {
canChangeToRelTypes: [
{
serviceTag:"SellOfferPrice",
relationshipTag: "hasSellOfferPricing"
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "graphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferStandard",
objectType: "SellOfferStandard"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "SellOfferPrice",
objectType: "sellOfferPricing"
},
linkType: "many",
handler: true
}
},
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "SellOfferReservedSales",
objectType: "sellOfferReservedSale"
},
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
}
}
]
}
}