{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/357","labels_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/357/comments","events_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/357/events","html_url":"https://github.com/stripe/stripe-ruby/issues/357","id":122330574,"number":357,"title":"Keeping data in place","user":{"login":"toobulkeh","id":1342064,"avatar_url":"https://avatars.githubusercontent.com/u/1342064?v=3","gravatar_id":"","url":"https://api.github.com/users/toobulkeh","html_url":"https://github.com/toobulkeh","followers_url":"https://api.github.com/users/toobulkeh/followers","following_url":"https://api.github.com/users/toobulkeh/following{/other_user}","gists_url":"https://api.github.com/users/toobulkeh/gists{/gist_id}","starred_url":"https://api.github.com/users/toobulkeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toobulkeh/subscriptions","organizations_url":"https://api.github.com/users/toobulkeh/orgs","repos_url":"https://api.github.com/users/toobulkeh/repos","events_url":"https://api.github.com/users/toobulkeh/events{/privacy}","received_events_url":"https://api.github.com/users/toobulkeh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-15T18:03:39Z","updated_at":"2015-12-15T18:33:16Z","closed_at":"2015-12-15T18:27:32Z","body":"I recently implemented a fix to not let trials slip when plans change during the trial period. The fix looked like this:\r\n\r\n```ruby\r\nsub.plan = new_plan_id\r\n#always keep the same trial end\r\nif sub.trial_end.present?\r\n  sub.trial_end = sub.trial_end \r\nend\r\nsub.save\r\n```\r\n\r\nIs there a more preferred way of doing this? It seems like an odd feeling pattern.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/comments/164849921","html_url":"https://github.com/stripe/stripe-ruby/issues/357#issuecomment-164849921","issue_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/357","id":164849921,"user":{"login":"toobulkeh","id":1342064,"avatar_url":"https://avatars.githubusercontent.com/u/1342064?v=3","gravatar_id":"","url":"https://api.github.com/users/toobulkeh","html_url":"https://github.com/toobulkeh","followers_url":"https://api.github.com/users/toobulkeh/followers","following_url":"https://api.github.com/users/toobulkeh/following{/other_user}","gists_url":"https://api.github.com/users/toobulkeh/gists{/gist_id}","starred_url":"https://api.github.com/users/toobulkeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toobulkeh/subscriptions","organizations_url":"https://api.github.com/users/toobulkeh/orgs","repos_url":"https://api.github.com/users/toobulkeh/repos","events_url":"https://api.github.com/users/toobulkeh/events{/privacy}","received_events_url":"https://api.github.com/users/toobulkeh/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:33:16Z","updated_at":"2015-12-15T18:33:16Z","body":"It seems overly verbose in ruby, is there a better *ruby* pattern for this?"}}