{"action":"closed","issue":{"url":"https://api.github.com/repos/killbill/killbill/issues/378","labels_url":"https://api.github.com/repos/killbill/killbill/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/killbill/killbill/issues/378/comments","events_url":"https://api.github.com/repos/killbill/killbill/issues/378/events","html_url":"https://github.com/killbill/killbill/issues/378","id":100926670,"number":378,"title":"PaymentStateContext: Can we remove setters and complicated business logic","user":{"login":"sbrossie","id":246910,"avatar_url":"https://avatars.githubusercontent.com/u/246910?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrossie","html_url":"https://github.com/sbrossie","followers_url":"https://api.github.com/users/sbrossie/followers","following_url":"https://api.github.com/users/sbrossie/following{/other_user}","gists_url":"https://api.github.com/users/sbrossie/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrossie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrossie/subscriptions","organizations_url":"https://api.github.com/users/sbrossie/orgs","repos_url":"https://api.github.com/users/sbrossie/repos","events_url":"https://api.github.com/users/sbrossie/events{/privacy}","received_events_url":"https://api.github.com/users/sbrossie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/killbill/killbill/labels/cleanup","name":"cleanup","color":"bfdadc"},{"url":"https://api.github.com/repos/killbill/killbill/labels/PAYMENT","name":"PAYMENT","color":"0b02e1"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/killbill/killbill/milestones/14","html_url":"https://github.com/killbill/killbill/milestones/Release-0.15.4","labels_url":"https://api.github.com/repos/killbill/killbill/milestones/14/labels","id":1250535,"number":14,"title":"Release-0.15.4","description":"","creator":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":6,"state":"open","created_at":"2015-08-11T19:25:22Z","updated_at":"2015-09-09T20:59:04Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-08-14T03:41:45Z","updated_at":"2015-09-09T20:59:04Z","closed_at":"2015-09-09T20:59:04Z","body":"The `PaymentStateContext` which is used to move through various state machine callbacks contains a lot of setters (as we move through state machine, more state becomes available) and also business logic (e.g `getAmount`, `getCurrency`).\r\n\r\nThis seems very error prone and fragile...\r\n"}}