Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Deprecation of lines, shipping and adjustment fields in the RefundOrderInput input. #3119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
22 changes: 10 additions & 12 deletions packages/core/src/api/schema/admin-api/order.api.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,12 @@ input CancelOrderInput {
}

input RefundOrderInput {
lines: [OrderLineInput!]!
shipping: Money!
adjustment: Money!
lines: [OrderLineInput!] @deprecated(reason: "Use the `amount` field instead")
shipping: Money @deprecated(reason: "Use the `amount` field instead")
adjustment: Money @deprecated(reason: "Use the `amount` field instead")
"""
If an amount is specified, this value will be used to create a Refund rather than calculating the
amount automatically. This was added in v2.2 and will be the preferred way to specify the refund
amount in the future. The `lines`, `shipping` and `adjustment` fields will likely be removed in a future
version.
The amount to be refunded to this particular payment. This was introduced in v2.2.0 as the preferred way to specify the refund amount.
Can be as much as the total amount of the payment minus the sum of all previous refunds.
"""
amount: Money
paymentId: ID!
Expand Down Expand Up @@ -410,28 +408,28 @@ type ManualPaymentStateError implements ErrorResult {

union TransitionOrderToStateResult = Order | OrderStateTransitionError
union SettlePaymentResult =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatic formatting. Will revert this if necessary.

Payment
| Payment
| SettlePaymentError
| PaymentStateTransitionError
| OrderStateTransitionError
union CancelPaymentResult = Payment | CancelPaymentError | PaymentStateTransitionError
union AddFulfillmentToOrderResult =
Fulfillment
| Fulfillment
| EmptyOrderLineSelectionError
| ItemsAlreadyFulfilledError
| InsufficientStockOnHandError
| InvalidFulfillmentHandlerError
| FulfillmentStateTransitionError
| CreateFulfillmentError
union CancelOrderResult =
Order
| Order
| EmptyOrderLineSelectionError
| QuantityTooGreatError
| MultipleOrderError
| CancelActiveOrderError
| OrderStateTransitionError
union RefundOrderResult =
Refund
| Refund
| QuantityTooGreatError
| NothingToRefundError
| OrderStateTransitionError
Expand All @@ -445,7 +443,7 @@ union SettleRefundResult = Refund | RefundStateTransitionError
union TransitionFulfillmentToStateResult = Fulfillment | FulfillmentStateTransitionError
union TransitionPaymentToStateResult = Payment | PaymentStateTransitionError
union ModifyOrderResult =
Order
| Order
| NoChangesSpecifiedError
| OrderModificationStateError
| PaymentMethodMissingError
Expand Down
Loading