* 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)
| 920 | * credits when the SDK applies its formula: credits = Math.round(cost * (1 + PROFIT_MARGIN) * 100) |
| 921 | */ |
| 922 | function creditsToFakeCost(credits: number): number { |
| 923 | return credits / ((1 + PROFIT_MARGIN) * 100) |
| 924 | } |
| 925 | |
| 926 | /** |
| 927 | * Bill a stream that exited before a usage-bearing chunk arrived by looking up |
no outgoing calls
no test coverage detected