25 August 2023
CartsOrdersGraphQL
With the addition of
perMethodExternalTaxRate on LineItemDraft, you can now set individual external Tax Rates for multiple Shipping Methods within a Line Item. Previously, you had to issue the Set LineItem Tax Rate update action for each Shipping Method.Changes:
- [API] Added the
perMethodExternalTaxRatefield to LineItemDraft. - [API] Added the
MethodExternalTaxRateDrafttype to the Carts API. - [GraphQL API] Added the following types to the GraphQL schema:
MethodExternalTaxRateDraft,MethodExternalTaxRateDraftOutput. - [GraphQL API] Changed the
LineItemDraftOutputtype:- Added the
perMethodExternalTaxRatefield to theLineItemDraftOutputtype.
- Added the
- [GraphQL API] Changed the
AddStagedOrderLineItemtype:- Input field
perMethodExternalTaxRatewas added toAddStagedOrderLineItemtype.
- Input field
- [GraphQL API] Changed the
AddCartLineItemtype:- Input field
perMethodExternalTaxRatewas added toAddCartLineItemtype.
- Input field
The following changes were introduced in terms of GraphQL SDL:
extend type LineItemDraftOutput {
perMethodExternalTaxRate: [MethodExternalTaxRateDraftOutput!]!
}
extend input AddStagedOrderLineItem {
perMethodExternalTaxRate: [MethodExternalTaxRateDraft!] = []
}
extend input AddCartLineItem {
perMethodExternalTaxRate: [MethodExternalTaxRateDraft!] = []
}
input MethodExternalTaxRateDraft {
shippingMethodKey: String!
taxRate: ExternalTaxRateDraft
}
type MethodExternalTaxRateDraftOutput {
shippingMethodKey: String!
taxRate: ExternalTaxRateDraftOutput
}