{"action":"created","issue":{"url":"https://api.github.com/repos/payfort/start-ruby/issues/5","repository_url":"https://api.github.com/repos/payfort/start-ruby","labels_url":"https://api.github.com/repos/payfort/start-ruby/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/payfort/start-ruby/issues/5/comments","events_url":"https://api.github.com/repos/payfort/start-ruby/issues/5/events","html_url":"https://github.com/payfort/start-ruby/issues/5","id":151105441,"number":5,"title":"bug when creating card for a customer Create a Card bug","user":{"login":"IslamAzab","id":3228221,"avatar_url":"https://avatars.githubusercontent.com/u/3228221?v=3","gravatar_id":"","url":"https://api.github.com/users/IslamAzab","html_url":"https://github.com/IslamAzab","followers_url":"https://api.github.com/users/IslamAzab/followers","following_url":"https://api.github.com/users/IslamAzab/following{/other_user}","gists_url":"https://api.github.com/users/IslamAzab/gists{/gist_id}","starred_url":"https://api.github.com/users/IslamAzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IslamAzab/subscriptions","organizations_url":"https://api.github.com/users/IslamAzab/orgs","repos_url":"https://api.github.com/users/IslamAzab/repos","events_url":"https://api.github.com/users/IslamAzab/events{/privacy}","received_events_url":"https://api.github.com/users/IslamAzab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-26T11:08:09Z","updated_at":"2016-05-04T18:25:20Z","closed_at":null,"body":"[Create a Card bug](https://goo.gl/MhoMPL)\r\n\r\nIs there any quick fix for that other than creating a `card` class and create the card from it ?\r\n\r\n> ```\r\n> [7] pry(main)> customer = Start::Customer.get(\"cus_ebb973c5b0594cb90142dc3da839\")\r\n> => {\"id\"=>\"cus_ebb973c5b0594cb90142dc3da839\",\r\n>  \"email\"=>\"user@example.com\",\r\n>  \"description\"=>nil,\r\n>  \"default_card_id\"=>\"card_a8ebf84a1e4634a5690a6d4a4e1\",\r\n>  \"name\"=>\"Islam Badr\",\r\n>  \"created_at\"=>\"2016-04-26T09:16:09.923Z\",\r\n>  \"updated_at\"=>\"2016-04-26T09:16:10.028Z\",\r\n>  \"object\"=>\"customer\",\r\n>  \"cards\"=>\r\n>   [{\"id\"=>\"card_a8ebf84a1e4634a5690a6d4a4e3\",\r\n>     \"last4\"=>\"4242\",\r\n>     \"brand\"=>\"visa\",\r\n>     \"exp_year\"=>2019,\r\n>     \"exp_month\"=>12,\r\n>     \"name\"=>nil,\r\n>     \"customer_id\"=>\"cus_ebb973c5b0594cb90142dc3da839\",\r\n>     \"created_at\"=>\"2016-04-26T09:16:10.023Z\",\r\n>     \"object\"=>\"card\"}]}\r\n> [8] pry(main)> customer.cards.create(\r\n> [8] pry(main)*   :card => {  \r\n> [8] pry(main)*     :name => \"Abdullah Ahmed\",    \r\n> [8] pry(main)*     :number => \"4242424242424242\",    \r\n> [8] pry(main)*     :exp_month => 11,    \r\n> [8] pry(main)*     :exp_year => 2016,    \r\n> [8] pry(main)*     :cvc => 123    \r\n> [8] pry(main)*   }    \r\n> [8] pry(main)* ) \r\n> ```\r\n```\r\n\r\nNoMethodError: undefined method `cards' for #<Hash:0x0000000666fc50>\r\nfrom (pry):8:in `<main>'\r\n[9] pry(main)> \r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/payfort/start-ruby/issues/comments/216956491","html_url":"https://github.com/payfort/start-ruby/issues/5#issuecomment-216956491","issue_url":"https://api.github.com/repos/payfort/start-ruby/issues/5","id":216956491,"user":{"login":"IslamAzab","id":3228221,"avatar_url":"https://avatars.githubusercontent.com/u/3228221?v=3","gravatar_id":"","url":"https://api.github.com/users/IslamAzab","html_url":"https://github.com/IslamAzab","followers_url":"https://api.github.com/users/IslamAzab/followers","following_url":"https://api.github.com/users/IslamAzab/following{/other_user}","gists_url":"https://api.github.com/users/IslamAzab/gists{/gist_id}","starred_url":"https://api.github.com/users/IslamAzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IslamAzab/subscriptions","organizations_url":"https://api.github.com/users/IslamAzab/orgs","repos_url":"https://api.github.com/users/IslamAzab/repos","events_url":"https://api.github.com/users/IslamAzab/events{/privacy}","received_events_url":"https://api.github.com/users/IslamAzab/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T18:25:20Z","updated_at":"2016-05-04T18:25:20Z","body":"This [pull request #6](https://github.com/payfort/start-ruby/pulls) should fix it."}}