import { AdjustmentReason } from "avatax/lib/enums/AdjustmentReason";
import { BoundaryLevel } from "avatax/lib/enums/BoundaryLevel";
import { ChargedTo } from "avatax/lib/enums/ChargedTo";
import { DocumentStatus } from "avatax/lib/enums/DocumentStatus";
import { DocumentType } from "avatax/lib/enums/DocumentType";
import { JurisTypeId } from "avatax/lib/enums/JurisTypeId";
import { JurisdictionType } from "avatax/lib/enums/JurisdictionType";
import { LiabilityType } from "avatax/lib/enums/LiabilityType";
import { RateType } from "avatax/lib/enums/RateType";
import { TransactionModel } from "avatax/lib/models/TransactionModel";
import { AvataxCalculateTaxesMapPayloadArgs } from "./avatax-calculate-taxes-map";

const NO_SHIPPING_TRANSACTION_MOCK: TransactionModel = {
  id: 0,
  code: "30ddd987-ed4a-49f1-bba1-ec555e417511",
  companyId: 7799660,
  date: new Date(),
  paymentDate: new Date(),
  status: DocumentStatus.Temporary,
  type: DocumentType.SalesOrder,
  batchCode: "",
  currencyCode: "USD",
  exchangeRateCurrencyCode: "USD",
  customerUsageType: "",
  entityUseCode: "",
  customerVendorCode: "VXNlcjoyMDg0NTEwNDEw",
  customerCode: "VXNlcjoyMDg0NTEwNDEw",
  exemptNo: "",
  reconciled: false,
  locationCode: "",
  reportingLocationCode: "",
  purchaseOrderNo: "",
  referenceCode: "",
  salespersonCode: "",
  totalAmount: 199.17,
  totalExempt: 0,
  totalDiscount: 0,
  totalTax: 18.92,
  totalTaxable: 199.17,
  totalTaxCalculated: 18.92,
  adjustmentReason: AdjustmentReason.NotAdjusted,
  locked: false,
  version: 1,
  exchangeRateEffectiveDate: new Date(),
  exchangeRate: 1,
  modifiedDate: new Date(),
  modifiedUserId: 6479978,
  taxDate: new Date(),
  lines: [
    {
      id: 0,
      transactionId: 0,
      lineNumber: "1",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "",
      lineAmount: 80,
      quantity: 4,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 7.6,
      taxableAmount: 80,
      taxCalculated: 7.6,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: false,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 4.8,
          taxableAmount: 80,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 4.8,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 80,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 4.8,
          reportingTaxCalculated: 4.8,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.2,
          taxableAmount: 80,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.2,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 80,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.2,
          reportingTaxCalculated: 0.2,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 1.8,
          taxableAmount: 80,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 1.8,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 80,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 1.8,
          reportingTaxCalculated: 1.8,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.8,
          taxableAmount: 80,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.8,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 80,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.8,
          reportingTaxCalculated: 0.8,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
    {
      id: 0,
      transactionId: 0,
      lineNumber: "2",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "",
      lineAmount: 60,
      quantity: 3,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 5.7,
      taxableAmount: 60,
      taxCalculated: 5.7,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: false,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 3.6,
          taxableAmount: 60,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 3.6,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 60,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 3.6,
          reportingTaxCalculated: 3.6,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.15,
          taxableAmount: 60,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.15,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 60,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.15,
          reportingTaxCalculated: 0.15,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 1.35,
          taxableAmount: 60,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 1.35,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 60,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 1.35,
          reportingTaxCalculated: 1.35,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.6,
          taxableAmount: 60,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.6,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 60,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.6,
          reportingTaxCalculated: 0.6,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
  ],
  addresses: [
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "123 Palm Grove Ln",
      line2: "",
      line3: "",
      city: "LOS ANGELES",
      region: "CA",
      postalCode: "90002",
      country: "US",
      taxRegionId: 4017056,
      latitude: "33.948712",
      longitude: "-118.245951",
    },
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "8559 Lake Avenue",
      line2: "",
      line3: "",
      city: "New York",
      region: "NY",
      postalCode: "10001",
      country: "US",
      taxRegionId: 2088629,
      latitude: "40.748481",
      longitude: "-73.993125",
    },
  ],
  summary: [
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.State,
      jurisCode: "06",
      jurisName: "CALIFORNIA",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA STATE TAX",
      rateType: RateType.General,
      taxable: 199.17,
      rate: 0.06,
      tax: 11.95,
      taxCalculated: 11.95,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.County,
      jurisCode: "037",
      jurisName: "LOS ANGELES",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA COUNTY TAX",
      rateType: RateType.General,
      taxable: 199.17,
      rate: 0.0025,
      tax: 0.5,
      taxCalculated: 0.5,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMTC0",
      jurisName: "LOS ANGELES CO LOCAL TAX SL",
      taxAuthorityType: 45,
      stateAssignedNo: "19",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 199.17,
      rate: 0.01,
      tax: 1.99,
      taxCalculated: 1.99,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMAR0",
      jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
      taxAuthorityType: 45,
      stateAssignedNo: "594",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 199.17,
      rate: 0.0225,
      tax: 4.48,
      taxCalculated: 4.48,
      nonTaxable: 0,
      exemption: 0,
    },
  ],
};

const TAXABLE_TAX_INCLUDED_TRANSACTION_MOCK: TransactionModel = {
  id: 0,
  code: "8fc875ce-a929-4556-9f30-0165b1597d9f",
  companyId: 7799640,
  date: new Date(),
  paymentDate: new Date(),
  status: DocumentStatus.Temporary,
  type: DocumentType.SalesOrder,
  batchCode: "",
  currencyCode: "USD",
  exchangeRateCurrencyCode: "USD",
  customerUsageType: "",
  entityUseCode: "",
  customerVendorCode: "VXNlcjoyMDg0NTEwNDEw",
  customerCode: "VXNlcjoyMDg0NTEwNDEw",
  exemptNo: "",
  reconciled: false,
  locationCode: "",
  reportingLocationCode: "",
  purchaseOrderNo: "",
  referenceCode: "",
  salespersonCode: "",
  totalAmount: 107.31,
  totalExempt: 0,
  totalDiscount: 0,
  totalTax: 10.2,
  totalTaxable: 107.31,
  totalTaxCalculated: 10.2,
  adjustmentReason: AdjustmentReason.NotAdjusted,
  locked: false,
  version: 1,
  exchangeRateEffectiveDate: new Date(),
  exchangeRate: 1,
  modifiedDate: new Date(),
  modifiedUserId: 6479978,
  taxDate: new Date(),
  lines: [
    {
      id: 0,
      transactionId: 0,
      lineNumber: "1",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "",
      lineAmount: 36.53,
      quantity: 2,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 3.47,
      taxableAmount: 36.53,
      taxCalculated: 3.47,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: true,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 2.19,
          taxableAmount: 36.53,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 2.19,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 36.53,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 2.19,
          reportingTaxCalculated: 2.19,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.09,
          taxableAmount: 36.53,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.09,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 36.53,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.09,
          reportingTaxCalculated: 0.09,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 0.82,
          taxableAmount: 36.53,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.82,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 36.53,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.82,
          reportingTaxCalculated: 0.82,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.37,
          taxableAmount: 36.53,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.37,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 36.53,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.37,
          reportingTaxCalculated: 0.37,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
    {
      id: 0,
      transactionId: 0,
      lineNumber: "2",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "Shipping",
      lineAmount: 70.78,
      quantity: 1,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 6.73,
      taxableAmount: 70.78,
      taxCalculated: 6.73,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: true,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 4.25,
          taxableAmount: 70.78,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 4.25,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 70.78,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 4.25,
          reportingTaxCalculated: 4.25,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.18,
          taxableAmount: 70.78,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.18,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 70.78,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.18,
          reportingTaxCalculated: 0.18,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 1.59,
          taxableAmount: 70.78,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 1.59,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 70.78,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 1.59,
          reportingTaxCalculated: 1.59,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.71,
          taxableAmount: 70.78,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.71,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 70.78,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.71,
          reportingTaxCalculated: 0.71,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
  ],
  addresses: [
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "123 Palm Grove Ln",
      line2: "",
      line3: "",
      city: "LOS ANGELES",
      region: "CA",
      postalCode: "90002",
      country: "US",
      taxRegionId: 4017056,
      latitude: "33.948712",
      longitude: "-118.245951",
    },
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "8559 Lake Avenue",
      line2: "",
      line3: "",
      city: "New York",
      region: "NY",
      postalCode: "10001",
      country: "US",
      taxRegionId: 2088629,
      latitude: "40.748481",
      longitude: "-73.993125",
    },
  ],
  summary: [
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.State,
      jurisCode: "06",
      jurisName: "CALIFORNIA",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA STATE TAX",
      rateType: RateType.General,
      taxable: 107.31,
      rate: 0.06,
      tax: 6.44,
      taxCalculated: 6.44,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.County,
      jurisCode: "037",
      jurisName: "LOS ANGELES",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA COUNTY TAX",
      rateType: RateType.General,
      taxable: 107.31,
      rate: 0.0025,
      tax: 0.27,
      taxCalculated: 0.27,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMTC0",
      jurisName: "LOS ANGELES CO LOCAL TAX SL",
      taxAuthorityType: 45,
      stateAssignedNo: "19",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 107.31,
      rate: 0.01,
      tax: 1.08,
      taxCalculated: 1.08,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMAR0",
      jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
      taxAuthorityType: 45,
      stateAssignedNo: "594",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 107.31,
      rate: 0.0225,
      tax: 2.41,
      taxCalculated: 2.41,
      nonTaxable: 0,
      exemption: 0,
    },
  ],
};

const NON_TAXABLE_TRANSACTION_MOCK: TransactionModel = {
  id: 0,
  code: "d431d046-f0b4-4eb3-a412-b2405323d148",
  companyId: 7799640,
  date: new Date(),
  paymentDate: new Date(),
  status: DocumentStatus.Temporary,
  type: DocumentType.SalesOrder,
  batchCode: "",
  currencyCode: "USD",
  exchangeRateCurrencyCode: "USD",
  customerUsageType: "",
  entityUseCode: "",
  customerVendorCode: "VXNlcjoyMDg0NTEwNDEx",
  customerCode: "VXNlcjoyMDg0NTEwNDEx",
  exemptNo: "",
  reconciled: false,
  locationCode: "",
  reportingLocationCode: "",
  purchaseOrderNo: "",
  referenceCode: "",
  salespersonCode: "",
  totalAmount: 97.51,
  totalExempt: 97.51,
  totalDiscount: 0,
  totalTax: 0,
  totalTaxable: 0,
  totalTaxCalculated: 0,
  adjustmentReason: AdjustmentReason.NotAdjusted,
  locked: false,
  version: 1,
  exchangeRateEffectiveDate: new Date(),
  exchangeRate: 1,
  modifiedDate: new Date(),
  modifiedUserId: 6479978,
  taxDate: new Date(),
  lines: [
    {
      id: 0,
      transactionId: 0,
      lineNumber: "1",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 20,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: false,
      itemCode: "",
      lineAmount: 20,
      quantity: 1,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 0,
      taxableAmount: 0,
      taxCalculated: 0,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: true,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "DE",
          exemptAmount: 0,
          jurisCode: "10",
          jurisName: "DELAWARE",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 20,
          rate: 0,
          tax: 0,
          taxableAmount: 0,
          taxType: "Sales",
          taxSubTypeId: "S",
          taxName: "DE STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 0,
          reportingNonTaxableUnits: 20,
          reportingExemptUnits: 0,
          reportingTax: 0,
          reportingTaxCalculated: 0,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
    {
      id: 0,
      transactionId: 0,
      lineNumber: "2",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 77.51,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: false,
      itemCode: "Shipping",
      lineAmount: 77.51,
      quantity: 1,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 0,
      taxableAmount: 0,
      taxCalculated: 0,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: true,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "DE",
          exemptAmount: 0,
          jurisCode: "10",
          jurisName: "DELAWARE",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 77.51,
          rate: 0,
          tax: 0,
          taxableAmount: 0,
          taxType: "Sales",
          taxSubTypeId: "S",
          taxName: "DE STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 0,
          reportingNonTaxableUnits: 77.51,
          reportingExemptUnits: 0,
          reportingTax: 0,
          reportingTaxCalculated: 0,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
  ],
  addresses: [
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Address,
      line1: "38774 Apple Ct",
      line2: "",
      line3: "",
      city: "OCEAN VIEW",
      region: "DE",
      postalCode: "19970",
      country: "US",
      taxRegionId: 4014271,
      latitude: "38.58276",
      longitude: "-75.074325",
    },
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "8559 Lake Avenue",
      line2: "",
      line3: "",
      city: "New York",
      region: "NY",
      postalCode: "10001",
      country: "US",
      taxRegionId: 2088629,
      latitude: "40.748481",
      longitude: "-73.993125",
    },
  ],
  summary: [
    {
      country: "US",
      region: "DE",
      jurisType: JurisdictionType.State,
      jurisCode: "10",
      jurisName: "DELAWARE",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Sales",
      taxSubType: "S",
      taxName: "DE STATE TAX",
      rateType: RateType.General,
      taxable: 0,
      rate: 0,
      tax: 0,
      taxCalculated: 0,
      nonTaxable: 97.51,
      exemption: 0,
    },
  ],
};

const TAXABLE_TAX_NOT_INCLUDED_TRANSACTION_MOCK: TransactionModel = {
  id: 0,
  code: "393b71d9-a102-4726-bba4-061832f526a2",
  companyId: 7799660,
  date: new Date(),
  paymentDate: new Date(),
  status: DocumentStatus.Temporary,
  type: DocumentType.SalesOrder,
  batchCode: "",
  currencyCode: "USD",
  exchangeRateCurrencyCode: "USD",
  customerUsageType: "",
  entityUseCode: "",
  customerVendorCode: "VXNlcjoyMDg0NTEwNDEw",
  customerCode: "VXNlcjoyMDg0NTEwNDEw",
  exemptNo: "",
  reconciled: false,
  locationCode: "",
  reportingLocationCode: "",
  purchaseOrderNo: "",
  referenceCode: "",
  salespersonCode: "",
  totalAmount: 117.51,
  totalExempt: 0,
  totalDiscount: 0,
  totalTax: 11.16,
  totalTaxable: 117.51,
  totalTaxCalculated: 11.16,
  adjustmentReason: AdjustmentReason.NotAdjusted,
  locked: false,
  version: 1,
  exchangeRateEffectiveDate: new Date(),
  exchangeRate: 1,
  modifiedDate: new Date(),
  modifiedUserId: 6479978,
  taxDate: new Date(),
  lines: [
    {
      id: 0,
      transactionId: 0,
      lineNumber: "1",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "",
      lineAmount: 40,
      quantity: 2,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 3.8,
      taxableAmount: 40,
      taxCalculated: 3.8,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: false,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 2.4,
          taxableAmount: 40,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 2.4,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 40,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 2.4,
          reportingTaxCalculated: 2.4,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.1,
          taxableAmount: 40,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.1,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 40,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.1,
          reportingTaxCalculated: 0.1,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 0.9,
          taxableAmount: 40,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.9,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 40,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.9,
          reportingTaxCalculated: 0.9,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.4,
          taxableAmount: 40,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.4,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 40,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.4,
          reportingTaxCalculated: 0.4,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
    {
      id: 0,
      transactionId: 0,
      lineNumber: "2",
      customerUsageType: "",
      entityUseCode: "",
      discountAmount: 0,
      exemptAmount: 0,
      exemptCertId: 0,
      exemptNo: "",
      isItemTaxable: true,
      itemCode: "Shipping",
      lineAmount: 77.51,
      quantity: 1,
      ref1: "",
      ref2: "",
      reportingDate: new Date(),
      tax: 7.36,
      taxableAmount: 77.51,
      taxCalculated: 7.36,
      taxCode: "P0000000",
      taxCodeId: 8087,
      taxDate: new Date(),
      taxIncluded: false,
      details: [
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "06",
          jurisName: "CALIFORNIA",
          stateAssignedNo: "",
          jurisType: JurisTypeId.STA,
          jurisdictionType: JurisdictionType.State,
          nonTaxableAmount: 0,
          rate: 0.06,
          tax: 4.65,
          taxableAmount: 77.51,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA STATE TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 4.65,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 77.51,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 4.65,
          reportingTaxCalculated: 4.65,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "037",
          jurisName: "LOS ANGELES",
          stateAssignedNo: "",
          jurisType: JurisTypeId.CTY,
          jurisdictionType: JurisdictionType.County,
          nonTaxableAmount: 0,
          rate: 0.0025,
          tax: 0.19,
          taxableAmount: 77.51,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA COUNTY TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.19,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 77.51,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.19,
          reportingTaxCalculated: 0.19,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMAR0",
          jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
          stateAssignedNo: "594",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.0225,
          tax: 1.74,
          taxableAmount: 77.51,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 1.74,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 77.51,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 1.74,
          reportingTaxCalculated: 1.74,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
        {
          id: 0,
          transactionLineId: 0,
          transactionId: 0,
          country: "US",
          region: "CA",
          exemptAmount: 0,
          jurisCode: "EMTC0",
          jurisName: "LOS ANGELES CO LOCAL TAX SL",
          stateAssignedNo: "19",
          jurisType: JurisTypeId.STJ,
          jurisdictionType: JurisdictionType.Special,
          nonTaxableAmount: 0,
          rate: 0.01,
          tax: 0.78,
          taxableAmount: 77.51,
          taxType: "Use",
          taxSubTypeId: "U",
          taxName: "CA SPECIAL TAX",
          taxAuthorityTypeId: 45,
          taxCalculated: 0.78,
          rateType: RateType.General,
          rateTypeCode: "G",
          unitOfBasis: "PerCurrencyUnit",
          isNonPassThru: false,
          isFee: false,
          reportingTaxableUnits: 77.51,
          reportingNonTaxableUnits: 0,
          reportingExemptUnits: 0,
          reportingTax: 0.78,
          reportingTaxCalculated: 0.78,
          liabilityType: LiabilityType.Seller,
          chargedTo: ChargedTo.Buyer,
        },
      ],
      nonPassthroughDetails: [],
      hsCode: "",
      costInsuranceFreight: 0,
      vatCode: "",
      vatNumberTypeId: 0,
    },
  ],
  addresses: [
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "123 Palm Grove Ln",
      line2: "",
      line3: "",
      city: "LOS ANGELES",
      region: "CA",
      postalCode: "90002",
      country: "US",
      taxRegionId: 4017056,
      latitude: "33.948712",
      longitude: "-118.245951",
    },
    {
      id: 0,
      transactionId: 0,
      boundaryLevel: BoundaryLevel.Zip5,
      line1: "8559 Lake Avenue",
      line2: "",
      line3: "",
      city: "New York",
      region: "NY",
      postalCode: "10001",
      country: "US",
      taxRegionId: 2088629,
      latitude: "40.748481",
      longitude: "-73.993125",
    },
  ],
  summary: [
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.State,
      jurisCode: "06",
      jurisName: "CALIFORNIA",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA STATE TAX",
      rateType: RateType.General,
      taxable: 117.51,
      rate: 0.06,
      tax: 7.05,
      taxCalculated: 7.05,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.County,
      jurisCode: "037",
      jurisName: "LOS ANGELES",
      taxAuthorityType: 45,
      stateAssignedNo: "",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA COUNTY TAX",
      rateType: RateType.General,
      taxable: 117.51,
      rate: 0.0025,
      tax: 0.29,
      taxCalculated: 0.29,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMTC0",
      jurisName: "LOS ANGELES CO LOCAL TAX SL",
      taxAuthorityType: 45,
      stateAssignedNo: "19",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 117.51,
      rate: 0.01,
      tax: 1.18,
      taxCalculated: 1.18,
      nonTaxable: 0,
      exemption: 0,
    },
    {
      country: "US",
      region: "CA",
      jurisType: JurisdictionType.Special,
      jurisCode: "EMAR0",
      jurisName: "LOS ANGELES COUNTY DISTRICT TAX SP",
      taxAuthorityType: 45,
      stateAssignedNo: "594",
      taxType: "Use",
      taxSubType: "U",
      taxName: "CA SPECIAL TAX",
      rateType: RateType.General,
      taxable: 117.51,
      rate: 0.0225,
      tax: 2.64,
      taxCalculated: 2.64,
      nonTaxable: 0,
      exemption: 0,
    },
  ],
};

const MOCKED_CALCULATE_TAXES_ARGS: AvataxCalculateTaxesMapPayloadArgs = {
  taxBase: {
    pricesEnteredWithTax: false,
    currency: "PLN",
    channel: {
      slug: "channel-pln",
    },
    sourceObject: {
      __typename: "Order",
      user: {
        id: "VXNlcjo5ZjY3ZjY0Zi1iZjY5LTQ5ZjYtYjQ4Zi1iZjY3ZjY0ZjY0ZjY=",
      },
    },
    discounts: [],
    address: {
      streetAddress1: "123 Palm Grove Ln",
      streetAddress2: "",
      city: "LOS ANGELES",
      country: {
        code: "US",
      },
      countryArea: "CA",
      postalCode: "90002",
    },
    shippingPrice: {
      amount: 48.33,
    },
    lines: [
      {
        quantity: 3,
        unitPrice: {
          amount: 84,
        },
        totalPrice: {
          amount: 252,
        },
        sourceLine: {
          __typename: "OrderLine",
          id: "T3JkZXJMaW5lOmY1NGQ1MWY2LTc1OTctNGY2OC1hNDk0LTFjYjZlYjRmOTlhMQ==",
          variant: {
            id: "UHJvZHVjdFZhcmlhbnQ6MzQ2",
            product: {
              metafield: null,
              productType: {
                metafield: null,
              },
            },
          },
        },
      },
      {
        quantity: 1,
        unitPrice: {
          amount: 5.99,
        },
        totalPrice: {
          amount: 5.99,
        },
        sourceLine: {
          __typename: "OrderLine",
          id: "T3JkZXJMaW5lOjU1NTFjNTFjLTM5MWQtNGI0Ny04MGU0LWVjY2Q5ZjU4MjQyNQ==",
          variant: {
            id: "UHJvZHVjdFZhcmlhbnQ6Mzg1",
            product: {
              metafield: null,
              productType: {
                metafield: null,
              },
            },
          },
        },
      },
    ],
  },
  channel: {
    providerInstanceId: "b8c29f49-7cae-4762-8458-e9a27eb83081",
    enabled: false,
    address: {
      country: "US",
      zip: "92093",
      state: "17-05-2023",
      city: "La Jolla",
      street: "9500 Gilman Drive",
    },
  },
  config: {
    companyCode: "DEFAULT",
    isAutocommit: false,
    isSandbox: true,
    name: "Avatax-1",
    password: "password",
    username: "username",
    shippingTaxCode: "FR000000",
  },
};

export const transactionModelMocks = {
  taxable: {
    taxIncluded: TAXABLE_TAX_INCLUDED_TRANSACTION_MOCK,
    taxNotIncluded: TAXABLE_TAX_NOT_INCLUDED_TRANSACTION_MOCK,
  },
  nonTaxable: NON_TAXABLE_TRANSACTION_MOCK,
  noShippingLine: NO_SHIPPING_TRANSACTION_MOCK,
};

export const mapPayloadArgsMocks = {
  default: MOCKED_CALCULATE_TAXES_ARGS,
};
