This repository was archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Added documentation for copy, move and delete requisition list items mutations #8202
Merged
keharper
merged 17 commits into
magento:requisition-lists
from
sathiyaaa:requision-list-mutations
Dec 11, 2020
Merged
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5316300
Added documentation for copy, move and remove requisition list items …
sathiyaaa 2c29f11
fixed json format
sathiyaaa c430d18
arranged the attributes alphabetically
sathiyaaa a1b2663
added backticks and spaces as mentioned
sathiyaaa 49983fe
Update src/guides/v2.4/graphql/mutations/copy-items-between-requisiti…
sathiyaaa b187eca
modified attribute name
sathiyaaa 3871c1d
Merge branch 'requision-list-mutations' of github.com:sathiyaaa/devdo…
sathiyaaa b8d7bfc
Modified the documentation according to the schema change
sathiyaaa 733a56b
Apply suggestions from code review
sathiyaaa b94b290
modified as per review comments
sathiyaaa 467de12
modified as per review comments
sathiyaaa 1e1d39c
removed a period
sathiyaaa 1d2e629
added a missing attribute
sathiyaaa a580df4
added the attributes alphabetically
sathiyaaa 936adaf
deleted extra line
sathiyaaa 86dc970
modified a description
sathiyaaa 49832fb
modified the uid's and item uid's
sathiyaaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
src/guides/v2.4/graphql/mutations/copy-items-between-requisition-list.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```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:** | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` 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. | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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) |
90 changes: 90 additions & 0 deletions
90
src/guides/v2.4/graphql/mutations/move-items-between-requisition-list.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment here. The mutation is now named |
||
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 | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```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) |
79 changes: 79 additions & 0 deletions
79
src/guides/v2.4/graphql/mutations/remove-requisition-list-items.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
group: graphql | ||
title: removeRequisitionListItems mutation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now named deleteRequisitionListItems and the schema is now very different. |
||
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. | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Syntax | ||
sathiyaaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```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 | ||
--- | --- | --- | ||
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 | ||
|
||
The removeRequisitionListItems 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 | ||
|
||
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html) | ||
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mutation is now called
copyItemsBetweenRequisitionLists
(ends with an s). So much has changed in the schema for this mutation that it would be better to start over on this topic than try to point out all the differences. Note that the descriptions have been updated in the schema file. Use those where you can.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will modify accordingly.