{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-node/issues/297","repository_url":"https://api.github.com/repos/stripe/stripe-node","labels_url":"https://api.github.com/repos/stripe/stripe-node/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-node/issues/297/comments","events_url":"https://api.github.com/repos/stripe/stripe-node/issues/297/events","html_url":"https://github.com/stripe/stripe-node/issues/297","id":203545915,"number":297,"title":"Readme contains incorrect documentation for deleteSource method","user":{"login":"jpm","id":29741,"avatar_url":"https://avatars.githubusercontent.com/u/29741?v=3","gravatar_id":"","url":"https://api.github.com/users/jpm","html_url":"https://github.com/jpm","followers_url":"https://api.github.com/users/jpm/followers","following_url":"https://api.github.com/users/jpm/following{/other_user}","gists_url":"https://api.github.com/users/jpm/gists{/gist_id}","starred_url":"https://api.github.com/users/jpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpm/subscriptions","organizations_url":"https://api.github.com/users/jpm/orgs","repos_url":"https://api.github.com/users/jpm/repos","events_url":"https://api.github.com/users/jpm/events{/privacy}","received_events_url":"https://api.github.com/users/jpm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-27T02:38:19Z","updated_at":"2017-02-02T17:56:00Z","closed_at":null,"body":"The readme documentation specifies the deleteSource as having the following signature:\r\n\r\n`deleteSource(customerId, {source: 'source_token'})`\r\n\r\nWhen the method is actually supposed to be the following:\r\n\r\n`deleteSource(customerId, source_token)`\r\n\r\nThis took me a while to diagnose, as these methods are sort of dynamic in the source code, and you can't quite understand what is going on without being an expert at the implementation.\r\n"},"comment":{"url":"https://api.github.com/repos/stripe/stripe-node/issues/comments/277032099","html_url":"https://github.com/stripe/stripe-node/issues/297#issuecomment-277032099","issue_url":"https://api.github.com/repos/stripe/stripe-node/issues/297","id":277032099,"user":{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T17:56:00Z","updated_at":"2017-02-02T17:56:00Z","body":"Thanks for reporting and sorry about the trouble. As Fred suggestions above, we're working on getting this into our canonical set of reference docs. I'm also suggesting #299 to reduce the likelihood of this type of documentation problem because we currently don't have any good mechanism for keeping the API list in the README up to date.\r\n\r\n> This took me a while to diagnose, as these methods are sort of dynamic in the source code, and you can't quite understand what is going on without being an expert at the implementation.\r\n\r\nDefinitely read you loud and clear on that one. Metaprogramming is sometimes useful, but unfortunately comes with the side effect of making things quite difficult to understand :/ I can't promise a rewrite or anything like it for now, but I'd certainly be interested in trending the code here towards a more explicit form."}}
{"actor":{"display_login":"brandur"}}