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
GraphQL: Merge requisition lists docs into 2.4.2-develop #8428
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9982f26
Added documentation for copy, move and delete requisition list items …
sathiyaaa 56f0035
8341 requisition list mutations (#8354)
chiranjeevi-cj 95d845b
issue-8376-made the requested changes (#8381)
dineshvb 3fbf9ca
GraphQL: Requisition list updates (#8408)
keharper 3f4e853
Update StoreConfig attribute name
keharper ea10503
Update examples
keharper 9a6136e
Update deleteReqList output
keharper b3cc0e8
Update deleteReqList output
keharper 869ef84
Fit & finish
keharper 7047fa4
Merge branch '2.4.2-develop' into requisition-lists
keharper 4ae2013
Reviewer comments
keharper dcbcc6f
Merge branch 'requisition-lists' of github.com:magento/devdocs into r…
keharper 95d05d0
Corrected deleteReqList output
keharper cd80bcc
Fix merge conflicts
keharper c9c1257
Update rel notes
keharper 65638a2
linting
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
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,20 @@ | ||
The `RequisitionList` object contains the following attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`description` | String | Optional text that describes the requisition list | ||
`items` | [RequistionListItems](#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 | ||
`uid` | ID! | The unique requisition list ID | ||
`updated_at` | String | The time of the last modification of the requisition list | ||
|
||
### RequistionListItems attributes {#RequistionListItems} | ||
|
||
The `RequistionListItems` object contains the following attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`items` | [[RequisitionListItemInterface]!]({{page.baseurl}}/graphql/interfaces/requisition-list-item-interface.html) | An array of items in the requisition list | ||
`page_info` | SearchResultPageInfo | Contains pagination metadata | ||
`total_pages` | Int! | The number of pages returned |
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
160 changes: 160 additions & 0 deletions
160
src/guides/v2.4/graphql/interfaces/requisition-list-item-interface.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,160 @@ | ||
--- | ||
group: graphql | ||
title: RequisitionListItemInterface attributes and implementations | ||
b2b_only: true | ||
--- | ||
|
||
`RequisitionListItemInterface` provides details about items in a requisition list. It has the following implementations: | ||
|
||
* [`BundleRequisitionListItem`](#BundleRequisitionListItem) | ||
* [`ConfigurableRequisitionListItem`](#ConfigurableRequisitionListItem) | ||
* [`DownloadableRequisitionListItem`](#DownloadableRequisitionListItem) | ||
* [`GiftCardRequisitionListItem`](#GiftCardRequisitionListItem) | ||
* [`SimpleRequisitionListItem`](#SimpleRequisitionListItem) | ||
* [`VirtualRequisitionListItem`](#VirtualRequisitionListItem) | ||
|
||
{:.bs-callout-info} | ||
There is not an implementation for grouped products. The items within a grouped product are managed individually. | ||
|
||
## Attributes | ||
|
||
The `RequisitionListItemInterface` defines the following attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`customizable_options` | [SelectedCustomizableOption] | Selected custom options for an item in the requisition list | ||
`product` | [ProductInterface!]({{page.baseurl}}/graphql/interfaces/product-interface.html) | Contains details about an item added to a requisition list | ||
`quantity` | Float! | The amount added | ||
`uid` | ID! | The unique ID for the requisition list item | ||
|
||
## Implementations | ||
|
||
### BundleRequisitionListItem attributes {#BundleRequisitionListItem} | ||
|
||
The `BundleRequisitionListItem` implementation adds the following attribute. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`bundle_options`| [SelectedBundleOption]! | An array of selected options for a bundle product | ||
|
||
### ConfigurableRequisitionListItem attributes {#ConfigurableRequisitionListItem} | ||
|
||
The `ConfigurableRequisitionListItem` implementation adds the following attribute. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`configurable_options`| [SelectedConfigurableOption] | Selected configurable options for an item in the requisition list | ||
|
||
### DownloadableRequisitionListItem attributes {#DownloadableRequisitionListItem} | ||
|
||
The `ConfigurableRequisitionListItem` implementation adds the following attributes. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`links`| [DownloadableProductLinks] | An array of links for downloadable products in the requisition list | ||
`samples` | [DownloadableProductSamples] | An array of links to downloadable product samples | ||
|
||
### GiftCardRequisitionListItem attributes {#GiftCardRequisitionListItem} | ||
|
||
The `GiftCardRequisitionListItem` implementation adds the following attribute. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`gift_card_options` | GiftCardOptions! | An array that defines gift card properties | ||
|
||
#### GiftCardOptions attributes {#GiftCardOptions} | ||
|
||
The GiftCardOptions object provides details about a gift card. All attributes are optional for a requisition list. | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`amount`| Money | The amount and currency of the gift card | ||
`custom_giftcard_amount` | Money | The custom amount and currency of the gift card | ||
`message` | String | A message to the recipient | ||
`recipient_email` | String | The name of the person receiving the gift card | ||
`sender_email` | String | The email address of the person sending the gift card | ||
`sender_name` | String | The name of the person sending the gift card | ||
|
||
### SimpleRequisitionListItem attributes {#SimpleRequisitionListItem} | ||
|
||
The SimpleRequisitionListItem data type does not provide additional attributes to the `RequisitionListItemInterface`. | ||
|
||
### VirtualRequisitionListItem attributes {#VirtualRequisitionListItem} | ||
|
||
The VirtualRequisitionListItem data type does not provide additional attributes to the `RequisitionListItemInterface`. | ||
|
||
## Example usage | ||
|
||
The following mutation adds a product to a requisition list and returns information about the products in the list. | ||
|
||
**Request:** | ||
|
||
```graphql | ||
mutation { | ||
addProductsToRequisitionList( | ||
requisitionListUid: "Mg==" | ||
requisitionListItems: [ | ||
{ | ||
sku: "MS10" | ||
quantity: 1 | ||
selected_options: ["Y29uZmlndXJhYmxlLzkzLzUw","Y29uZmlndXJhYmxlLzE2MC8xNjg"] | ||
} | ||
] | ||
) { | ||
requisition_list { | ||
uid | ||
items { | ||
items { | ||
... on RequisitionListItemInterface { | ||
uid | ||
product { | ||
uid | ||
sku | ||
name | ||
} | ||
quantity | ||
} | ||
} | ||
} | ||
items_count | ||
} | ||
} | ||
} | ||
``` | ||
|
||
**Response:** | ||
|
||
```json | ||
{ | ||
"data": { | ||
"addProductsToRequisitionList": { | ||
"requisition_list": { | ||
"uid": "Mg==", | ||
"items": { | ||
"items": [ | ||
{ | ||
"uid": "Mg==", | ||
"product": { | ||
"uid": "MTA=", | ||
"sku": "24-WB05", | ||
"name": "Savvy Shoulder Tote" | ||
}, | ||
"quantity": 1 | ||
}, | ||
{ | ||
"uid": "Mw==", | ||
"product": { | ||
"uid": "NTk2", | ||
"sku": "MS10", | ||
"name": "Logan HeatTec® Tee" | ||
}, | ||
"quantity": 1 | ||
} | ||
] | ||
}, | ||
"items_count": 2 | ||
} | ||
} | ||
} | ||
} | ||
``` |
Oops, something went wrong.
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.