fragment TaxBaseLine on TaxableObjectLine {
  sourceLine {
    __typename
    ... on CheckoutLine {
      id
      checkoutProductVariant: variant {
        id
        product {
          taxClass {
            id
            name
          }
        }
      }
    }
    ... on OrderLine {
      id
      orderProductVariant: variant {
        id
        product {
          taxClass {
            id
            name
          }
        }
      }
    }
  }
  quantity
  unitPrice {
    amount
  }
  totalPrice {
    amount
  }
}
fragment TaxDiscount on TaxableObjectDiscount {
  name
  amount {
    amount
  }
}

fragment TaxBase on TaxableObject {
  pricesEnteredWithTax
  currency
  channel {
    slug
  }
  discounts {
    ...TaxDiscount
  }
  address {
    ...Address
  }
  shippingPrice {
    amount
  }
  lines {
    ...TaxBaseLine
  }
  sourceObject {
    ... on Checkout {
      avataxEntityCode: metafield(key: "avataxEntityCode")
      user {
        id
      }
    }
    ... on Order {
      avataxEntityCode: metafield(key: "avataxEntityCode")
      user {
        id
      }
    }
  }
}
