From 97c8785bb00651aa91f749db71a8f4e65728d075 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Thu, 6 Aug 2020 14:27:48 -0500 Subject: [PATCH 1/5] GraphQL: Add support for downloadable/gift card products in customer orders --- .../graphql/customer-orders-output.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 882a5b00d34..6a6c8229ff1 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -144,6 +144,42 @@ Attribute | Data type | Description `amount` | Money! | The amount of the discount `label` | String! | A description of the discount +#### DownloadableItemsLinks attributes {#DownloadableItemsLinks} + +The `DownloadableProductLinks` object defines characteristics of a downloadable product. + +Attribute | Data type | Description +--- | --- | --- +`sort_order` | Int | A number indicating the sort order +`title`| String | The display name of the link +`uid` | ID! | A string that encodes option details + +#### DownloadableOrderItem attributes {#DownloadableOrderItem} + +The `DownloadableOrderItem` object implements the [`OrderItemInterface`](#OrderItemInterface). It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`downloadable_links` | [[DownloadableItemsLinks]](#DownloadableItemsLinks) | A list of downloadable links that are ordered from the downloadable product + +#### GiftCardItem attributes {#GiftCardItem} + +The `GiftCardItem` object contains selected buyer-entered gift card properties for an order item. + +Attribute | Data type | Description +--- | --- | --- +`message`| String | A message from the sender to the recipient +`recipient_name` | String | The gift card recipient name +`sender_name` | String | The gift card sender name + +#### GiftCardOrderItem attributes {#GiftCardOrderItem} + +The `DownloadableOrderItem` object implements the [`OrderItemInterface`](#OrderItemInterface). It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`gift_card` | [GiftCardItem](#GiftCardItem) | Selected gift card properties for an order item + #### Invoice attributes {#Invoice} The `Invoice` object provides details about a customer invoice. From cd72324fc8599183aeaa764cd9584324a5d2aa79 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Tue, 11 Aug 2020 14:25:23 -0500 Subject: [PATCH 2/5] Add new attributes --- .../graphql/customer-orders-output.md | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 6a6c8229ff1..b3dddcce802 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -144,6 +144,14 @@ Attribute | Data type | Description `amount` | Money! | The amount of the discount `label` | String! | A description of the discount +#### DownloadableCreditMemoItem attributes {#DownloadableCreditMemoItem} + +The `DownloadableCreditMemoItem` object implements the `CreditMemoItemInterface`. It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`downloadable_links` | [[DownloadableItemsLinks]](#DownloadableItemsLinks) | A list of downloadable links that were refunded from the downloadable product + #### DownloadableItemsLinks attributes {#DownloadableItemsLinks} The `DownloadableProductLinks` object defines characteristics of a downloadable product. @@ -154,32 +162,66 @@ Attribute | Data type | Description `title`| String | The display name of the link `uid` | ID! | A string that encodes option details +#### DownloadableInvoiceItem attributes {#DownloadableInvoiceItem} + +The `DownloadableInvoiceItem` object implements the [`InvoiceItemInterface`](#InvoiceItemInterface). It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`downloadable_links` | [[DownloadableItemsLinks]](#DownloadableItemsLinks) | A list of downloadable links that were invoiced from the downloadable product + #### DownloadableOrderItem attributes {#DownloadableOrderItem} The `DownloadableOrderItem` object implements the [`OrderItemInterface`](#OrderItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- -`downloadable_links` | [[DownloadableItemsLinks]](#DownloadableItemsLinks) | A list of downloadable links that are ordered from the downloadable product +`downloadable_links` | [[DownloadableItemsLinks]](#DownloadableItemsLinks) | A list of downloadable links that were ordered from the downloadable product #### GiftCardItem attributes {#GiftCardItem} -The `GiftCardItem` object contains selected buyer-entered gift card properties for an order item. +The `GiftCardItem` object contains selected buyer-entered gift card properties for an order item. Physical and virtual gift cards + +Attribute | Data type | Description +--- | --- | --- +`message`| String | A message provided by the sender to the recipient +`recipient_email` | String | The email provided for the recipient of a virtual gift card +`recipient_name` | String | The name provided for the recipient of a physical or virtual gift card +`sender_email` | String | The sender email provided for a virtual gift card +`sender_name` | String | The sender name provided for a physical or virtual gift card + +#### GiftCardCreditMemoItem attributes {#GiftCardOrderItem} + +The `GiftCardCreditMemoItem` object implements the `CreditMemoItemInterface`. It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`gift_card` | [GiftCardItem](#GiftCardItem) | Selected gift card properties for a refunded item + +#### GiftCardInvoiceItem attributes {#GiftCardInvoiceItem} + +The `GiftCardInvoiceItem` object implements the [`InvoiceItemInterface`](#InvoiceItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- -`message`| String | A message from the sender to the recipient -`recipient_name` | String | The gift card recipient name -`sender_name` | String | The gift card sender name +`gift_card` | [GiftCardItem](#GiftCardItem) | Selected gift card properties for an invoiced item #### GiftCardOrderItem attributes {#GiftCardOrderItem} -The `DownloadableOrderItem` object implements the [`OrderItemInterface`](#OrderItemInterface). It also defines the following attribute: +The `GiftCardOrderItem` object implements the [`OrderItemInterface`](#OrderItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- `gift_card` | [GiftCardItem](#GiftCardItem) | Selected gift card properties for an order item +#### GiftCardShipmentItem attributes {#GiftCardShipmentItem} + +The `GiftCardShipmentItem` object implements the [`ShipmentItemInterface`](#ShipmentItemInterface). It also defines the following attribute: + +Attribute | Data type | Description +--- | --- | --- +`gift_card` | [GiftCardItem](#GiftCardItem) | Selected gift card properties for a shipped item + #### Invoice attributes {#Invoice} The `Invoice` object provides details about a customer invoice. From 8cf7be7ade11e56457be414391ed1327ad29af65 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Tue, 11 Aug 2020 14:32:35 -0500 Subject: [PATCH 3/5] remove sentence fragment --- src/_includes/graphql/customer-orders-output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index b3dddcce802..188e46b0f76 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -180,7 +180,7 @@ Attribute | Data type | Description #### GiftCardItem attributes {#GiftCardItem} -The `GiftCardItem` object contains selected buyer-entered gift card properties for an order item. Physical and virtual gift cards +The `GiftCardItem` object contains selected buyer-entered gift card properties for an order item. Attribute | Data type | Description --- | --- | --- From 7dd425f76b86b5bd87be92433216934fdce5b618 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Wed, 12 Aug 2020 13:45:15 -0500 Subject: [PATCH 4/5] Add links to CreditMemoItemInterface --- src/_includes/graphql/customer-orders-output.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 33154cba95e..936be126323 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -65,7 +65,7 @@ The deprecated attributes were previously defined in the `CustomerOrder` object #### BundleCreditMemoItem attributes {#BundleCreditMemoItem} -The `BundleCreditMemoItem` object implements the [`CreditMemoInterface`](#CreditMemoInterface). It also defines the following attribute: +The `BundleCreditMemoItem` object implements the [`CreditMemoItemInterface`](#CreditMemoItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- @@ -116,7 +116,7 @@ Attribute | Data type | Description `number` | String! | The sequential credit memo number `total` | [CreditMemoTotal](#CreditMemoTotal) | Contains details about the total refunded amount -#### CreditMemoInterface attributes {#CreditMemoInterface} +#### CreditMemoItemInterface attributes {#CreditMemoItemInterface} The `CreditMemoItemInterface` describes a specific credit memo. @@ -131,7 +131,7 @@ Attribute | Data type | Description #### CreditMemoItem attributes {#CreditMemoItem} -The `CreditMemoItem` object implements the [`CreditMemoInterface`](#CreditMemoInterface). +The `CreditMemoItem` object implements the [`CreditMemoItemInterface`](#CreditMemoItemInterface). #### CreditMemoTotal attributes {#CreditMemoTotal} @@ -160,7 +160,7 @@ Attribute | Data type | Description #### DownloadableCreditMemoItem attributes {#DownloadableCreditMemoItem} -The `DownloadableCreditMemoItem` object implements the `CreditMemoItemInterface`. It also defines the following attribute: +The `DownloadableCreditMemoItem` object implements the [`CreditMemoItemInterface`](#CreditMemoItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- @@ -206,7 +206,7 @@ Attribute | Data type | Description #### GiftCardCreditMemoItem attributes {#GiftCardOrderItem} -The `GiftCardCreditMemoItem` object implements the `CreditMemoItemInterface`. It also defines the following attribute: +The `GiftCardCreditMemoItem` object implements the [`CreditMemoItemInterface`](#CreditMemoItemInterface). It also defines the following attribute: Attribute | Data type | Description --- | --- | --- From 85cb66295d654241a123ff18fedba48d82790e57 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Wed, 12 Aug 2020 14:30:28 -0500 Subject: [PATCH 5/5] Changes per 51839 --- .../graphql/customer-orders-output.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/_includes/graphql/customer-orders-output.md b/src/_includes/graphql/customer-orders-output.md index 936be126323..af9987d7a77 100644 --- a/src/_includes/graphql/customer-orders-output.md +++ b/src/_includes/graphql/customer-orders-output.md @@ -43,7 +43,7 @@ Attribute | Data type | Description --- | --- | --- `billing_address` | [OrderAddress](#OrderAddress) | The billing address for the order `carrier` | String | The shipping carrier for the order delivery -`comments` | [[CommentItem](#CommentItem)] | Comments on the order +`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the order `created_at` | String | Deprecated. Use the `order_date` attribute instead `credit_memos` | [[CreditMemo](#CreditMemo)] | Contains a list of credit memos for the order `grand_total` | Float | Deprecated. Use the `totals.grand_total` attribute instead @@ -54,7 +54,7 @@ Attribute | Data type | Description `number` | String! | The order number `order_date` | String! | The date the order was placed `order_number` | String! | Deprecated. Use the `number` attribute instead -`payment_methods` | [[PaymentMethod](#PaymentMethod)] | Payment details for the order +`payment_methods` | [[OrderPaymentMethod](#OrderPaymentMethod)] | Payment details for the order `shipments` | [[OrderShipment](#OrderShipment)] | Shipment list for the order `shipping_address` | [OrderAddress](#OrderAddress) | Shipping address for the order `shipping_method` | String | Shipping method for the order @@ -95,22 +95,13 @@ Attribute | Data type | Description --- | --- | --- `bundle_options` | [[ItemSelectedBundleOption]](#ItemSelectedBundleOption) | A list of bundle options that are assigned to the bundle product -#### CommentItem attributes {#CommentItem} - -The `CommentItem` object contains details about a comment applied to an order. - -Attribute | Data type | Description ---- | --- | --- -`message` | String!| The text of the message -`timestamp` | String! | The timestamp of the comment - #### CreditMemo attributes {#CreditMemo} The `CreditMemo` object contains details about credit memos applied to an order. Attribute | Data type | Description --- | --- | --- -`comments` | [[CommentItem](#CommentItem)] | Comments on the credit memo +`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the credit memo `id` | ID! | The unique ID of the credit memo `items` | [[CreditMemoItem](#CreditMemoItem)] | An array containing details about refunded items `number` | String! | The sequential credit memo number @@ -242,7 +233,7 @@ The `Invoice` object provides details about a customer invoice. Attribute | Data type | Description --- | --- | --- -`comments` | [[CommentItem](#CommentItem)] | Comments on the invoice +`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments on the invoice `id` | ID! | The internal ID of the invoice `items` | [[InvoiceItemInterface](#InvoiceItemInterface)]! | Contains details about invoiced products `number` | String! | The sequential number of the invoice @@ -364,14 +355,24 @@ Attribute | Data type | Description Attribute | Data type | Description --- | --- | --- -`id` | String! | The name of the option +`label` | String! | The name of the option `value` | String! | The value of the option +#### OrderPaymentMethod attributes {#OrderPaymentMethod} + +The OrderPaymentMethod data type contains details about the payment method used to pay for the order. + +Attribute | Data type | Description +--- | --- | --- +`additional_data` | [[KeyValue](#KeyValue)] | Additional data per payment method type +`name` | String! | The label that describes the payment method +`type` | String! | The payment method code that indicates how the order was paid for + #### OrderShipment attributes {#OrderShipment} Attribute | Data type | Description --- | --- | --- -`comments` | [[CommentItem](#CommentItem)] | Comments added to the shipment +`comments` | [[SalesCommentItem](#SalesCommentItem)] | Comments added to the shipment `id` | ID! | The unique ID of the shipment `items` | [[ShipmentItemInterface](#ShipmentItemInterface)] | Contains items included in the shipment `number` | String! | The sequential credit shipment number @@ -392,16 +393,6 @@ Attribute | Data type | Description `total_shipping` | Money! | The shipping costs for the order `total_tax` | Money! | The amount of tax applied to the order -#### PaymentMethod attributes {#PaymentMethod} - -The PaymentMethod data type contains details about the payment method used to pay for the order. - -Attribute | Data type | Description ---- | --- | --- -`additional_data` | [[KeyValue](#KeyValue)] | Additional data per payment method type -`name` | String! | The label that describes the payment method -`type` | String! | The payment method code that indicates how the order was paid for - #### RewardPoints attributes {#RewardPoints} The `RewardPoints` object provides details about the customer's reward points balance, history, and related information. @@ -460,6 +451,15 @@ Attribute | Data type | Description `balance_updates` | RewardPointsSubscriptionStatusesEnum! | Customer subscription status to 'Reward points balance updates' emails `points_expiration_notifications` | RewardPointsSubscriptionStatusesEnum! | Customer subscription status to 'Reward points expiration notifications' emails +#### SalesCommentItem attributes {#SalesCommentItem} + +The `SalesCommentItem` object contains details about a comment applied to an order. + +Attribute | Data type | Description +--- | --- | --- +`message` | String!| The text of the message +`timestamp` | String! | The timestamp of the comment + #### SalesItemOption attributes {#SalesItemOption} The `SalesItemOption` data type contains the ID and value for the selected or entered options.