Pergunta

I'm working on a project that aims to charge user by request. He will have an account, and monthly a receipt should be sent to him describing how much of the service he used on the month. Is there some gem or documentaion about this?

My concern is about just registering as a legitm use, when the request completes correctly, so as to avoid charging him error requests. I believe its a very careful part of the application. Have anyone seen anything about this?

Foi útil?

Solução

I don't think you'll find a gem for that. Probably you'll end up creating a Rack middleware and add it to the end of the middlewares chain, check if the status code is 200 and increment the user's usage counter.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top