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

GraphQL: Add gift message attributes to Cart #7441

Merged
merged 4 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/_includes/graphql/cart-object-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Attribute | Data Type | Description
--- | --- | ---
`applied_coupon` | [`AppliedCoupon`][AppliedCoupon] | Deprecated. Use `applied_coupons` instead
`applied_coupons` | [[`AppliedCoupon`]][AppliedCoupon] | An array of `AppliedCoupon` objects. Each object contains the `code` text attribute, which specifies the coupon code
`applied_gift_cards` | [[`AppliedGiftCard`]][AppliedGiftCard] | An array of `AppliedGiftCard` objects. An `AppliedGiftCard` object contains the `code` text attribute, which specifies the gift card code. `applied_gift_cards` is a Commerce-only attribute, defined in the GiftCardAccountGraphQl module
`applied_store_credit` | [`AppliedStoreCredit`][AppliedStoreCredit] | Contains store credit information applied to the cart. `applied_store_credit` is a Commerce-only attribute, defined in the CustomerBalanceGraphQl module
`available_payment_methods` | [[AvailablePaymentMethod]][AvailablePaymentMethod] | Available payment methods
`billing_address` | [BillingCartAddress][BillingCartAddress] | Contains the billing address specified in the customer's cart
`email` | String | The customer's email address
`gift_message` | [GiftMessage][GiftMessage] | A gift message added to the cart
`id` | ID! | The ID of the cart
`is_virtual` | Boolean! | Indicates whether the cart contains only virtual products
`items` | [[CartItemInterface]][CartItemInterface] | Contains the items in the customer's cart
`prices` | [CartPrices][CartPrices] | Contains subtotals and totals
`selected_payment_method` | [SelectedPaymentMethod][SelectedPaymentMethod] | Selected payment method
`shipping_addresses` | [[ShippingCartAddress]][ShippingCartAddress]! | Contains one or more shipping addresses
`total_quantity` | Float! | Total Quantity of products in the cart

[AppliedCoupon]: {{page.baseurl}}/graphql/queries/cart.html#AppliedCoupon
[AppliedGiftCard]: {{page.baseurl}}/graphql/queries/cart.html#AppliedGiftCard
[AppliedStoreCredit]: {{page.baseurl}}/graphql/queries/cart.html#AppliedStoreCredit
[AvailablePaymentMethod]: {{page.baseurl}}/graphql/queries/cart.html#AvailablePaymentMethod
[BillingCartAddress]: {{page.baseurl}}/graphql/queries/cart.html#BillingCartAddress
[CartItemInterface]: {{page.baseurl}}/graphql/queries/cart.html#CartItemInterface
[CartPrices]: {{page.baseurl}}/graphql/queries/cart.html#CartPrices
[GiftMessage]: {{page.baseurl}}/graphql/queries/cart.html#GiftMessage
[SelectedPaymentMethod]: {{page.baseurl}}/graphql/queries/cart.html#SelectedPaymentMethod
[ShippingCartAddress]: {{page.baseurl}}/graphql/queries/cart.html#ShippingCartAddress
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/add-bundle-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

## Errors

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/add-simple-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/add-virtual-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/apply-coupon.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/apply-giftcard.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/apply-store-credit.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ The PayflowProResponseOutput contains a `Cart` object.

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/merge-carts.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/remove-coupon.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/remove-giftcard.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/remove-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

## Errors

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/remove-store-credit.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/reorder-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/set-billing-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/set-guest-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/set-payment-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/set-shipping-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/set-shipping-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/update-cart-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Attribute | Data Type | Description

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.

Expand Down
12 changes: 11 additions & 1 deletion src/guides/v2.4/graphql/queries/cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ The top-level `Cart` object is listed first. All interfaces and child objects ar

The `Cart` object can contain the following attributes.

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

### AppliedCoupon object {#AppliedCoupon}

Expand Down Expand Up @@ -748,6 +748,16 @@ Attribute | Data Type | Description
`amount` | Money! | The amount of the discount applied to the cart
`label` | String! | The description of the discount

### GiftMessage object {#GiftMessage}

The `GiftMessage` object must contain the following attributes.

Attribute | Data Type | Description
--- | --- | ---
`from` | String! | Identifies the sender
`message` | String! | The gift message text
`to` | String! | Identifies the recipient

### SelectedPaymentMethod object {#SelectedPaymentMethod}

The `SelectedPaymentMethod` object can contain the following attributes.
Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/queries/customer-cart.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ The `customerCart` query returns the `Cart` object.

### Cart object {#CartObject}

{% include graphql/cart-object.md %}
{% include graphql/cart-object-24.md %}

[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.