{"action":"created","issue":{"url":"https://api.github.com/repos/dmjio/stripe/issues/12","labels_url":"https://api.github.com/repos/dmjio/stripe/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dmjio/stripe/issues/12/comments","events_url":"https://api.github.com/repos/dmjio/stripe/issues/12/events","html_url":"https://github.com/dmjio/stripe/issues/12","id":58810899,"number":12,"title":"getEvents fails to parse some events","user":{"login":"iand675","id":69209,"avatar_url":"https://avatars.githubusercontent.com/u/69209?v=3","gravatar_id":"","url":"https://api.github.com/users/iand675","html_url":"https://github.com/iand675","followers_url":"https://api.github.com/users/iand675/followers","following_url":"https://api.github.com/users/iand675/following{/other_user}","gists_url":"https://api.github.com/users/iand675/gists{/gist_id}","starred_url":"https://api.github.com/users/iand675/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iand675/subscriptions","organizations_url":"https://api.github.com/users/iand675/orgs","repos_url":"https://api.github.com/users/iand675/repos","events_url":"https://api.github.com/users/iand675/events{/privacy}","received_events_url":"https://api.github.com/users/iand675/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-24T21:47:36Z","updated_at":"2015-02-26T01:08:01Z","closed_at":null,"body":"When getEvents / getEvent tries to parse invoice events, parsing fails:\r\n\r\nHere's the JSON for such an event:\r\n\r\n```\r\n{\r\n  \"id\": \"evt_5lMTkArNbhyJPU\",\r\n  \"created\": 1424811455,\r\n  \"livemode\": true,\r\n  \"type\": \"invoice.payment_succeeded\",\r\n  \"data\": {\r\n    \"object\": {\r\n      \"date\": 1424807432,\r\n      \"id\": \"in_5lLOs7u2iEDiPT\",\r\n      \"period_start\": 1422128773,\r\n      \"period_end\": 1424807173,\r\n      \"lines\": {\r\n        \"invoiceitems\": [],\r\n        \"prorations\": [],\r\n        \"subscriptions\": [\r\n          {\r\n            \"id\": \"sub_2oX7wwmnO09JfZ\",\r\n            \"object\": \"line_item\",\r\n            \"type\": \"subscription\",\r\n            \"livemode\": true,\r\n            \"amount\": 11900,\r\n            \"currency\": \"usd\",\r\n            \"proration\": false,\r\n            \"period\": {\r\n              \"start\": 1424807173,\r\n              \"end\": 1427226373\r\n            },\r\n            \"subscription\": null,\r\n            \"quantity\": 1,\r\n            \"plan\": {\r\n              \"interval\": \"month\",\r\n              \"name\": \"Plan costing 11900\",\r\n              \"created\": 1373995867,\r\n              \"amount\": 11900,\r\n              \"currency\": \"usd\",\r\n              \"id\": \"total-11900\",\r\n              \"object\": \"plan\",\r\n              \"livemode\": true,\r\n              \"interval_count\": 1,\r\n              \"trial_period_days\": null,\r\n              \"metadata\": {},\r\n              \"statement_descriptor\": null,\r\n              \"statement_description\": null\r\n            },\r\n            \"description\": null,\r\n            \"metadata\": {}\r\n          }\r\n        ]\r\n      },\r\n      \"subtotal\": 11900,\r\n      \"total\": 11900,\r\n      \"customer\": \"cus_2oX79nSv0CXG52\",\r\n      \"object\": \"invoice\",\r\n      \"attempted\": true,\r\n      \"closed\": true,\r\n      \"forgiven\": false,\r\n      \"paid\": true,\r\n      \"livemode\": true,\r\n      \"attempt_count\": 1,\r\n      \"amount_due\": 11900,\r\n      \"currency\": \"usd\",\r\n      \"starting_balance\": 0,\r\n      \"ending_balance\": 0,\r\n      \"next_payment_attempt\": null,\r\n      \"webhooks_delivered_at\": 1424807441,\r\n      \"charge\": \"ch_5lMT9jjyWHhlUc\",\r\n      \"discount\": null,\r\n      \"application_fee\": null,\r\n      \"subscription\": \"sub_2oX7wwmnO09JfZ\",\r\n      \"tax_percent\": null,\r\n      \"tax\": null,\r\n      \"metadata\": {},\r\n      \"statement_descriptor\": null,\r\n      \"description\": null,\r\n      \"receipt_number\": null,\r\n      \"statement_description\": null\r\n    }\r\n  },\r\n  \"object\": \"event\",\r\n  \"pending_webhooks\": 0,\r\n  \"request\": null,\r\n  \"api_version\": \"2012-03-25\"\r\n}\r\n```\r\n\r\nHere's the parse error:\r\n\r\n```\r\nLeft (StripeError {errorType = ParseFailure, errorMsg = \"key \\\"data\\\" not present\", errorCode = Nothing, errorParam = Nothing, errorHTTP = Nothing})\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dmjio/stripe/issues/comments/76103482","html_url":"https://github.com/dmjio/stripe/issues/12#issuecomment-76103482","issue_url":"https://api.github.com/repos/dmjio/stripe/issues/12","id":76103482,"user":{"login":"iand675","id":69209,"avatar_url":"https://avatars.githubusercontent.com/u/69209?v=3","gravatar_id":"","url":"https://api.github.com/users/iand675","html_url":"https://github.com/iand675","followers_url":"https://api.github.com/users/iand675/followers","following_url":"https://api.github.com/users/iand675/following{/other_user}","gists_url":"https://api.github.com/users/iand675/gists{/gist_id}","starred_url":"https://api.github.com/users/iand675/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iand675/subscriptions","organizations_url":"https://api.github.com/users/iand675/orgs","repos_url":"https://api.github.com/users/iand675/repos","events_url":"https://api.github.com/users/iand675/events{/privacy}","received_events_url":"https://api.github.com/users/iand675/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T01:08:01Z","updated_at":"2015-02-26T01:08:01Z","body":"Or at the very least, perhaps you could just expose a low-level function that would just let me specify a path e.g. '/v1/events' and just give me an object? e.g.\r\n\r\n```\r\nrawGetRequest :: String -> Stripe Object\r\n```\r\n\r\nSomething like that would be enough to help me make what I need happen."}}