microsoft / azure-api-management-monetization

MIT License
54 stars 31 forks source link

Modify monetizationModels.json post-hoc #70

Open gordicaleksa opened 9 months ago

gordicaleksa commented 9 months ago

Hi!

What's the recommended workflow if one wants to modify a monetization model after the deployment?

E.g. for the Pro product in Stripe, if I go to my Stripe console and modify the quota from 5000 to 10000, do I have to redeploy or will things "just work"?

It seems much more intuitive that the APIM polls Stripe for latest monetization models of the products as opposed to looking into internally cached version of the monetizationModels.json file that was used during the deployment?

The only piece of code that seems to rely on this file is here in stripe.ts: const pricingModelType = monetizationModel.pricingModelType; and it looks like the model type is thus the only bit that can't be modified post-hoc?

Or am I misunderstanding something here?

Would be good to have a README that discusses how to modify stuff after the deployment happened which I assume is a very common workflow.