Skip to content

Commit

Permalink
fix(core): Added deprecation notices to the old refund input fields (#…
Browse files Browse the repository at this point in the history
…3119)

+ Added documentation to the new refund amount value
  • Loading branch information
sonntag-philipp authored Nov 14, 2024
1 parent f61e070 commit 7324bb3
Showing 1 changed file with 10 additions and 12 deletions.
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 =
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

0 comments on commit 7324bb3

Please sign in to comment.