From 53163007874cdcafeb9dff62743010adf4cd70fa Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Mon, 9 Nov 2020 16:09:52 +0530 Subject: [PATCH 01/15] Added documentation for copy, move and remove requisition list items mutations --- src/_data/toc/graphql.yml | 15 ++++ .../copy-items-between-requisition-list.md | 90 +++++++++++++++++++ .../move-items-between-requisition-list.md | 90 +++++++++++++++++++ .../remove-requisition-list-items.md | 79 ++++++++++++++++ 4 files changed, 274 insertions(+) create mode 100644 src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md create mode 100644 src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md create mode 100644 src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md diff --git a/src/_data/toc/graphql.yml b/src/_data/toc/graphql.yml index 78e801fd11e..d076514d47b 100644 --- a/src/_data/toc/graphql.yml +++ b/src/_data/toc/graphql.yml @@ -205,6 +205,11 @@ pages: - label: changeCustomerPassword mutation url: /graphql/mutations/change-customer-password.html + - label: copyItemsBetweenRequisitionList mutation + url: /graphql/mutations/copy-items-between-requisition-list.html + edition: b2b-only + exclude_versions: [ "2.3" ] + - label: copyProductsToWishlist mutation url: /graphql/mutations/copy-products-to-wishlist.html edition: ee-only @@ -305,6 +310,11 @@ pages: edition: ee-only exclude_versions: ["2.3"] + - label: moveItemsBetweenRequisitionList mutation + url: /graphql/mutations/move-items-between-requisition-list.html + edition: b2b-only + exclude_versions: [ "2.3" ] + - label: placeOrder mutation url: /graphql/mutations/place-order.html @@ -331,6 +341,11 @@ pages: edition: ee-only exclude_versions: ["2.3"] + - label: removeRequisitionListItems mutation + url: /graphql/mutations/remove-requisition-list-items.html + edition: b2b-only + exclude_versions: [ "2.3" ] + - label: removeStoreCreditFromCart mutation url: /graphql/mutations/remove-store-credit.html edition: ee-only diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md new file mode 100644 index 00000000000..11c2b9904fe --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md @@ -0,0 +1,90 @@ +--- +group: graphql +title: copyItemsBetweenRequisitionList mutation +b2b_only: true +contributor_name: Zilker Technology +contributor_link: https://www.ztech.io/ +--- +The copyItemsBetweenRequisitionList mutation copies items from one requisition list to another. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +{:.bs-callout-info} +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. + +## Syntax +```graphql +mutation { + copyItemsBetweenRequisitionList( + source_id: ID!, + destination_id: ID, + itemIds: [ID!]!, + ) { + CopyItemsFromRequisitionListOutput + } +} +``` + +## Example usage + +The following example copies items from one requisition list to another. +**Request:** +``` graphql +mutation { + copyItemsBetweenRequisitionList( + source_id: "4", + destination_id: "5", + itemIds: ["2","3"] + ) { + source { + uid, + items_count + } + destination { + uid, + items_count + } + } +} +``` +**Response:** +``` json +{ + "data": { + "copyItemsBetweenRequisitionList": { + "source": { + "uid": "4", + "items_count": 2 + } + "destination": { + "uid": "5", + "items_count": 2 + } + } + } +} +``` + +## Input attributes + +The copyItemsBetweenRequisitionList mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +source_id| ID! | The ID of the source requisition list. +destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. +itemIds| [ID!]! | An array of selected requisition list items that are to be copied from source to destination. + +## Output attributes + +The copyItemsBetweenRequisitionList object returns the uid of the requisition list as well as the input attributes. + +Attribute | Data Type | Description +--- | --- | --- +uid | ID! | The unique ID of the modified requisition list. +items_count | Int! | The number of products in the requisition list. + +## Related topics + +* [moveItemsBetweenRequisitionList mutation]({{page.baseurl}}/graphql/mutations/move-items-between-requisition-list.html) +* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) \ No newline at end of file diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md new file mode 100644 index 00000000000..f1fb128f97f --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md @@ -0,0 +1,90 @@ +--- +group: graphql +title: moveItemsBetweenRequisitionList mutation +b2b_only: true +contributor_name: Zilker Technology +contributor_link: https://www.ztech.io/ +--- +The moveItemsBetweenRequisitionList mutation moves items from one requisition list to another. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +{:.bs-callout-info} +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. + +## Syntax +```graphql +mutation { + moveItemsBetweenRequisitionList( + source_id: ID! + destination_id: ID + itemIds: [ID!]! + ) { + MoveItemsFromRequisitionListOutput + } +} +``` + +## Example usage + +The following example moves items from one requisition list to another. +**Request:** +``` graphql +mutation { + moveItemsBetweenRequisitionList( + source_id: "4" + destination_id: "5" + itemIds: ["2","3"] + ) { + source { + uid + items_count + } + destination { + uid + items_count + } + } +} +``` +**Response:** +``` json +{ + "data": { + "moveItemsBetweenRequisitionList": { + "source": { + "uid": "4", + "items_count": 0 + } + "destination": { + "uid": "5", + "items_count": 2 + } + } + } +} +``` + +## Input attributes + +The moveItemsBetweenRequisitionList mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +source_id| ID! | The ID of the source requisition list. +destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. +itemIds| [ID!]! | An array of selected requisition list items that are to be moved from source to destination. + +## Output attributes + +The moveItemsBetweenRequisitionList object returns the uid of the requisition list as well as the input attributes. + +Attribute | Data Type | Description +--- | --- | --- +uid | ID! | The unique ID of the modified requisition list. +items_count | Int! | The number of products in the requisition list. + +## Related topics + +* [copyItemsBetweenRequisitionList mutation]({{page.baseurl}}/graphql/mutations/copy-items-between-requisition-list.html) +* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) \ No newline at end of file diff --git a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md new file mode 100644 index 00000000000..74a197f136b --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md @@ -0,0 +1,79 @@ +--- +group: graphql +title: removeRequisitionListItems mutation +b2b_only: true +contributor_name: Zilker Technology +contributor_link: https://www.ztech.io/ +--- +The removeRequisitionListItems mutation removes items from the specified requisiton list for the logged in customer. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +{:.bs-callout-info} +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. + +## Syntax +```graphql +mutation { + removeRequisitionListItems( + uid: ID! + items: [ID!]! + ) { + RemoveRequisitionListItemsOutput + } +} +``` +## Example usage + +The following example removes the Frequently Ordered Products requisition list item by ID. + +**Request:** +``` graphql +mutation { + removeRequisitionListItems( + uid: "4", + items: ["2","3"] + ) { + list { + uid + items_count + } + } +} +``` +**Response:** +``` json +{ + "data": { + "removeRequisitionListItems": { + "list": { + "uid": "4", + "items_count": 0 + } + } + } +} +``` + +## Input attributes + +The removeRequisitionListItems mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +uid| ID! | The unique ID of the requisition list to change +items_count | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list + +## Output attributes + +The removeRequisitionListItems object returns the uid of the requisition list as well as the input attributes. + +Attribute | Data Type | Description +--- | --- | --- +uid | ID! | The unique ID of the modified requisition list. +items_count | Int! | The number of products in the requisition list. + +## Related topics + +* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html) +* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html) \ No newline at end of file From 2c29f118bf22690e0dc990c490e202bcca70b6b2 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Mon, 9 Nov 2020 16:16:00 +0530 Subject: [PATCH 02/15] fixed json format --- .../graphql/mutations/copy-items-between-requisition-list.md | 2 +- .../graphql/mutations/move-items-between-requisition-list.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md index 11c2b9904fe..49230a41727 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md @@ -55,7 +55,7 @@ mutation { "source": { "uid": "4", "items_count": 2 - } + }, "destination": { "uid": "5", "items_count": 2 diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md index f1fb128f97f..b2b75176f3c 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md @@ -55,7 +55,7 @@ mutation { "source": { "uid": "4", "items_count": 0 - } + }, "destination": { "uid": "5", "items_count": 2 From c430d187610f19b10e858168cef52a872c8b379d Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Mon, 9 Nov 2020 16:19:06 +0530 Subject: [PATCH 03/15] arranged the attributes alphabetically --- .../mutations/copy-items-between-requisition-list.md | 4 ++-- .../mutations/move-items-between-requisition-list.md | 4 ++-- .../v2.4/graphql/mutations/remove-requisition-list-items.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md index 49230a41727..690079fc32c 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md @@ -71,9 +71,9 @@ The copyItemsBetweenRequisitionList mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -source_id| ID! | The ID of the source requisition list. destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. itemIds| [ID!]! | An array of selected requisition list items that are to be copied from source to destination. +source_id| ID! | The ID of the source requisition list. ## Output attributes @@ -81,8 +81,8 @@ The copyItemsBetweenRequisitionList object returns the uid of the requisition li Attribute | Data Type | Description --- | --- | --- -uid | ID! | The unique ID of the modified requisition list. items_count | Int! | The number of products in the requisition list. +uid | ID! | The unique ID of the modified requisition list. ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md index b2b75176f3c..273fe98f8f1 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md @@ -71,9 +71,9 @@ The moveItemsBetweenRequisitionList mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -source_id| ID! | The ID of the source requisition list. destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. itemIds| [ID!]! | An array of selected requisition list items that are to be moved from source to destination. +source_id| ID! | The ID of the source requisition list. ## Output attributes @@ -81,8 +81,8 @@ The moveItemsBetweenRequisitionList object returns the uid of the requisition li Attribute | Data Type | Description --- | --- | --- -uid | ID! | The unique ID of the modified requisition list. items_count | Int! | The number of products in the requisition list. +uid | ID! | The unique ID of the modified requisition list. ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md index 74a197f136b..dc9dbd2a76c 100644 --- a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md @@ -61,8 +61,8 @@ The removeRequisitionListItems mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -uid| ID! | The unique ID of the requisition list to change -items_count | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list +items_count | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list. +uid| ID! | The unique ID of the requisition list to change. ## Output attributes @@ -70,8 +70,8 @@ The removeRequisitionListItems object returns the uid of the requisition list as Attribute | Data Type | Description --- | --- | --- -uid | ID! | The unique ID of the modified requisition list. items_count | Int! | The number of products in the requisition list. +uid | ID! | The unique ID of the modified requisition list. ## Related topics From a1b2663ba1075bd7ca85f543992ba51b4d9ec0b6 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Tue, 10 Nov 2020 11:34:42 +0530 Subject: [PATCH 04/15] added backticks and spaces as mentioned --- .../copy-items-between-requisition-list.md | 13 +++++++++---- .../move-items-between-requisition-list.md | 13 +++++++++---- .../mutations/remove-requisition-list-items.md | 12 ++++++++---- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md index 690079fc32c..ed8c7c00455 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md @@ -5,14 +5,15 @@ b2b_only: true contributor_name: Zilker Technology contributor_link: https://www.ztech.io/ --- -The copyItemsBetweenRequisitionList mutation copies items from one requisition list to another. +The `copyItemsBetweenRequisitionList` mutation copies items from one requisition list to another. This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). {:.bs-callout-info} -Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. ## Syntax + ```graphql mutation { copyItemsBetweenRequisitionList( @@ -28,7 +29,9 @@ mutation { ## Example usage The following example copies items from one requisition list to another. + **Request:** + ``` graphql mutation { copyItemsBetweenRequisitionList( @@ -47,7 +50,9 @@ mutation { } } ``` + **Response:** + ``` json { "data": { @@ -67,7 +72,7 @@ mutation { ## Input attributes -The copyItemsBetweenRequisitionList mutation requires the following input. +The `copyItemsBetweenRequisitionList` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- @@ -77,7 +82,7 @@ source_id| ID! | The ID of the source requisition list. ## Output attributes -The copyItemsBetweenRequisitionList object returns the uid of the requisition list as well as the input attributes. +The `copyItemsBetweenRequisitionList` object returns the uid of the requisition list as well as the input attributes. Attribute | Data Type | Description --- | --- | --- diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md index 273fe98f8f1..40a422575eb 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md @@ -5,14 +5,15 @@ b2b_only: true contributor_name: Zilker Technology contributor_link: https://www.ztech.io/ --- -The moveItemsBetweenRequisitionList mutation moves items from one requisition list to another. +The `moveItemsBetweenRequisitionList` mutation moves items from one requisition list to another. This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). {:.bs-callout-info} -Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. ## Syntax + ```graphql mutation { moveItemsBetweenRequisitionList( @@ -28,7 +29,9 @@ mutation { ## Example usage The following example moves items from one requisition list to another. + **Request:** + ``` graphql mutation { moveItemsBetweenRequisitionList( @@ -47,7 +50,9 @@ mutation { } } ``` + **Response:** + ``` json { "data": { @@ -67,7 +72,7 @@ mutation { ## Input attributes -The moveItemsBetweenRequisitionList mutation requires the following input. +The `moveItemsBetweenRequisitionList` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- @@ -77,7 +82,7 @@ source_id| ID! | The ID of the source requisition list. ## Output attributes -The moveItemsBetweenRequisitionList object returns the uid of the requisition list as well as the input attributes. +The `moveItemsBetweenRequisitionList` object returns the uid of the requisition list as well as the input attributes. Attribute | Data Type | Description --- | --- | --- diff --git a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md index dc9dbd2a76c..293645e8201 100644 --- a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md @@ -5,14 +5,15 @@ b2b_only: true contributor_name: Zilker Technology contributor_link: https://www.ztech.io/ --- -The removeRequisitionListItems mutation removes items from the specified requisiton list for the logged in customer. +The `removeRequisitionListItems` mutation removes items from the specified requisiton list for the logged in customer. This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). {:.bs-callout-info} -Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the btob_website_configuration_requisition_list_active attribute to determine whether requisition lists are supported. +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. ## Syntax + ```graphql mutation { removeRequisitionListItems( @@ -28,6 +29,7 @@ mutation { The following example removes the Frequently Ordered Products requisition list item by ID. **Request:** + ``` graphql mutation { removeRequisitionListItems( @@ -41,7 +43,9 @@ mutation { } } ``` + **Response:** + ``` json { "data": { @@ -57,7 +61,7 @@ mutation { ## Input attributes -The removeRequisitionListItems mutation requires the following input. +The `removeRequisitionListItems` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- @@ -66,7 +70,7 @@ uid| ID! | The unique ID of the requisition list to change. ## Output attributes -The removeRequisitionListItems object returns the uid of the requisition list as well as the input attributes. +The `removeRequisitionListItems` object returns the uid of the requisition list as well as the input attributes. Attribute | Data Type | Description --- | --- | --- From 49983feee005c24d4065d9816ee0048f6783a2f4 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash <50226394+sathiyaaa@users.noreply.github.com> Date: Wed, 11 Nov 2020 11:04:30 +0530 Subject: [PATCH 05/15] Update src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md Co-authored-by: Yaroslav Rogoza --- .../graphql/mutations/copy-items-between-requisition-list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md index ed8c7c00455..8ea23c5e0d9 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md @@ -76,7 +76,7 @@ The `copyItemsBetweenRequisitionList` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. +destination_id| ID | The ID of the destination requisition list. If null, the mutation creates a new requisition list. itemIds| [ID!]! | An array of selected requisition list items that are to be copied from source to destination. source_id| ID! | The ID of the source requisition list. @@ -92,4 +92,4 @@ uid | ID! | The unique ID of the modified requisition list. ## Related topics * [moveItemsBetweenRequisitionList mutation]({{page.baseurl}}/graphql/mutations/move-items-between-requisition-list.html) -* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) \ No newline at end of file +* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) From b187ecae352b2413276420fdd8a3814642ca90bd Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Thu, 12 Nov 2020 11:59:28 +0530 Subject: [PATCH 06/15] modified attribute name --- .../v2.4/graphql/mutations/remove-requisition-list-items.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md index 293645e8201..88ec819483b 100644 --- a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md @@ -65,7 +65,7 @@ The `removeRequisitionListItems` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -items_count | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list. +items | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list. uid| ID! | The unique ID of the requisition list to change. ## Output attributes From b8d7bfc90f5d5f74e208fe4ac3b365c333e884f0 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Tue, 8 Dec 2020 11:26:10 +0530 Subject: [PATCH 07/15] Modified the documentation according to the schema change --- src/_data/toc/graphql.yml | 18 +-- src/_includes/graphql/requisition-list.md | 9 ++ .../copy-items-between-requisition-list.md | 95 ---------------- .../copy-items-between-requisition-lists.md | 96 ++++++++++++++++ ...ms.md => delete-requisition-list-items.md} | 38 +++---- .../move-items-between-requisition-list.md | 95 ---------------- .../move-items-between-requisition-lists.md | 105 ++++++++++++++++++ 7 files changed, 237 insertions(+), 219 deletions(-) create mode 100644 src/_includes/graphql/requisition-list.md delete mode 100644 src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md create mode 100644 src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md rename src/guides/v2.4/graphql/mutations/{remove-requisition-list-items.md => delete-requisition-list-items.md} (59%) delete mode 100644 src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md create mode 100644 src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md diff --git a/src/_data/toc/graphql.yml b/src/_data/toc/graphql.yml index d076514d47b..4d3f31bf126 100644 --- a/src/_data/toc/graphql.yml +++ b/src/_data/toc/graphql.yml @@ -205,8 +205,8 @@ pages: - label: changeCustomerPassword mutation url: /graphql/mutations/change-customer-password.html - - label: copyItemsBetweenRequisitionList mutation - url: /graphql/mutations/copy-items-between-requisition-list.html + - label: copyItemsBetweenRequisitionLists mutation + url: /graphql/mutations/copy-items-between-requisition-lists.html edition: b2b-only exclude_versions: [ "2.3" ] @@ -283,6 +283,11 @@ pages: - label: deleteCustomerAddress mutation url: /graphql/mutations/delete-customer-address.html + - label: deleteRequisitionListItems mutation + url: /graphql/mutations/delete-requisition-list-items.html + edition: b2b-only + exclude_versions: [ "2.3" ] + - label: deleteWishlist mutation url: /graphql/mutations/delete-wishlist.html edition: ee-only @@ -310,8 +315,8 @@ pages: edition: ee-only exclude_versions: ["2.3"] - - label: moveItemsBetweenRequisitionList mutation - url: /graphql/mutations/move-items-between-requisition-list.html + - label: moveItemsBetweenRequisitionLists mutation + url: /graphql/mutations/move-items-between-requisition-lists.html edition: b2b-only exclude_versions: [ "2.3" ] @@ -341,11 +346,6 @@ pages: edition: ee-only exclude_versions: ["2.3"] - - label: removeRequisitionListItems mutation - url: /graphql/mutations/remove-requisition-list-items.html - edition: b2b-only - exclude_versions: [ "2.3" ] - - label: removeStoreCreditFromCart mutation url: /graphql/mutations/remove-store-credit.html edition: ee-only diff --git a/src/_includes/graphql/requisition-list.md b/src/_includes/graphql/requisition-list.md new file mode 100644 index 00000000000..64a86ab16a8 --- /dev/null +++ b/src/_includes/graphql/requisition-list.md @@ -0,0 +1,9 @@ +The `RequisitionList` object contains the following attributes. + +Attribute | Data Type | Description +--- | --- | --- +`description` | String! | Optional text that describes the requisition list +`items` | RequistionListItems | An array of products added to the requisition list +`items_count` | Int! | The number of items in the list +`name` | String! | The requisition list name +`updated_at` | String | The time of the last modification of the requisition list diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md deleted file mode 100644 index 8ea23c5e0d9..00000000000 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -group: graphql -title: copyItemsBetweenRequisitionList mutation -b2b_only: true -contributor_name: Zilker Technology -contributor_link: https://www.ztech.io/ ---- -The `copyItemsBetweenRequisitionList` mutation copies items from one requisition list to another. - -This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). - -{:.bs-callout-info} -Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. - -## Syntax - -```graphql -mutation { - copyItemsBetweenRequisitionList( - source_id: ID!, - destination_id: ID, - itemIds: [ID!]!, - ) { - CopyItemsFromRequisitionListOutput - } -} -``` - -## Example usage - -The following example copies items from one requisition list to another. - -**Request:** - -``` graphql -mutation { - copyItemsBetweenRequisitionList( - source_id: "4", - destination_id: "5", - itemIds: ["2","3"] - ) { - source { - uid, - items_count - } - destination { - uid, - items_count - } - } -} -``` - -**Response:** - -``` json -{ - "data": { - "copyItemsBetweenRequisitionList": { - "source": { - "uid": "4", - "items_count": 2 - }, - "destination": { - "uid": "5", - "items_count": 2 - } - } - } -} -``` - -## Input attributes - -The `copyItemsBetweenRequisitionList` mutation requires the following input. - -Attribute | Data Type | Description ---- | --- | --- -destination_id| ID | The ID of the destination requisition list. If null, the mutation creates a new requisition list. -itemIds| [ID!]! | An array of selected requisition list items that are to be copied from source to destination. -source_id| ID! | The ID of the source requisition list. - -## Output attributes - -The `copyItemsBetweenRequisitionList` object returns the uid of the requisition list as well as the input attributes. - -Attribute | Data Type | Description ---- | --- | --- -items_count | Int! | The number of products in the requisition list. -uid | ID! | The unique ID of the modified requisition list. - -## Related topics - -* [moveItemsBetweenRequisitionList mutation]({{page.baseurl}}/graphql/mutations/move-items-between-requisition-list.html) -* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md new file mode 100644 index 00000000000..ce1c940d2af --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md @@ -0,0 +1,96 @@ +--- +group: graphql +title: copyItemsBetweenRequisitionLists mutation +b2b_only: true +contributor_name: EY +--- +The `copyItemsBetweenRequisitionLists` mutation copies items from one requisition list to another. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +{:.bs-callout-info} +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. + +## Syntax + +```graphql +mutation { + copyItemsBetweenRequisitionLists( + sourceRequisitionListUid: ID!, + destinationRequisitionListUid: ID, + requisitionListItem: CopyItemsBetweenRequisitionListsInput + ) { + CopyItemsFromRequisitionListsOutput + } +} +``` + +## Example usage + +The following example copies items from one requisition list to another. + +**Request:** + +``` graphql +mutation { + copyItemsBetweenRequisitionLists( + sourceRequisitionListUid: "4", + destinationRequisitionListUid: "5", + requisitionListItem: ["2","3"] + ) { + requisition_list { + uid, + items_count + } + } +} +``` + +**Response:** + +``` json +{ + "data": { + "copyItemsBetweenRequisitionLists": { + "requisition_list": { + "uid": "4", + "items_count": 2 + } + } + } +} +``` + +## Input attributes + +The `copyItemsBetweenRequisitionLists` mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +`destinationRequisitionListUid`| ID | The unique ID of the destination requisition list. If null new requisition list will be created. +`requisitionListItem`| [[CopyItemsBetweenRequisitionListsInput](#copyItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be copied from source to destination. +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. + +## Output attributes + +The `copyItemsBetweenRequisitionLists` object returns the requisition list object to which the products were copied to. + +Attribute | Data Type | Description +--- | --- | --- +`requisition_list` | [[RequisitionList](#requisitionList)] | The destination requisition list after the items were copied. + +### CopyItemsBetweenRequisitionListsInput attributes {#copyItemsBetweenRequisitionListsInput} + +The `CopyItemsBetweenRequisitionListsInput` type contains the list of products to copy from one requisition list to other. + +Attribute | Data Type | Description +--- | --- | --- +`requisitionListItemUids` | [ID!]! | An array of IDs representing products copied from one requisition list to another. + +### RequisitionList attributes {#requisitionList} +{% include graphql/requisition-list.md %} + +## Related topics + +* [moveItemsBetweenRequisitionLists mutation]({{page.baseurl}}/graphql/mutations/move-items-between-requisition-lists.html) +* [deleteRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list-items.html) diff --git a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md similarity index 59% rename from src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md rename to src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md index 88ec819483b..443ceef116b 100644 --- a/src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md @@ -1,11 +1,10 @@ --- group: graphql -title: removeRequisitionListItems mutation +title: deleteRequisitionListItems mutation b2b_only: true -contributor_name: Zilker Technology -contributor_link: https://www.ztech.io/ +contributor_name: EY --- -The `removeRequisitionListItems` mutation removes items from the specified requisiton list for the logged in customer. +The `deleteRequisitionListItems` mutation removes items from the specified requisiton list for the logged in customer. This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). @@ -16,11 +15,11 @@ Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) ```graphql mutation { - removeRequisitionListItems( - uid: ID! - items: [ID!]! + deleteRequisitionListItems( + requisitionListUid: ID! + requisitionListItemUids: [ID!]! ) { - RemoveRequisitionListItemsOutput + DeleteRequisitionListItemsOutput } } ``` @@ -32,11 +31,11 @@ The following example removes the Frequently Ordered Products requisition list i ``` graphql mutation { - removeRequisitionListItems( - uid: "4", - items: ["2","3"] + deleteRequisitionListItems( + requisitionListUid: "4", + requisitionListItemUids: ["2","3"] ) { - list { + requisition_list { uid items_count } @@ -49,8 +48,8 @@ mutation { ``` json { "data": { - "removeRequisitionListItems": { - "list": { + "deleteRequisitionListItems": { + "requisition_list": { "uid": "4", "items_count": 0 } @@ -61,21 +60,20 @@ mutation { ## Input attributes -The `removeRequisitionListItems` mutation requires the following input. +The `deleteRequisitionListItems` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -items | [ID!]! | An array of items IDs corresponding to products to be removed from the requisition list. -uid| ID! | The unique ID of the requisition list to change. +`requisitionListItemUids`| [ID!]! | An array of UIDs representing products to be removed from the requisition list. +`requisitionListUid`| ID! | The unique ID of the requisition list. ## Output attributes -The `removeRequisitionListItems` object returns the uid of the requisition list as well as the input attributes. +The `deleteRequisitionListItems` object returns the uid of the requisition list as well as the input attributes. Attribute | Data Type | Description --- | --- | --- -items_count | Int! | The number of products in the requisition list. -uid | ID! | The unique ID of the modified requisition list. +`requisition_list` | RequisitionList | The requisition list after removing items. ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md deleted file mode 100644 index 40a422575eb..00000000000 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -group: graphql -title: moveItemsBetweenRequisitionList mutation -b2b_only: true -contributor_name: Zilker Technology -contributor_link: https://www.ztech.io/ ---- -The `moveItemsBetweenRequisitionList` mutation moves items from one requisition list to another. - -This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). - -{:.bs-callout-info} -Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. - -## Syntax - -```graphql -mutation { - moveItemsBetweenRequisitionList( - source_id: ID! - destination_id: ID - itemIds: [ID!]! - ) { - MoveItemsFromRequisitionListOutput - } -} -``` - -## Example usage - -The following example moves items from one requisition list to another. - -**Request:** - -``` graphql -mutation { - moveItemsBetweenRequisitionList( - source_id: "4" - destination_id: "5" - itemIds: ["2","3"] - ) { - source { - uid - items_count - } - destination { - uid - items_count - } - } -} -``` - -**Response:** - -``` json -{ - "data": { - "moveItemsBetweenRequisitionList": { - "source": { - "uid": "4", - "items_count": 0 - }, - "destination": { - "uid": "5", - "items_count": 2 - } - } - } -} -``` - -## Input attributes - -The `moveItemsBetweenRequisitionList` mutation requires the following input. - -Attribute | Data Type | Description ---- | --- | --- -destination_id| ID! | The ID of the destination requisition list. If null, the mutation creates a new requisition list. -itemIds| [ID!]! | An array of selected requisition list items that are to be moved from source to destination. -source_id| ID! | The ID of the source requisition list. - -## Output attributes - -The `moveItemsBetweenRequisitionList` object returns the uid of the requisition list as well as the input attributes. - -Attribute | Data Type | Description ---- | --- | --- -items_count | Int! | The number of products in the requisition list. -uid | ID! | The unique ID of the modified requisition list. - -## Related topics - -* [copyItemsBetweenRequisitionList mutation]({{page.baseurl}}/graphql/mutations/copy-items-between-requisition-list.html) -* [removeRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/remove-requisition-list-items.html) \ No newline at end of file diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md new file mode 100644 index 00000000000..e217490d7e1 --- /dev/null +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md @@ -0,0 +1,105 @@ +--- +group: graphql +title: moveItemsBetweenRequisitionLists mutation +b2b_only: true +contributor_name: EY +--- +The `moveItemsBetweenRequisitionLists` mutation moves items from one requisition list to another. + +This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). + +{:.bs-callout-info} +Use the [storeConfig query]({{page.baseurl}}/graphql/queries/store-config.html) with the `btob_website_configuration_requisition_list_active` attribute to determine whether requisition lists are supported. + +## Syntax + +```graphql +mutation { + moveItemsBetweenRequisitionLists( + sourceRequisitionListUid: ID! + destinationRequisitionListUid: ID + requisitionListItem: MoveItemsBetweenRequisitionListsInput + ) { + MoveItemsBetweenRequisitionListsOutput + } +} +``` + +## Example usage + +The following example moves items from one requisition list to another. + +**Request:** + +``` graphql +mutation { + moveItemsBetweenRequisitionLists( + sourceRequisitionListUid: "4" + destinationRequisitionListUid: "5" + requisitionListItem: ["2","3"] + ) { + source_requisition_list { + uid + items_count + } + destination_requisition_list { + uid + items_count + } + } +} +``` + +**Response:** + +``` json +{ + "data": { + "moveItemsBetweenRequisitionLists": { + "source_requisition_list": { + "uid": "4", + "items_count": 0 + }, + "destination_requisition_list": { + "uid": "5", + "items_count": 2 + } + } + } +} +``` + +## Input attributes + +The `moveItemsBetweenRequisitionLists` mutation requires the following input. + +Attribute | Data Type | Description +--- | --- | --- +`destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null new requisition list will be created. +`requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#moveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from source to destination list. +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. + +## Output attributes + +The `moveItemsBetweenRequisitionLists` object returns the source requisition list and the destination requisition list object. + +Attribute | Data Type | Description +--- | --- | --- +`destination_requisition_list` | [[RequisitionList](#requisitionList)] | The destination requisition list after moving items. +`source_requisition_list` | [[RequisitionList](#requisitionList)] | The source requisition list after moving items. + +### MoveItemsBetweenRequisitionListsInput attributes {#moveItemsBetweenRequisitionListsInput} + +The `MoveItemsBetweenRequisitionListsInput` type contains the list of products to move from one requisition list to other. + +Attribute | Data Type | Description +--- | --- | --- +`requisitionListItemUids` | [ID!]! | An array of IDs representing products moved from one requisition list to another. + +### RequisitionList attributes {#requisitionList} +{% include graphql/requisition-list.md %} + +## Related topics + +* [copyItemsBetweenRequisitionLists mutation]({{page.baseurl}}/graphql/mutations/copy-items-between-requisition-lists.html) +* [deleteRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list-items.html) \ No newline at end of file From 733a56bfc9a70e52414340e36bd12e1646dd6e76 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash <50226394+sathiyaaa@users.noreply.github.com> Date: Wed, 9 Dec 2020 11:18:52 +0530 Subject: [PATCH 08/15] Apply suggestions from code review Co-authored-by: Kevin Harper --- .../mutations/copy-items-between-requisition-lists.md | 10 +++++----- .../mutations/move-items-between-requisition-lists.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md index ce1c940d2af..16e8cb203e1 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md @@ -39,7 +39,7 @@ mutation { requisitionListItem: ["2","3"] ) { requisition_list { - uid, + uid items_count } } @@ -67,9 +67,9 @@ The `copyItemsBetweenRequisitionLists` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`destinationRequisitionListUid`| ID | The unique ID of the destination requisition list. If null new requisition list will be created. -`requisitionListItem`| [[CopyItemsBetweenRequisitionListsInput](#copyItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be copied from source to destination. -`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. +`destinationRequisitionListUid`| ID | The unique ID of the destination requisition list. If null, a new requisition list will be created +`requisitionListItem`| [[CopyItemsBetweenRequisitionListsInput](#copyItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be copied +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list ## Output attributes @@ -79,7 +79,7 @@ Attribute | Data Type | Description --- | --- | --- `requisition_list` | [[RequisitionList](#requisitionList)] | The destination requisition list after the items were copied. -### CopyItemsBetweenRequisitionListsInput attributes {#copyItemsBetweenRequisitionListsInput} +### CopyItemsBetweenRequisitionListsInput attributes {#CopyItemsBetweenRequisitionListsInput} The `CopyItemsBetweenRequisitionListsInput` type contains the list of products to copy from one requisition list to other. diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md index e217490d7e1..0b55f36cd95 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md @@ -75,8 +75,8 @@ The `moveItemsBetweenRequisitionLists` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null new requisition list will be created. -`requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#moveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from source to destination list. +`destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null, a new requisition list will be created +`requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#moveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from the source to the destination list `sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. ## Output attributes @@ -102,4 +102,4 @@ Attribute | Data Type | Description ## Related topics * [copyItemsBetweenRequisitionLists mutation]({{page.baseurl}}/graphql/mutations/copy-items-between-requisition-lists.html) -* [deleteRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list-items.html) \ No newline at end of file +* [deleteRequisitionListItems mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list-items.html) From b94b2902b64b5501ae4c42141ec22e71c336f81d Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 11:26:31 +0530 Subject: [PATCH 09/15] modified as per review comments --- .../copy-items-between-requisition-lists.md | 16 ++++++++-------- .../mutations/delete-requisition-list-items.md | 8 ++++---- .../move-items-between-requisition-lists.md | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md index ce1c940d2af..82882184aa1 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md @@ -67,27 +67,27 @@ The `copyItemsBetweenRequisitionLists` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`destinationRequisitionListUid`| ID | The unique ID of the destination requisition list. If null new requisition list will be created. -`requisitionListItem`| [[CopyItemsBetweenRequisitionListsInput](#copyItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be copied from source to destination. -`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. +`destinationRequisitionListUid`| ID | The unique ID of the destination requisition list. If null new requisition list will be created +`requisitionListItem`| [[CopyItemsBetweenRequisitionListsInput](#CopyItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be copied from source to destination +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list ## Output attributes -The `copyItemsBetweenRequisitionLists` object returns the requisition list object to which the products were copied to. +The `copyItemsBetweenRequisitionLists` mutation returns the requisition list object to which the products were copied to. Attribute | Data Type | Description --- | --- | --- -`requisition_list` | [[RequisitionList](#requisitionList)] | The destination requisition list after the items were copied. +`requisition_list` | [[RequisitionList](#RequisitionList)] | The destination requisition list after the items were copied -### CopyItemsBetweenRequisitionListsInput attributes {#copyItemsBetweenRequisitionListsInput} +### CopyItemsBetweenRequisitionListsInput attributes {#CopyItemsBetweenRequisitionListsInput} The `CopyItemsBetweenRequisitionListsInput` type contains the list of products to copy from one requisition list to other. Attribute | Data Type | Description --- | --- | --- -`requisitionListItemUids` | [ID!]! | An array of IDs representing products copied from one requisition list to another. +`requisitionListItemUids` | [ID!]! | An array of IDs representing products copied from one requisition list to another -### RequisitionList attributes {#requisitionList} +### RequisitionList attributes {#RequisitionList} {% include graphql/requisition-list.md %} ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md index 443ceef116b..a351428a5aa 100644 --- a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md @@ -25,7 +25,7 @@ mutation { ``` ## Example usage -The following example removes the Frequently Ordered Products requisition list item by ID. +The following example removes the specified items from the requisition list. **Request:** @@ -64,8 +64,8 @@ The `deleteRequisitionListItems` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`requisitionListItemUids`| [ID!]! | An array of UIDs representing products to be removed from the requisition list. -`requisitionListUid`| ID! | The unique ID of the requisition list. +`requisitionListItemUids`| [ID!]! | An array of UIDs representing products to be removed from the requisition list +`requisitionListUid`| ID! | The unique ID of the requisition list ## Output attributes @@ -73,7 +73,7 @@ The `deleteRequisitionListItems` object returns the uid of the requisition list Attribute | Data Type | Description --- | --- | --- -`requisition_list` | RequisitionList | The requisition list after removing items. +`requisition_list` | RequisitionList | The requisition list after removing items ## Related topics diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md index e217490d7e1..3a7e27e4c24 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md @@ -75,9 +75,9 @@ The `moveItemsBetweenRequisitionLists` mutation requires the following input. Attribute | Data Type | Description --- | --- | --- -`destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null new requisition list will be created. -`requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#moveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from source to destination list. -`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. +`destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null new requisition list will be created +`requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#MoveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from source to destination list +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list ## Output attributes @@ -85,18 +85,18 @@ The `moveItemsBetweenRequisitionLists` object returns the source requisition lis Attribute | Data Type | Description --- | --- | --- -`destination_requisition_list` | [[RequisitionList](#requisitionList)] | The destination requisition list after moving items. -`source_requisition_list` | [[RequisitionList](#requisitionList)] | The source requisition list after moving items. +`destination_requisition_list` | [[RequisitionList](#RequisitionList)] | The destination requisition list after moving items +`source_requisition_list` | [[RequisitionList](#RequisitionList)] | The source requisition list after moving items -### MoveItemsBetweenRequisitionListsInput attributes {#moveItemsBetweenRequisitionListsInput} +### MoveItemsBetweenRequisitionListsInput attributes {#MoveItemsBetweenRequisitionListsInput} The `MoveItemsBetweenRequisitionListsInput` type contains the list of products to move from one requisition list to other. Attribute | Data Type | Description --- | --- | --- -`requisitionListItemUids` | [ID!]! | An array of IDs representing products moved from one requisition list to another. +`requisitionListItemUids` | [ID!]! | An array of IDs representing products moved from one requisition list to another -### RequisitionList attributes {#requisitionList} +### RequisitionList attributes {#RequisitionList} {% include graphql/requisition-list.md %} ## Related topics From 1e1d39ce6a4e37cb80dadadf74566d5239f9f599 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 11:35:34 +0530 Subject: [PATCH 10/15] removed a period --- .../graphql/mutations/move-items-between-requisition-lists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md index 4b0d844ca00..94431b45e10 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md @@ -77,7 +77,7 @@ Attribute | Data Type | Description --- | --- | --- `destinationRequisitionListUid`| ID! | The unique ID of the destination requisition list. If null, a new requisition list will be created `requisitionListItem`| [[MoveItemsBetweenRequisitionListsInput](#MoveItemsBetweenRequisitionListsInput)] | An array of selected requisition list items that are to be moved from the source to the destination list -`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list. +`sourceRequisitionListUid`| ID! | The unique ID of the source requisition list ## Output attributes From 1d2e629ca9e8aa0fe7a8837c307db089af6f70ba Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 15:11:24 +0530 Subject: [PATCH 11/15] added a missing attribute --- src/_includes/graphql/requisition-list.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_includes/graphql/requisition-list.md b/src/_includes/graphql/requisition-list.md index 64a86ab16a8..032f8140460 100644 --- a/src/_includes/graphql/requisition-list.md +++ b/src/_includes/graphql/requisition-list.md @@ -2,8 +2,9 @@ The `RequisitionList` object contains the following attributes. Attribute | Data Type | Description --- | --- | --- -`description` | String! | Optional text that describes the requisition list +`description` | String | Optional text that describes the requisition list `items` | RequistionListItems | An array of products added to the requisition list `items_count` | Int! | The number of items in the list `name` | String! | The requisition list name `updated_at` | String | The time of the last modification of the requisition list +`uid` | ID! | The unique requisition list ID From a580df43c8491e30d24a6921aaad88a84b822858 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 15:15:44 +0530 Subject: [PATCH 12/15] added the attributes alphabetically --- src/_includes/graphql/requisition-list.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_includes/graphql/requisition-list.md b/src/_includes/graphql/requisition-list.md index 032f8140460..55f1620ed33 100644 --- a/src/_includes/graphql/requisition-list.md +++ b/src/_includes/graphql/requisition-list.md @@ -6,5 +6,6 @@ Attribute | Data Type | Description `items` | RequistionListItems | An array of products added to the requisition list `items_count` | Int! | The number of items in the list `name` | String! | The requisition list name -`updated_at` | String | The time of the last modification of the requisition list `uid` | ID! | The unique requisition list ID +`updated_at` | String | The time of the last modification of the requisition list + From 936adaf9fd53ce717010028e767c9965791ace8f Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 15:16:19 +0530 Subject: [PATCH 13/15] deleted extra line --- src/_includes/graphql/requisition-list.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/_includes/graphql/requisition-list.md b/src/_includes/graphql/requisition-list.md index 55f1620ed33..4b9a8c73727 100644 --- a/src/_includes/graphql/requisition-list.md +++ b/src/_includes/graphql/requisition-list.md @@ -8,4 +8,3 @@ Attribute | Data Type | Description `name` | String! | The requisition list name `uid` | ID! | The unique requisition list ID `updated_at` | String | The time of the last modification of the requisition list - From 86dc970892bccfddd7849dd69586ec265612c9d1 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Wed, 9 Dec 2020 18:49:15 +0530 Subject: [PATCH 14/15] modified a description --- .../v2.4/graphql/mutations/delete-requisition-list-items.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md index a351428a5aa..bcd198fcba6 100644 --- a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md @@ -69,7 +69,7 @@ Attribute | Data Type | Description ## Output attributes -The `deleteRequisitionListItems` object returns the uid of the requisition list as well as the input attributes. +The `deleteRequisitionListItems` object returns the requisition list after the deletion of items. Attribute | Data Type | Description --- | --- | --- From 49832fb29f1c4a1ea8eb0225dd08a31faf417cc0 Mon Sep 17 00:00:00 2001 From: Sathiya Prakash Date: Thu, 10 Dec 2020 14:45:57 +0530 Subject: [PATCH 15/15] modified the uid's and item uid's --- .../mutations/copy-items-between-requisition-lists.md | 8 ++++---- .../graphql/mutations/delete-requisition-list-items.md | 4 ++-- .../mutations/move-items-between-requisition-lists.md | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md index 48ed935156b..cde7d55a517 100644 --- a/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/copy-items-between-requisition-lists.md @@ -34,9 +34,9 @@ The following example copies items from one requisition list to another. ``` graphql mutation { copyItemsBetweenRequisitionLists( - sourceRequisitionListUid: "4", - destinationRequisitionListUid: "5", - requisitionListItem: ["2","3"] + sourceRequisitionListUid: "Y29uZmlndXJhYmxlLzkzLzUz", + destinationRequisitionListUid: "W16uZmlndXJhYmxlLakzLzUz", + requisitionListItemUids: ["2","3"] ) { requisition_list { uid @@ -53,7 +53,7 @@ mutation { "data": { "copyItemsBetweenRequisitionLists": { "requisition_list": { - "uid": "4", + "uid": "W16uZmlndXJhYmxlLakzLzUz", "items_count": 2 } } diff --git a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md index bcd198fcba6..9b38496c119 100644 --- a/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md +++ b/src/guides/v2.4/graphql/mutations/delete-requisition-list-items.md @@ -32,7 +32,7 @@ The following example removes the specified items from the requisition list. ``` graphql mutation { deleteRequisitionListItems( - requisitionListUid: "4", + requisitionListUid: "Y29uZmlndXJhYmxlLzkzLzUz", requisitionListItemUids: ["2","3"] ) { requisition_list { @@ -50,7 +50,7 @@ mutation { "data": { "deleteRequisitionListItems": { "requisition_list": { - "uid": "4", + "uid": "Y29uZmlndXJhYmxlLzkzLzUz", "items_count": 0 } } diff --git a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md index 94431b45e10..a5abbe3bf2f 100644 --- a/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md +++ b/src/guides/v2.4/graphql/mutations/move-items-between-requisition-lists.md @@ -34,9 +34,9 @@ The following example moves items from one requisition list to another. ``` graphql mutation { moveItemsBetweenRequisitionLists( - sourceRequisitionListUid: "4" - destinationRequisitionListUid: "5" - requisitionListItem: ["2","3"] + sourceRequisitionListUid: "Y29uZmlndXJhYmxlLzkzLzUz" + destinationRequisitionListUid: "W16uZmlndXJhYmxlLakzLzUz" + requisitionListItemUids: ["2","3"] ) { source_requisition_list { uid @@ -57,11 +57,11 @@ mutation { "data": { "moveItemsBetweenRequisitionLists": { "source_requisition_list": { - "uid": "4", + "uid": "Y29uZmlndXJhYmxlLzkzLzUz", "items_count": 0 }, "destination_requisition_list": { - "uid": "5", + "uid": "W16uZmlndXJhYmxlLakzLzUz", "items_count": 2 } }