{"action":"created","issue":{"url":"https://api.github.com/repos/siwapp/siwapp/issues/132","repository_url":"https://api.github.com/repos/siwapp/siwapp","labels_url":"https://api.github.com/repos/siwapp/siwapp/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/siwapp/siwapp/issues/132/comments","events_url":"https://api.github.com/repos/siwapp/siwapp/issues/132/events","html_url":"https://github.com/siwapp/siwapp/issues/132","id":172903589,"number":132,"title":"API: invoices with embedded items are created with items: []","user":{"login":"ecoslado","id":506447,"avatar_url":"https://avatars.githubusercontent.com/u/506447?v=3","gravatar_id":"","url":"https://api.github.com/users/ecoslado","html_url":"https://github.com/ecoslado","followers_url":"https://api.github.com/users/ecoslado/followers","following_url":"https://api.github.com/users/ecoslado/following{/other_user}","gists_url":"https://api.github.com/users/ecoslado/gists{/gist_id}","starred_url":"https://api.github.com/users/ecoslado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecoslado/subscriptions","organizations_url":"https://api.github.com/users/ecoslado/orgs","repos_url":"https://api.github.com/users/ecoslado/repos","events_url":"https://api.github.com/users/ecoslado/events{/privacy}","received_events_url":"https://api.github.com/users/ecoslado/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/siwapp/siwapp/labels/WORKING","name":"WORKING","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"JoeZ99","id":479027,"avatar_url":"https://avatars.githubusercontent.com/u/479027?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeZ99","html_url":"https://github.com/JoeZ99","followers_url":"https://api.github.com/users/JoeZ99/followers","following_url":"https://api.github.com/users/JoeZ99/following{/other_user}","gists_url":"https://api.github.com/users/JoeZ99/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeZ99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeZ99/subscriptions","organizations_url":"https://api.github.com/users/JoeZ99/orgs","repos_url":"https://api.github.com/users/JoeZ99/repos","events_url":"https://api.github.com/users/JoeZ99/events{/privacy}","received_events_url":"https://api.github.com/users/JoeZ99/received_events","type":"User","site_admin":false},"assignees":[{"login":"JoeZ99","id":479027,"avatar_url":"https://avatars.githubusercontent.com/u/479027?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeZ99","html_url":"https://github.com/JoeZ99","followers_url":"https://api.github.com/users/JoeZ99/followers","following_url":"https://api.github.com/users/JoeZ99/following{/other_user}","gists_url":"https://api.github.com/users/JoeZ99/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeZ99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeZ99/subscriptions","organizations_url":"https://api.github.com/users/JoeZ99/orgs","repos_url":"https://api.github.com/users/JoeZ99/repos","events_url":"https://api.github.com/users/JoeZ99/events{/privacy}","received_events_url":"https://api.github.com/users/JoeZ99/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-08-24T09:18:35Z","updated_at":"2016-09-01T16:10:08Z","closed_at":null,"body":"I send a post with  body:\r\n```JSON\r\n{\"series_id\":2,\"draft\":false,\"sent_by_email\":false,\"name\":\"Demo Company\",\"identification\":\"D-1234\",\"email\":\"info@democompany.com\",\"invoicing_address\":null,\"shipping_address\":null,\"contact_person\":null,\"terms\":null,\"notes\":null,\"base_amount\":\"1260.61\",\"discount_amount\":\"91.11\",\"net_amount\":\"1169.5\",\"gross_amount\":\"1383.51\",\"paid_amount\":\"0.0\",\"tax_amount\":\"214.0113\",\"issue_date\":\"2016-08-23\",\"due_date\":\"2016-09-23\",\"days_to_due\":null,\"created_at\":\"2016-08-24T07:31:43.000Z\",\"updated_at\":\"2016-08-24T07:31:43.000Z\",\"url\":\"http://localhost:3000/api/v1/invoices/10\",\"status\":\"paid\",\"customer\":\"http://localhost:3000/api/v1/customers/4\",\"items\":[{\"description\": \"Lorem ipsum\", \"quantity\": 2, \"cost\": 3, \"total\": 6, \"taxes\": []}]\r\n}\r\n```\r\nThe response I get:\r\n```JSON\r\n{\r\n  \"id\": 16,\r\n  \"series_id\": 2,\r\n  \"draft\": false,\r\n  \"sent_by_email\": false,\r\n  \"name\": \"Demo Company\",\r\n  \"identification\": \"D-1234\",\r\n  \"email\": \"info@democompany.com\",\r\n  \"invoicing_address\": null,\r\n  \"shipping_address\": null,\r\n  \"contact_person\": null,\r\n  \"terms\": null,\r\n  \"notes\": null,\r\n  \"base_amount\": \"0.0\",\r\n  \"discount_amount\": \"0.0\",\r\n  \"net_amount\": \"0.0\",\r\n  \"gross_amount\": \"0.0\",\r\n  \"paid_amount\": \"0.0\",\r\n  \"tax_amount\": \"0.0\",\r\n  \"issue_date\": \"2016-08-23\",\r\n  \"due_date\": \"2016-09-23\",\r\n  \"days_to_due\": null,\r\n  \"created_at\": \"2016-08-24T08:37:54.099Z\",\r\n  \"updated_at\": \"2016-08-24T08:37:54.118Z\",\r\n  \"url\": \"http://localhost:3000/api/v1/invoices/16\",\r\n  \"series_number\": \"SSB-13\",\r\n  \"status\": \"paid\",\r\n  \"download_link\": \"http://localhost:3000/api/v1/invoices/template/1/invoice/16.pdf\",\r\n  \"customer\": {\r\n    \"id\": 4,\r\n    \"identification\": \"D-1234\",\r\n    \"url\": \"http://localhost:3000/api/v1/customers/4\"\r\n  },\r\n  \"items\": [],\r\n  \"payments\": []\r\n}\r\n```\r\nAnd the invoice has no items in Siwapp GUI."},"comment":{"url":"https://api.github.com/repos/siwapp/siwapp/issues/comments/244129604","html_url":"https://github.com/siwapp/siwapp/issues/132#issuecomment-244129604","issue_url":"https://api.github.com/repos/siwapp/siwapp/issues/132","id":244129604,"user":{"login":"JoeZ99","id":479027,"avatar_url":"https://avatars.githubusercontent.com/u/479027?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeZ99","html_url":"https://github.com/JoeZ99","followers_url":"https://api.github.com/users/JoeZ99/followers","following_url":"https://api.github.com/users/JoeZ99/following{/other_user}","gists_url":"https://api.github.com/users/JoeZ99/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeZ99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeZ99/subscriptions","organizations_url":"https://api.github.com/users/JoeZ99/orgs","repos_url":"https://api.github.com/users/JoeZ99/repos","events_url":"https://api.github.com/users/JoeZ99/events{/privacy}","received_events_url":"https://api.github.com/users/JoeZ99/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T16:10:08Z","updated_at":"2016-09-01T16:10:08Z","body":"well, I may misunderstood how it was supposed to work. I assumed an invoice shouldn't be created with payments already, so payments must be added using the payments create entrypoint. I guess I thought you issue an invoice before start getting payments. If you think that's a plausible use case, we could enable creating nvoices with payments in the same request. Right now you need to create the invoice first and then start adding payments.\r\n\r\nBy the way, whose guy is you avatar picture from???"}}
{"actor":{"display_login":"JoeZ99"}}