{"action":"created","comment":{"url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/comments/39261004","id":39261004,"diff_hunk":"@@ -0,0 +1,73 @@\n+<?php\n+/*\n+ * Copyright © Eduard Sukharev\n+ *\n+ * For a full license, see the LICENSE file.\n+ */\n+\n+namespace Ups\\Entity;\n+\n+/**\n+ * @author Eduard Sukharev <eduard.sukharev@opensoftdev.ru>\n+ */\n+class BillShipper\n+{\n+    /**\n+     * @var string\n+     */\n+    private $accountNumber;\n+\n+    /**\n+     * @var CreditCard\n+     */\n+    private $creditCard;\n+\n+    public function __construct($attributes = null)\n+    {\n+        if (isset($attributes->AccountNumber)) {\n+            $this->setAccountNumber($attributes->AccountNumber);\n+        }\n+        if (isset($attributes->CreditCard)) {\n+            $this->setAccountNumber(new CreditCard($attributes->CreditCard));\n+        }\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function getAccountNumber()\n+    {\n+        return $this->accountNumber;\n+    }\n+\n+    /**\n+     * @param string $accountNumber\n+     *\n+     * @return BillShipper\n+     */\n+    public function setAccountNumber($accountNumber)\n+    {\n+        $this->accountNumber = $accountNumber;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * @return CreditCard\n+     */\n+    public function getCreditCard()\n+    {\n+        return $this->creditCard;\n+    }\n+\n+    /**\n+     * @param CreditCard $creditCard\n+     * @return BillShipper\n+     */\n+    public function setCreditCard($creditCard)","path":"src/Entity/BillShipper.php","position":67,"original_position":67,"commit_id":"655b48801763ede5eda55e6cb7ffecb2d6933f77","original_commit_id":"655b48801763ede5eda55e6cb7ffecb2d6933f77","user":{"login":"stefandoorn","id":4903082,"avatar_url":"https://avatars.githubusercontent.com/u/4903082?v=3","gravatar_id":"","url":"https://api.github.com/users/stefandoorn","html_url":"https://github.com/stefandoorn","followers_url":"https://api.github.com/users/stefandoorn/followers","following_url":"https://api.github.com/users/stefandoorn/following{/other_user}","gists_url":"https://api.github.com/users/stefandoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/stefandoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefandoorn/subscriptions","organizations_url":"https://api.github.com/users/stefandoorn/orgs","repos_url":"https://api.github.com/users/stefandoorn/repos","events_url":"https://api.github.com/users/stefandoorn/events{/privacy}","received_events_url":"https://api.github.com/users/stefandoorn/received_events","type":"User","site_admin":false},"body":"I understand, but the function declaration comment shows it should receive a CreditCard object when being used. Now I can also insert any other object, making the code afterwards not compatible.","created_at":"2015-09-11T10:59:29Z","updated_at":"2015-09-11T10:59:29Z","html_url":"https://github.com/gabrielbull/php-ups-api/pull/53#discussion_r39261004","pull_request_url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/comments/39261004"},"html":{"href":"https://github.com/gabrielbull/php-ups-api/pull/53#discussion_r39261004"},"pull_request":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53","id":44663117,"html_url":"https://github.com/gabrielbull/php-ups-api/pull/53","diff_url":"https://github.com/gabrielbull/php-ups-api/pull/53.diff","patch_url":"https://github.com/gabrielbull/php-ups-api/pull/53.patch","issue_url":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/53","number":53,"state":"open","locked":false,"title":"Shipping class refactoring","user":{"login":"eduard-sukharev","id":3235378,"avatar_url":"https://avatars.githubusercontent.com/u/3235378?v=3","gravatar_id":"","url":"https://api.github.com/users/eduard-sukharev","html_url":"https://github.com/eduard-sukharev","followers_url":"https://api.github.com/users/eduard-sukharev/followers","following_url":"https://api.github.com/users/eduard-sukharev/following{/other_user}","gists_url":"https://api.github.com/users/eduard-sukharev/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-sukharev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-sukharev/subscriptions","organizations_url":"https://api.github.com/users/eduard-sukharev/orgs","repos_url":"https://api.github.com/users/eduard-sukharev/repos","events_url":"https://api.github.com/users/eduard-sukharev/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-sukharev/received_events","type":"User","site_admin":false},"body":"This mainly makes use of getter/setter methods instead of public object parameters in Shipping class.\r\n`compileAddressNode` was removed and some code was deleted in favor of broader usage of `toNode()` methods.\r\nAdded ShipmentRequestLabelSpecification and ShipmentRequestReceiptSpecification classes for easier options passing.","created_at":"2015-09-10T12:49:18Z","updated_at":"2015-09-11T10:59:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f1eb2fa5442fa5623f25190408c9b25e93a5e64","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53/commits","review_comments_url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53/comments","review_comment_url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/53/comments","statuses_url":"https://api.github.com/repos/gabrielbull/php-ups-api/statuses/655b48801763ede5eda55e6cb7ffecb2d6933f77","head":{"label":"eduard-sukharev:add_labelSpec_class","ref":"add_labelSpec_class","sha":"655b48801763ede5eda55e6cb7ffecb2d6933f77","user":{"login":"eduard-sukharev","id":3235378,"avatar_url":"https://avatars.githubusercontent.com/u/3235378?v=3","gravatar_id":"","url":"https://api.github.com/users/eduard-sukharev","html_url":"https://github.com/eduard-sukharev","followers_url":"https://api.github.com/users/eduard-sukharev/followers","following_url":"https://api.github.com/users/eduard-sukharev/following{/other_user}","gists_url":"https://api.github.com/users/eduard-sukharev/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-sukharev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-sukharev/subscriptions","organizations_url":"https://api.github.com/users/eduard-sukharev/orgs","repos_url":"https://api.github.com/users/eduard-sukharev/repos","events_url":"https://api.github.com/users/eduard-sukharev/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-sukharev/received_events","type":"User","site_admin":false},"repo":{"id":42054749,"name":"php-ups-api","full_name":"eduard-sukharev/php-ups-api","owner":{"login":"eduard-sukharev","id":3235378,"avatar_url":"https://avatars.githubusercontent.com/u/3235378?v=3","gravatar_id":"","url":"https://api.github.com/users/eduard-sukharev","html_url":"https://github.com/eduard-sukharev","followers_url":"https://api.github.com/users/eduard-sukharev/followers","following_url":"https://api.github.com/users/eduard-sukharev/following{/other_user}","gists_url":"https://api.github.com/users/eduard-sukharev/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-sukharev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-sukharev/subscriptions","organizations_url":"https://api.github.com/users/eduard-sukharev/orgs","repos_url":"https://api.github.com/users/eduard-sukharev/repos","events_url":"https://api.github.com/users/eduard-sukharev/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-sukharev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eduard-sukharev/php-ups-api","description":"PHP Wrapper for all UPS API","fork":true,"url":"https://api.github.com/repos/eduard-sukharev/php-ups-api","forks_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/forks","keys_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/teams","hooks_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/hooks","issue_events_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/issues/events{/number}","events_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/events","assignees_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/assignees{/user}","branches_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/branches{/branch}","tags_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/tags","blobs_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/statuses/{sha}","languages_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/languages","stargazers_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/stargazers","contributors_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/contributors","subscribers_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/subscribers","subscription_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/subscription","commits_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/contents/{+path}","compare_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/merges","archive_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/downloads","issues_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/issues{/number}","pulls_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/pulls{/number}","milestones_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/milestones{/number}","notifications_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/labels{/name}","releases_url":"https://api.github.com/repos/eduard-sukharev/php-ups-api/releases{/id}","created_at":"2015-09-07T13:34:45Z","updated_at":"2015-09-07T13:34:46Z","pushed_at":"2015-09-11T09:26:03Z","git_url":"git://github.com/eduard-sukharev/php-ups-api.git","ssh_url":"git@github.com:eduard-sukharev/php-ups-api.git","clone_url":"https://github.com/eduard-sukharev/php-ups-api.git","svn_url":"https://github.com/eduard-sukharev/php-ups-api","homepage":"","size":478,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gabrielbull:develop","ref":"develop","sha":"c0edf773e4a4660002a0dc203b11d543c16d3b7c","user":{"login":"gabrielbull","id":671923,"avatar_url":"https://avatars.githubusercontent.com/u/671923?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielbull","html_url":"https://github.com/gabrielbull","followers_url":"https://api.github.com/users/gabrielbull/followers","following_url":"https://api.github.com/users/gabrielbull/following{/other_user}","gists_url":"https://api.github.com/users/gabrielbull/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielbull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielbull/subscriptions","organizations_url":"https://api.github.com/users/gabrielbull/orgs","repos_url":"https://api.github.com/users/gabrielbull/repos","events_url":"https://api.github.com/users/gabrielbull/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielbull/received_events","type":"User","site_admin":false},"repo":{"id":7774788,"name":"php-ups-api","full_name":"gabrielbull/php-ups-api","owner":{"login":"gabrielbull","id":671923,"avatar_url":"https://avatars.githubusercontent.com/u/671923?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielbull","html_url":"https://github.com/gabrielbull","followers_url":"https://api.github.com/users/gabrielbull/followers","following_url":"https://api.github.com/users/gabrielbull/following{/other_user}","gists_url":"https://api.github.com/users/gabrielbull/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielbull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielbull/subscriptions","organizations_url":"https://api.github.com/users/gabrielbull/orgs","repos_url":"https://api.github.com/users/gabrielbull/repos","events_url":"https://api.github.com/users/gabrielbull/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielbull/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabrielbull/php-ups-api","description":"PHP Wrapper for all UPS API","fork":false,"url":"https://api.github.com/repos/gabrielbull/php-ups-api","forks_url":"https://api.github.com/repos/gabrielbull/php-ups-api/forks","keys_url":"https://api.github.com/repos/gabrielbull/php-ups-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabrielbull/php-ups-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabrielbull/php-ups-api/teams","hooks_url":"https://api.github.com/repos/gabrielbull/php-ups-api/hooks","issue_events_url":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/events{/number}","events_url":"https://api.github.com/repos/gabrielbull/php-ups-api/events","assignees_url":"https://api.github.com/repos/gabrielbull/php-ups-api/assignees{/user}","branches_url":"https://api.github.com/repos/gabrielbull/php-ups-api/branches{/branch}","tags_url":"https://api.github.com/repos/gabrielbull/php-ups-api/tags","blobs_url":"https://api.github.com/repos/gabrielbull/php-ups-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabrielbull/php-ups-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabrielbull/php-ups-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabrielbull/php-ups-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabrielbull/php-ups-api/statuses/{sha}","languages_url":"https://api.github.com/repos/gabrielbull/php-ups-api/languages","stargazers_url":"https://api.github.com/repos/gabrielbull/php-ups-api/stargazers","contributors_url":"https://api.github.com/repos/gabrielbull/php-ups-api/contributors","subscribers_url":"https://api.github.com/repos/gabrielbull/php-ups-api/subscribers","subscription_url":"https://api.github.com/repos/gabrielbull/php-ups-api/subscription","commits_url":"https://api.github.com/repos/gabrielbull/php-ups-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabrielbull/php-ups-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabrielbull/php-ups-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabrielbull/php-ups-api/contents/{+path}","compare_url":"https://api.github.com/repos/gabrielbull/php-ups-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabrielbull/php-ups-api/merges","archive_url":"https://api.github.com/repos/gabrielbull/php-ups-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabrielbull/php-ups-api/downloads","issues_url":"https://api.github.com/repos/gabrielbull/php-ups-api/issues{/number}","pulls_url":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls{/number}","milestones_url":"https://api.github.com/repos/gabrielbull/php-ups-api/milestones{/number}","notifications_url":"https://api.github.com/repos/gabrielbull/php-ups-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabrielbull/php-ups-api/labels{/name}","releases_url":"https://api.github.com/repos/gabrielbull/php-ups-api/releases{/id}","created_at":"2013-01-23T13:07:27Z","updated_at":"2015-09-10T14:57:35Z","pushed_at":"2015-09-11T09:26:04Z","git_url":"git://github.com/gabrielbull/php-ups-api.git","ssh_url":"git@github.com:gabrielbull/php-ups-api.git","clone_url":"https://github.com/gabrielbull/php-ups-api.git","svn_url":"https://github.com/gabrielbull/php-ups-api","homepage":"","size":1216,"stargazers_count":85,"watchers_count":85,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":2,"forks":65,"open_issues":2,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53"},"html":{"href":"https://github.com/gabrielbull/php-ups-api/pull/53"},"issue":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/53"},"comments":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/gabrielbull/php-ups-api/statuses/655b48801763ede5eda55e6cb7ffecb2d6933f77"}}}}