{"action":"created","comment":{"url":"https://api.github.com/repos/printful/php-api-sdk/pulls/comments/233744162","pull_request_review_id":175229523,"id":233744162,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzc0NDE2Mg==","diff_hunk":"@@ -0,0 +1,137 @@\n+<?php\n+\n+namespace Printful\\Tests\\Products;\n+\n+use Printful\\PrintfulProducts;\n+use Printful\\Structures\\Sync\\Responses\\SyncProductResponse;\n+use Printful\\Structures\\Sync\\SyncProductCreationParameters;\n+use Printful\\Tests\\TestCase;\n+\n+abstract class ProductsTestBase extends TestCase\n+{\n+    /** @var PrintfulProducts */\n+    protected $apiEndpoint;\n+\n+    /**\n+     * @throws \\Exception\n+     */\n+    protected function setUp()\n+    {\n+        parent::setUp();\n+        $this->apiEndpoint = new PrintfulProducts($this->api);\n+    }\n+\n+    /**\n+     * Returns POST product data in array format\n+     *\n+     * @return array\n+     */\n+    protected function getPostProductData()\n+    {\n+        return [\n+            'sync_product' => [\n+                'name' => 'SDK Test name',\n+                'thumbnail' => 'https://picsum.photos/200/300',\n+            ],\n+            'sync_variants' => [\n+                [\n+                    'retail_price' => 21.00,\n+                    'variant_id' => 4011,\n+                    'files' => [\n+                        [\n+                            'url' => 'https://picsum.photos/200/300',\n+                        ],\n+                        [\n+                            'type' => 'back',\n+                            'url' => 'https://picsum.photos/200/300',\n+                        ],\n+                    ],\n+                    'options' => [\n+                        [\n+                            'id' => 'embroidery_type',\n+                            'value' => 'flat',\n+                        ],\n+                        [\n+                            'id' => 'thread_colors',\n+                            'value' => '',\n+                        ],\n+                    ],\n+                ],\n+                [\n+                    'retail_price' => 21,\n+                    'variant_id' => 4012,\n+                    'files' => [\n+                        [\n+                            'url' => 'https://picsum.photos/200/300',\n+                        ],\n+                        [\n+                            'type' => 'back',\n+                            'url' => 'https://picsum.photos/200/300',\n+                        ],\n+                    ],\n+                    'options' => [\n+                        [\n+                            'id' => 'embroidery_type',\n+                            'value' => 'flat',\n+                        ],\n+                        [\n+                            'id' => 'thread_colors',\n+                            'value' => '',\n+                        ],\n+                    ],\n+                ],\n+            ],\n+        ];\n+    }\n+\n+    protected function getPostVariantData()\n+    {\n+        return [\n+            'retail_price' => 21.00,\n+            'variant_id' => 4011,\n+            'files' => [\n+                [\n+                    'url' => 'https://picsum.photos/200/300',\n+                ],\n+                [\n+                    'type' => 'back',\n+                    'url' => 'https://picsum.photos/200/300',\n+                ],\n+            ],\n+            'options' => [\n+                [\n+                    'id' => 'embroidery_type',\n+                    'value' => 'flat',\n+                ],\n+                [\n+                    'id' => 'thread_colors',\n+                    'value' => '',\n+                ],\n+            ],\n+        ];\n+    }\n+\n+    /**\n+     * Creates SyncProduct and caches result\n+     *\n+     * @param bool $useCache\n+     * @return SyncProductResponse\n+     * @throws \\Printful\\Exceptions\\PrintfulApiException\n+     * @throws \\Printful\\Exceptions\\PrintfulException\n+     */\n+    protected function createProduct($useCache = true)\n+    {\n+        static $result;\n+\n+        if ($useCache && $result) {","path":"tests/Products/ProductsTestBase.php","position":null,"original_position":126,"commit_id":"3df2e3966822d07bf9ce43548006c316c27684a2","original_commit_id":"4ce24ed8b978bbecef4aa49c70be8356f9a6e906","user":{"login":"rkistaps","id":22044469,"node_id":"MDQ6VXNlcjIyMDQ0NDY5","avatar_url":"https://avatars3.githubusercontent.com/u/22044469?v=4","gravatar_id":"","url":"https://api.github.com/users/rkistaps","html_url":"https://github.com/rkistaps","followers_url":"https://api.github.com/users/rkistaps/followers","following_url":"https://api.github.com/users/rkistaps/following{/other_user}","gists_url":"https://api.github.com/users/rkistaps/gists{/gist_id}","starred_url":"https://api.github.com/users/rkistaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkistaps/subscriptions","organizations_url":"https://api.github.com/users/rkistaps/orgs","repos_url":"https://api.github.com/users/rkistaps/repos","events_url":"https://api.github.com/users/rkistaps/events{/privacy}","received_events_url":"https://api.github.com/users/rkistaps/received_events","type":"User","site_admin":false},"body":"Removed caching","created_at":"2018-11-15T08:12:53Z","updated_at":"2018-11-15T08:12:53Z","html_url":"https://github.com/printful/php-api-sdk/pull/19#discussion_r233744162","pull_request_url":"https://api.github.com/repos/printful/php-api-sdk/pulls/19","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/comments/233744162"},"html":{"href":"https://github.com/printful/php-api-sdk/pull/19#discussion_r233744162"},"pull_request":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/19"}},"in_reply_to_id":232719940},"pull_request":{"url":"https://api.github.com/repos/printful/php-api-sdk/pulls/19","id":228962289,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTYyMjg5","html_url":"https://github.com/printful/php-api-sdk/pull/19","diff_url":"https://github.com/printful/php-api-sdk/pull/19.diff","patch_url":"https://github.com/printful/php-api-sdk/pull/19.patch","issue_url":"https://api.github.com/repos/printful/php-api-sdk/issues/19","number":19,"state":"open","locked":false,"title":"Products API ","user":{"login":"rkistaps","id":22044469,"node_id":"MDQ6VXNlcjIyMDQ0NDY5","avatar_url":"https://avatars3.githubusercontent.com/u/22044469?v=4","gravatar_id":"","url":"https://api.github.com/users/rkistaps","html_url":"https://github.com/rkistaps","followers_url":"https://api.github.com/users/rkistaps/followers","following_url":"https://api.github.com/users/rkistaps/following{/other_user}","gists_url":"https://api.github.com/users/rkistaps/gists{/gist_id}","starred_url":"https://api.github.com/users/rkistaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkistaps/subscriptions","organizations_url":"https://api.github.com/users/rkistaps/orgs","repos_url":"https://api.github.com/users/rkistaps/repos","events_url":"https://api.github.com/users/rkistaps/events{/privacy}","received_events_url":"https://api.github.com/users/rkistaps/received_events","type":"User","site_admin":false},"body":"Added new Products Api endpoint to SDK\r\n\r\nDocs: https://www.printful.local/docs/products","created_at":"2018-11-07T09:19:14Z","updated_at":"2018-11-15T08:12:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3748532da30366499b06af5e9e1af83fb356283","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/printful/php-api-sdk/pulls/19/commits","review_comments_url":"https://api.github.com/repos/printful/php-api-sdk/pulls/19/comments","review_comment_url":"https://api.github.com/repos/printful/php-api-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/printful/php-api-sdk/issues/19/comments","statuses_url":"https://api.github.com/repos/printful/php-api-sdk/statuses/3df2e3966822d07bf9ce43548006c316c27684a2","head":{"label":"rkistaps:master","ref":"master","sha":"3df2e3966822d07bf9ce43548006c316c27684a2","user":{"login":"rkistaps","id":22044469,"node_id":"MDQ6VXNlcjIyMDQ0NDY5","avatar_url":"https://avatars3.githubusercontent.com/u/22044469?v=4","gravatar_id":"","url":"https://api.github.com/users/rkistaps","html_url":"https://github.com/rkistaps","followers_url":"https://api.github.com/users/rkistaps/followers","following_url":"https://api.github.com/users/rkistaps/following{/other_user}","gists_url":"https://api.github.com/users/rkistaps/gists{/gist_id}","starred_url":"https://api.github.com/users/rkistaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkistaps/subscriptions","organizations_url":"https://api.github.com/users/rkistaps/orgs","repos_url":"https://api.github.com/users/rkistaps/repos","events_url":"https://api.github.com/users/rkistaps/events{/privacy}","received_events_url":"https://api.github.com/users/rkistaps/received_events","type":"User","site_admin":false},"repo":{"id":156205179,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyMDUxNzk=","name":"php-api-sdk","full_name":"rkistaps/php-api-sdk","private":false,"owner":{"login":"rkistaps","id":22044469,"node_id":"MDQ6VXNlcjIyMDQ0NDY5","avatar_url":"https://avatars3.githubusercontent.com/u/22044469?v=4","gravatar_id":"","url":"https://api.github.com/users/rkistaps","html_url":"https://github.com/rkistaps","followers_url":"https://api.github.com/users/rkistaps/followers","following_url":"https://api.github.com/users/rkistaps/following{/other_user}","gists_url":"https://api.github.com/users/rkistaps/gists{/gist_id}","starred_url":"https://api.github.com/users/rkistaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkistaps/subscriptions","organizations_url":"https://api.github.com/users/rkistaps/orgs","repos_url":"https://api.github.com/users/rkistaps/repos","events_url":"https://api.github.com/users/rkistaps/events{/privacy}","received_events_url":"https://api.github.com/users/rkistaps/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rkistaps/php-api-sdk","description":"Printful API PHP wrapper","fork":true,"url":"https://api.github.com/repos/rkistaps/php-api-sdk","forks_url":"https://api.github.com/repos/rkistaps/php-api-sdk/forks","keys_url":"https://api.github.com/repos/rkistaps/php-api-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rkistaps/php-api-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rkistaps/php-api-sdk/teams","hooks_url":"https://api.github.com/repos/rkistaps/php-api-sdk/hooks","issue_events_url":"https://api.github.com/repos/rkistaps/php-api-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/rkistaps/php-api-sdk/events","assignees_url":"https://api.github.com/repos/rkistaps/php-api-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/rkistaps/php-api-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/rkistaps/php-api-sdk/tags","blobs_url":"https://api.github.com/repos/rkistaps/php-api-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rkistaps/php-api-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rkistaps/php-api-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/rkistaps/php-api-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rkistaps/php-api-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/rkistaps/php-api-sdk/languages","stargazers_url":"https://api.github.com/repos/rkistaps/php-api-sdk/stargazers","contributors_url":"https://api.github.com/repos/rkistaps/php-api-sdk/contributors","subscribers_url":"https://api.github.com/repos/rkistaps/php-api-sdk/subscribers","subscription_url":"https://api.github.com/repos/rkistaps/php-api-sdk/subscription","commits_url":"https://api.github.com/repos/rkistaps/php-api-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/rkistaps/php-api-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/rkistaps/php-api-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/rkistaps/php-api-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/rkistaps/php-api-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/rkistaps/php-api-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rkistaps/php-api-sdk/merges","archive_url":"https://api.github.com/repos/rkistaps/php-api-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rkistaps/php-api-sdk/downloads","issues_url":"https://api.github.com/repos/rkistaps/php-api-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/rkistaps/php-api-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/rkistaps/php-api-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/rkistaps/php-api-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rkistaps/php-api-sdk/labels{/name}","releases_url":"https://api.github.com/repos/rkistaps/php-api-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/rkistaps/php-api-sdk/deployments","created_at":"2018-11-05T11:14:05Z","updated_at":"2018-11-15T08:12:46Z","pushed_at":"2018-11-15T08:12:44Z","git_url":"git://github.com/rkistaps/php-api-sdk.git","ssh_url":"git@github.com:rkistaps/php-api-sdk.git","clone_url":"https://github.com/rkistaps/php-api-sdk.git","svn_url":"https://github.com/rkistaps/php-api-sdk","homepage":null,"size":119,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"printful:master","ref":"master","sha":"394d7881f285d371efa1abc7a0d2c71aee530a61","user":{"login":"printful","id":25079890,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDc5ODkw","avatar_url":"https://avatars0.githubusercontent.com/u/25079890?v=4","gravatar_id":"","url":"https://api.github.com/users/printful","html_url":"https://github.com/printful","followers_url":"https://api.github.com/users/printful/followers","following_url":"https://api.github.com/users/printful/following{/other_user}","gists_url":"https://api.github.com/users/printful/gists{/gist_id}","starred_url":"https://api.github.com/users/printful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printful/subscriptions","organizations_url":"https://api.github.com/users/printful/orgs","repos_url":"https://api.github.com/users/printful/repos","events_url":"https://api.github.com/users/printful/events{/privacy}","received_events_url":"https://api.github.com/users/printful/received_events","type":"Organization","site_admin":false},"repo":{"id":78745294,"node_id":"MDEwOlJlcG9zaXRvcnk3ODc0NTI5NA==","name":"php-api-sdk","full_name":"printful/php-api-sdk","private":false,"owner":{"login":"printful","id":25079890,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDc5ODkw","avatar_url":"https://avatars0.githubusercontent.com/u/25079890?v=4","gravatar_id":"","url":"https://api.github.com/users/printful","html_url":"https://github.com/printful","followers_url":"https://api.github.com/users/printful/followers","following_url":"https://api.github.com/users/printful/following{/other_user}","gists_url":"https://api.github.com/users/printful/gists{/gist_id}","starred_url":"https://api.github.com/users/printful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printful/subscriptions","organizations_url":"https://api.github.com/users/printful/orgs","repos_url":"https://api.github.com/users/printful/repos","events_url":"https://api.github.com/users/printful/events{/privacy}","received_events_url":"https://api.github.com/users/printful/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/printful/php-api-sdk","description":"Printful API PHP wrapper","fork":false,"url":"https://api.github.com/repos/printful/php-api-sdk","forks_url":"https://api.github.com/repos/printful/php-api-sdk/forks","keys_url":"https://api.github.com/repos/printful/php-api-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/printful/php-api-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/printful/php-api-sdk/teams","hooks_url":"https://api.github.com/repos/printful/php-api-sdk/hooks","issue_events_url":"https://api.github.com/repos/printful/php-api-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/printful/php-api-sdk/events","assignees_url":"https://api.github.com/repos/printful/php-api-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/printful/php-api-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/printful/php-api-sdk/tags","blobs_url":"https://api.github.com/repos/printful/php-api-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/printful/php-api-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/printful/php-api-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/printful/php-api-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/printful/php-api-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/printful/php-api-sdk/languages","stargazers_url":"https://api.github.com/repos/printful/php-api-sdk/stargazers","contributors_url":"https://api.github.com/repos/printful/php-api-sdk/contributors","subscribers_url":"https://api.github.com/repos/printful/php-api-sdk/subscribers","subscription_url":"https://api.github.com/repos/printful/php-api-sdk/subscription","commits_url":"https://api.github.com/repos/printful/php-api-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/printful/php-api-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/printful/php-api-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/printful/php-api-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/printful/php-api-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/printful/php-api-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/printful/php-api-sdk/merges","archive_url":"https://api.github.com/repos/printful/php-api-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/printful/php-api-sdk/downloads","issues_url":"https://api.github.com/repos/printful/php-api-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/printful/php-api-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/printful/php-api-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/printful/php-api-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/printful/php-api-sdk/labels{/name}","releases_url":"https://api.github.com/repos/printful/php-api-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/printful/php-api-sdk/deployments","created_at":"2017-01-12T12:56:19Z","updated_at":"2018-11-08T10:22:02Z","pushed_at":"2018-11-15T08:12:46Z","git_url":"git://github.com/printful/php-api-sdk.git","ssh_url":"git@github.com:printful/php-api-sdk.git","clone_url":"https://github.com/printful/php-api-sdk.git","svn_url":"https://github.com/printful/php-api-sdk","homepage":null,"size":62,"stargazers_count":31,"watchers_count":31,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":7,"open_issues":2,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/19"},"html":{"href":"https://github.com/printful/php-api-sdk/pull/19"},"issue":{"href":"https://api.github.com/repos/printful/php-api-sdk/issues/19"},"comments":{"href":"https://api.github.com/repos/printful/php-api-sdk/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/printful/php-api-sdk/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/printful/php-api-sdk/statuses/3df2e3966822d07bf9ce43548006c316c27684a2"}},"author_association":"NONE"}}
{"actor":{"display_login":"rkistaps"}}