Skip to content

Commit

Permalink
Add endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Apr 13, 2017
1 parent 2bffca4 commit c5e7572
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.2.3

* Add an `UpdateOrder` endpoint

# 2.2.2

* Retry in case of 5XX response.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ Here is a list of supported endpoints (more to come in the future):

* array getOrders(array $args = [])
* array getOrder(array $args = [])
* array createOrder(array $args = [])
* array updateOrder(array $args = [])
* array closeOrder(array $args = [])
* array openOrder(array $args = [])
* array cancelOrder(array $args = [])
Expand Down
64 changes: 64 additions & 0 deletions src/ServiceDescription/Shopify-v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,70 @@
'type' => 'array',
'required' => false,
],
'metafields' => [
'description' => 'Optional metafields to attach',
'location' => 'json',
'type' => 'array',
'required' => false
]
],
],

'UpdateOrder' => [
'httpMethod' => 'PUT',
'uri' => 'admin/orders/{id}.json',
'responseModel' => 'GenericModel',
'summary' => 'Update an existing order',
'data' => ['root_key' => 'order'],
'parameters' => [
'id' => [
'description' => 'Order ID',
'location' => 'uri',
'type' => 'integer',
'required' => true
],
'email' => [
'description' => 'The customer\'s email address',
'location' => 'json',
'type' => 'string',
'required' => false,
],
'customer' => [
'description' => 'An object containing information about the customer',
'location' => 'json',
'type' => 'object',
'required' => false,
],
'shipping_address' => [
'description' => 'Customer\'s shipping address',
'location' => 'json',
'type' => 'object',
'required' => false,
],
'tags' => [
'description' => 'Tags are additional short descriptors',
'location' => 'json',
'type' => 'string',
'required' => false,
],
'note' => [
'description' => 'The text of an optional note that a shop owner can attach to the order',
'location' => 'json',
'type' => 'string',
'required' => false,
],
'note_attributes' => [
'description' => 'Extra information that is added to the order',
'location' => 'json',
'type' => 'array',
'required' => false,
],
'metafields' => [
'description' => 'Optional metafields to attach',
'location' => 'json',
'type' => 'array',
'required' => false
],
],
],

Expand Down
1 change: 1 addition & 0 deletions src/ShopifyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
*
* @method array getOrders(array $args = []) {@command Shopify GetOrders}
* @method array createOrder(array $args = []) {@command Shopify CreateOrder}
* @method array updateOrder(array $args = []) {@command Shopify UpdateOrder}
* @method array getOrder(array $args = []) {@command Shopify GetOrder}
* @method array closeOrder(array $args = []) {@command Shopify CloseOrder}
* @method array openOrder(array $args = []) {@command Shopify OpenOrder}
Expand Down

0 comments on commit c5e7572

Please sign in to comment.