orderEditAddLineItemDiscount mutation
Add a discount to an item added during this order edit.
Required access
write_order_edits
access scope.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
discount
(
OrderEditAppliedDiscountInput!
)
required
|
The discount to apply to the line item. |
id
(
ID!
)
required
|
The ID of the calculated order to add the discount to. |
lineItemId
(
ID!
)
required
|
The ID of a line item added during this edit to add the discount to. |
OrderEditAppliedDiscountInput fields
-
description (
String
)The description of the discount.
-
fixedValue (
MoneyInput
)The value of the discount as a fixed amount.
-
percentValue (
Float
)The value of the discount as a percentage.
Return fields
-
addedDiscountStagedChange (
OrderStagedChangeAddLineItemDiscount
)The staged change produced by this mutation.
-
calculatedLineItem (
CalculatedLineItem
)The line item with the discount applied.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a discount to an item added during this order edit.
Required access
write_order_edits
access scope.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
discount
(
OrderEditAppliedDiscountInput!
)
required
|
The discount to apply to the line item. |
id
(
ID!
)
required
|
The ID of the calculated order to add the discount to. |
lineItemId
(
ID!
)
required
|
The ID of a line item added during this edit to add the discount to. |
OrderEditAppliedDiscountInput fields
-
description (
String
)The description of the discount.
-
fixedValue (
MoneyInput
)The value of the discount as a fixed amount.
-
percentValue (
Float
)The value of the discount as a percentage.
Return fields
-
addedDiscountStagedChange (
OrderStagedChangeAddLineItemDiscount
)The staged change produced by this mutation.
-
calculatedLineItem (
CalculatedLineItem
)The line item with the discount applied.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a discount to an item added during this order edit.
Required access
write_order_edits
access scope.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
discount
(
OrderEditAppliedDiscountInput!
)
required
|
The discount to apply to the line item. |
id
(
ID!
)
required
|
The ID of the calculated order to add the discount to. |
lineItemId
(
ID!
)
required
|
The ID of a line item added during this edit to add the discount to. |
OrderEditAppliedDiscountInput fields
-
description (
String
)The description of the discount.
-
fixedValue (
MoneyInput
)The value of the discount as a fixed amount.
-
percentValue (
Float
)The value of the discount as a percentage.
Return fields
-
addedDiscountStagedChange (
OrderStagedChangeAddLineItemDiscount
)The staged change produced by this mutation.
-
calculatedLineItem (
CalculatedLineItem
)The line item with the discount applied.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a discount to an item added during this order edit.
Required access
write_order_edits
access scope.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
discount
(
OrderEditAppliedDiscountInput!
)
required
|
The discount to apply to the line item. |
id
(
ID!
)
required
|
The ID of the calculated order to add the discount to. |
lineItemId
(
ID!
)
required
|
The ID of a line item added during this edit to add the discount to. |
OrderEditAppliedDiscountInput fields
-
description (
String
)The description of the discount.
-
fixedValue (
MoneyInput
)The value of the discount as a fixed amount.
-
percentValue (
Float
)The value of the discount as a percentage.
Return fields
-
addedDiscountStagedChange (
OrderStagedChangeAddLineItemDiscount
)The staged change produced by this mutation.
-
calculatedLineItem (
CalculatedLineItem
)The line item with the discount applied.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.