{"action":"created","comment":{"url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/comments/77777488","id":77777488,"diff_hunk":"@@ -137,27 +143,27 @@ extension CheckoutSummaryActionsHandler {\n }\n \n extension CheckoutSummaryActionsHandler {\n-    func pickedAddressCompletion(pickedAddress address: Address,\n+    func pickedAddressCompletion(pickedAddress address: Addressable,\n         forAddressType addressType: AddressType) {\n \n             switch addressType {\n             case AddressType.billing:\n-                viewController.checkoutViewModel.selectedBillingAddress = BillingAddress(address: address)\n-                viewController.checkoutViewModel.selectedBillingAddressId = address.id\n+                guard let billingAddress = BillingAddress(address: address) else { return }\n+                viewController.checkoutViewModel.selectedBillingAddress = billingAddress\n             case AddressType.shipping:\n-                viewController.checkoutViewModel.selectedShippingAddress = ShippingAddress(address: address)\n-                viewController.checkoutViewModel.selectedShippingAddressId = address.id\n+                guard let shippingAddress = ShippingAddress(address: address) else { return }\n+                viewController.checkoutViewModel.selectedShippingAddress = shippingAddress\n             }\n             viewController.loaderView.hide()\n             viewController.rootStackView.configureData(viewController)\n-\n+            viewController.refreshViewData()\n             guard let ready = viewController.checkoutViewModel.isReadyToCreateCheckout where ready == true\n             else { return }\n             viewController.loaderView.show()\n             guard let cartId = viewController.checkoutViewModel.cartId else { return }\n             viewController.checkout.client.createCheckout(cartId,\n-                billingAddressId: viewController.checkoutViewModel.selectedBillingAddressId,\n-                shippingAddressId: viewController.checkoutViewModel.selectedShippingAddressId) { result in\n+                billingAddressId: viewController.checkoutViewModel.selectedBillingAddress?.id,\n+                shippingAddressId: viewController.checkoutViewModel.selectedShippingAddress?.id) { result in","path":"AtlasUI/AtlasUI/CheckoutSummaryActionsHandler.swift","position":64,"original_position":64,"commit_id":"6da4250b7dac6489bf78a143bd378e73d13f084b","original_commit_id":"f054c04aab1be4f0a4e8c83b2d23a865933ee3c3","user":{"login":"bonkey","id":39100,"avatar_url":"https://avatars.githubusercontent.com/u/39100?v=3","gravatar_id":"","url":"https://api.github.com/users/bonkey","html_url":"https://github.com/bonkey","followers_url":"https://api.github.com/users/bonkey/followers","following_url":"https://api.github.com/users/bonkey/following{/other_user}","gists_url":"https://api.github.com/users/bonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/bonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonkey/subscriptions","organizations_url":"https://api.github.com/users/bonkey/orgs","repos_url":"https://api.github.com/users/bonkey/repos","events_url":"https://api.github.com/users/bonkey/events{/privacy}","received_events_url":"https://api.github.com/users/bonkey/received_events","type":"User","site_admin":false},"body":"And [inappropriate intimacy](https://sourcemaking.com/refactoring/smells/inappropriate-intimacy) as well.","created_at":"2016-09-07T08:13:52Z","updated_at":"2016-09-07T08:13:52Z","html_url":"https://github.com/zalando-incubator/atlas-ios/pull/209#discussion_r77777488","pull_request_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209","_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/comments/77777488"},"html":{"href":"https://github.com/zalando-incubator/atlas-ios/pull/209#discussion_r77777488"},"pull_request":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209"}}},"pull_request":{"url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209","id":83993996,"html_url":"https://github.com/zalando-incubator/atlas-ios/pull/209","diff_url":"https://github.com/zalando-incubator/atlas-ios/pull/209.diff","patch_url":"https://github.com/zalando-incubator/atlas-ios/pull/209.patch","issue_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/209","number":209,"state":"closed","locked":false,"title":"#206 - Added delete address function ","user":{"login":"ahmed-shehata","id":4982099,"avatar_url":"https://avatars.githubusercontent.com/u/4982099?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmed-shehata","html_url":"https://github.com/ahmed-shehata","followers_url":"https://api.github.com/users/ahmed-shehata/followers","following_url":"https://api.github.com/users/ahmed-shehata/following{/other_user}","gists_url":"https://api.github.com/users/ahmed-shehata/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmed-shehata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmed-shehata/subscriptions","organizations_url":"https://api.github.com/users/ahmed-shehata/orgs","repos_url":"https://api.github.com/users/ahmed-shehata/repos","events_url":"https://api.github.com/users/ahmed-shehata/events{/privacy}","received_events_url":"https://api.github.com/users/ahmed-shehata/received_events","type":"User","site_admin":false},"body":"Issue #206 = Added delete address function + fixed small bug in refreshing view state in checkout summary","created_at":"2016-09-05T12:19:47Z","updated_at":"2016-09-07T08:13:52Z","closed_at":"2016-09-07T07:33:39Z","merged_at":"2016-09-07T07:33:39Z","merge_commit_sha":"b6d914c13d6a6735be22704e2202063a9370ff6e","assignee":{"login":"bonkey","id":39100,"avatar_url":"https://avatars.githubusercontent.com/u/39100?v=3","gravatar_id":"","url":"https://api.github.com/users/bonkey","html_url":"https://github.com/bonkey","followers_url":"https://api.github.com/users/bonkey/followers","following_url":"https://api.github.com/users/bonkey/following{/other_user}","gists_url":"https://api.github.com/users/bonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/bonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonkey/subscriptions","organizations_url":"https://api.github.com/users/bonkey/orgs","repos_url":"https://api.github.com/users/bonkey/repos","events_url":"https://api.github.com/users/bonkey/events{/privacy}","received_events_url":"https://api.github.com/users/bonkey/received_events","type":"User","site_admin":false},"assignees":[{"login":"bonkey","id":39100,"avatar_url":"https://avatars.githubusercontent.com/u/39100?v=3","gravatar_id":"","url":"https://api.github.com/users/bonkey","html_url":"https://github.com/bonkey","followers_url":"https://api.github.com/users/bonkey/followers","following_url":"https://api.github.com/users/bonkey/following{/other_user}","gists_url":"https://api.github.com/users/bonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/bonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonkey/subscriptions","organizations_url":"https://api.github.com/users/bonkey/orgs","repos_url":"https://api.github.com/users/bonkey/repos","events_url":"https://api.github.com/users/bonkey/events{/privacy}","received_events_url":"https://api.github.com/users/bonkey/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209/commits","review_comments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209/comments","review_comment_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/209/comments","statuses_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/statuses/6da4250b7dac6489bf78a143bd378e73d13f084b","head":{"label":"zalando-incubator:issue-206","ref":"issue-206","sha":"6da4250b7dac6489bf78a143bd378e73d13f084b","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":64761185,"name":"atlas-ios","full_name":"zalando-incubator/atlas-ios","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/atlas-ios","description":"Atlas iOS SDK for Zalando Checkout and Catalog APIs.","fork":false,"url":"https://api.github.com/repos/zalando-incubator/atlas-ios","forks_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/forks","keys_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/events","assignees_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/merges","archive_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/deployments","created_at":"2016-08-02T13:55:33Z","updated_at":"2016-08-28T18:35:42Z","pushed_at":"2016-09-07T07:34:54Z","git_url":"git://github.com/zalando-incubator/atlas-ios.git","ssh_url":"git@github.com:zalando-incubator/atlas-ios.git","clone_url":"https://github.com/zalando-incubator/atlas-ios.git","svn_url":"https://github.com/zalando-incubator/atlas-ios","homepage":"","size":88294,"stargazers_count":12,"watchers_count":12,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":45,"forks":1,"open_issues":45,"watchers":12,"default_branch":"master"}},"base":{"label":"zalando-incubator:master","ref":"master","sha":"f3db8368ad1fffcf95160a09979d595c190bd74a","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":64761185,"name":"atlas-ios","full_name":"zalando-incubator/atlas-ios","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/atlas-ios","description":"Atlas iOS SDK for Zalando Checkout and Catalog APIs.","fork":false,"url":"https://api.github.com/repos/zalando-incubator/atlas-ios","forks_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/forks","keys_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/events","assignees_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/merges","archive_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/atlas-ios/deployments","created_at":"2016-08-02T13:55:33Z","updated_at":"2016-08-28T18:35:42Z","pushed_at":"2016-09-07T07:34:54Z","git_url":"git://github.com/zalando-incubator/atlas-ios.git","ssh_url":"git@github.com:zalando-incubator/atlas-ios.git","clone_url":"https://github.com/zalando-incubator/atlas-ios.git","svn_url":"https://github.com/zalando-incubator/atlas-ios","homepage":"","size":88294,"stargazers_count":12,"watchers_count":12,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":45,"forks":1,"open_issues":45,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209"},"html":{"href":"https://github.com/zalando-incubator/atlas-ios/pull/209"},"issue":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/209"},"comments":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/zalando-incubator/atlas-ios/statuses/6da4250b7dac6489bf78a143bd378e73d13f084b"}}}}
{"actor":{"display_login":"bonkey"}}