Closed honeycomb-cheesecake closed 6 months ago
This pull request has been linked to Shortcut Story #57121: 🐞 updating caps via Javascript SDK gives error that decimal version doesn't match🐞.
@akiradev, your comment on using Math.ceil(capAmountDecimal)
. Without this we get the following error from the API as the shape requires it to be an integer. The Math.ceil(...)
function also complies with DailyCapAmount must be equal to DailyCapAmountDecimal rounded up.
requirement (error message that is returned if you set dailyCapAmount
to 43
and dailyCapAmountDecimal
to 43.12
.
{
"status": 400,
"body": {
"Errors": [
{
"path": ["body", "DailyCapAmount"],
"value": 43.12,
"message": "Value '43.12' at '[:body \"DailyCapAmount\"]' must be an integer, or it may be null."
}
]
}
}
Fix for flight decimal values not being set properly via the sdk.
Testing steps:
I used the following script to help after checking out the repo and running
npm install && npm run build
: