{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/members-data-api/issues/313","repository_url":"https://api.github.com/repos/guardian/members-data-api","labels_url":"https://api.github.com/repos/guardian/members-data-api/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/guardian/members-data-api/issues/313/comments","events_url":"https://api.github.com/repos/guardian/members-data-api/issues/313/events","html_url":"https://github.com/guardian/members-data-api/pull/313","id":307312920,"number":313,"title":"When finding the latest unpaid invoice, ignore any invoices that aren't posted.","user":{"login":"lmath","id":3072877,"avatar_url":"https://avatars1.githubusercontent.com/u/3072877?v=4","gravatar_id":"","url":"https://api.github.com/users/lmath","html_url":"https://github.com/lmath","followers_url":"https://api.github.com/users/lmath/followers","following_url":"https://api.github.com/users/lmath/following{/other_user}","gists_url":"https://api.github.com/users/lmath/gists{/gist_id}","starred_url":"https://api.github.com/users/lmath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmath/subscriptions","organizations_url":"https://api.github.com/users/lmath/orgs","repos_url":"https://api.github.com/users/lmath/repos","events_url":"https://api.github.com/users/lmath/events{/privacy}","received_events_url":"https://api.github.com/users/lmath/received_events","type":"User","site_admin":false},"labels":[{"id":268019669,"url":"https://api.github.com/repos/guardian/members-data-api/labels/Seen-on-PROD","name":"Seen-on-PROD","color":"bfe5bf","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-21T16:09:20Z","updated_at":"2018-03-22T10:28:08Z","closed_at":"2018-03-22T10:15:16Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/guardian/members-data-api/pulls/313","html_url":"https://github.com/guardian/members-data-api/pull/313","diff_url":"https://github.com/guardian/members-data-api/pull/313.diff","patch_url":"https://github.com/guardian/members-data-api/pull/313.patch"},"body":"<!-- \r\nThe text you're about to write will advocate why the change is needed.\r\nThink about OKRs and wider purpose!\r\n-->\r\n### Why do we need this? <!-- how will closing this PR damage the guardian/KRs? -->\r\nWhen finding the latest unpaid invoice to determine who should see a payment failure banner, the only invoices that are relevant are posted, so let's ignore the others. \r\n\r\n### The changes <!-- technical description/bullets (if it's long, would two PRs would have been better?) -->\r\n- On calls to /me/mma-membership, we make a zuora account summary call and from the invoices returned, determine the invoice date for the latest unpaid invoice. Here we ignore any invoices that don't have status \"Posted\" when finding this date. \r\n\r\n### trello card/screenshot/json/related PRs etc\r\nhttps://github.com/guardian/membership-common/pull/571 - keep invoices and invoice dates \r\nhttps://github.com/guardian/members-data-api/pull/302 - identify and log if a member has an action on calls to /me\r\nhttps://github.com/guardian/members-data-api/pull/309 - identify and log if a member has an alert for the membership manage page\r\nhttps://github.com/guardian/members-data-api/pull/312 - more accurately identify if membership should see the payment failure banner based on the latest invoice date + they should have an active membership\r\n\r\ncc @paulbrown1982 @AWare @jacobwinch @johnduffell @pvighi "},"comment":{"url":"https://api.github.com/repos/guardian/members-data-api/issues/comments/375249397","html_url":"https://github.com/guardian/members-data-api/pull/313#issuecomment-375249397","issue_url":"https://api.github.com/repos/guardian/members-data-api/issues/313","id":375249397,"user":{"login":"prout-bot","id":8896019,"avatar_url":"https://avatars2.githubusercontent.com/u/8896019?v=4","gravatar_id":"","url":"https://api.github.com/users/prout-bot","html_url":"https://github.com/prout-bot","followers_url":"https://api.github.com/users/prout-bot/followers","following_url":"https://api.github.com/users/prout-bot/following{/other_user}","gists_url":"https://api.github.com/users/prout-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/prout-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prout-bot/subscriptions","organizations_url":"https://api.github.com/users/prout-bot/orgs","repos_url":"https://api.github.com/users/prout-bot/repos","events_url":"https://api.github.com/users/prout-bot/events{/privacy}","received_events_url":"https://api.github.com/users/prout-bot/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T10:28:08Z","updated_at":"2018-03-22T10:28:08Z","author_association":"NONE","body":"Seen on [PROD](https://members-data-api.theguardian.com/healthcheck) (merged by @lmath 12 minutes and 51 seconds ago) Please check your changes!\n\n#### Sentry Release: [members-data-api](https://sentry.io/the-guardian/members-data-api/releases/0a4add3bfc4f2a43298bb204b0bbfdf1c9a9a964/)"}}
{"actor":{"display_login":"prout-bot"}}