* Convert credits (integer cents) back to a cost value that will result in the same * credits when the SDK applies its formula: credits = Math.round(cost * (1 + PROFIT_MARGIN) * 100)
(credits: number)
| 170 | * credits when the SDK applies its formula: credits = Math.round(cost * (1 + PROFIT_MARGIN) * 100) |
| 171 | */ |
| 172 | function creditsToFakeCost(credits: number): number { |
| 173 | return credits / ((1 + PROFIT_MARGIN) * 100) |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Overwrite the cost field in an SSE line to reflect actual billed credits. |
no outgoing calls
no test coverage detected