{"action":"created","comment":{"url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/comments/33121059","id":33121059,"diff_hunk":"@@ -0,0 +1,130 @@\n+<?php\n+\n+namespace SMSApi\\Api\\Action\\Contacts;\n+\n+use DateTime;\n+use InvalidArgumentException;\n+use SMSApi\\Api\\Response\\Contacts\\ContactResponse;\n+use SMSApi\\Client;\n+use SMSApi\\Proxy\\Proxy;\n+\n+final class ContactAdd extends ContactsAction\n+{\n+    private static $PARAMETER_METHODS = [\n+        ContactResponse::FIELD_FIRST_NAME => 'setFirstName',\n+        ContactResponse::FIELD_LAST_NAME => 'setLastName',\n+        ContactResponse::FIELD_PHONE_NUMBER => 'setPhoneNumber',\n+        ContactResponse::FIELD_EMAIL => 'setEmail',\n+    ];\n+\n+    public static function fromFirstName($firstName, Client $client, Proxy $proxy)\n+    {\n+        return new self(ContactResponse::FIELD_FIRST_NAME, $firstName, $client, $proxy);\n+    }\n+\n+    public static function fromLastName($lastName, Client $client, Proxy $proxy)\n+    {\n+        return new self(ContactResponse::FIELD_LAST_NAME, $lastName, $client, $proxy);\n+    }\n+\n+    public static function fromPhoneNumber($phoneNumber, Client $client, Proxy $proxy)\n+    {\n+        return new self(ContactResponse::FIELD_PHONE_NUMBER, $phoneNumber, $client, $proxy);\n+    }\n+\n+    public static function fromEmail($email, Client $client, Proxy $proxy)\n+    {\n+        return new self(ContactResponse::FIELD_EMAIL, $email, $client, $proxy);\n+    }\n+\n+    /**\n+     * @param string $parameterName\n+     * @param string|int $parameterValue\n+     * @param Client $client\n+     * @param Proxy $proxy\n+     */\n+    public function __construct($parameterName, $parameterValue, Client $client, Proxy $proxy)\n+    {\n+        parent::__construct($client, $proxy);\n+\n+        $this->{self::$PARAMETER_METHODS[$parameterName]} = $parameterValue;\n+    }\n+\n+    public function getMethod()\n+    {\n+        return self::METHOD_POST;\n+    }\n+\n+    protected function getResource()\n+    {\n+        return '/contacts';\n+    }\n+\n+    protected function response($data)\n+    {\n+        return ContactResponse::fromJsonString($data);\n+    }\n+\n+    public function setPhoneNumber($phoneNumber)","path":"smsapi/Api/Action/Contacts/ContactAdd.php","position":68,"original_position":68,"commit_id":"d2e67f83a3101583b831be0923aee6526218665a","original_commit_id":"d2e67f83a3101583b831be0923aee6526218665a","user":{"login":"sudlik","id":843750,"avatar_url":"https://avatars.githubusercontent.com/u/843750?v=3","gravatar_id":"","url":"https://api.github.com/users/sudlik","html_url":"https://github.com/sudlik","followers_url":"https://api.github.com/users/sudlik/followers","following_url":"https://api.github.com/users/sudlik/following{/other_user}","gists_url":"https://api.github.com/users/sudlik/gists{/gist_id}","starred_url":"https://api.github.com/users/sudlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudlik/subscriptions","organizations_url":"https://api.github.com/users/sudlik/orgs","repos_url":"https://api.github.com/users/sudlik/repos","events_url":"https://api.github.com/users/sudlik/events{/privacy}","received_events_url":"https://api.github.com/users/sudlik/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-06-24T06:46:56Z","updated_at":"2015-06-24T06:46:56Z","html_url":"https://github.com/smsapi/smsapi-php-client/pull/63#discussion_r33121059","pull_request_url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/comments/33121059"},"html":{"href":"https://github.com/smsapi/smsapi-php-client/pull/63#discussion_r33121059"},"pull_request":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63","id":37442068,"html_url":"https://github.com/smsapi/smsapi-php-client/pull/63","diff_url":"https://github.com/smsapi/smsapi-php-client/pull/63.diff","patch_url":"https://github.com/smsapi/smsapi-php-client/pull/63.patch","issue_url":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/63","number":63,"state":"open","locked":false,"title":"contacts","user":{"login":"sudlik","id":843750,"avatar_url":"https://avatars.githubusercontent.com/u/843750?v=3","gravatar_id":"","url":"https://api.github.com/users/sudlik","html_url":"https://github.com/sudlik","followers_url":"https://api.github.com/users/sudlik/followers","following_url":"https://api.github.com/users/sudlik/following{/other_user}","gists_url":"https://api.github.com/users/sudlik/gists{/gist_id}","starred_url":"https://api.github.com/users/sudlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudlik/subscriptions","organizations_url":"https://api.github.com/users/sudlik/orgs","repos_url":"https://api.github.com/users/sudlik/repos","events_url":"https://api.github.com/users/sudlik/events{/privacy}","received_events_url":"https://api.github.com/users/sudlik/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-11T08:59:25Z","updated_at":"2015-06-24T06:46:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3179e1d52f88ed8cf1241bd5166b97d4a2bdcbb2","assignee":null,"milestone":{"url":"https://api.github.com/repos/smsapi/smsapi-php-client/milestones/5","html_url":"https://github.com/smsapi/smsapi-php-client/milestones/v1.4","labels_url":"https://api.github.com/repos/smsapi/smsapi-php-client/milestones/5/labels","id":1046638,"number":5,"title":"v1.4","description":"https://github.com/smsapi/smsapi-php-client/tree/1.4.0","creator":{"login":"sudlik","id":843750,"avatar_url":"https://avatars.githubusercontent.com/u/843750?v=3","gravatar_id":"","url":"https://api.github.com/users/sudlik","html_url":"https://github.com/sudlik","followers_url":"https://api.github.com/users/sudlik/followers","following_url":"https://api.github.com/users/sudlik/following{/other_user}","gists_url":"https://api.github.com/users/sudlik/gists{/gist_id}","starred_url":"https://api.github.com/users/sudlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudlik/subscriptions","organizations_url":"https://api.github.com/users/sudlik/orgs","repos_url":"https://api.github.com/users/sudlik/repos","events_url":"https://api.github.com/users/sudlik/events{/privacy}","received_events_url":"https://api.github.com/users/sudlik/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2015-03-31T10:31:00Z","updated_at":"2015-06-11T08:59:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63/commits","review_comments_url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63/comments","review_comment_url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/63/comments","statuses_url":"https://api.github.com/repos/smsapi/smsapi-php-client/statuses/d2e67f83a3101583b831be0923aee6526218665a","head":{"label":"sudlik:contacts","ref":"contacts","sha":"d2e67f83a3101583b831be0923aee6526218665a","user":{"login":"sudlik","id":843750,"avatar_url":"https://avatars.githubusercontent.com/u/843750?v=3","gravatar_id":"","url":"https://api.github.com/users/sudlik","html_url":"https://github.com/sudlik","followers_url":"https://api.github.com/users/sudlik/followers","following_url":"https://api.github.com/users/sudlik/following{/other_user}","gists_url":"https://api.github.com/users/sudlik/gists{/gist_id}","starred_url":"https://api.github.com/users/sudlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudlik/subscriptions","organizations_url":"https://api.github.com/users/sudlik/orgs","repos_url":"https://api.github.com/users/sudlik/repos","events_url":"https://api.github.com/users/sudlik/events{/privacy}","received_events_url":"https://api.github.com/users/sudlik/received_events","type":"User","site_admin":false},"repo":{"id":20794857,"name":"smsapi-php-client","full_name":"sudlik/smsapi-php-client","owner":{"login":"sudlik","id":843750,"avatar_url":"https://avatars.githubusercontent.com/u/843750?v=3","gravatar_id":"","url":"https://api.github.com/users/sudlik","html_url":"https://github.com/sudlik","followers_url":"https://api.github.com/users/sudlik/followers","following_url":"https://api.github.com/users/sudlik/following{/other_user}","gists_url":"https://api.github.com/users/sudlik/gists{/gist_id}","starred_url":"https://api.github.com/users/sudlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudlik/subscriptions","organizations_url":"https://api.github.com/users/sudlik/orgs","repos_url":"https://api.github.com/users/sudlik/repos","events_url":"https://api.github.com/users/sudlik/events{/privacy}","received_events_url":"https://api.github.com/users/sudlik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sudlik/smsapi-php-client","description":"Klient napisany w języku PHP, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl","fork":true,"url":"https://api.github.com/repos/sudlik/smsapi-php-client","forks_url":"https://api.github.com/repos/sudlik/smsapi-php-client/forks","keys_url":"https://api.github.com/repos/sudlik/smsapi-php-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sudlik/smsapi-php-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sudlik/smsapi-php-client/teams","hooks_url":"https://api.github.com/repos/sudlik/smsapi-php-client/hooks","issue_events_url":"https://api.github.com/repos/sudlik/smsapi-php-client/issues/events{/number}","events_url":"https://api.github.com/repos/sudlik/smsapi-php-client/events","assignees_url":"https://api.github.com/repos/sudlik/smsapi-php-client/assignees{/user}","branches_url":"https://api.github.com/repos/sudlik/smsapi-php-client/branches{/branch}","tags_url":"https://api.github.com/repos/sudlik/smsapi-php-client/tags","blobs_url":"https://api.github.com/repos/sudlik/smsapi-php-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sudlik/smsapi-php-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sudlik/smsapi-php-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/sudlik/smsapi-php-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sudlik/smsapi-php-client/statuses/{sha}","languages_url":"https://api.github.com/repos/sudlik/smsapi-php-client/languages","stargazers_url":"https://api.github.com/repos/sudlik/smsapi-php-client/stargazers","contributors_url":"https://api.github.com/repos/sudlik/smsapi-php-client/contributors","subscribers_url":"https://api.github.com/repos/sudlik/smsapi-php-client/subscribers","subscription_url":"https://api.github.com/repos/sudlik/smsapi-php-client/subscription","commits_url":"https://api.github.com/repos/sudlik/smsapi-php-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/sudlik/smsapi-php-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/sudlik/smsapi-php-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/sudlik/smsapi-php-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/sudlik/smsapi-php-client/contents/{+path}","compare_url":"https://api.github.com/repos/sudlik/smsapi-php-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sudlik/smsapi-php-client/merges","archive_url":"https://api.github.com/repos/sudlik/smsapi-php-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sudlik/smsapi-php-client/downloads","issues_url":"https://api.github.com/repos/sudlik/smsapi-php-client/issues{/number}","pulls_url":"https://api.github.com/repos/sudlik/smsapi-php-client/pulls{/number}","milestones_url":"https://api.github.com/repos/sudlik/smsapi-php-client/milestones{/number}","notifications_url":"https://api.github.com/repos/sudlik/smsapi-php-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sudlik/smsapi-php-client/labels{/name}","releases_url":"https://api.github.com/repos/sudlik/smsapi-php-client/releases{/id}","created_at":"2014-06-13T06:48:38Z","updated_at":"2015-03-31T10:26:19Z","pushed_at":"2015-06-11T08:57:23Z","git_url":"git://github.com/sudlik/smsapi-php-client.git","ssh_url":"git@github.com:sudlik/smsapi-php-client.git","clone_url":"https://github.com/sudlik/smsapi-php-client.git","svn_url":"https://github.com/sudlik/smsapi-php-client","homepage":"","size":981,"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":"smsapi:master","ref":"master","sha":"76fc6566f16baca75f65b55483ccf5ffb7804bf9","user":{"login":"smsapi","id":3853554,"avatar_url":"https://avatars.githubusercontent.com/u/3853554?v=3","gravatar_id":"","url":"https://api.github.com/users/smsapi","html_url":"https://github.com/smsapi","followers_url":"https://api.github.com/users/smsapi/followers","following_url":"https://api.github.com/users/smsapi/following{/other_user}","gists_url":"https://api.github.com/users/smsapi/gists{/gist_id}","starred_url":"https://api.github.com/users/smsapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smsapi/subscriptions","organizations_url":"https://api.github.com/users/smsapi/orgs","repos_url":"https://api.github.com/users/smsapi/repos","events_url":"https://api.github.com/users/smsapi/events{/privacy}","received_events_url":"https://api.github.com/users/smsapi/received_events","type":"User","site_admin":false},"repo":{"id":8753860,"name":"smsapi-php-client","full_name":"smsapi/smsapi-php-client","owner":{"login":"smsapi","id":3853554,"avatar_url":"https://avatars.githubusercontent.com/u/3853554?v=3","gravatar_id":"","url":"https://api.github.com/users/smsapi","html_url":"https://github.com/smsapi","followers_url":"https://api.github.com/users/smsapi/followers","following_url":"https://api.github.com/users/smsapi/following{/other_user}","gists_url":"https://api.github.com/users/smsapi/gists{/gist_id}","starred_url":"https://api.github.com/users/smsapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smsapi/subscriptions","organizations_url":"https://api.github.com/users/smsapi/orgs","repos_url":"https://api.github.com/users/smsapi/repos","events_url":"https://api.github.com/users/smsapi/events{/privacy}","received_events_url":"https://api.github.com/users/smsapi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smsapi/smsapi-php-client","description":"Klient napisany w języku PHP, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl","fork":false,"url":"https://api.github.com/repos/smsapi/smsapi-php-client","forks_url":"https://api.github.com/repos/smsapi/smsapi-php-client/forks","keys_url":"https://api.github.com/repos/smsapi/smsapi-php-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smsapi/smsapi-php-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smsapi/smsapi-php-client/teams","hooks_url":"https://api.github.com/repos/smsapi/smsapi-php-client/hooks","issue_events_url":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/events{/number}","events_url":"https://api.github.com/repos/smsapi/smsapi-php-client/events","assignees_url":"https://api.github.com/repos/smsapi/smsapi-php-client/assignees{/user}","branches_url":"https://api.github.com/repos/smsapi/smsapi-php-client/branches{/branch}","tags_url":"https://api.github.com/repos/smsapi/smsapi-php-client/tags","blobs_url":"https://api.github.com/repos/smsapi/smsapi-php-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smsapi/smsapi-php-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smsapi/smsapi-php-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/smsapi/smsapi-php-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smsapi/smsapi-php-client/statuses/{sha}","languages_url":"https://api.github.com/repos/smsapi/smsapi-php-client/languages","stargazers_url":"https://api.github.com/repos/smsapi/smsapi-php-client/stargazers","contributors_url":"https://api.github.com/repos/smsapi/smsapi-php-client/contributors","subscribers_url":"https://api.github.com/repos/smsapi/smsapi-php-client/subscribers","subscription_url":"https://api.github.com/repos/smsapi/smsapi-php-client/subscription","commits_url":"https://api.github.com/repos/smsapi/smsapi-php-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/smsapi/smsapi-php-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/smsapi/smsapi-php-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/smsapi/smsapi-php-client/contents/{+path}","compare_url":"https://api.github.com/repos/smsapi/smsapi-php-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smsapi/smsapi-php-client/merges","archive_url":"https://api.github.com/repos/smsapi/smsapi-php-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smsapi/smsapi-php-client/downloads","issues_url":"https://api.github.com/repos/smsapi/smsapi-php-client/issues{/number}","pulls_url":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls{/number}","milestones_url":"https://api.github.com/repos/smsapi/smsapi-php-client/milestones{/number}","notifications_url":"https://api.github.com/repos/smsapi/smsapi-php-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smsapi/smsapi-php-client/labels{/name}","releases_url":"https://api.github.com/repos/smsapi/smsapi-php-client/releases{/id}","created_at":"2013-03-13T14:22:09Z","updated_at":"2015-06-01T11:01:43Z","pushed_at":"2015-06-11T08:59:25Z","git_url":"git://github.com/smsapi/smsapi-php-client.git","ssh_url":"git@github.com:smsapi/smsapi-php-client.git","clone_url":"https://github.com/smsapi/smsapi-php-client.git","svn_url":"https://github.com/smsapi/smsapi-php-client","homepage":"","size":1451,"stargazers_count":22,"watchers_count":22,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":14,"forks":10,"open_issues":14,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63"},"html":{"href":"https://github.com/smsapi/smsapi-php-client/pull/63"},"issue":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/63"},"comments":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/smsapi/smsapi-php-client/statuses/d2e67f83a3101583b831be0923aee6526218665a"}}}}