{"action":"created","issue":{"url":"https://api.github.com/repos/iugu/iugu-ruby/issues/11","repository_url":"https://api.github.com/repos/iugu/iugu-ruby","labels_url":"https://api.github.com/repos/iugu/iugu-ruby/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/iugu/iugu-ruby/issues/11/comments","events_url":"https://api.github.com/repos/iugu/iugu-ruby/issues/11/events","html_url":"https://github.com/iugu/iugu-ruby/issues/11","id":182959982,"number":11,"title":"Como atualizar um objeto?","user":{"login":"thiagogsr","id":1802025,"avatar_url":"https://avatars.githubusercontent.com/u/1802025?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagogsr","html_url":"https://github.com/thiagogsr","followers_url":"https://api.github.com/users/thiagogsr/followers","following_url":"https://api.github.com/users/thiagogsr/following{/other_user}","gists_url":"https://api.github.com/users/thiagogsr/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagogsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagogsr/subscriptions","organizations_url":"https://api.github.com/users/thiagogsr/orgs","repos_url":"https://api.github.com/users/thiagogsr/repos","events_url":"https://api.github.com/users/thiagogsr/events{/privacy}","received_events_url":"https://api.github.com/users/thiagogsr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T04:16:34Z","updated_at":"2016-10-14T17:27:48Z","closed_at":null,"body":"Estou tentando fazer um update no plano. Tentei de várias formas mas nenhuma ficou 100%.\r\n\r\nTentei das seguintes formas:\r\n\r\n```ruby\r\nplan = Iugu::Plan.new(attributes) # attributes inclui o id\r\nplan.save # retorna true mas não atualiza nada\r\n```\r\n\r\n```ruby\r\nplan = Iugu.Plan.new\r\nplan.set_attributes attributes, true # não queria usar dessa forma porque é uma interface da gem e não do Ruby.\r\nplan.save # retorna true mas só atualiza lá quando eu chamo isso 2x (não sei o motivo que na segunda funciona)\r\n```\r\n\r\n```ruby\r\nplan = Iugu::Plan.fetch(id: attributes[:id])\r\nplan.set_attributes attributes, true # não queria usar dessa forma porque é uma interface da gem e não do Ruby.\r\nplan.save # retorna true mas só atualiza lá quando eu chamo isso 2x (não sei o motivo que na segunda funciona)\r\n```\r\n\r\nPoderia me ajudar por favor?"},"comment":{"url":"https://api.github.com/repos/iugu/iugu-ruby/issues/comments/253867153","html_url":"https://github.com/iugu/iugu-ruby/issues/11#issuecomment-253867153","issue_url":"https://api.github.com/repos/iugu/iugu-ruby/issues/11","id":253867153,"user":{"login":"paezao","id":301430,"avatar_url":"https://avatars.githubusercontent.com/u/301430?v=3","gravatar_id":"","url":"https://api.github.com/users/paezao","html_url":"https://github.com/paezao","followers_url":"https://api.github.com/users/paezao/followers","following_url":"https://api.github.com/users/paezao/following{/other_user}","gists_url":"https://api.github.com/users/paezao/gists{/gist_id}","starred_url":"https://api.github.com/users/paezao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paezao/subscriptions","organizations_url":"https://api.github.com/users/paezao/orgs","repos_url":"https://api.github.com/users/paezao/repos","events_url":"https://api.github.com/users/paezao/events{/privacy}","received_events_url":"https://api.github.com/users/paezao/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T17:27:48Z","updated_at":"2016-10-14T17:27:48Z","body":"Olá @thiagogsr,\r\n\r\nTente por favor da seguinte maneira:\r\n`\r\nplan = Iugu::Plan.fetch(id: attributes[:id])\r\nplan.name = \"Teste\"\r\nplan.save\r\n`\r\n"}}
{"actor":{"display_login":"paezao"}}