{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/comments/200050178","pull_request_review_id":134284444,"id":200050178,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDA1MDE3OA==","diff_hunk":"@@ -0,0 +1,30 @@\n+<?php\n+\n+declare(strict_types=1);\n+\n+namespace Sylius\\InvoicingPlugin\\Event;\n+\n+use DateTime;\n+use Prooph\\Common\\Messaging\\DomainEvent;\n+use Prooph\\Common\\Messaging\\PayloadTrait;\n+\n+final class OrderPaymentPaid extends DomainEvent\n+{\n+    use PayloadTrait;\n+\n+    public function __construct(string $orderNumber, \\DateTimeInterface $date)\n+    {\n+        $this->init();\n+        $this->setPayload(['order_number' => $orderNumber, 'date' => $date->format('d-m-Y H:i:s.u')]);\n+    }\n+\n+    public function orderNumber(): string\n+    {\n+        return $this->payload()['order_number'];\n+    }\n+\n+    public function date(): \\DateTimeInterface\n+    {\n+        return DateTime::createFromFormat('d-m-Y H:i:s.u', $this->payload()['date']);","path":"src/Event/OrderPaymentPaid.php","position":28,"original_position":28,"commit_id":"b9c0c6dfd1bf28af8e44be2b875df0110b3f7884","original_commit_id":"b9c0c6dfd1bf28af8e44be2b875df0110b3f7884","user":{"login":"Zales0123","id":6212718,"node_id":"MDQ6VXNlcjYyMTI3MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6212718?v=4","gravatar_id":"","url":"https://api.github.com/users/Zales0123","html_url":"https://github.com/Zales0123","followers_url":"https://api.github.com/users/Zales0123/followers","following_url":"https://api.github.com/users/Zales0123/following{/other_user}","gists_url":"https://api.github.com/users/Zales0123/gists{/gist_id}","starred_url":"https://api.github.com/users/Zales0123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zales0123/subscriptions","organizations_url":"https://api.github.com/users/Zales0123/orgs","repos_url":"https://api.github.com/users/Zales0123/repos","events_url":"https://api.github.com/users/Zales0123/events{/privacy}","received_events_url":"https://api.github.com/users/Zales0123/received_events","type":"User","site_admin":false},"body":"`\\DateTime`","created_at":"2018-07-04T08:39:58Z","updated_at":"2018-07-04T08:43:50Z","html_url":"https://github.com/Sylius/InvoicingPlugin/pull/12#discussion_r200050178","pull_request_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/comments/200050178"},"html":{"href":"https://github.com/Sylius/InvoicingPlugin/pull/12#discussion_r200050178"},"pull_request":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12","id":198910607,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4OTEwNjA3","html_url":"https://github.com/Sylius/InvoicingPlugin/pull/12","diff_url":"https://github.com/Sylius/InvoicingPlugin/pull/12.diff","patch_url":"https://github.com/Sylius/InvoicingPlugin/pull/12.patch","issue_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/12","number":12,"state":"open","locked":false,"title":"I want to receive email with invoice when order is paid","user":{"login":"bartoszpietrzak1994","id":22262296,"node_id":"MDQ6VXNlcjIyMjYyMjk2","avatar_url":"https://avatars1.githubusercontent.com/u/22262296?v=4","gravatar_id":"","url":"https://api.github.com/users/bartoszpietrzak1994","html_url":"https://github.com/bartoszpietrzak1994","followers_url":"https://api.github.com/users/bartoszpietrzak1994/followers","following_url":"https://api.github.com/users/bartoszpietrzak1994/following{/other_user}","gists_url":"https://api.github.com/users/bartoszpietrzak1994/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszpietrzak1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszpietrzak1994/subscriptions","organizations_url":"https://api.github.com/users/bartoszpietrzak1994/orgs","repos_url":"https://api.github.com/users/bartoszpietrzak1994/repos","events_url":"https://api.github.com/users/bartoszpietrzak1994/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszpietrzak1994/received_events","type":"User","site_admin":false},"body":"\r\n![screen shot 2018-07-03 at 18 42 46](https://user-images.githubusercontent.com/22262296/42233433-da01957a-7ef1-11e8-8bf1-6efdebccf8fc.png)\r\n\r\n\r\n```\r\nScenario: I receive an email containing invoice once complete payment steps for order\r\n    When the order \"#00000666\" is already paid\r\n    Then an email containing invoice generated for order \"#00000666\" should be sent to \"sylius@example.com\"\r\n\r\nScenario: I don't receive an email containing invoice when the order is not paid\r\n    When the order \"#00000667\" was cancelled\r\n    Then an email containing invoice generated for order \"#00000667\" should not be sent to \"sylius@example.com\"\r\n```\r\n\r\nScenarios fulfilled","created_at":"2018-07-03T09:58:31Z","updated_at":"2018-07-04T08:43:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3520c40b0a3ebc7d4abcbdc7a33853658635e76a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pamil","id":1897953,"node_id":"MDQ6VXNlcjE4OTc5NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1897953?v=4","gravatar_id":"","url":"https://api.github.com/users/pamil","html_url":"https://github.com/pamil","followers_url":"https://api.github.com/users/pamil/followers","following_url":"https://api.github.com/users/pamil/following{/other_user}","gists_url":"https://api.github.com/users/pamil/gists{/gist_id}","starred_url":"https://api.github.com/users/pamil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamil/subscriptions","organizations_url":"https://api.github.com/users/pamil/orgs","repos_url":"https://api.github.com/users/pamil/repos","events_url":"https://api.github.com/users/pamil/events{/privacy}","received_events_url":"https://api.github.com/users/pamil/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12/commits","review_comments_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12/comments","review_comment_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/12/comments","statuses_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/statuses/b9c0c6dfd1bf28af8e44be2b875df0110b3f7884","head":{"label":"bartoszpietrzak1994:i-want-to-receive-email-with-invoice-when-order-is-paid","ref":"i-want-to-receive-email-with-invoice-when-order-is-paid","sha":"b9c0c6dfd1bf28af8e44be2b875df0110b3f7884","user":{"login":"bartoszpietrzak1994","id":22262296,"node_id":"MDQ6VXNlcjIyMjYyMjk2","avatar_url":"https://avatars1.githubusercontent.com/u/22262296?v=4","gravatar_id":"","url":"https://api.github.com/users/bartoszpietrzak1994","html_url":"https://github.com/bartoszpietrzak1994","followers_url":"https://api.github.com/users/bartoszpietrzak1994/followers","following_url":"https://api.github.com/users/bartoszpietrzak1994/following{/other_user}","gists_url":"https://api.github.com/users/bartoszpietrzak1994/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszpietrzak1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszpietrzak1994/subscriptions","organizations_url":"https://api.github.com/users/bartoszpietrzak1994/orgs","repos_url":"https://api.github.com/users/bartoszpietrzak1994/repos","events_url":"https://api.github.com/users/bartoszpietrzak1994/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszpietrzak1994/received_events","type":"User","site_admin":false},"repo":{"id":138268725,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgyNjg3MjU=","name":"InvoicingPlugin","full_name":"bartoszpietrzak1994/InvoicingPlugin","owner":{"login":"bartoszpietrzak1994","id":22262296,"node_id":"MDQ6VXNlcjIyMjYyMjk2","avatar_url":"https://avatars1.githubusercontent.com/u/22262296?v=4","gravatar_id":"","url":"https://api.github.com/users/bartoszpietrzak1994","html_url":"https://github.com/bartoszpietrzak1994","followers_url":"https://api.github.com/users/bartoszpietrzak1994/followers","following_url":"https://api.github.com/users/bartoszpietrzak1994/following{/other_user}","gists_url":"https://api.github.com/users/bartoszpietrzak1994/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszpietrzak1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszpietrzak1994/subscriptions","organizations_url":"https://api.github.com/users/bartoszpietrzak1994/orgs","repos_url":"https://api.github.com/users/bartoszpietrzak1994/repos","events_url":"https://api.github.com/users/bartoszpietrzak1994/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszpietrzak1994/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bartoszpietrzak1994/InvoicingPlugin","description":null,"fork":true,"url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin","forks_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/forks","keys_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/teams","hooks_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/hooks","issue_events_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/issues/events{/number}","events_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/events","assignees_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/assignees{/user}","branches_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/branches{/branch}","tags_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/tags","blobs_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/languages","stargazers_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/stargazers","contributors_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/contributors","subscribers_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/subscribers","subscription_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/subscription","commits_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/contents/{+path}","compare_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/merges","archive_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/downloads","issues_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/issues{/number}","pulls_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/labels{/name}","releases_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/releases{/id}","deployments_url":"https://api.github.com/repos/bartoszpietrzak1994/InvoicingPlugin/deployments","created_at":"2018-06-22T07:14:53Z","updated_at":"2018-06-22T07:14:55Z","pushed_at":"2018-07-04T08:23:29Z","git_url":"git://github.com/bartoszpietrzak1994/InvoicingPlugin.git","ssh_url":"git@github.com:bartoszpietrzak1994/InvoicingPlugin.git","clone_url":"https://github.com/bartoszpietrzak1994/InvoicingPlugin.git","svn_url":"https://github.com/bartoszpietrzak1994/InvoicingPlugin","homepage":null,"size":115,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Sylius:master","ref":"master","sha":"f8f2e87df6404bf450f4fa44033bca38dd3a806f","user":{"login":"Sylius","id":719423,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxOTQyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/719423?v=4","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"repo":{"id":137469748,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc0Njk3NDg=","name":"InvoicingPlugin","full_name":"Sylius/InvoicingPlugin","owner":{"login":"Sylius","id":719423,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxOTQyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/719423?v=4","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sylius/InvoicingPlugin","description":null,"fork":false,"url":"https://api.github.com/repos/Sylius/InvoicingPlugin","forks_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/forks","keys_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/teams","hooks_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/hooks","issue_events_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/events{/number}","events_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/events","assignees_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/assignees{/user}","branches_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/branches{/branch}","tags_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/tags","blobs_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/languages","stargazers_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/stargazers","contributors_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/contributors","subscribers_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/subscribers","subscription_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/subscription","commits_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/contents/{+path}","compare_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/merges","archive_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/downloads","issues_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues{/number}","pulls_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/labels{/name}","releases_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/releases{/id}","deployments_url":"https://api.github.com/repos/Sylius/InvoicingPlugin/deployments","created_at":"2018-06-15T09:39:22Z","updated_at":"2018-07-03T18:56:39Z","pushed_at":"2018-07-04T08:23:31Z","git_url":"git://github.com/Sylius/InvoicingPlugin.git","ssh_url":"git@github.com:Sylius/InvoicingPlugin.git","clone_url":"https://github.com/Sylius/InvoicingPlugin.git","svn_url":"https://github.com/Sylius/InvoicingPlugin","homepage":null,"size":101,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":4,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12"},"html":{"href":"https://github.com/Sylius/InvoicingPlugin/pull/12"},"issue":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/12"},"comments":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/InvoicingPlugin/statuses/b9c0c6dfd1bf28af8e44be2b875df0110b3f7884"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Zales0123"}}