MODORDSTOR-131 adds a new "isSubscription" field to the ongoing (formerly "renewal") schema. This story builds upon that by adding validation.
if (orderType == Ongoing)
- the "ongoing" sub-object must be present
- Since "ongoing.isSubscription" is a boolean w/ default, at the very least that field will be present.
If (orderType == One Time && "ongoing" sub-object is present)
- return an appropriate error
NOTE: There were also several fields renamed in
MODORDSTOR-131, these changes need to be factored in as part of this story as well (Api tests, etc.)
- The validation described above it implemented
- unit tests are updated
- api tests are updated