{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/195","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/195/comments","events_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/195/events","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/issues/195","id":125038022,"number":195,"title":"How do we handle rating plan change for rate based usage submission ","user":{"login":"sinduri","id":10440004,"avatar_url":"https://avatars.githubusercontent.com/u/10440004?v=3","gravatar_id":"","url":"https://api.github.com/users/sinduri","html_url":"https://github.com/sinduri","followers_url":"https://api.github.com/users/sinduri/followers","following_url":"https://api.github.com/users/sinduri/following{/other_user}","gists_url":"https://api.github.com/users/sinduri/gists{/gist_id}","starred_url":"https://api.github.com/users/sinduri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinduri/subscriptions","organizations_url":"https://api.github.com/users/sinduri/orgs","repos_url":"https://api.github.com/users/sinduri/repos","events_url":"https://api.github.com/users/sinduri/events{/privacy}","received_events_url":"https://api.github.com/users/sinduri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-05T19:54:25Z","updated_at":"2016-01-22T19:07:49Z","closed_at":null,"body":"The issue we want to address is with rate based usage submissions such as the runtime submission and a change in the rating plan/ price plan since the usage was last submitted.\r\n\r\nAn example of it is, App1 was started and running since the 2nd of the month and the runtime resource provider submits a  usage of 1GB with a { consuming: 2, consumed:0, since: '2016-01-02'}, at the point of the submission we associate this usage with a rating plan (gold) and price plan (gold-v1). Now when any of these plans change the accumulators and aggregator need to be made aware, so that the accumulation and aggregations happen to those tuples.\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/comments/174014365","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/issues/195#issuecomment-174014365","issue_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/195","id":174014365,"user":{"login":"jsdelfino","id":247394,"avatar_url":"https://avatars.githubusercontent.com/u/247394?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdelfino","html_url":"https://github.com/jsdelfino","followers_url":"https://api.github.com/users/jsdelfino/followers","following_url":"https://api.github.com/users/jsdelfino/following{/other_user}","gists_url":"https://api.github.com/users/jsdelfino/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdelfino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdelfino/subscriptions","organizations_url":"https://api.github.com/users/jsdelfino/orgs","repos_url":"https://api.github.com/users/jsdelfino/repos","events_url":"https://api.github.com/users/jsdelfino/events{/privacy}","received_events_url":"https://api.github.com/users/jsdelfino/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T19:07:49Z","updated_at":"2016-01-22T19:07:49Z","body":"I thought a bit more about this and I think that given that a combination of (b) and (c) should work well. Given that the rating and charge functions are produced and returned by the account plugin (aka stub) service, that account plugin can leverage its knowledge of the account (as it's passed the account id) and the evolution of its state over time (or the evolution of the prices applicable to that account) to return rating and charge function that will apply the correct pricing and charge over time.\r\n\r\nThoughts?"}}