Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 374c63f

Browse files
Christopher Danielkeharper
Christopher Daniel
andauthored
added create, rename, delete requisition lists (#8093)
* added create, rename, delete lists * Update src/guides/v2.4/graphql/mutations/create-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/create-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/delete-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * Update src/guides/v2.4/graphql/mutations/rename-requisition-list.md Co-authored-by: Kevin Harper <[email protected]> * req list added * req list comments fixed * Fix linting error Co-authored-by: Kevin Harper <[email protected]>
1 parent 27b0583 commit 374c63f

File tree

5 files changed

+261
-0
lines changed

5 files changed

+261
-0
lines changed

src/_data/toc/graphql.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ pages:
250250
url: /graphql/mutations/create-product-review.html
251251
exclude_versions: ["2.3"]
252252

253+
- label: createRequisitionList mutation
254+
url: /graphql/mutations/create-requisition-list.html
255+
edition: b2b-only
256+
exclude_versions: [ "2.3" ]
257+
253258
- label: createWishlist mutation
254259
url: /graphql/mutations/create-wishlist.html
255260
edition: ee-only
@@ -271,6 +276,11 @@ pages:
271276
- label: deletePaymentToken mutation
272277
url: /graphql/mutations/delete-payment-token.html
273278

279+
- label: deleteRequisitionList mutation
280+
url: /graphql/mutations/delete-requisition-list.html
281+
edition: b2b-only
282+
exclude_versions: [ "2.3" ]
283+
274284
- label: generateCustomerToken mutation
275285
url: /graphql/mutations/generate-customer-token.html
276286

@@ -315,6 +325,11 @@ pages:
315325
url: /graphql/mutations/remove-store-credit.html
316326
edition: ee-only
317327

328+
- label: renameRequisitionList mutation
329+
url: /graphql/mutations/rename-requisition-list.html
330+
edition: b2b-only
331+
exclude_versions: [ "2.3" ]
332+
318333
- label: reorderItems mutation
319334
url: /graphql/mutations/reorder-items.html
320335
exclude_versions: ["2.3"]

src/_includes/graphql/store-config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Attribute | Data Type | Description | Default or example value
1616
`base_media_url` | String | The fully-qualified URL that specifies the location of user media files | `http://magentohost.example.com/pub/media/`
1717
`base_static_url` | String | The fully-qualified URL that specifies the location of static view files | `http://magentohost.example.com/pub/static/`
1818
`base_url` | String | The store's fully-qualified base URL | `http://magentohost.example.com/`
19+
`btob_website_configuration_requisition_list_active` | String | Indicates if requisition lists are enabled. Possible values: 1 (Yes) and 0 (No) | 0
1920
`cart_gift_wrapping` | String | Indicates if gift wrapping prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
2021
`cart_printed_card` | String | Indicates if printed card prices are displayed on the Shopping Cart page. Possible values: 1 (Yes) and 0 (No) | 1
2122
`catalog_default_sort_by` | String | The default sort order of the search results list | `position`
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
group: graphql
3+
title: createRequisitionList mutation
4+
b2b_only: true
5+
contributor_name: Zilker Technology
6+
contributor_link: https://www.ztech.io/
7+
---
8+
The `createRequisitionList` mutation creates a requisition list for the logged in customer.
9+
10+
This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).
11+
12+
{:.bs-callout-info}
13+
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.
14+
15+
## Syntax
16+
17+
```graphql
18+
mutation {
19+
createRequisitionList(
20+
name: String!
21+
description: String
22+
) {
23+
CreateRequisitionListOutput
24+
}
25+
}
26+
```
27+
28+
## Example usage
29+
30+
The following example creates the `Frequently Ordered Products` requisition list.
31+
32+
**Request:**
33+
34+
```graphql
35+
mutation {
36+
createRequisitionList(
37+
name: "Frequently Ordered Products",
38+
description: "Frequently ordered products list"
39+
) {
40+
list {
41+
uid
42+
name
43+
description
44+
}
45+
}
46+
}
47+
```
48+
49+
**Response:**
50+
51+
```json
52+
{
53+
"data": {
54+
"createRequisitionList": {
55+
"list": {
56+
"uid": "4",
57+
"name": "Frequently Ordered Products",
58+
"description": "Frequently ordered products list"
59+
}
60+
}
61+
}
62+
}
63+
```
64+
65+
## Input attributes
66+
67+
The `createRequisitionList` mutation requires the following input.
68+
69+
Attribute | Data Type | Description
70+
--- | --- | ---
71+
`description`| String | Description of the customer's requisition list
72+
`name` | String! | The name of the customer's requisition list
73+
74+
## Output attributes
75+
76+
The `createRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.
77+
78+
Attribute | Data Type | Description
79+
--- | --- | ---
80+
`description` | String | The requisition list description
81+
`name` | String! | The requisition list name
82+
`uid` | ID! | The ID of the new requisition list
83+
84+
## Related topics
85+
86+
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html)
87+
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
group: graphql
3+
title: deleteRequisitionList mutation
4+
b2b_only: true
5+
contributor_name: Zilker Technology
6+
contributor_link: https://www.ztech.io/
7+
---
8+
The `deleteRequisitionList` mutation deletes a requisition list of the logged in customer.
9+
10+
This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).
11+
12+
## Syntax
13+
14+
```graphql
15+
mutation {
16+
deleteRequisitionList(
17+
uid: ID!
18+
) {
19+
deleteRequisitionListOutput
20+
}
21+
}
22+
```
23+
24+
## Example usage
25+
26+
The following example deletes the requisition list with `uid` 4.
27+
28+
**Request:**
29+
30+
```graphql
31+
mutation {
32+
deleteRequisitionList(
33+
uid: "4"
34+
) {
35+
result
36+
}
37+
}
38+
```
39+
40+
**Response:**
41+
42+
```json
43+
{
44+
"data": {
45+
"deleteRequisitionList": {
46+
"result": true
47+
}
48+
}
49+
}
50+
```
51+
52+
## Input attributes
53+
54+
The `deleteRequisitionList` mutation requires the following input.
55+
56+
Attribute | Data Type | Description
57+
--- | --- | ---
58+
`uid` | ID! | The ID of the requisition list to delete
59+
60+
## Output attributes
61+
62+
The `deleteRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.
63+
64+
Attribute | Data Type | Description
65+
--- | --- | ---
66+
`result` | Boolean | Indicates whether the requisition list was deleted
67+
68+
## Related topics
69+
70+
* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-requisition-list.html)
71+
* [renameRequisitionList mutation]({{page.baseurl}}/graphql/mutations/rename-requisition-list.html)
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
group: graphql
3+
title: renameRequisitionList mutation
4+
b2b_only: true
5+
contributor_name: Zilker Technology
6+
contributor_link: https://www.ztech.io/
7+
---
8+
The `renameRequisitionList` mutation updates the name and, optionally, the description of a requisition list.
9+
10+
This mutation requires a valid [customer authentication token]({{page.baseurl}}/graphql/mutations/generate-customer-token.html).
11+
12+
## Syntax
13+
14+
```graphql
15+
mutation {
16+
renameRequisitionList(
17+
uid: ID!
18+
name: String!
19+
description: String
20+
) {
21+
renameRequisitionListOutput
22+
}
23+
}
24+
```
25+
26+
## Example usage
27+
28+
The following example renames the `Frequently Ordered Products` requisition list and updates its description.
29+
30+
**Request:**
31+
32+
```graphql
33+
mutation {
34+
renameRequisitionList(
35+
uid: "4"
36+
name: "Frequently Ordered Essential Products",
37+
description: "Frequently ordered essential products list"
38+
) {
39+
list {
40+
uid
41+
name
42+
description
43+
}
44+
}
45+
}
46+
```
47+
48+
**Response:**
49+
50+
```json
51+
{
52+
"data": {
53+
"renameRequisitionList": {
54+
"list": {
55+
"uid": "4",
56+
"name": "Frequently Ordered Essential Products",
57+
"description": "Frequently ordered essential products list"
58+
}
59+
}
60+
}
61+
}
62+
```
63+
64+
## Input attributes
65+
66+
The `renameRequisitionList` mutation requires the following input.
67+
68+
Attribute | Data Type | Description
69+
--- | --- | ---
70+
`description`| String | Description of the customer's requisition list
71+
`name` | String! | The name of the customer's requisition list
72+
`uid` | ID! | The ID of the new requisition list
73+
74+
## Output attributes
75+
76+
The `renameRequisitionListOutput` object returns the `uid` of the new requisition list as well as the input attributes.
77+
78+
Attribute | Data Type | Description
79+
--- | --- | ---
80+
`description` | String | The requisition list description
81+
`name` | String! | The requisition list name
82+
`uid` | ID! | The ID of the new requisition list
83+
84+
## Related topics
85+
86+
* [createRequisitionList mutation]({{page.baseurl}}/graphql/mutations/create-requisition-list.html)
87+
* [deleteRequisitionList mutation]({{page.baseurl}}/graphql/mutations/delete-requisition-list.html)

0 commit comments

Comments
 (0)