{"action":"opened","issue":{"url":"https://api.github.com/repos/boena/pipedrive-api-client/issues/1","labels_url":"https://api.github.com/repos/boena/pipedrive-api-client/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/boena/pipedrive-api-client/issues/1/comments","events_url":"https://api.github.com/repos/boena/pipedrive-api-client/issues/1/events","html_url":"https://github.com/boena/pipedrive-api-client/issues/1","id":124262073,"number":1,"title":"Authentication token is not updated for Entities that made a previous request on API ","user":{"login":"ricocaldeira","id":38027,"avatar_url":"https://avatars.githubusercontent.com/u/38027?v=3","gravatar_id":"","url":"https://api.github.com/users/ricocaldeira","html_url":"https://github.com/ricocaldeira","followers_url":"https://api.github.com/users/ricocaldeira/followers","following_url":"https://api.github.com/users/ricocaldeira/following{/other_user}","gists_url":"https://api.github.com/users/ricocaldeira/gists{/gist_id}","starred_url":"https://api.github.com/users/ricocaldeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricocaldeira/subscriptions","organizations_url":"https://api.github.com/users/ricocaldeira/orgs","repos_url":"https://api.github.com/users/ricocaldeira/repos","events_url":"https://api.github.com/users/ricocaldeira/events{/privacy}","received_events_url":"https://api.github.com/users/ricocaldeira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-29T20:11:53Z","updated_at":"2015-12-29T20:11:53Z","closed_at":null,"body":"First, I setup authentication with my token:\r\n\r\n```\r\nPipedrive.authenticate('VALID_TOKEN')\r\nPipedrive::User.default_options\r\n---\r\n#=>{:base_uri=>\"https://api.pipedrive.com/v1\",\r\n :headers=>\r\n  {\"User-Agent\"=>\"Ruby.Pipedrive.Api\",\r\n   \"Accept\"=>\"application/json\",\r\n   \"Content-Type\"=>\"application/x-www-form-urlencoded\"},\r\n :parser=>HTTParty::Parser,\r\n :format=>:json,\r\n :default_params=>{:api_token=>\"VALID_TOKEN\"}}\r\n```\r\n\r\nOk, after that I made some requests with that token:\r\n\r\n```\r\nPipedrive::User.all\r\n---\r\n#=>[#<Pipedrive::User id=716163, name=\"Ricardo\", default_currency=\"BRL\", locale=\"pt_BR\", lang=1, email=\"ricardo.nezz@gmail.com\", phone=nil, activated=true, last_login=\"2015-12-14 18:01:18\", created=\"2015-07-06 20:12:36\", modified=\"2015-12-14 18:01:17\", is_admin=1, role_id=\"1\", timezone_name=\"America/Sao_Paulo\", active_flag=true, icon_url=\"https://d3myhnqlqw2314.cloudfront.net/profile_120x120_716163_8ace7b2ac100042420fb64fa1b114a97.jpg\", is_you=true>]\r\n```\r\n\r\nSo, I update my token by another one, that I will call here ANOTHER_VALID_TOKEN\r\n\r\n```\r\nPipedrive.authenticate('ANOTHER_VALID_TOKEN')\r\n---\r\n#=> {:api_token=>\"ANOTHER_VALID_TOKEN\"}\r\n```\r\n\r\nThan, I check if my new token is updated\r\n\r\n```\r\nPipedrive::Base.default_options\r\n---\r\n#=> {:base_uri=>\"https://api.pipedrive.com/v1\",\r\n :headers=>\r\n  {\"User-Agent\"=>\"Ruby.Pipedrive.Api\",\r\n   \"Accept\"=>\"application/json\",\r\n   \"Content-Type\"=>\"application/x-www-form-urlencoded\"},\r\n :parser=>HTTParty::Parser,\r\n :format=>:json,\r\n :default_params=>{:api_token=>\"ANOTHER_VALID_TOKEN\"}}\r\n```\r\n\r\nOk, everything looks ok, but wait... When I try to get all my Users again, I receive a list from my old token (VALID_TOKEN). So I decided to check which token is used to make the request on 'users' path\r\n\r\n```\r\nPipedrive::User.default_options\r\n---\r\n#=> {:base_uri=>\"https://api.pipedrive.com/v1\",\r\n :headers=>\r\n  {\"User-Agent\"=>\"Ruby.Pipedrive.Api\",\r\n   \"Accept\"=>\"application/json\",\r\n   \"Content-Type\"=>\"application/x-www-form-urlencoded\"},\r\n :parser=>HTTParty::Parser,\r\n :format=>:json,\r\n :default_params=>{:api_token=>\"VALID_TOKEN\"}}\r\n```\r\n\r\nOops, something looks weird here, on ```Base``` class my token is updated, but on ```User``` class my VALID_TOKEN (old token) is still used.\r\n\r\nCould you try to reproduce my problem? Thx."}}