{"action":"created","comment":{"url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/comments/196607358","pull_request_review_id":130193297,"id":196607358,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjYwNzM1OA==","diff_hunk":"@@ -0,0 +1,125 @@\n+using System;\n+using System.Runtime.Serialization;\n+using System.Text.RegularExpressions;\n+\n+namespace ServiceHub.User.Library.Models\n+{\n+    /// <summary>\n+    /// Stores data for an address model.\n+    /// </summary>\n+    /// <remarks>\n+    /// The residential address of a user.\n+    /// </remarks>\n+    public class Address\n+    {\n+        /// <value> The unique ID of an address. </value>\n+        public Guid AddressId { get; set; }\n+        ///<value> Address line one </value>\n+        public string Address1 { get; set; }\n+        ///<value> Address line two </value>\n+        public string Address2 { get; set; }\n+        /// <value> The city. </value>\n+        public string City { get; set; }\n+        /// <value> The state. </value>\n+        public string State { get; set; }\n+        /// <value> The zip code.. </value>\n+        public string PostalCode { get; set; }\n+        /// <value> The country. </value>\n+        public string Country { get; set; }\n+\n+        /// <value> Maximum allowed length of a string for the class. </value>\n+        [IgnoreDataMember]\n+        public static readonly int MaxStringLength = 255;\n+\n+        /// <value> All allowed Country codes</value>\n+        [IgnoreDataMember]\n+        private static readonly string[] CountryCodes = { \"US\" };\n+\n+        /// <value> All state codes for the 50 US states. </value>\n+        [IgnoreDataMember]\n+        private static readonly string[] StateCodes = { \"AL\", \"AK\", \"AZ\", \"AR\", \"CA\", \"CO\", \"CT\", \"DE\", \"FL\", \"GA\", \"HI\", \"ID\", \"IL\", \"IN\", \"IA\", \"KS\", \"KY\", \"LA\", \"ME\", \"MD\", \"MA\", \"MI\", \"MN\", \"MS\", \"MO\", \"MT\", \"NE\", \"NV\", \"NH\", \"NJ\", \"NM\", \"NY\", \"NC\", \"ND\", \"OH\", \"OK\", \"OR\", \"PA\", \"RI\", \"SC\", \"SD\", \"TN\", \"TX\", \"UT\", \"VT\", \"VA\", \"WA\", \"WV\", \"WI\", \"WY\" };\n+\n+        /// <summary>\n+        /// Check whether the address is valid.\n+        /// </summary>\n+        /// <remarks>\n+        /// AddressId, Address1, City, State, PostalCode and Country are all required.\n+        /// Address2 is not required but cannot be an empty string.\n+        /// If the country is the United States, postal codes must follow the\n+        /// 5-digit convention (with or without the 4-digit extension code).\n+        /// Country must follow the ISO Alpha-2 country code format, \n+        /// e.g. US for United States and GB for United Kingdom.\n+        /// </remarks>\n+        /// <returns>True if the address is valid and false otherwise</returns>\n+        public Boolean Validate()","path":"src/ServiceHub.User.Library/Models/Address.cs","position":54,"original_position":54,"commit_id":"9393e0531c35675fa81e109f4ee9d605aa5b8a68","original_commit_id":"9393e0531c35675fa81e109f4ee9d605aa5b8a68","user":{"login":"fredbelotte","id":22018714,"node_id":"MDQ6VXNlcjIyMDE4NzE0","avatar_url":"https://avatars3.githubusercontent.com/u/22018714?v=4","gravatar_id":"","url":"https://api.github.com/users/fredbelotte","html_url":"https://github.com/fredbelotte","followers_url":"https://api.github.com/users/fredbelotte/followers","following_url":"https://api.github.com/users/fredbelotte/following{/other_user}","gists_url":"https://api.github.com/users/fredbelotte/gists{/gist_id}","starred_url":"https://api.github.com/users/fredbelotte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredbelotte/subscriptions","organizations_url":"https://api.github.com/users/fredbelotte/orgs","repos_url":"https://api.github.com/users/fredbelotte/repos","events_url":"https://api.github.com/users/fredbelotte/events{/privacy}","received_events_url":"https://api.github.com/users/fredbelotte/received_events","type":"User","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed. ([csharpsquid:S3776](https://sonarcloud.io/organizations/revaturecloud/rules#rule_key=csharpsquid%3AS3776))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=servicehub%3Auser&pullRequest=79&issues=AWQZwBhZ_bEzQ-kURGGX&open=AWQZwBhZ_bEzQ-kURGGX)\n\n[ISSUE_KEY]: AWQZwBhZ_bEzQ-kURGGX","created_at":"2018-06-19T23:15:35Z","updated_at":"2018-06-19T23:15:37Z","html_url":"https://github.com/revaturecloud/servicehub-user/pull/79#discussion_r196607358","pull_request_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/comments/196607358"},"html":{"href":"https://github.com/revaturecloud/servicehub-user/pull/79#discussion_r196607358"},"pull_request":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79","id":195840851,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODQwODUx","html_url":"https://github.com/revaturecloud/servicehub-user/pull/79","diff_url":"https://github.com/revaturecloud/servicehub-user/pull/79.diff","patch_url":"https://github.com/revaturecloud/servicehub-user/pull/79.patch","issue_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/79","number":79,"state":"open","locked":false,"title":"Broker","user":{"login":"escalonn","id":2515013,"node_id":"MDQ6VXNlcjI1MTUwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2515013?v=4","gravatar_id":"","url":"https://api.github.com/users/escalonn","html_url":"https://github.com/escalonn","followers_url":"https://api.github.com/users/escalonn/followers","following_url":"https://api.github.com/users/escalonn/following{/other_user}","gists_url":"https://api.github.com/users/escalonn/gists{/gist_id}","starred_url":"https://api.github.com/users/escalonn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escalonn/subscriptions","organizations_url":"https://api.github.com/users/escalonn/orgs","repos_url":"https://api.github.com/users/escalonn/repos","events_url":"https://api.github.com/users/escalonn/events{/privacy}","received_events_url":"https://api.github.com/users/escalonn/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-19T14:08:31Z","updated_at":"2018-06-19T23:15:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac9782b5cb86207fd0da341ded29c61827bf197e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79/commits","review_comments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79/comments","review_comment_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/comments{/number}","comments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/79/comments","statuses_url":"https://api.github.com/repos/revaturecloud/servicehub-user/statuses/9393e0531c35675fa81e109f4ee9d605aa5b8a68","head":{"label":"revaturecloud:broker","ref":"broker","sha":"9393e0531c35675fa81e109f4ee9d605aa5b8a68","user":{"login":"revaturecloud","id":36998744,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTk4NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/36998744?v=4","gravatar_id":"","url":"https://api.github.com/users/revaturecloud","html_url":"https://github.com/revaturecloud","followers_url":"https://api.github.com/users/revaturecloud/followers","following_url":"https://api.github.com/users/revaturecloud/following{/other_user}","gists_url":"https://api.github.com/users/revaturecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/revaturecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revaturecloud/subscriptions","organizations_url":"https://api.github.com/users/revaturecloud/orgs","repos_url":"https://api.github.com/users/revaturecloud/repos","events_url":"https://api.github.com/users/revaturecloud/events{/privacy}","received_events_url":"https://api.github.com/users/revaturecloud/received_events","type":"Organization","site_admin":false},"repo":{"id":131664524,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE2NjQ1MjQ=","name":"servicehub-user","full_name":"revaturecloud/servicehub-user","owner":{"login":"revaturecloud","id":36998744,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTk4NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/36998744?v=4","gravatar_id":"","url":"https://api.github.com/users/revaturecloud","html_url":"https://github.com/revaturecloud","followers_url":"https://api.github.com/users/revaturecloud/followers","following_url":"https://api.github.com/users/revaturecloud/following{/other_user}","gists_url":"https://api.github.com/users/revaturecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/revaturecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revaturecloud/subscriptions","organizations_url":"https://api.github.com/users/revaturecloud/orgs","repos_url":"https://api.github.com/users/revaturecloud/repos","events_url":"https://api.github.com/users/revaturecloud/events{/privacy}","received_events_url":"https://api.github.com/users/revaturecloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/revaturecloud/servicehub-user","description":"the person api.","fork":false,"url":"https://api.github.com/repos/revaturecloud/servicehub-user","forks_url":"https://api.github.com/repos/revaturecloud/servicehub-user/forks","keys_url":"https://api.github.com/repos/revaturecloud/servicehub-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/revaturecloud/servicehub-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/revaturecloud/servicehub-user/teams","hooks_url":"https://api.github.com/repos/revaturecloud/servicehub-user/hooks","issue_events_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/events{/number}","events_url":"https://api.github.com/repos/revaturecloud/servicehub-user/events","assignees_url":"https://api.github.com/repos/revaturecloud/servicehub-user/assignees{/user}","branches_url":"https://api.github.com/repos/revaturecloud/servicehub-user/branches{/branch}","tags_url":"https://api.github.com/repos/revaturecloud/servicehub-user/tags","blobs_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/revaturecloud/servicehub-user/statuses/{sha}","languages_url":"https://api.github.com/repos/revaturecloud/servicehub-user/languages","stargazers_url":"https://api.github.com/repos/revaturecloud/servicehub-user/stargazers","contributors_url":"https://api.github.com/repos/revaturecloud/servicehub-user/contributors","subscribers_url":"https://api.github.com/repos/revaturecloud/servicehub-user/subscribers","subscription_url":"https://api.github.com/repos/revaturecloud/servicehub-user/subscription","commits_url":"https://api.github.com/repos/revaturecloud/servicehub-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/comments{/number}","contents_url":"https://api.github.com/repos/revaturecloud/servicehub-user/contents/{+path}","compare_url":"https://api.github.com/repos/revaturecloud/servicehub-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/revaturecloud/servicehub-user/merges","archive_url":"https://api.github.com/repos/revaturecloud/servicehub-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/revaturecloud/servicehub-user/downloads","issues_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues{/number}","pulls_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls{/number}","milestones_url":"https://api.github.com/repos/revaturecloud/servicehub-user/milestones{/number}","notifications_url":"https://api.github.com/repos/revaturecloud/servicehub-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/revaturecloud/servicehub-user/labels{/name}","releases_url":"https://api.github.com/repos/revaturecloud/servicehub-user/releases{/id}","deployments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/deployments","created_at":"2018-05-01T01:30:39Z","updated_at":"2018-06-07T21:13:21Z","pushed_at":"2018-06-19T23:09:12Z","git_url":"git://github.com/revaturecloud/servicehub-user.git","ssh_url":"git@github.com:revaturecloud/servicehub-user.git","clone_url":"https://github.com/revaturecloud/servicehub-user.git","svn_url":"https://github.com/revaturecloud/servicehub-user","homepage":null,"size":592,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"revaturecloud:lesser","ref":"lesser","sha":"93acb98ab8634a40a6d3e7406e3b8a9b3e80ebee","user":{"login":"revaturecloud","id":36998744,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTk4NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/36998744?v=4","gravatar_id":"","url":"https://api.github.com/users/revaturecloud","html_url":"https://github.com/revaturecloud","followers_url":"https://api.github.com/users/revaturecloud/followers","following_url":"https://api.github.com/users/revaturecloud/following{/other_user}","gists_url":"https://api.github.com/users/revaturecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/revaturecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revaturecloud/subscriptions","organizations_url":"https://api.github.com/users/revaturecloud/orgs","repos_url":"https://api.github.com/users/revaturecloud/repos","events_url":"https://api.github.com/users/revaturecloud/events{/privacy}","received_events_url":"https://api.github.com/users/revaturecloud/received_events","type":"Organization","site_admin":false},"repo":{"id":131664524,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE2NjQ1MjQ=","name":"servicehub-user","full_name":"revaturecloud/servicehub-user","owner":{"login":"revaturecloud","id":36998744,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2OTk4NzQ0","avatar_url":"https://avatars3.githubusercontent.com/u/36998744?v=4","gravatar_id":"","url":"https://api.github.com/users/revaturecloud","html_url":"https://github.com/revaturecloud","followers_url":"https://api.github.com/users/revaturecloud/followers","following_url":"https://api.github.com/users/revaturecloud/following{/other_user}","gists_url":"https://api.github.com/users/revaturecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/revaturecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revaturecloud/subscriptions","organizations_url":"https://api.github.com/users/revaturecloud/orgs","repos_url":"https://api.github.com/users/revaturecloud/repos","events_url":"https://api.github.com/users/revaturecloud/events{/privacy}","received_events_url":"https://api.github.com/users/revaturecloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/revaturecloud/servicehub-user","description":"the person api.","fork":false,"url":"https://api.github.com/repos/revaturecloud/servicehub-user","forks_url":"https://api.github.com/repos/revaturecloud/servicehub-user/forks","keys_url":"https://api.github.com/repos/revaturecloud/servicehub-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/revaturecloud/servicehub-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/revaturecloud/servicehub-user/teams","hooks_url":"https://api.github.com/repos/revaturecloud/servicehub-user/hooks","issue_events_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/events{/number}","events_url":"https://api.github.com/repos/revaturecloud/servicehub-user/events","assignees_url":"https://api.github.com/repos/revaturecloud/servicehub-user/assignees{/user}","branches_url":"https://api.github.com/repos/revaturecloud/servicehub-user/branches{/branch}","tags_url":"https://api.github.com/repos/revaturecloud/servicehub-user/tags","blobs_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/revaturecloud/servicehub-user/statuses/{sha}","languages_url":"https://api.github.com/repos/revaturecloud/servicehub-user/languages","stargazers_url":"https://api.github.com/repos/revaturecloud/servicehub-user/stargazers","contributors_url":"https://api.github.com/repos/revaturecloud/servicehub-user/contributors","subscribers_url":"https://api.github.com/repos/revaturecloud/servicehub-user/subscribers","subscription_url":"https://api.github.com/repos/revaturecloud/servicehub-user/subscription","commits_url":"https://api.github.com/repos/revaturecloud/servicehub-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/revaturecloud/servicehub-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/comments{/number}","contents_url":"https://api.github.com/repos/revaturecloud/servicehub-user/contents/{+path}","compare_url":"https://api.github.com/repos/revaturecloud/servicehub-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/revaturecloud/servicehub-user/merges","archive_url":"https://api.github.com/repos/revaturecloud/servicehub-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/revaturecloud/servicehub-user/downloads","issues_url":"https://api.github.com/repos/revaturecloud/servicehub-user/issues{/number}","pulls_url":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls{/number}","milestones_url":"https://api.github.com/repos/revaturecloud/servicehub-user/milestones{/number}","notifications_url":"https://api.github.com/repos/revaturecloud/servicehub-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/revaturecloud/servicehub-user/labels{/name}","releases_url":"https://api.github.com/repos/revaturecloud/servicehub-user/releases{/id}","deployments_url":"https://api.github.com/repos/revaturecloud/servicehub-user/deployments","created_at":"2018-05-01T01:30:39Z","updated_at":"2018-06-07T21:13:21Z","pushed_at":"2018-06-19T23:09:12Z","git_url":"git://github.com/revaturecloud/servicehub-user.git","ssh_url":"git@github.com:revaturecloud/servicehub-user.git","clone_url":"https://github.com/revaturecloud/servicehub-user.git","svn_url":"https://github.com/revaturecloud/servicehub-user","homepage":null,"size":592,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79"},"html":{"href":"https://github.com/revaturecloud/servicehub-user/pull/79"},"issue":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/79"},"comments":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/revaturecloud/servicehub-user/statuses/9393e0531c35675fa81e109f4ee9d605aa5b8a68"}},"author_association":"NONE"}}
{"actor":{"display_login":"fredbelotte"}}