-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification needed for exchangeOffer price and refundableAmount fields #850
Comments
We made different assumptions in our implementation of exchange flow.
The |
Me and Tim suggest this.
The naming of the new field must be handled by the group. Is customerCost an alternative? |
Next Step
|
I think we can work with this proposal. I just would like it very clearly documented that Applied to the examples from above: Example 1
{
"exchangeFee": {
"amount": 1000,
"currency": "EUR",
"scale": 2
},
"exchangePrice": {
"amount": 11000,
"currency": "EUR",
"scale": 2
},
"refundableAmount": {
"amount": 0,
"currency": "EUR",
"scale": 2
},
"amountToBePaid": {
"amount": 6000,
"currency": "EUR",
"scale": 2
}
} Example 2
{
"exchangeFee": {
"amount": 1000,
"currency": "EUR",
"scale": 2
},
"exchangePrice": {
"amount": 11000,
"currency": "EUR",
"scale": 2
},
"refundableAmount": {
"amount": 4000,
"currency": "EUR",
"scale": 2
},
"amountToBePaid": {
"amount": 0,
"currency": "EUR",
"scale": 2
}
} |
PKP has implemented the same approach as @pgitips described above: |
We need clarification on the
exchangePrice
andrefundableAmount
fields in theExchangeOffer
object. Our current assumptions are:exchangePrice
: The sum of all prices of the bookingParts in the offer.refundableAmount
: The actual balance between exchanged bookingParts and new bookingParts, including the fee.Calculated as:
sum(exchangedBookingParts.price) - sum(newBookingParts.price) - exchangeFee
Questions
exchangePrice
andrefundableAmount
correct?Examples
To illustrate our understanding, here are two examples:
Example 1
Example 2
The text was updated successfully, but these errors were encountered: