Hello,
As defined at "TMF630_REST_API_Design_Guidelines_4.2.0" Chapter 4. EntityRefOrValue pattern: When an object (or list of objects) exists in the server side then it can be referred to by its reference; when the object (or list of objects) does not exist then it can only be referenced by its value. The EntityRefOrValue pattern is useful when there is a need to pass to the server an object (or a list of objects) in either existence state.
so ProductOfferingPriceRefOrValue could have ProductOfferingPrice ref (id, href) or the value, so ProductOfferingPrice object and ProductOfferingPriceRefOrValue object should be the same if I used the expand directive or if I decided to show the value instead of the Ref because RefOrValue give me the permission to do that.
the problem is that ProductOfferingPrice Entity is different than ProductOfferingPriceRefOrValue
- ProductOfferingPrice.price is a Money Entity, so it should be like that
"productOfferingPrice": [
{
"price": {
"unit": "string",
"value": 0
}
}
]
- ProductOfferingPriceRefOrValue.price is a ProductPriceValue Entity, so it should be like this
"productOfferingPrice": [
{
"price": {
"percentage": 0,
"taxCategory": "string",
"taxRate": 0,
"dutyFreeAmount": {
"unit": "string",
"value": 0
},
"taxIncludedAmount": {
"unit": "string",
"value": 0
}
}
}
]
This is misleading to me, Should I use the ProductOfferingPrice as a RefOrValue and not use expand to expand it? even if i did that, it still misleading for me because the price at /ProductOffering endpoint will be different than /ProductOfferingPrice endpoint and they have the same ID, so it should be the exact same object.