{"action":"created","comment":{"url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/comments/176432091","pull_request_review_id":106130720,"id":176432091,"diff_hunk":"@@ -0,0 +1,43 @@\n+using System.Net.Http;\r\n+using System.Threading.Tasks;\r\n+using Microsoft.AspNetCore.Mvc;\r\n+using Microsoft.Azure.WebJobs;\r\n+using Microsoft.Azure.WebJobs.Extensions.Http;\r\n+using Microsoft.Azure.WebJobs.Host;\r\n+using Webcrm.Integrations.Api.Models;\r\n+using Webcrm.Integrations.Synchroniser;\r\n+\r\n+namespace Webcrm.Integrations.Api.Fortnox.Functions\r\n+{\r\n+\r\n+    /*PAYLOAD EXPECTED PUT /Api/SynchroniseOrganisationFromFortnox\r\n+    {\r\n+        FortnoxAccessToken: ...\r\n+        FortnoxClientSecret: ...\r\n+        WebcrmKey: ...\r\n+        FortnoxCustomerNumber: ...\r\n+        WebCrmSyncCustomField: ...\r\n+    }*/\r\n+    public static class SynchroniseOrganisation\r\n+    {\r\n+        //Notice the trigger was changed from HttpRequest to HttpRequestMessage\r\n+        [FunctionName(\"SynchroniseOrganisationFromFortnox\")]\r\n+        public static async Task<IActionResult> FromFortnox(\r\n+            [HttpTrigger(AuthorizationLevel.Function, \"put\",\r\n+                Route = \"SynchroniseOrganisationFromFortnox\")]HttpRequestMessage req, TraceWriter log)\r","path":"Api/Fortnox/Functions/SynchroniseOrganisation.cs","position":27,"original_position":27,"commit_id":"d9917fe8d7fa1db8af6714c51b0584ccb0f58195","original_commit_id":"586e9b7e86000606285fbbd4f45527c95da4e000","user":{"login":"janaagaard75","id":1769450,"avatar_url":"https://avatars3.githubusercontent.com/u/1769450?v=4","gravatar_id":"","url":"https://api.github.com/users/janaagaard75","html_url":"https://github.com/janaagaard75","followers_url":"https://api.github.com/users/janaagaard75/followers","following_url":"https://api.github.com/users/janaagaard75/following{/other_user}","gists_url":"https://api.github.com/users/janaagaard75/gists{/gist_id}","starred_url":"https://api.github.com/users/janaagaard75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janaagaard75/subscriptions","organizations_url":"https://api.github.com/users/janaagaard75/orgs","repos_url":"https://api.github.com/users/janaagaard75/repos","events_url":"https://api.github.com/users/janaagaard75/events{/privacy}","received_events_url":"https://api.github.com/users/janaagaard75/received_events","type":"User","site_admin":false},"body":"You can leave out the `Route` parameter when it's just the same as the function name.","created_at":"2018-03-22T14:08:07Z","updated_at":"2018-03-22T14:39:52Z","html_url":"https://github.com/webCRMdotcom/erp-integrations/pull/4#discussion_r176432091","pull_request_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/comments/176432091"},"html":{"href":"https://github.com/webCRMdotcom/erp-integrations/pull/4#discussion_r176432091"},"pull_request":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4","id":176775270,"html_url":"https://github.com/webCRMdotcom/erp-integrations/pull/4","diff_url":"https://github.com/webCRMdotcom/erp-integrations/pull/4.diff","patch_url":"https://github.com/webCRMdotcom/erp-integrations/pull/4.patch","issue_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/4","number":4,"state":"open","locked":false,"title":"Sync person from fortnox","user":{"login":"rippo","id":772549,"avatar_url":"https://avatars2.githubusercontent.com/u/772549?v=4","gravatar_id":"","url":"https://api.github.com/users/rippo","html_url":"https://github.com/rippo","followers_url":"https://api.github.com/users/rippo/followers","following_url":"https://api.github.com/users/rippo/following{/other_user}","gists_url":"https://api.github.com/users/rippo/gists{/gist_id}","starred_url":"https://api.github.com/users/rippo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rippo/subscriptions","organizations_url":"https://api.github.com/users/rippo/orgs","repos_url":"https://api.github.com/users/rippo/repos","events_url":"https://api.github.com/users/rippo/events{/privacy}","received_events_url":"https://api.github.com/users/rippo/received_events","type":"User","site_admin":false},"body":"Got to point where I can now pass the custom field from postman through the API - The code now\r\n\r\n- Finds fortnox customer\r\n- Finds corresponding webcrm organisation\r\n\r\n","created_at":"2018-03-22T13:19:13Z","updated_at":"2018-03-22T14:39:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"664670e2b91a0c014356b780ba9fb5564a1195f1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4/commits","review_comments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4/comments","review_comment_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/4/comments","statuses_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/statuses/d9917fe8d7fa1db8af6714c51b0584ccb0f58195","head":{"label":"webCRMdotcom:SyncPersonFromFortnox","ref":"SyncPersonFromFortnox","sha":"d9917fe8d7fa1db8af6714c51b0584ccb0f58195","user":{"login":"webCRMdotcom","id":37531685,"avatar_url":"https://avatars3.githubusercontent.com/u/37531685?v=4","gravatar_id":"","url":"https://api.github.com/users/webCRMdotcom","html_url":"https://github.com/webCRMdotcom","followers_url":"https://api.github.com/users/webCRMdotcom/followers","following_url":"https://api.github.com/users/webCRMdotcom/following{/other_user}","gists_url":"https://api.github.com/users/webCRMdotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/webCRMdotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webCRMdotcom/subscriptions","organizations_url":"https://api.github.com/users/webCRMdotcom/orgs","repos_url":"https://api.github.com/users/webCRMdotcom/repos","events_url":"https://api.github.com/users/webCRMdotcom/events{/privacy}","received_events_url":"https://api.github.com/users/webCRMdotcom/received_events","type":"Organization","site_admin":false},"repo":{"id":126195798,"name":"erp-integrations","full_name":"webCRMdotcom/erp-integrations","owner":{"login":"webCRMdotcom","id":37531685,"avatar_url":"https://avatars3.githubusercontent.com/u/37531685?v=4","gravatar_id":"","url":"https://api.github.com/users/webCRMdotcom","html_url":"https://github.com/webCRMdotcom","followers_url":"https://api.github.com/users/webCRMdotcom/followers","following_url":"https://api.github.com/users/webCRMdotcom/following{/other_user}","gists_url":"https://api.github.com/users/webCRMdotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/webCRMdotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webCRMdotcom/subscriptions","organizations_url":"https://api.github.com/users/webCRMdotcom/orgs","repos_url":"https://api.github.com/users/webCRMdotcom/repos","events_url":"https://api.github.com/users/webCRMdotcom/events{/privacy}","received_events_url":"https://api.github.com/users/webCRMdotcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webCRMdotcom/erp-integrations","description":null,"fork":false,"url":"https://api.github.com/repos/webCRMdotcom/erp-integrations","forks_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/forks","keys_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/teams","hooks_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/hooks","issue_events_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/events{/number}","events_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/events","assignees_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/assignees{/user}","branches_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/branches{/branch}","tags_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/tags","blobs_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/statuses/{sha}","languages_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/languages","stargazers_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/stargazers","contributors_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/contributors","subscribers_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/subscribers","subscription_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/subscription","commits_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/contents/{+path}","compare_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/merges","archive_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/downloads","issues_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues{/number}","pulls_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls{/number}","milestones_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/milestones{/number}","notifications_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/labels{/name}","releases_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/releases{/id}","deployments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/deployments","created_at":"2018-03-21T14:58:18Z","updated_at":"2018-03-22T11:53:42Z","pushed_at":"2018-03-22T13:19:14Z","git_url":"git://github.com/webCRMdotcom/erp-integrations.git","ssh_url":"git@github.com:webCRMdotcom/erp-integrations.git","clone_url":"https://github.com/webCRMdotcom/erp-integrations.git","svn_url":"https://github.com/webCRMdotcom/erp-integrations","homepage":null,"size":262,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"webCRMdotcom:master","ref":"master","sha":"44db4cdf4d38d94bdedf6c4ae74bee5babdbc8c5","user":{"login":"webCRMdotcom","id":37531685,"avatar_url":"https://avatars3.githubusercontent.com/u/37531685?v=4","gravatar_id":"","url":"https://api.github.com/users/webCRMdotcom","html_url":"https://github.com/webCRMdotcom","followers_url":"https://api.github.com/users/webCRMdotcom/followers","following_url":"https://api.github.com/users/webCRMdotcom/following{/other_user}","gists_url":"https://api.github.com/users/webCRMdotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/webCRMdotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webCRMdotcom/subscriptions","organizations_url":"https://api.github.com/users/webCRMdotcom/orgs","repos_url":"https://api.github.com/users/webCRMdotcom/repos","events_url":"https://api.github.com/users/webCRMdotcom/events{/privacy}","received_events_url":"https://api.github.com/users/webCRMdotcom/received_events","type":"Organization","site_admin":false},"repo":{"id":126195798,"name":"erp-integrations","full_name":"webCRMdotcom/erp-integrations","owner":{"login":"webCRMdotcom","id":37531685,"avatar_url":"https://avatars3.githubusercontent.com/u/37531685?v=4","gravatar_id":"","url":"https://api.github.com/users/webCRMdotcom","html_url":"https://github.com/webCRMdotcom","followers_url":"https://api.github.com/users/webCRMdotcom/followers","following_url":"https://api.github.com/users/webCRMdotcom/following{/other_user}","gists_url":"https://api.github.com/users/webCRMdotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/webCRMdotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webCRMdotcom/subscriptions","organizations_url":"https://api.github.com/users/webCRMdotcom/orgs","repos_url":"https://api.github.com/users/webCRMdotcom/repos","events_url":"https://api.github.com/users/webCRMdotcom/events{/privacy}","received_events_url":"https://api.github.com/users/webCRMdotcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webCRMdotcom/erp-integrations","description":null,"fork":false,"url":"https://api.github.com/repos/webCRMdotcom/erp-integrations","forks_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/forks","keys_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/teams","hooks_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/hooks","issue_events_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/events{/number}","events_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/events","assignees_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/assignees{/user}","branches_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/branches{/branch}","tags_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/tags","blobs_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/statuses/{sha}","languages_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/languages","stargazers_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/stargazers","contributors_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/contributors","subscribers_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/subscribers","subscription_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/subscription","commits_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/comments{/number}","contents_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/contents/{+path}","compare_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/merges","archive_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/downloads","issues_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues{/number}","pulls_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls{/number}","milestones_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/milestones{/number}","notifications_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/labels{/name}","releases_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/releases{/id}","deployments_url":"https://api.github.com/repos/webCRMdotcom/erp-integrations/deployments","created_at":"2018-03-21T14:58:18Z","updated_at":"2018-03-22T11:53:42Z","pushed_at":"2018-03-22T13:19:14Z","git_url":"git://github.com/webCRMdotcom/erp-integrations.git","ssh_url":"git@github.com:webCRMdotcom/erp-integrations.git","clone_url":"https://github.com/webCRMdotcom/erp-integrations.git","svn_url":"https://github.com/webCRMdotcom/erp-integrations","homepage":null,"size":262,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4"},"html":{"href":"https://github.com/webCRMdotcom/erp-integrations/pull/4"},"issue":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/4"},"comments":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/webCRMdotcom/erp-integrations/statuses/d9917fe8d7fa1db8af6714c51b0584ccb0f58195"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"janaagaard75"}}