{"action":"created","issue":{"url":"https://api.github.com/repos/kin-business/kin.api.public/issues/5","repository_url":"https://api.github.com/repos/kin-business/kin.api.public","labels_url":"https://api.github.com/repos/kin-business/kin.api.public/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kin-business/kin.api.public/issues/5/comments","events_url":"https://api.github.com/repos/kin-business/kin.api.public/issues/5/events","html_url":"https://github.com/kin-business/kin.api.public/issues/5","id":359043805,"node_id":"MDU6SXNzdWUzNTkwNDM4MDU=","number":5,"title":"When settling, memberToMemberBalances don't update","user":{"login":"JacquesSmuts","id":8026691,"node_id":"MDQ6VXNlcjgwMjY2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8026691?v=4","gravatar_id":"","url":"https://api.github.com/users/JacquesSmuts","html_url":"https://github.com/JacquesSmuts","followers_url":"https://api.github.com/users/JacquesSmuts/followers","following_url":"https://api.github.com/users/JacquesSmuts/following{/other_user}","gists_url":"https://api.github.com/users/JacquesSmuts/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesSmuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesSmuts/subscriptions","organizations_url":"https://api.github.com/users/JacquesSmuts/orgs","repos_url":"https://api.github.com/users/JacquesSmuts/repos","events_url":"https://api.github.com/users/JacquesSmuts/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesSmuts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-11T13:18:15Z","updated_at":"2018-09-12T08:28:03Z","closed_at":null,"author_association":"NONE","body":"\r\nI have this group:\r\n\r\n> {\r\n\t\"data\": {\r\n\t\t\"group\": {\r\n\t\t\t\"__typename\": \"Group\",\r\n\t\t\t\"createDate\": \"2018-09-11T12:05:51.015+00:00\",\r\n\t\t\t\"id\": \"5b97af9e3157ef0002c8b1fd\",\r\n\t\t\t\"name\": \"jjjj\",\r\n\t\t\t\"updateDate\": \"2018-09-11T12:58:17.592+00:00\",\r\n\t\t\t\"summary\": {\r\n\t\t\t\t\"__typename\": \"GroupSummary\",\r\n\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 17260,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t},\r\n\t\t\t\t\"totalEstimate\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 0,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"memberToMemberBalance\": [{\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"toMemberId\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 3096,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"toMemberId\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 2467,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"toMemberId\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": **3333**,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}],\r\n\t\t\t\"members\": [{\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/aee48067a9d435eab1991fec2baece3c.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"Jacques\",\r\n\t\t\t\t\"status\": \"Active\",\r\n\t\t\t\t\"userId\": \"5b961d1da266eb0002efe61b\",\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 629,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 7260,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 8961,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 8332,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/495e807e18982c28abad30f952b40914.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"hdhdh\",\r\n\t\t\t\t\"status\": \"Invited\",\r\n\t\t\t\t\"userId\": null,\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": -6429,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 0,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 4166,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 10595,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/2ccec9cad37a7527c36ddb7ad485af02.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"jangesig\",\r\n\t\t\t\t\"status\": \"Active\",\r\n\t\t\t\t\"userId\": \"5b8cf6ef4203140002f4036b\",\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 5800,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 10000,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 14165,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 8365,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}]\r\n\t\t}\r\n\t}\r\n}\r\n\r\n### I owe one member **3333** cents, so then I make a settlement like so:\r\n\r\n> \"query\":\"mutation CreateSettlement($groupId: String!, $settlement: TransactionRecordSettlement!) {  transactionRecordCreateSettlement(groupId: $groupId, settlement: $settlement) {    __typename    id  }}\",\"operationName\":\"CreateSettlement\",\"variables\":{\"groupId\":\"5b97af9e3157ef0002c8b1fd\",\"settlement\":{\"description\":\"nothing\",\"fromMemberId\":\"5b97af9f3157ef0002c8b1fe\",\"date\":\"2018-09-11T15:13:26.533\",\"to\":[{\"memberId\":\"5b97b81b95c71b000231a76f\",\"amount\":{\"currencyIso\":\"ZAR\",\"cents\":3333}}]}}}\r\n\r\nWith success from the server\r\n\r\nBut then when the group updates I get this response:\r\n\r\n> {\r\n\t\"data\": {\r\n\t\t\"group\": {\r\n\t\t\t\"__typename\": \"Group\",\r\n\t\t\t\"createDate\": \"2018-09-11T12:05:51.015+00:00\",\r\n\t\t\t\"id\": \"5b97af9e3157ef0002c8b1fd\",\r\n\t\t\t\"name\": \"jjjj\",\r\n\t\t\t\"updateDate\": \"2018-09-11T13:13:27.752+00:00\",\r\n\t\t\t\"summary\": {\r\n\t\t\t\t\"__typename\": \"GroupSummary\",\r\n\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 17260,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t},\r\n\t\t\t\t\"totalEstimate\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 0,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\"memberToMemberBalance\": [{\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"toMemberId\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 3096,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"toMemberId\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": 866,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMemberToPayMember\",\r\n\t\t\t\t\"fromMemberId\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"toMemberId\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"amount\": {\r\n\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\"cents\": **3333**,\r\n\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t}\r\n\t\t\t}],\r\n\t\t\t\"members\": [{\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97af9f3157ef0002c8b1fe\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/aee48067a9d435eab1991fec2baece3c.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"Jacques\",\r\n\t\t\t\t\"status\": \"Active\",\r\n\t\t\t\t\"userId\": \"5b961d1da266eb0002efe61b\",\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 3962,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 10593,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 12294,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 8332,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97afa8c93c690002aef190\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/495e807e18982c28abad30f952b40914.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"hdhdh\",\r\n\t\t\t\t\"status\": \"Invited\",\r\n\t\t\t\t\"userId\": null,\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": -6429,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 0,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 4166,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 10595,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, {\r\n\t\t\t\t\"__typename\": \"GroupMember\",\r\n\t\t\t\t\"id\": \"5b97b81b95c71b000231a76f\",\r\n\t\t\t\t\"image\": \"https://www.gravatar.com/avatar/2ccec9cad37a7527c36ddb7ad485af02.jpg?s=100&d=retro\",\r\n\t\t\t\t\"name\": \"jangesig\",\r\n\t\t\t\t\"status\": \"Active\",\r\n\t\t\t\t\"userId\": \"5b8cf6ef4203140002f4036b\",\r\n\t\t\t\t\"summary\": {\r\n\t\t\t\t\t\"__typename\": \"GroupMemberSummary\",\r\n\t\t\t\t\t\"balance\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 2467,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalSpent\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 10000,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalIAmOwed\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 14165,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"totalOwe\": {\r\n\t\t\t\t\t\t\"__typename\": \"Amount\",\r\n\t\t\t\t\t\t\"cents\": 11698,\r\n\t\t\t\t\t\t\"currencyIso\": \"ZAR\"\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}]\r\n\t\t}\r\n\t}\r\n}\r\n\r\nAm I reading the data correctly?\r\n"},"comment":{"url":"https://api.github.com/repos/kin-business/kin.api.public/issues/comments/420559213","html_url":"https://github.com/kin-business/kin.api.public/issues/5#issuecomment-420559213","issue_url":"https://api.github.com/repos/kin-business/kin.api.public/issues/5","id":420559213,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDU1OTIxMw==","user":{"login":"JacquesSmuts","id":8026691,"node_id":"MDQ6VXNlcjgwMjY2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8026691?v=4","gravatar_id":"","url":"https://api.github.com/users/JacquesSmuts","html_url":"https://github.com/JacquesSmuts","followers_url":"https://api.github.com/users/JacquesSmuts/followers","following_url":"https://api.github.com/users/JacquesSmuts/following{/other_user}","gists_url":"https://api.github.com/users/JacquesSmuts/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesSmuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesSmuts/subscriptions","organizations_url":"https://api.github.com/users/JacquesSmuts/orgs","repos_url":"https://api.github.com/users/JacquesSmuts/repos","events_url":"https://api.github.com/users/JacquesSmuts/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesSmuts/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T08:28:03Z","updated_at":"2018-09-12T08:28:03Z","author_association":"NONE","body":"Is there a better way to format the data for github issues? Github steals formatting away for some reason -_-\r\n\r\nFor now, Ctrl+F 3333 and look for the bolded parts and you'll get an idea. It looks from my side as if settlements don't work.\r\n"}}
{"actor":{"display_login":"JacquesSmuts"}}