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 create, rename, delete requisition lists #8093
Merged
keharper
merged 13 commits into
magento:2.4.2-develop
from
dani97:requisition-list-create-mutations
Oct 21, 2020
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
607c885
added create, rename, delete lists
5f79a3f
Update src/guides/v2.4/graphql/mutations/create-requisition-list.md
e19a4e1
Update src/guides/v2.4/graphql/mutations/create-requisition-list.md
f2cfc27
Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md
a025c03
Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md
f874a50
Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md
80d4039
Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md
e81e846
Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md
e600174
Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md
bbcda06
req list added
9161a5e
req list comments fixed
6a221c6
Fix linting error
keharper 2a7006e
Merge branch '2.4.2-develop' into requisition-list-create-mutations
keharper 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
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
87 changes: 87 additions & 0 deletions
87
src/guides/v2.4/graphql/mutations/create-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,87 @@ | ||
--- | ||
group: graphql | ||
title: createRequisitionList mutation | ||
b2b_only: true | ||
contributor_name: Zilker Technology | ||
contributor_link: https://www.ztech.io/ | ||
--- | ||
The `createRequisitionList` mutation creates a requisition 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 { | ||
createRequisitionList( | ||
name: String! | ||
description: String | ||
) { | ||
CreateRequisitionListOutput | ||
} | ||
} | ||
``` | ||
|
||
## Example usage | ||
|
||
The following example creates the `Frequently Ordered Products` requisition list. | ||
|
||
**Request:** | ||
|
||
```graphql | ||
mutation { | ||
createRequisitionList( | ||
name: "Frequently Ordered Products", | ||
description: "Frequently ordered products list" | ||
) { | ||
list { | ||
uid | ||
name | ||
description | ||
} | ||
} | ||
} | ||
``` | ||
|
||
**Response:** | ||
|
||
```json | ||
{ | ||
"data": { | ||
"createRequisitionList": { | ||
"list": { | ||
"uid": "4", | ||
"name": "Frequently Ordered Products", | ||
"description": "Frequently ordered products list" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Input attributes | ||
|
||
The `createRequisitionList` mutation requires the following input. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`description`| String | Description of the customer's requisition list | ||
`name` | String! | The name of the customer's requisition list | ||
|
||
## Output attributes | ||
|
||
The `createRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`description` | String | The requisition list description | ||
`name` | String! | The requisition list name | ||
keharper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
`uid` | ID! | The ID of the new requisition list | ||
|
||
## Related topics | ||
|
||
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html) | ||
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html) |
71 changes: 71 additions & 0 deletions
71
src/guides/v2.4/graphql/mutations/delete-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,71 @@ | ||
--- | ||
group: graphql | ||
title: deleteRequisitionList mutation | ||
b2b_only: true | ||
contributor_name: Zilker Technology | ||
contributor_link: https://www.ztech.io/ | ||
--- | ||
The `deleteRequisitionList` mutation deletes a requisition list of the logged in customer. | ||
|
||
This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). | ||
|
||
## Syntax | ||
|
||
```graphql | ||
mutation { | ||
deleteRequisitionList( | ||
uid: ID! | ||
) { | ||
deleteRequisitionListOutput | ||
} | ||
} | ||
``` | ||
|
||
## Example usage | ||
|
||
The following example deletes the requisition list with `uid` 4. | ||
|
||
**Request:** | ||
|
||
```graphql | ||
mutation { | ||
deleteRequisitionList( | ||
uid: "4" | ||
) { | ||
result | ||
} | ||
} | ||
``` | ||
|
||
**Response:** | ||
|
||
```json | ||
{ | ||
"data": { | ||
"deleteRequisitionList": { | ||
"result": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Input attributes | ||
|
||
The `deleteRequisitionList` mutation requires the following input. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`uid` | ID! | The ID of the requisition list to delete | ||
|
||
## Output attributes | ||
|
||
The `deleteRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`result` | Boolean | Indicates whether the requisition list was deleted | ||
|
||
## Related topics | ||
|
||
* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-requisition-list.html) | ||
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html) |
87 changes: 87 additions & 0 deletions
87
src/guides/v2.4/graphql/mutations/rename-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,87 @@ | ||
--- | ||
group: graphql | ||
title: renameRequisitionList mutation | ||
b2b_only: true | ||
contributor_name: Zilker Technology | ||
contributor_link: https://www.ztech.io/ | ||
--- | ||
The `renameRequisitionList` mutation updates the name and, optionally, the description of a requisition list. | ||
|
||
This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html). | ||
|
||
## Syntax | ||
|
||
```graphql | ||
mutation { | ||
renameRequisitionList( | ||
uid: ID! | ||
name: String! | ||
description: String | ||
) { | ||
renameRequisitionListOutput | ||
} | ||
} | ||
``` | ||
|
||
## Example usage | ||
|
||
The following example renames the `Frequently Ordered Products` requisition list and updates its description. | ||
|
||
**Request:** | ||
|
||
```graphql | ||
mutation { | ||
renameRequisitionList( | ||
uid: "4" | ||
name: "Frequently Ordered Essential Products", | ||
description: "Frequently ordered essential products list" | ||
) { | ||
list { | ||
uid | ||
name | ||
description | ||
} | ||
} | ||
} | ||
``` | ||
|
||
**Response:** | ||
|
||
```json | ||
{ | ||
"data": { | ||
"renameRequisitionList": { | ||
"list": { | ||
"uid": "4", | ||
"name": "Frequently Ordered Essential Products", | ||
"description": "Frequently ordered essential products list" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Input attributes | ||
|
||
The `renameRequisitionList` mutation requires the following input. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`description`| String | Description of the customer's requisition list | ||
`name` | String! | The name of the customer's requisition list | ||
`uid` | ID! | The ID of the new requisition list | ||
|
||
## Output attributes | ||
|
||
The `renameRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`description` | String | The requisition list description | ||
`name` | String! | The requisition list name | ||
keharper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
`uid` | ID! | The ID of the new requisition list | ||
|
||
## Related topics | ||
|
||
* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-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.
Uh oh!
There was an error while loading. Please reload this page.