{"action":"created","comment":{"url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/comments/333146235","pull_request_review_id":299585282,"id":333146235,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMzE0NjIzNQ==","diff_hunk":"@@ -4,39 +4,52 @@ import ShippingResult from './ShippingResult'\n import { useRuntime } from 'vtex.render-runtime'\n import { components, helpers } from 'vtex.address-form'\n import { newAddress } from '../utils/address'\n+\n const { AddressContainer, AddressRules, StyleguideInput } = components\n-const { addValidation } = helpers\n+const { addValidation, removeValidation } = helpers\n \n-type CustomProps = {\n+interface CustomProps {\n+  insertAddress: any\n   selectedAddress: Address\n   deliveryOptions: DeliveryOption[]\n   countries: string[]\n+  selectDeliveryOption: any\n }\n \n const EstimateShipping: FunctionComponent<CustomProps> = ({\n+  insertAddress,\n   selectedAddress,\n   deliveryOptions,\n   countries,\n+  selectDeliveryOption,\n }) => {\n   const { account, culture } = useRuntime()\n \n   const [address, setAddress] = useState<AddressWithValidation>(\n-    addValidation(selectedAddress || newAddress({ country: culture.country }))\n+    addValidation(\n+      selectedAddress\n+        ? newAddress(selectedAddress)\n+        : newAddress({ country: culture.country })\n+    )\n   )\n \n-  const [showResult, setShowResult] = useState<boolean>(false)\n+  const [showResult, setShowResult] = useState<boolean>(\n+    selectedAddress && selectedAddress.postalCode ? true : false","path":"react/components/EstimateShipping.tsx","position":38,"original_position":38,"commit_id":"82a87a3c0a6b1597ce979855d85602f6a282f931","original_commit_id":"63489193b929f0671cc4deea8d35d3315f38624d","user":{"login":"jeffersontuc","id":12574426,"node_id":"MDQ6VXNlcjEyNTc0NDI2","avatar_url":"https://avatars1.githubusercontent.com/u/12574426?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffersontuc","html_url":"https://github.com/jeffersontuc","followers_url":"https://api.github.com/users/jeffersontuc/followers","following_url":"https://api.github.com/users/jeffersontuc/following{/other_user}","gists_url":"https://api.github.com/users/jeffersontuc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffersontuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffersontuc/subscriptions","organizations_url":"https://api.github.com/users/jeffersontuc/orgs","repos_url":"https://api.github.com/users/jeffersontuc/repos","events_url":"https://api.github.com/users/jeffersontuc/events{/privacy}","received_events_url":"https://api.github.com/users/jeffersontuc/received_events","type":"User","site_admin":false},"body":"I'm gonna try it.","created_at":"2019-10-09T17:45:22Z","updated_at":"2019-10-09T17:45:22Z","html_url":"https://github.com/vtex-apps/shipping-calculator/pull/7#discussion_r333146235","pull_request_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/comments/333146235"},"html":{"href":"https://github.com/vtex-apps/shipping-calculator/pull/7#discussion_r333146235"},"pull_request":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7"}},"in_reply_to_id":333024604},"pull_request":{"url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7","id":323970997,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIzOTcwOTk3","html_url":"https://github.com/vtex-apps/shipping-calculator/pull/7","diff_url":"https://github.com/vtex-apps/shipping-calculator/pull/7.diff","patch_url":"https://github.com/vtex-apps/shipping-calculator/pull/7.patch","issue_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/7","number":7,"state":"open","locked":false,"title":"Selects a delivery option, estimates shipping and make some UI adjustments","user":{"login":"jeffersontuc","id":12574426,"node_id":"MDQ6VXNlcjEyNTc0NDI2","avatar_url":"https://avatars1.githubusercontent.com/u/12574426?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffersontuc","html_url":"https://github.com/jeffersontuc","followers_url":"https://api.github.com/users/jeffersontuc/followers","following_url":"https://api.github.com/users/jeffersontuc/following{/other_user}","gists_url":"https://api.github.com/users/jeffersontuc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffersontuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffersontuc/subscriptions","organizations_url":"https://api.github.com/users/jeffersontuc/orgs","repos_url":"https://api.github.com/users/jeffersontuc/repos","events_url":"https://api.github.com/users/jeffersontuc/events{/privacy}","received_events_url":"https://api.github.com/users/jeffersontuc/received_events","type":"User","site_admin":false},"body":"#### Notes\r\n\r\nThis PR depends on and must be merged after [order-shipping](https://github.com/vtex-apps/order-shipping/pull/2).\r\n\r\n<!-- Put any relevant information that doesn't fit in the other sections here. -->\r\n#### What problem is this solving?\r\n\r\nIn order to select a delivery option and to estimate shipping value, the component needs to use `OrderShipping` API. This PR does it. \r\n\r\nIt also makes some UI adjustments.\r\n\r\n<!--- What is the motivation and context for this change? -->\r\n\r\n#### How should this be manually tested?\r\n\r\n[Workspace](https://ordershipping--vtexgame1.myvtex.com/cart)\r\n\r\n#### Checklist/Reminders\r\n\r\n- [ ] Updated `README.md`.\r\n- [x] Updated `CHANGELOG.md`.\r\n- [x] [Linked this PR to a Clubhouse story (if applicable).](https://app.clubhouse.io/vtex/story/18320/implementar-consumer-do-order-shipping-no-shipping-calculator)\r\n- [x] Updated/created tests (important for bug fixes).\r\n- [ ] Deleted the workspace after merging this PR (if applicable).\r\n\r\n#### Screenshots or example usage\r\n\r\n#### Type of changes\r\n\r\n<!--- Add a ✔️ where applicable -->\r\n✔️ | Type of Change\r\n---|---\r\n_ | Bug fix <!-- a non-breaking change which fixes an issue -->\r\n✔️| New feature <!-- a non-breaking change which adds functionality -->\r\n_ | Breaking change <!-- fix or feature that would cause existing functionality to change -->\r\n✔️| Technical improvements <!-- chores, refactors and overall reduction of technical debt -->\r\n\r\n","created_at":"2019-10-02T22:28:38Z","updated_at":"2019-10-09T17:45:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"670853f763906f3d1cf14d8061ae6862423865f6","assignee":{"login":"jeffersontuc","id":12574426,"node_id":"MDQ6VXNlcjEyNTc0NDI2","avatar_url":"https://avatars1.githubusercontent.com/u/12574426?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffersontuc","html_url":"https://github.com/jeffersontuc","followers_url":"https://api.github.com/users/jeffersontuc/followers","following_url":"https://api.github.com/users/jeffersontuc/following{/other_user}","gists_url":"https://api.github.com/users/jeffersontuc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffersontuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffersontuc/subscriptions","organizations_url":"https://api.github.com/users/jeffersontuc/orgs","repos_url":"https://api.github.com/users/jeffersontuc/repos","events_url":"https://api.github.com/users/jeffersontuc/events{/privacy}","received_events_url":"https://api.github.com/users/jeffersontuc/received_events","type":"User","site_admin":false},"assignees":[{"login":"jeffersontuc","id":12574426,"node_id":"MDQ6VXNlcjEyNTc0NDI2","avatar_url":"https://avatars1.githubusercontent.com/u/12574426?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffersontuc","html_url":"https://github.com/jeffersontuc","followers_url":"https://api.github.com/users/jeffersontuc/followers","following_url":"https://api.github.com/users/jeffersontuc/following{/other_user}","gists_url":"https://api.github.com/users/jeffersontuc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffersontuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffersontuc/subscriptions","organizations_url":"https://api.github.com/users/jeffersontuc/orgs","repos_url":"https://api.github.com/users/jeffersontuc/repos","events_url":"https://api.github.com/users/jeffersontuc/events{/privacy}","received_events_url":"https://api.github.com/users/jeffersontuc/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7/commits","review_comments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7/comments","review_comment_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/7/comments","statuses_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/statuses/82a87a3c0a6b1597ce979855d85602f6a282f931","head":{"label":"vtex-apps:feature/flex-layout","ref":"feature/flex-layout","sha":"82a87a3c0a6b1597ce979855d85602f6a282f931","user":{"login":"vtex-apps","id":12614072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjE0MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/12614072?v=4","gravatar_id":"","url":"https://api.github.com/users/vtex-apps","html_url":"https://github.com/vtex-apps","followers_url":"https://api.github.com/users/vtex-apps/followers","following_url":"https://api.github.com/users/vtex-apps/following{/other_user}","gists_url":"https://api.github.com/users/vtex-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/vtex-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtex-apps/subscriptions","organizations_url":"https://api.github.com/users/vtex-apps/orgs","repos_url":"https://api.github.com/users/vtex-apps/repos","events_url":"https://api.github.com/users/vtex-apps/events{/privacy}","received_events_url":"https://api.github.com/users/vtex-apps/received_events","type":"Organization","site_admin":false},"repo":{"id":202422362,"node_id":"MDEwOlJlcG9zaXRvcnkyMDI0MjIzNjI=","name":"shipping-calculator","full_name":"vtex-apps/shipping-calculator","private":false,"owner":{"login":"vtex-apps","id":12614072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjE0MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/12614072?v=4","gravatar_id":"","url":"https://api.github.com/users/vtex-apps","html_url":"https://github.com/vtex-apps","followers_url":"https://api.github.com/users/vtex-apps/followers","following_url":"https://api.github.com/users/vtex-apps/following{/other_user}","gists_url":"https://api.github.com/users/vtex-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/vtex-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtex-apps/subscriptions","organizations_url":"https://api.github.com/users/vtex-apps/orgs","repos_url":"https://api.github.com/users/vtex-apps/repos","events_url":"https://api.github.com/users/vtex-apps/events{/privacy}","received_events_url":"https://api.github.com/users/vtex-apps/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/vtex-apps/shipping-calculator","description":null,"fork":false,"url":"https://api.github.com/repos/vtex-apps/shipping-calculator","forks_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/forks","keys_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/teams","hooks_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/hooks","issue_events_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/events{/number}","events_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/events","assignees_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/assignees{/user}","branches_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/branches{/branch}","tags_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/tags","blobs_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/languages","stargazers_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/stargazers","contributors_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/contributors","subscribers_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/subscribers","subscription_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/subscription","commits_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/contents/{+path}","compare_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/merges","archive_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/downloads","issues_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues{/number}","pulls_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/labels{/name}","releases_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/releases{/id}","deployments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/deployments","created_at":"2019-08-14T20:37:02Z","updated_at":"2019-09-25T17:46:16Z","pushed_at":"2019-10-09T17:43:59Z","git_url":"git://github.com/vtex-apps/shipping-calculator.git","ssh_url":"git@github.com:vtex-apps/shipping-calculator.git","clone_url":"https://github.com/vtex-apps/shipping-calculator.git","svn_url":"https://github.com/vtex-apps/shipping-calculator","homepage":null,"size":158,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"vtex-apps:master","ref":"master","sha":"e1862fabb451757b1bdf301d1d35560c95fcd842","user":{"login":"vtex-apps","id":12614072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjE0MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/12614072?v=4","gravatar_id":"","url":"https://api.github.com/users/vtex-apps","html_url":"https://github.com/vtex-apps","followers_url":"https://api.github.com/users/vtex-apps/followers","following_url":"https://api.github.com/users/vtex-apps/following{/other_user}","gists_url":"https://api.github.com/users/vtex-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/vtex-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtex-apps/subscriptions","organizations_url":"https://api.github.com/users/vtex-apps/orgs","repos_url":"https://api.github.com/users/vtex-apps/repos","events_url":"https://api.github.com/users/vtex-apps/events{/privacy}","received_events_url":"https://api.github.com/users/vtex-apps/received_events","type":"Organization","site_admin":false},"repo":{"id":202422362,"node_id":"MDEwOlJlcG9zaXRvcnkyMDI0MjIzNjI=","name":"shipping-calculator","full_name":"vtex-apps/shipping-calculator","private":false,"owner":{"login":"vtex-apps","id":12614072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjE0MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/12614072?v=4","gravatar_id":"","url":"https://api.github.com/users/vtex-apps","html_url":"https://github.com/vtex-apps","followers_url":"https://api.github.com/users/vtex-apps/followers","following_url":"https://api.github.com/users/vtex-apps/following{/other_user}","gists_url":"https://api.github.com/users/vtex-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/vtex-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtex-apps/subscriptions","organizations_url":"https://api.github.com/users/vtex-apps/orgs","repos_url":"https://api.github.com/users/vtex-apps/repos","events_url":"https://api.github.com/users/vtex-apps/events{/privacy}","received_events_url":"https://api.github.com/users/vtex-apps/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/vtex-apps/shipping-calculator","description":null,"fork":false,"url":"https://api.github.com/repos/vtex-apps/shipping-calculator","forks_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/forks","keys_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/teams","hooks_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/hooks","issue_events_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/events{/number}","events_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/events","assignees_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/assignees{/user}","branches_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/branches{/branch}","tags_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/tags","blobs_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/languages","stargazers_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/stargazers","contributors_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/contributors","subscribers_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/subscribers","subscription_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/subscription","commits_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/contents/{+path}","compare_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/merges","archive_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/downloads","issues_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues{/number}","pulls_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/labels{/name}","releases_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/releases{/id}","deployments_url":"https://api.github.com/repos/vtex-apps/shipping-calculator/deployments","created_at":"2019-08-14T20:37:02Z","updated_at":"2019-09-25T17:46:16Z","pushed_at":"2019-10-09T17:43:59Z","git_url":"git://github.com/vtex-apps/shipping-calculator.git","ssh_url":"git@github.com:vtex-apps/shipping-calculator.git","clone_url":"https://github.com/vtex-apps/shipping-calculator.git","svn_url":"https://github.com/vtex-apps/shipping-calculator","homepage":null,"size":158,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7"},"html":{"href":"https://github.com/vtex-apps/shipping-calculator/pull/7"},"issue":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/7"},"comments":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/vtex-apps/shipping-calculator/statuses/82a87a3c0a6b1597ce979855d85602f6a282f931"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jeffersontuc"}}