From 3a2e76df5f685188a015f62e97d1194ea2a2c789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Sun, 19 Jun 2016 17:23:49 +0200 Subject: [PATCH] Add endpoint --- CHANGELOG.md | 4 ++++ README.md | 4 ++++ src/ServiceDescription/Shopify-v1.php | 26 ++++++++++++++++++++++++++ src/ShopifyClient.php | 4 ++++ 4 files changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b42e2de..92195bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.1.0 + +* Add `createDelegateAccessToken` endpoint ([more info on delegate tokens](https://help.shopify.com/api/guides/authentication/oauth#delegating-access-to-subsystems) + # 1.0.0 * First release \ No newline at end of file diff --git a/README.md b/README.md index 188bcf4..8bc7644 100644 --- a/README.md +++ b/README.md @@ -314,3 +314,7 @@ Here is a list of supported endpoints (more to come in the future): * createWebhook(array $args = []) * updateWebhook(array $args = []) * deleteWebhook(array $args = []) + +**OTHER METHODS:** + +* createDelegateAccessToken(array $args = []) \ No newline at end of file diff --git a/src/ServiceDescription/Shopify-v1.php b/src/ServiceDescription/Shopify-v1.php index 589d87b..1f9f73c 100644 --- a/src/ServiceDescription/Shopify-v1.php +++ b/src/ServiceDescription/Shopify-v1.php @@ -3150,5 +3150,31 @@ ] ] ], + + /** + * -------------------------------------------------------------------------------- + * OTHERS + * -------------------------------------------------------------------------------- + */ + + 'CreateDelegateAccessToken' => [ + 'httpMethod' => 'POST', + 'uri' => 'access_tokens/delegate.json', + 'summary' => 'Create a new delegate access token', + 'parameters' => [ + 'delegate_access_scope' => [ + 'description' => 'New scopes that are granted to the delegate access token', + 'location' => 'json', + 'type' => 'array', + 'required' => true, + ], + 'expires_in' => [ + 'description' => 'Number of times in second before the token expires', + 'location' => 'json', + 'type' => 'integer', + 'required' => false + ] + ] + ], ] ]; diff --git a/src/ShopifyClient.php b/src/ShopifyClient.php index 96e2597..fedd46c 100644 --- a/src/ShopifyClient.php +++ b/src/ShopifyClient.php @@ -159,6 +159,10 @@ * @method array createWebhook(array $args = []) {@command Shopify CreateWebhook} * @method array updateWebhook(array $args = []) {@command Shopify UpdateWebhook} * @method array deleteWebhook(array $args = []) {@command Shopify DeleteWebhook} + * + * OTHER METHODS: + * + * @method array createDelegateAccessToken(array $args = []) {@command Shopify CreateDelegateAccessToken} * * ITERATOR METHODS: *