{"action":"opened","issue":{"url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/369","repository_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock","labels_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/369/comments","events_url":"https://api.github.com/repos/rebelidealist/stripe-ruby-mock/issues/369/events","html_url":"https://github.com/rebelidealist/stripe-ruby-mock/issues/369","id":174668631,"number":369,"title":"Customer default_source is supposed to be a hash of data, not a token?","user":{"login":"sevenseacat","id":543859,"avatar_url":"https://avatars.githubusercontent.com/u/543859?v=3","gravatar_id":"","url":"https://api.github.com/users/sevenseacat","html_url":"https://github.com/sevenseacat","followers_url":"https://api.github.com/users/sevenseacat/followers","following_url":"https://api.github.com/users/sevenseacat/following{/other_user}","gists_url":"https://api.github.com/users/sevenseacat/gists{/gist_id}","starred_url":"https://api.github.com/users/sevenseacat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevenseacat/subscriptions","organizations_url":"https://api.github.com/users/sevenseacat/orgs","repos_url":"https://api.github.com/users/sevenseacat/repos","events_url":"https://api.github.com/users/sevenseacat/events{/privacy}","received_events_url":"https://api.github.com/users/sevenseacat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T02:40:21Z","updated_at":"2016-09-02T02:40:21Z","closed_at":null,"body":"When inspecting a Stripe::Customer using the real API, the `default_source` comes back as a hash of card data:\r\n\r\n```\r\n#<Stripe::Customer:0x3feefa6cddc8 id=cus_8AvezLItIxasvm> JSON: {\r\n  \"id\": \"cus_8AvezLItIxasvm\",\r\n  \"object\": \"customer\",\r\n  \"account_balance\": 0,\r\n  \"created\": 1459307700,\r\n  \"currency\": \"aud\",\r\n  \"default_source\": {\"id\":\"card_18ZYKgLgOyYLIbhwiuc8mSdC\",\"object\":\"card\",\"address_city\":null,\"address_country\":null,\"address_line1\":null,\"address_line1_check\":null,\"address_line2\":null,\"address_state\":null,\"address_zip\":null,\"address_zip_check\":null,\"brand\":\"Visa\",\"country\":\"US\",\"customer\":\"cus_8AvezLItIxasvm\",\"cvc_check\":\"pass\",\"dynamic_last4\":null,\"exp_month\":11,\"exp_year\":2017,\"fingerprint\":\"XuJytmaoHaTaZLrm\",\"funding\":\"credit\",\"last4\":\"4242\",\"metadata\":{},\"name\":null,\"tokenization_method\":null},\r\n  \"delinquent\": false,\r\n  \"description\": \"Test Account\",\r\n  \"discount\": null,\r\n  \"email\": \"test@test.com\",\r\n  \"livemode\": false,\r\n...\r\n```\r\n\r\nWhen creating a customer via stripe-ruby-mock, the `default_source` comes back as just the saved card token:\r\n\r\n```\r\n#<Stripe::Customer:0x3fd1ed269888 id=test_cus_5> JSON: {\r\n  \"id\": \"test_cus_5\",\r\n  \"email\": \"test@test.com\",\r\n  \"description\": \"John Brown\",\r\n  \"object\": \"customer\",\r\n  \"created\": 1372126710,\r\n  \"livemode\": false,\r\n  \"delinquent\": false,\r\n  \"discount\": null,\r\n  \"account_balance\": 0,\r\n  \"currency\": \"aud\",\r\n  \"sources\": {\"object\":\"list\",\"total_count\":1,\"url\":\"/v1/customers/test_cus_5/sources\",\"data\":[{\"id\":\"test_cc_4\",\"object\":\"card\",\"last4\":\"4242\",\"type\":\"Visa\",\"brand\":\"Visa\",\"funding\":\"credit\",\"exp_month\":9,\"exp_year\":2018,\"fingerprint\":\"eXWMGVNbMZcworZC\",\"customer\":\"test_cus_5\",\"country\":\"US\",\"name\":\"Johnny App\",\"address_line1\":null,\"address_line2\":null,\"address_city\":null,\"address_state\":null,\"address_zip\":null,\"address_country\":null,\"cvc_check\":null,\"address_line1_check\":null,\"address_zip_check\":null,\"number\":\"4242424242424242\",\"cvc\":\"999\"}]},\r\n  \"subscriptions\": {\"object\":\"list\",\"total_count\":1,\"url\":\"/v1/customers/test_cus_5/subscriptions\",\"data\":[{\"id\":\"test_su_6\",\"current_period_start\":1472783321,\"current_period_end\":1475375321,\"status\":\"active\",\"plan\":{\"id\":\"medium_aud\",\"object\":\"plan\",\"amount\":200,\"created\":1466698898,\"currency\":\"aud\",\"interval\":\"month\",\"interval_count\":1,\"livemode\":false,\"metadata\":{},\"name\":\"In the Nest\",\"statement_descriptor\":null,\"trial_period_days\":null},\"cancel_at_period_end\":false,\"canceled_at\":null,\"ended_at\":null,\"start\":1308595038,\"object\":\"subscription\",\"trial_start\":null,\"trial_end\":null,\"customer\":\"test_cus_5\",\"quantity\":1,\"tax_percent\":null,\"discount\":null,\"metadata\":{}}]},\r\n  \"default_source\": \"test_cc_4\",\r\n  \"plan\": \"medium_aud\"\r\n}\r\n```\r\n\r\nThis breaks any code in tests that tries to use the real default source data."}}
{"actor":{"display_login":"sevenseacat"}}