DX STF Client API

<back to all web services

GetInvoiceById

Invoice Requests

Invoice

Requires Authentication
The following routes are available for this service:
GET/api/invoice/{Id}Get specific invoice by Invoice Id
import 'package:servicestack/servicestack.dart';

// @DataContract
class DocumentIdentification implements IConvertible
{
    // @DataMember(Name="identifier")
    String identifier = "";

    // @DataMember(Name="type")
    String type = "";

    // @DataMember(Name="creationDateAndTime")
    DateTime creationDateAndTime = DateTime(0);

    DocumentIdentification({this.identifier,this.type,this.creationDateAndTime});
    DocumentIdentification.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        identifier = json['identifier'];
        type = json['type'];
        creationDateAndTime = JsonConverters.fromJson(json['creationDateAndTime'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'identifier': identifier,
        'type': type,
        'creationDateAndTime': JsonConverters.toJson(creationDateAndTime,'DateTime',context!)
    };

    getTypeName() => "DocumentIdentification";
    TypeContext? context = _ctx;
}

// @DataContract
class Identifier implements IConvertible
{
    // @DataMember(Name="authority")
    String authority = "";

    // @DataMember(Name="text")
    String text = "";

    Identifier({this.authority,this.text});
    Identifier.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        authority = json['authority'];
        text = json['text'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'authority': authority,
        'text': text
    };

    getTypeName() => "Identifier";
    TypeContext? context = _ctx;
}

// @DataContract
class ContactInformation implements IConvertible
{
    ContactInformation();
    ContactInformation.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ContactInformation";
    TypeContext? context = _ctx;
}

// @DataContract
class Partner implements IConvertible
{
    // @DataMember(Name="identifier")
    Identifier identifier;

    // @DataMember(Name="contactInformation")
    List<ContactInformation> contactInformation = [];

    Partner({this.identifier,this.contactInformation});
    Partner.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        identifier = JsonConverters.fromJson(json['identifier'],'Identifier',context!);
        contactInformation = JsonConverters.fromJson(json['contactInformation'],'List<ContactInformation>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'identifier': JsonConverters.toJson(identifier,'Identifier',context!),
        'contactInformation': JsonConverters.toJson(contactInformation,'List<ContactInformation>',context!)
    };

    getTypeName() => "Partner";
    TypeContext? context = _ctx;
}

// @DataContract
class Header implements IConvertible
{
    // @DataMember(Name="documentIdentification")
    DocumentIdentification documentIdentification;

    // @DataMember(Name="sender")
    Partner sender;

    // @DataMember(Name="receiver")
    Partner receiver;

    Header({this.documentIdentification,this.sender,this.receiver});
    Header.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        documentIdentification = JsonConverters.fromJson(json['documentIdentification'],'DocumentIdentification',context!);
        sender = JsonConverters.fromJson(json['sender'],'Partner',context!);
        receiver = JsonConverters.fromJson(json['receiver'],'Partner',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'documentIdentification': JsonConverters.toJson(documentIdentification,'DocumentIdentification',context!),
        'sender': JsonConverters.toJson(sender,'Partner',context!),
        'receiver': JsonConverters.toJson(receiver,'Partner',context!)
    };

    getTypeName() => "Header";
    TypeContext? context = _ctx;
}

enum DocumentAction
{
    ADD,
    CHANGE_BY_REFRESH,
    DELETE,
    REJECTED,
}

enum DocumentStatus
{
    ADDITIONAL_TRANSMISSION,
    COPY,
    ORIGINAL,
}

class AvpList implements IConvertible
{
    String code = "";
    String value = "";

    AvpList({this.code,this.value});
    AvpList.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        value = json['value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'value': value
    };

    getTypeName() => "AvpList";
    TypeContext? context = _ctx;
}

class BaseDocument implements IConvertible
{
    String currencyCode = "";
    DateTime creationDateTime = DateTime(0);
    DocumentAction documentActionCode;
    DocumentStatus documentStatusCode;
    String documentStructureVersion = "";
    DateTime? lastUpdateDateTime;
    int? revisionNumber;
    List<AvpList> avpList = [];

    BaseDocument({this.currencyCode,this.creationDateTime,this.documentActionCode,this.documentStatusCode,this.documentStructureVersion,this.lastUpdateDateTime,this.revisionNumber,this.avpList});
    BaseDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        currencyCode = json['currencyCode'];
        creationDateTime = JsonConverters.fromJson(json['creationDateTime'],'DateTime',context!);
        documentActionCode = JsonConverters.fromJson(json['documentActionCode'],'DocumentAction',context!);
        documentStatusCode = JsonConverters.fromJson(json['documentStatusCode'],'DocumentStatus',context!);
        documentStructureVersion = json['documentStructureVersion'];
        lastUpdateDateTime = JsonConverters.fromJson(json['lastUpdateDateTime'],'DateTime',context!);
        revisionNumber = json['revisionNumber'];
        avpList = JsonConverters.fromJson(json['avpList'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'currencyCode': currencyCode,
        'creationDateTime': JsonConverters.toJson(creationDateTime,'DateTime',context!),
        'documentActionCode': JsonConverters.toJson(documentActionCode,'DocumentAction',context!),
        'documentStatusCode': JsonConverters.toJson(documentStatusCode,'DocumentStatus',context!),
        'documentStructureVersion': documentStructureVersion,
        'lastUpdateDateTime': JsonConverters.toJson(lastUpdateDateTime,'DateTime',context!),
        'revisionNumber': revisionNumber,
        'avpList': JsonConverters.toJson(avpList,'List<AvpList>',context!)
    };

    getTypeName() => "BaseDocument";
    TypeContext? context = _ctx;
}

class Ecom_PartyIdentificationType implements IConvertible
{
    String gln = "";
    String name = "";
    List<AvpList> additionalPartyIdentification = [];

    Ecom_PartyIdentificationType({this.gln,this.name,this.additionalPartyIdentification});
    Ecom_PartyIdentificationType.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        gln = json['gln'];
        name = json['name'];
        additionalPartyIdentification = JsonConverters.fromJson(json['additionalPartyIdentification'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'gln': gln,
        'name': name,
        'additionalPartyIdentification': JsonConverters.toJson(additionalPartyIdentification,'List<AvpList>',context!)
    };

    getTypeName() => "Ecom_PartyIdentificationType";
    TypeContext? context = _ctx;
}

class CommunicationChannel implements IConvertible
{
    String communicationChannelCode = "";
    String communicationChannelName = "";
    String communicationValue = "";

    CommunicationChannel({this.communicationChannelCode,this.communicationChannelName,this.communicationValue});
    CommunicationChannel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        communicationChannelCode = json['communicationChannelCode'];
        communicationChannelName = json['communicationChannelName'];
        communicationValue = json['communicationValue'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'communicationChannelCode': communicationChannelCode,
        'communicationChannelName': communicationChannelName,
        'communicationValue': communicationValue
    };

    getTypeName() => "CommunicationChannel";
    TypeContext? context = _ctx;
}

class Contact implements IConvertible
{
    String contactTypeCode = "";
    String personName = "";
    String departmentName = "";
    String jobTitle = "";
    String responsibility = "";
    List<CommunicationChannel> communicationChannel = [];

    Contact({this.contactTypeCode,this.personName,this.departmentName,this.jobTitle,this.responsibility,this.communicationChannel});
    Contact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        contactTypeCode = json['contactTypeCode'];
        personName = json['personName'];
        departmentName = json['departmentName'];
        jobTitle = json['jobTitle'];
        responsibility = json['responsibility'];
        communicationChannel = JsonConverters.fromJson(json['communicationChannel'],'List<CommunicationChannel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'contactTypeCode': contactTypeCode,
        'personName': personName,
        'departmentName': departmentName,
        'jobTitle': jobTitle,
        'responsibility': responsibility,
        'communicationChannel': JsonConverters.toJson(communicationChannel,'List<CommunicationChannel>',context!)
    };

    getTypeName() => "Contact";
    TypeContext? context = _ctx;
}

class Address implements IConvertible
{
    String streetAddressOne = "";
    String streetAddressTwo = "";
    String streetAddressThree = "";
    String city = "";
    String postalCode = "";
    String provinceCode = "";
    String countryCode = "";

    Address({this.streetAddressOne,this.streetAddressTwo,this.streetAddressThree,this.city,this.postalCode,this.provinceCode,this.countryCode});
    Address.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        streetAddressOne = json['streetAddressOne'];
        streetAddressTwo = json['streetAddressTwo'];
        streetAddressThree = json['streetAddressThree'];
        city = json['city'];
        postalCode = json['postalCode'];
        provinceCode = json['provinceCode'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'streetAddressOne': streetAddressOne,
        'streetAddressTwo': streetAddressTwo,
        'streetAddressThree': streetAddressThree,
        'city': city,
        'postalCode': postalCode,
        'provinceCode': provinceCode,
        'countryCode': countryCode
    };

    getTypeName() => "Address";
    TypeContext? context = _ctx;
}

class FinancialRoutingNumber implements IConvertible
{
    String number = "";
    String numberTypeCode = "";

    FinancialRoutingNumber({this.number,this.numberTypeCode});
    FinancialRoutingNumber.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        number = json['number'];
        numberTypeCode = json['numberTypeCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'number': number,
        'numberTypeCode': numberTypeCode
    };

    getTypeName() => "FinancialRoutingNumber";
    TypeContext? context = _ctx;
}

class FinancialAccount implements IConvertible
{
    String number = "";
    String numberTypeCode = "";
    String name = "";

    FinancialAccount({this.number,this.numberTypeCode,this.name});
    FinancialAccount.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        number = json['number'];
        numberTypeCode = json['numberTypeCode'];
        name = json['name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'number': number,
        'numberTypeCode': numberTypeCode,
        'name': name
    };

    getTypeName() => "FinancialAccount";
    TypeContext? context = _ctx;
}

class FinancialInstitutionInformation implements IConvertible
{
    String financialInstitutionBranchName = "";
    String financialInstitutionName = "";
    FinancialRoutingNumber financialRoutingNumber;
    FinancialAccount financialAccount;
    String swiftCode = "";
    String exportersCode = "";

    FinancialInstitutionInformation({this.financialInstitutionBranchName,this.financialInstitutionName,this.financialRoutingNumber,this.financialAccount,this.swiftCode,this.exportersCode});
    FinancialInstitutionInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        financialInstitutionBranchName = json['financialInstitutionBranchName'];
        financialInstitutionName = json['financialInstitutionName'];
        financialRoutingNumber = JsonConverters.fromJson(json['financialRoutingNumber'],'FinancialRoutingNumber',context!);
        financialAccount = JsonConverters.fromJson(json['financialAccount'],'FinancialAccount',context!);
        swiftCode = json['swiftCode'];
        exportersCode = json['exportersCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'financialInstitutionBranchName': financialInstitutionBranchName,
        'financialInstitutionName': financialInstitutionName,
        'financialRoutingNumber': JsonConverters.toJson(financialRoutingNumber,'FinancialRoutingNumber',context!),
        'financialAccount': JsonConverters.toJson(financialAccount,'FinancialAccount',context!),
        'swiftCode': swiftCode,
        'exportersCode': exportersCode
    };

    getTypeName() => "FinancialInstitutionInformation";
    TypeContext? context = _ctx;
}

class TransactionalParty extends Ecom_PartyIdentificationType implements IConvertible
{
    List<Contact> contact = [];
    Address address;
    List<AvpList> communicationChannel = [];
    FinancialInstitutionInformation financialInstitutionInformation;
    String dutyFeeTaxRegistration = "";
    String entityIdentification = "";

    TransactionalParty({this.contact,this.address,this.communicationChannel,this.financialInstitutionInformation,this.dutyFeeTaxRegistration,this.entityIdentification});
    TransactionalParty.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        contact = JsonConverters.fromJson(json['contact'],'List<Contact>',context!);
        address = JsonConverters.fromJson(json['address'],'Address',context!);
        communicationChannel = JsonConverters.fromJson(json['communicationChannel'],'List<AvpList>',context!);
        financialInstitutionInformation = JsonConverters.fromJson(json['financialInstitutionInformation'],'FinancialInstitutionInformation',context!);
        dutyFeeTaxRegistration = json['dutyFeeTaxRegistration'];
        entityIdentification = json['entityIdentification'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'contact': JsonConverters.toJson(contact,'List<Contact>',context!),
        'address': JsonConverters.toJson(address,'Address',context!),
        'communicationChannel': JsonConverters.toJson(communicationChannel,'List<AvpList>',context!),
        'financialInstitutionInformation': JsonConverters.toJson(financialInstitutionInformation,'FinancialInstitutionInformation',context!),
        'dutyFeeTaxRegistration': dutyFeeTaxRegistration,
        'entityIdentification': entityIdentification
    });

    getTypeName() => "TransactionalParty";
    TypeContext? context = _ctx;
}

class Invoice implements IConvertible
{
    DateTime? creationDate;
    int? revisionNumber;
    String entityIdentification = "";

    Invoice({this.creationDate,this.revisionNumber,this.entityIdentification});
    Invoice.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        creationDate = JsonConverters.fromJson(json['creationDate'],'DateTime',context!);
        revisionNumber = json['revisionNumber'];
        entityIdentification = json['entityIdentification'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'creationDate': JsonConverters.toJson(creationDate,'DateTime',context!),
        'revisionNumber': revisionNumber,
        'entityIdentification': entityIdentification
    };

    getTypeName() => "Invoice";
    TypeContext? context = _ctx;
}

class DocumentReference implements IConvertible
{
    DateTime? creationDateTime;
    int? revisionNumber;
    int? lineItemNumber;
    String entityIdentification = "";

    DocumentReference({this.creationDateTime,this.revisionNumber,this.lineItemNumber,this.entityIdentification});
    DocumentReference.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        creationDateTime = JsonConverters.fromJson(json['creationDateTime'],'DateTime',context!);
        revisionNumber = json['revisionNumber'];
        lineItemNumber = json['lineItemNumber'];
        entityIdentification = json['entityIdentification'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'creationDateTime': JsonConverters.toJson(creationDateTime,'DateTime',context!),
        'revisionNumber': revisionNumber,
        'lineItemNumber': lineItemNumber,
        'entityIdentification': entityIdentification
    };

    getTypeName() => "DocumentReference";
    TypeContext? context = _ctx;
}

class ShipmentTransportationInformation implements IConvertible
{
    TransactionalParty carrier;
    TransactionalParty freightForwarder;

    ShipmentTransportationInformation({this.carrier,this.freightForwarder});
    ShipmentTransportationInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        carrier = JsonConverters.fromJson(json['carrier'],'TransactionalParty',context!);
        freightForwarder = JsonConverters.fromJson(json['freightForwarder'],'TransactionalParty',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'carrier': JsonConverters.toJson(carrier,'TransactionalParty',context!),
        'freightForwarder': JsonConverters.toJson(freightForwarder,'TransactionalParty',context!)
    };

    getTypeName() => "ShipmentTransportationInformation";
    TypeContext? context = _ctx;
}

class Quantity implements IConvertible
{
    double? value;
    String measurementUnitCode = "";
    String codeListVersion = "";

    Quantity({this.value,this.measurementUnitCode,this.codeListVersion});
    Quantity.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        value = JsonConverters.toDouble(json['value']);
        measurementUnitCode = json['measurementUnitCode'];
        codeListVersion = json['codeListVersion'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'value': value,
        'measurementUnitCode': measurementUnitCode,
        'codeListVersion': codeListVersion
    };

    getTypeName() => "Quantity";
    TypeContext? context = _ctx;
}

class TransactionalItem implements IConvertible
{
    String measurementUnitCode = "";
    String measurementType = "";
    String measurementValue = "";

    TransactionalItem({this.measurementUnitCode,this.measurementType,this.measurementValue});
    TransactionalItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        measurementUnitCode = json['measurementUnitCode'];
        measurementType = json['measurementType'];
        measurementValue = json['measurementValue'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'measurementUnitCode': measurementUnitCode,
        'measurementType': measurementType,
        'measurementValue': measurementValue
    };

    getTypeName() => "TransactionalItem";
    TypeContext? context = _ctx;
}

class SerialNumberRange implements IConvertible
{
    String maximumValue = "";
    String minimumValue = "";

    SerialNumberRange({this.maximumValue,this.minimumValue});
    SerialNumberRange.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        maximumValue = json['maximumValue'];
        minimumValue = json['minimumValue'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'maximumValue': maximumValue,
        'minimumValue': minimumValue
    };

    getTypeName() => "SerialNumberRange";
    TypeContext? context = _ctx;
}

class TransactionalItemDimension implements IConvertible
{
    String measurementUnitCode = "";
    String depth = "";
    String height = "";
    String width = "";

    TransactionalItemDimension({this.measurementUnitCode,this.depth,this.height,this.width});
    TransactionalItemDimension.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        measurementUnitCode = json['measurementUnitCode'];
        depth = json['depth'];
        height = json['height'];
        width = json['width'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'measurementUnitCode': measurementUnitCode,
        'depth': depth,
        'height': height,
        'width': width
    };

    getTypeName() => "TransactionalItemDimension";
    TypeContext? context = _ctx;
}

class TransactionalItemLogisticUnitInformation implements IConvertible
{
    int? numberOfLayers;
    int? numberOfUnitsPerLayer;
    int? numberOfUnitsPerPallet;
    String packagingTerms = "";
    String packageTypeCode = "";
    int? maximumStackingFactor;
    String returnablePackageTransportCostPayment = "";
    List<TransactionalItemDimension> dimensionsOfLogisticUnit = [];

    TransactionalItemLogisticUnitInformation({this.numberOfLayers,this.numberOfUnitsPerLayer,this.numberOfUnitsPerPallet,this.packagingTerms,this.packageTypeCode,this.maximumStackingFactor,this.returnablePackageTransportCostPayment,this.dimensionsOfLogisticUnit});
    TransactionalItemLogisticUnitInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        numberOfLayers = json['numberOfLayers'];
        numberOfUnitsPerLayer = json['numberOfUnitsPerLayer'];
        numberOfUnitsPerPallet = json['numberOfUnitsPerPallet'];
        packagingTerms = json['packagingTerms'];
        packageTypeCode = json['packageTypeCode'];
        maximumStackingFactor = json['maximumStackingFactor'];
        returnablePackageTransportCostPayment = json['returnablePackageTransportCostPayment'];
        dimensionsOfLogisticUnit = JsonConverters.fromJson(json['dimensionsOfLogisticUnit'],'List<TransactionalItemDimension>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'numberOfLayers': numberOfLayers,
        'numberOfUnitsPerLayer': numberOfUnitsPerLayer,
        'numberOfUnitsPerPallet': numberOfUnitsPerPallet,
        'packagingTerms': packagingTerms,
        'packageTypeCode': packageTypeCode,
        'maximumStackingFactor': maximumStackingFactor,
        'returnablePackageTransportCostPayment': returnablePackageTransportCostPayment,
        'dimensionsOfLogisticUnit': JsonConverters.toJson(dimensionsOfLogisticUnit,'List<TransactionalItemDimension>',context!)
    };

    getTypeName() => "TransactionalItemLogisticUnitInformation";
    TypeContext? context = _ctx;
}

class TransactionalItemDataCarrierAndIdentification implements IConvertible
{
    String gs1TransactionalItemIdentificationKey = "";
    String dataCarrier = "";

    TransactionalItemDataCarrierAndIdentification({this.gs1TransactionalItemIdentificationKey,this.dataCarrier});
    TransactionalItemDataCarrierAndIdentification.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        gs1TransactionalItemIdentificationKey = json['gs1TransactionalItemIdentificationKey'];
        dataCarrier = json['dataCarrier'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'gs1TransactionalItemIdentificationKey': gs1TransactionalItemIdentificationKey,
        'dataCarrier': dataCarrier
    };

    getTypeName() => "TransactionalItemDataCarrierAndIdentification";
    TypeContext? context = _ctx;
}

class TradeItemWaste implements IConvertible
{
    String wasteIdentification = "";
    List<AvpList> typeOfWaste = [];

    TradeItemWaste({this.wasteIdentification,this.typeOfWaste});
    TradeItemWaste.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        wasteIdentification = json['wasteIdentification'];
        typeOfWaste = JsonConverters.fromJson(json['typeOfWaste'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'wasteIdentification': wasteIdentification,
        'typeOfWaste': JsonConverters.toJson(typeOfWaste,'List<AvpList>',context!)
    };

    getTypeName() => "TradeItemWaste";
    TypeContext? context = _ctx;
}

class TransactionalItemOrganicInformation implements IConvertible
{
    bool? isTradeItemOrganic;
    String organicCertification = "";

    TransactionalItemOrganicInformation({this.isTradeItemOrganic,this.organicCertification});
    TransactionalItemOrganicInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        isTradeItemOrganic = json['isTradeItemOrganic'];
        organicCertification = json['organicCertification'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'isTradeItemOrganic': isTradeItemOrganic,
        'organicCertification': organicCertification
    };

    getTypeName() => "TransactionalItemOrganicInformation";
    TypeContext? context = _ctx;
}

class TransactionalItemData implements IConvertible
{
    DateTime? availableForSaleDate;
    String batchNumber = "";
    DateTime? bestBeforeDate;
    String countryOfOrigin = "";
    DateTime? itemExpirationDate;
    String lotNumber = "";
    DateTime? packagingDate;
    DateTime? productionDate;
    String productQualityIndication = "";
    DateTime? sellByDate;
    List<String> serialNumber = [];
    String shelfLife = "";
    int? tradeItemQuantity;
    bool? itemInContactWithFoodProduct;
    List<TransactionalItem> transactionalItemWeight = [];
    List<TransactionalItem> transactionalItemVolume = [];
    List<SerialNumberRange> serialNumberRange = [];
    List<TransactionalItemDimension> transactionalItemDimensions = [];
    TransactionalItemLogisticUnitInformation transactionalItemLogisticUnitInformation;
    TransactionalItemDataCarrierAndIdentification transactionalItemDataCarrierAndIdentification;
    List<TradeItemWaste> tradeItemWaste = [];
    TransactionalItemOrganicInformation transactionalItemOrganicInformation;
    List<AvpList> avpList = [];

    TransactionalItemData({this.availableForSaleDate,this.batchNumber,this.bestBeforeDate,this.countryOfOrigin,this.itemExpirationDate,this.lotNumber,this.packagingDate,this.productionDate,this.productQualityIndication,this.sellByDate,this.serialNumber,this.shelfLife,this.tradeItemQuantity,this.itemInContactWithFoodProduct,this.transactionalItemWeight,this.transactionalItemVolume,this.serialNumberRange,this.transactionalItemDimensions,this.transactionalItemLogisticUnitInformation,this.transactionalItemDataCarrierAndIdentification,this.tradeItemWaste,this.transactionalItemOrganicInformation,this.avpList});
    TransactionalItemData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        availableForSaleDate = JsonConverters.fromJson(json['availableForSaleDate'],'DateTime',context!);
        batchNumber = json['batchNumber'];
        bestBeforeDate = JsonConverters.fromJson(json['bestBeforeDate'],'DateTime',context!);
        countryOfOrigin = json['countryOfOrigin'];
        itemExpirationDate = JsonConverters.fromJson(json['itemExpirationDate'],'DateTime',context!);
        lotNumber = json['lotNumber'];
        packagingDate = JsonConverters.fromJson(json['packagingDate'],'DateTime',context!);
        productionDate = JsonConverters.fromJson(json['productionDate'],'DateTime',context!);
        productQualityIndication = json['productQualityIndication'];
        sellByDate = JsonConverters.fromJson(json['sellByDate'],'DateTime',context!);
        serialNumber = JsonConverters.fromJson(json['serialNumber'],'List<String>',context!);
        shelfLife = json['shelfLife'];
        tradeItemQuantity = json['tradeItemQuantity'];
        itemInContactWithFoodProduct = json['itemInContactWithFoodProduct'];
        transactionalItemWeight = JsonConverters.fromJson(json['transactionalItemWeight'],'List<TransactionalItem>',context!);
        transactionalItemVolume = JsonConverters.fromJson(json['transactionalItemVolume'],'List<TransactionalItem>',context!);
        serialNumberRange = JsonConverters.fromJson(json['serialNumberRange'],'List<SerialNumberRange>',context!);
        transactionalItemDimensions = JsonConverters.fromJson(json['transactionalItemDimensions'],'List<TransactionalItemDimension>',context!);
        transactionalItemLogisticUnitInformation = JsonConverters.fromJson(json['transactionalItemLogisticUnitInformation'],'TransactionalItemLogisticUnitInformation',context!);
        transactionalItemDataCarrierAndIdentification = JsonConverters.fromJson(json['transactionalItemDataCarrierAndIdentification'],'TransactionalItemDataCarrierAndIdentification',context!);
        tradeItemWaste = JsonConverters.fromJson(json['tradeItemWaste'],'List<TradeItemWaste>',context!);
        transactionalItemOrganicInformation = JsonConverters.fromJson(json['transactionalItemOrganicInformation'],'TransactionalItemOrganicInformation',context!);
        avpList = JsonConverters.fromJson(json['avpList'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'availableForSaleDate': JsonConverters.toJson(availableForSaleDate,'DateTime',context!),
        'batchNumber': batchNumber,
        'bestBeforeDate': JsonConverters.toJson(bestBeforeDate,'DateTime',context!),
        'countryOfOrigin': countryOfOrigin,
        'itemExpirationDate': JsonConverters.toJson(itemExpirationDate,'DateTime',context!),
        'lotNumber': lotNumber,
        'packagingDate': JsonConverters.toJson(packagingDate,'DateTime',context!),
        'productionDate': JsonConverters.toJson(productionDate,'DateTime',context!),
        'productQualityIndication': productQualityIndication,
        'sellByDate': JsonConverters.toJson(sellByDate,'DateTime',context!),
        'serialNumber': JsonConverters.toJson(serialNumber,'List<String>',context!),
        'shelfLife': shelfLife,
        'tradeItemQuantity': tradeItemQuantity,
        'itemInContactWithFoodProduct': itemInContactWithFoodProduct,
        'transactionalItemWeight': JsonConverters.toJson(transactionalItemWeight,'List<TransactionalItem>',context!),
        'transactionalItemVolume': JsonConverters.toJson(transactionalItemVolume,'List<TransactionalItem>',context!),
        'serialNumberRange': JsonConverters.toJson(serialNumberRange,'List<SerialNumberRange>',context!),
        'transactionalItemDimensions': JsonConverters.toJson(transactionalItemDimensions,'List<TransactionalItemDimension>',context!),
        'transactionalItemLogisticUnitInformation': JsonConverters.toJson(transactionalItemLogisticUnitInformation,'TransactionalItemLogisticUnitInformation',context!),
        'transactionalItemDataCarrierAndIdentification': JsonConverters.toJson(transactionalItemDataCarrierAndIdentification,'TransactionalItemDataCarrierAndIdentification',context!),
        'tradeItemWaste': JsonConverters.toJson(tradeItemWaste,'List<TradeItemWaste>',context!),
        'transactionalItemOrganicInformation': JsonConverters.toJson(transactionalItemOrganicInformation,'TransactionalItemOrganicInformation',context!),
        'avpList': JsonConverters.toJson(avpList,'List<AvpList>',context!)
    };

    getTypeName() => "TransactionalItemData";
    TypeContext? context = _ctx;
}

class Colour implements IConvertible
{
    String colourCode = "";
    String colourDescription = "";

    Colour({this.colourCode,this.colourDescription});
    Colour.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        colourCode = json['colourCode'];
        colourDescription = json['colourDescription'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'colourCode': colourCode,
        'colourDescription': colourDescription
    };

    getTypeName() => "Colour";
    TypeContext? context = _ctx;
}

class Size implements IConvertible
{
    String descriptiveSize = "";
    String sizeCode = "";

    Size({this.descriptiveSize,this.sizeCode});
    Size.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        descriptiveSize = json['descriptiveSize'];
        sizeCode = json['sizeCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'descriptiveSize': descriptiveSize,
        'sizeCode': sizeCode
    };

    getTypeName() => "Size";
    TypeContext? context = _ctx;
}

class TradeItemClassification implements IConvertible
{
    String gpcCategoryCode = "";
    List<AvpList> additionalTradeItemClassificationCode = [];
    String gpcCategoryName = "";
    List<AvpList> gpcAttribute = [];

    TradeItemClassification({this.gpcCategoryCode,this.additionalTradeItemClassificationCode,this.gpcCategoryName,this.gpcAttribute});
    TradeItemClassification.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        gpcCategoryCode = json['gpcCategoryCode'];
        additionalTradeItemClassificationCode = JsonConverters.fromJson(json['additionalTradeItemClassificationCode'],'List<AvpList>',context!);
        gpcCategoryName = json['gpcCategoryName'];
        gpcAttribute = JsonConverters.fromJson(json['gpcAttribute'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'gpcCategoryCode': gpcCategoryCode,
        'additionalTradeItemClassificationCode': JsonConverters.toJson(additionalTradeItemClassificationCode,'List<AvpList>',context!),
        'gpcCategoryName': gpcCategoryName,
        'gpcAttribute': JsonConverters.toJson(gpcAttribute,'List<AvpList>',context!)
    };

    getTypeName() => "TradeItemClassification";
    TypeContext? context = _ctx;
}

class TransactionalTradeItem implements IConvertible
{
    String gtin = "";
    List<AvpList> additionalTradeItemIdentification = [];
    double? tradeItemQuantity;
    String tradeItemDescription = "";
    String productVariantIdentifier = "";
    String itemTypeCode = "";
    String tradeItemDataOwner = "";
    String butterFatReference = "";
    List<TransactionalItemData> transactionalItemData = [];
    List<Colour> colour = [];
    Size size;
    TradeItemClassification tradeItemClassification;
    List<AvpList> avpList = [];

    TransactionalTradeItem({this.gtin,this.additionalTradeItemIdentification,this.tradeItemQuantity,this.tradeItemDescription,this.productVariantIdentifier,this.itemTypeCode,this.tradeItemDataOwner,this.butterFatReference,this.transactionalItemData,this.colour,this.size,this.tradeItemClassification,this.avpList});
    TransactionalTradeItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        gtin = json['gtin'];
        additionalTradeItemIdentification = JsonConverters.fromJson(json['additionalTradeItemIdentification'],'List<AvpList>',context!);
        tradeItemQuantity = JsonConverters.toDouble(json['tradeItemQuantity']);
        tradeItemDescription = json['tradeItemDescription'];
        productVariantIdentifier = json['productVariantIdentifier'];
        itemTypeCode = json['itemTypeCode'];
        tradeItemDataOwner = json['tradeItemDataOwner'];
        butterFatReference = json['butterFatReference'];
        transactionalItemData = JsonConverters.fromJson(json['transactionalItemData'],'List<TransactionalItemData>',context!);
        colour = JsonConverters.fromJson(json['colour'],'List<Colour>',context!);
        size = JsonConverters.fromJson(json['size'],'Size',context!);
        tradeItemClassification = JsonConverters.fromJson(json['tradeItemClassification'],'TradeItemClassification',context!);
        avpList = JsonConverters.fromJson(json['avpList'],'List<AvpList>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'gtin': gtin,
        'additionalTradeItemIdentification': JsonConverters.toJson(additionalTradeItemIdentification,'List<AvpList>',context!),
        'tradeItemQuantity': tradeItemQuantity,
        'tradeItemDescription': tradeItemDescription,
        'productVariantIdentifier': productVariantIdentifier,
        'itemTypeCode': itemTypeCode,
        'tradeItemDataOwner': tradeItemDataOwner,
        'butterFatReference': butterFatReference,
        'transactionalItemData': JsonConverters.toJson(transactionalItemData,'List<TransactionalItemData>',context!),
        'colour': JsonConverters.toJson(colour,'List<Colour>',context!),
        'size': JsonConverters.toJson(size,'Size',context!),
        'tradeItemClassification': JsonConverters.toJson(tradeItemClassification,'TradeItemClassification',context!),
        'avpList': JsonConverters.toJson(avpList,'List<AvpList>',context!)
    };

    getTypeName() => "TransactionalTradeItem";
    TypeContext? context = _ctx;
}

class TaxInformation implements IConvertible
{
    double? taxPercentage;
    double? taxAmount;

    TaxInformation({this.taxPercentage,this.taxAmount});
    TaxInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        taxPercentage = JsonConverters.toDouble(json['taxPercentage']);
        taxAmount = JsonConverters.toDouble(json['taxAmount']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'taxPercentage': taxPercentage,
        'taxAmount': taxAmount
    };

    getTypeName() => "TaxInformation";
    TypeContext? context = _ctx;
}

class AllowanceCharge implements IConvertible
{
    double? allowanceChargeAmount;
    double? allowanceChargePercentage;
    String allowanceChargeType = "";
    String allowanceOrChargeType = "";
    double? amountPerUnit;
    double? baseAmount;
    String baseNumberOfUnits = "";
    String bracketIdentifier = "";
    DateTime? effectiveDateType;
    String sequenceNumber = "";
    String settlementType = "";
    String specialServiceType = "";
    String allowanceChargeDescription = "";

    AllowanceCharge({this.allowanceChargeAmount,this.allowanceChargePercentage,this.allowanceChargeType,this.allowanceOrChargeType,this.amountPerUnit,this.baseAmount,this.baseNumberOfUnits,this.bracketIdentifier,this.effectiveDateType,this.sequenceNumber,this.settlementType,this.specialServiceType,this.allowanceChargeDescription});
    AllowanceCharge.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        allowanceChargeAmount = JsonConverters.toDouble(json['allowanceChargeAmount']);
        allowanceChargePercentage = JsonConverters.toDouble(json['allowanceChargePercentage']);
        allowanceChargeType = json['allowanceChargeType'];
        allowanceOrChargeType = json['allowanceOrChargeType'];
        amountPerUnit = JsonConverters.toDouble(json['amountPerUnit']);
        baseAmount = JsonConverters.toDouble(json['baseAmount']);
        baseNumberOfUnits = json['baseNumberOfUnits'];
        bracketIdentifier = json['bracketIdentifier'];
        effectiveDateType = JsonConverters.fromJson(json['effectiveDateType'],'DateTime',context!);
        sequenceNumber = json['sequenceNumber'];
        settlementType = json['settlementType'];
        specialServiceType = json['specialServiceType'];
        allowanceChargeDescription = json['allowanceChargeDescription'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'allowanceChargeAmount': allowanceChargeAmount,
        'allowanceChargePercentage': allowanceChargePercentage,
        'allowanceChargeType': allowanceChargeType,
        'allowanceOrChargeType': allowanceOrChargeType,
        'amountPerUnit': amountPerUnit,
        'baseAmount': baseAmount,
        'baseNumberOfUnits': baseNumberOfUnits,
        'bracketIdentifier': bracketIdentifier,
        'effectiveDateType': JsonConverters.toJson(effectiveDateType,'DateTime',context!),
        'sequenceNumber': sequenceNumber,
        'settlementType': settlementType,
        'specialServiceType': specialServiceType,
        'allowanceChargeDescription': allowanceChargeDescription
    };

    getTypeName() => "AllowanceCharge";
    TypeContext? context = _ctx;
}

class InvoiceAllowanceCharge implements IConvertible
{
    AllowanceCharge allowanceCharge;
    TaxInformation leviedDutyFeeTax;

    InvoiceAllowanceCharge({this.allowanceCharge,this.leviedDutyFeeTax});
    InvoiceAllowanceCharge.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        allowanceCharge = JsonConverters.fromJson(json['allowanceCharge'],'AllowanceCharge',context!);
        leviedDutyFeeTax = JsonConverters.fromJson(json['leviedDutyFeeTax'],'TaxInformation',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'allowanceCharge': JsonConverters.toJson(allowanceCharge,'AllowanceCharge',context!),
        'leviedDutyFeeTax': JsonConverters.toJson(leviedDutyFeeTax,'TaxInformation',context!)
    };

    getTypeName() => "InvoiceAllowanceCharge";
    TypeContext? context = _ctx;
}

class Extension implements IConvertible
{
    Extension();
    Extension.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "Extension";
    TypeContext? context = _ctx;
}

class InvoiceLineItem implements IConvertible
{
    int? lineNumber;
    String parentLineItemNumber = "";
    Quantity invoicedQuantity;
    TransactionalTradeItem transactionalTradeItem;
    double? itemPriceBaseQuantity;
    double? retailPriceExcludingExcise;
    double? recommendedRetailPrice;
    TaxInformation taxInformation;
    double? amountExclusiveAllowancesCharges;
    double? amountInclusiveAllowancesCharges;
    double? itemPriceExclusiveAllowancesCharges;
    double? itemPriceInclusiveAllowancesCharges;
    String tradeAgreement = "";
    String deliveryNote = "";
    DocumentReference promotionalDeal;
    List<InvoiceAllowanceCharge> invoiceAllowanceCharge = [];
    Extension extendedProperties;

    InvoiceLineItem({this.lineNumber,this.parentLineItemNumber,this.invoicedQuantity,this.transactionalTradeItem,this.itemPriceBaseQuantity,this.retailPriceExcludingExcise,this.recommendedRetailPrice,this.taxInformation,this.amountExclusiveAllowancesCharges,this.amountInclusiveAllowancesCharges,this.itemPriceExclusiveAllowancesCharges,this.itemPriceInclusiveAllowancesCharges,this.tradeAgreement,this.deliveryNote,this.promotionalDeal,this.invoiceAllowanceCharge,this.extendedProperties});
    InvoiceLineItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        lineNumber = json['lineNumber'];
        parentLineItemNumber = json['parentLineItemNumber'];
        invoicedQuantity = JsonConverters.fromJson(json['invoicedQuantity'],'Quantity',context!);
        transactionalTradeItem = JsonConverters.fromJson(json['transactionalTradeItem'],'TransactionalTradeItem',context!);
        itemPriceBaseQuantity = JsonConverters.toDouble(json['itemPriceBaseQuantity']);
        retailPriceExcludingExcise = JsonConverters.toDouble(json['retailPriceExcludingExcise']);
        recommendedRetailPrice = JsonConverters.toDouble(json['recommendedRetailPrice']);
        taxInformation = JsonConverters.fromJson(json['taxInformation'],'TaxInformation',context!);
        amountExclusiveAllowancesCharges = JsonConverters.toDouble(json['amountExclusiveAllowancesCharges']);
        amountInclusiveAllowancesCharges = JsonConverters.toDouble(json['amountInclusiveAllowancesCharges']);
        itemPriceExclusiveAllowancesCharges = JsonConverters.toDouble(json['itemPriceExclusiveAllowancesCharges']);
        itemPriceInclusiveAllowancesCharges = JsonConverters.toDouble(json['itemPriceInclusiveAllowancesCharges']);
        tradeAgreement = json['tradeAgreement'];
        deliveryNote = json['deliveryNote'];
        promotionalDeal = JsonConverters.fromJson(json['promotionalDeal'],'DocumentReference',context!);
        invoiceAllowanceCharge = JsonConverters.fromJson(json['invoiceAllowanceCharge'],'List<InvoiceAllowanceCharge>',context!);
        extendedProperties = JsonConverters.fromJson(json['extendedProperties'],'Extension',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'lineNumber': lineNumber,
        'parentLineItemNumber': parentLineItemNumber,
        'invoicedQuantity': JsonConverters.toJson(invoicedQuantity,'Quantity',context!),
        'transactionalTradeItem': JsonConverters.toJson(transactionalTradeItem,'TransactionalTradeItem',context!),
        'itemPriceBaseQuantity': itemPriceBaseQuantity,
        'retailPriceExcludingExcise': retailPriceExcludingExcise,
        'recommendedRetailPrice': recommendedRetailPrice,
        'taxInformation': JsonConverters.toJson(taxInformation,'TaxInformation',context!),
        'amountExclusiveAllowancesCharges': amountExclusiveAllowancesCharges,
        'amountInclusiveAllowancesCharges': amountInclusiveAllowancesCharges,
        'itemPriceExclusiveAllowancesCharges': itemPriceExclusiveAllowancesCharges,
        'itemPriceInclusiveAllowancesCharges': itemPriceInclusiveAllowancesCharges,
        'tradeAgreement': tradeAgreement,
        'deliveryNote': deliveryNote,
        'promotionalDeal': JsonConverters.toJson(promotionalDeal,'DocumentReference',context!),
        'invoiceAllowanceCharge': JsonConverters.toJson(invoiceAllowanceCharge,'List<InvoiceAllowanceCharge>',context!),
        'extendedProperties': JsonConverters.toJson(extendedProperties,'Extension',context!)
    };

    getTypeName() => "InvoiceLineItem";
    TypeContext? context = _ctx;
}

class InvoiceTotals implements IConvertible
{
    double? baseAmount;
    double? prepaidAmount;
    DateTime? prepaidAmountDate;
    double? totalAmountInvoiceAllowancesCharges;
    double? totalLineAmountInclusiveAllowancesCharges;
    double? totalTaxAmount;
    double? totalInvoiceAmount;
    double? totalInvoiceAmountPayable;

    InvoiceTotals({this.baseAmount,this.prepaidAmount,this.prepaidAmountDate,this.totalAmountInvoiceAllowancesCharges,this.totalLineAmountInclusiveAllowancesCharges,this.totalTaxAmount,this.totalInvoiceAmount,this.totalInvoiceAmountPayable});
    InvoiceTotals.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        baseAmount = JsonConverters.toDouble(json['baseAmount']);
        prepaidAmount = JsonConverters.toDouble(json['prepaidAmount']);
        prepaidAmountDate = JsonConverters.fromJson(json['prepaidAmountDate'],'DateTime',context!);
        totalAmountInvoiceAllowancesCharges = JsonConverters.toDouble(json['totalAmountInvoiceAllowancesCharges']);
        totalLineAmountInclusiveAllowancesCharges = JsonConverters.toDouble(json['totalLineAmountInclusiveAllowancesCharges']);
        totalTaxAmount = JsonConverters.toDouble(json['totalTaxAmount']);
        totalInvoiceAmount = JsonConverters.toDouble(json['totalInvoiceAmount']);
        totalInvoiceAmountPayable = JsonConverters.toDouble(json['totalInvoiceAmountPayable']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'baseAmount': baseAmount,
        'prepaidAmount': prepaidAmount,
        'prepaidAmountDate': JsonConverters.toJson(prepaidAmountDate,'DateTime',context!),
        'totalAmountInvoiceAllowancesCharges': totalAmountInvoiceAllowancesCharges,
        'totalLineAmountInclusiveAllowancesCharges': totalLineAmountInclusiveAllowancesCharges,
        'totalTaxAmount': totalTaxAmount,
        'totalInvoiceAmount': totalInvoiceAmount,
        'totalInvoiceAmountPayable': totalInvoiceAmountPayable
    };

    getTypeName() => "InvoiceTotals";
    TypeContext? context = _ctx;
}

class InvoiceClass extends BaseDocument implements IConvertible
{
    String countryOfSupplyOfGoods = "";
    TransactionalParty buyer;
    TransactionalParty seller;
    TransactionalParty payee;
    TransactionalParty payer;
    TransactionalParty shipFrom;
    TransactionalParty shipTo;
    TransactionalParty ultimateConsignee;
    String supplierAccountReceivable = "";
    String invoiceIdentification = "";
    Invoice invoice;
    DocumentReference salesOrder;
    DocumentReference purchaseOrder;
    DocumentReference deliveryNote;
    DocumentReference tradeAgreement;
    ShipmentTransportationInformation shipmentTransportationInformation;
    String paymentTerms = "";
    List<InvoiceLineItem> invoiceLineItem = [];
    InvoiceTotals invoiceTotals;

    InvoiceClass({this.countryOfSupplyOfGoods,this.buyer,this.seller,this.payee,this.payer,this.shipFrom,this.shipTo,this.ultimateConsignee,this.supplierAccountReceivable,this.invoiceIdentification,this.invoice,this.salesOrder,this.purchaseOrder,this.deliveryNote,this.tradeAgreement,this.shipmentTransportationInformation,this.paymentTerms,this.invoiceLineItem,this.invoiceTotals});
    InvoiceClass.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        countryOfSupplyOfGoods = json['countryOfSupplyOfGoods'];
        buyer = JsonConverters.fromJson(json['buyer'],'TransactionalParty',context!);
        seller = JsonConverters.fromJson(json['seller'],'TransactionalParty',context!);
        payee = JsonConverters.fromJson(json['payee'],'TransactionalParty',context!);
        payer = JsonConverters.fromJson(json['payer'],'TransactionalParty',context!);
        shipFrom = JsonConverters.fromJson(json['shipFrom'],'TransactionalParty',context!);
        shipTo = JsonConverters.fromJson(json['shipTo'],'TransactionalParty',context!);
        ultimateConsignee = JsonConverters.fromJson(json['ultimateConsignee'],'TransactionalParty',context!);
        supplierAccountReceivable = json['supplierAccountReceivable'];
        invoiceIdentification = json['invoiceIdentification'];
        invoice = JsonConverters.fromJson(json['invoice'],'Invoice',context!);
        salesOrder = JsonConverters.fromJson(json['salesOrder'],'DocumentReference',context!);
        purchaseOrder = JsonConverters.fromJson(json['purchaseOrder'],'DocumentReference',context!);
        deliveryNote = JsonConverters.fromJson(json['deliveryNote'],'DocumentReference',context!);
        tradeAgreement = JsonConverters.fromJson(json['tradeAgreement'],'DocumentReference',context!);
        shipmentTransportationInformation = JsonConverters.fromJson(json['shipmentTransportationInformation'],'ShipmentTransportationInformation',context!);
        paymentTerms = json['paymentTerms'];
        invoiceLineItem = JsonConverters.fromJson(json['invoiceLineItem'],'List<InvoiceLineItem>',context!);
        invoiceTotals = JsonConverters.fromJson(json['invoiceTotals'],'InvoiceTotals',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'countryOfSupplyOfGoods': countryOfSupplyOfGoods,
        'buyer': JsonConverters.toJson(buyer,'TransactionalParty',context!),
        'seller': JsonConverters.toJson(seller,'TransactionalParty',context!),
        'payee': JsonConverters.toJson(payee,'TransactionalParty',context!),
        'payer': JsonConverters.toJson(payer,'TransactionalParty',context!),
        'shipFrom': JsonConverters.toJson(shipFrom,'TransactionalParty',context!),
        'shipTo': JsonConverters.toJson(shipTo,'TransactionalParty',context!),
        'ultimateConsignee': JsonConverters.toJson(ultimateConsignee,'TransactionalParty',context!),
        'supplierAccountReceivable': supplierAccountReceivable,
        'invoiceIdentification': invoiceIdentification,
        'invoice': JsonConverters.toJson(invoice,'Invoice',context!),
        'salesOrder': JsonConverters.toJson(salesOrder,'DocumentReference',context!),
        'purchaseOrder': JsonConverters.toJson(purchaseOrder,'DocumentReference',context!),
        'deliveryNote': JsonConverters.toJson(deliveryNote,'DocumentReference',context!),
        'tradeAgreement': JsonConverters.toJson(tradeAgreement,'DocumentReference',context!),
        'shipmentTransportationInformation': JsonConverters.toJson(shipmentTransportationInformation,'ShipmentTransportationInformation',context!),
        'paymentTerms': paymentTerms,
        'invoiceLineItem': JsonConverters.toJson(invoiceLineItem,'List<InvoiceLineItem>',context!),
        'invoiceTotals': JsonConverters.toJson(invoiceTotals,'InvoiceTotals',context!)
    });

    getTypeName() => "InvoiceClass";
    TypeContext? context = _ctx;
}

class InvoiceMessage implements IConvertible
{
    Header header;
    InvoiceClass invoice;

    InvoiceMessage({this.header,this.invoice});
    InvoiceMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        header = JsonConverters.fromJson(json['header'],'Header',context!);
        invoice = JsonConverters.fromJson(json['invoice'],'InvoiceClass',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'header': JsonConverters.toJson(header,'Header',context!),
        'invoice': JsonConverters.toJson(invoice,'InvoiceClass',context!)
    };

    getTypeName() => "InvoiceMessage";
    TypeContext? context = _ctx;
}

/**
* Invoice
*/
// @Api(Description="Invoice")
// @ApiResponse(Description="Invoice data", IsDefaultResponse=true, StatusCode=200)
// @ApiResponse(Description="No Content", ResponseType=typeof(IReturnVoid), StatusCode=204)
// @ApiResponse(Description="Specified argument was out of the range of valid values.", ResponseType=typeof(ArgumentOutOfRangeException), StatusCode=400)
class GetInvoiceById implements IGetDocumentById, IConvertible
{
    // @ApiMember(ExcludeInSchema=true, ParameterType="path")
    String id = "";

    GetInvoiceById({this.id});
    GetInvoiceById.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id
    };

    getTypeName() => "GetInvoiceById";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stf_api_uat.data_xchange.co.za', types: <String, TypeInfo> {
    'DocumentIdentification': TypeInfo(TypeOf.Class, create:() => DocumentIdentification()),
    'Identifier': TypeInfo(TypeOf.Class, create:() => Identifier()),
    'ContactInformation': TypeInfo(TypeOf.Class, create:() => ContactInformation()),
    'Partner': TypeInfo(TypeOf.Class, create:() => Partner()),
    'List<ContactInformation>': TypeInfo(TypeOf.Class, create:() => <ContactInformation>[]),
    'Header': TypeInfo(TypeOf.Class, create:() => Header()),
    'DocumentAction': TypeInfo(TypeOf.Enum, enumValues:DocumentAction.values),
    'DocumentStatus': TypeInfo(TypeOf.Enum, enumValues:DocumentStatus.values),
    'AvpList': TypeInfo(TypeOf.Class, create:() => AvpList()),
    'BaseDocument': TypeInfo(TypeOf.Class, create:() => BaseDocument()),
    'List<AvpList>': TypeInfo(TypeOf.Class, create:() => <AvpList>[]),
    'Ecom_PartyIdentificationType': TypeInfo(TypeOf.Class, create:() => Ecom_PartyIdentificationType()),
    'CommunicationChannel': TypeInfo(TypeOf.Class, create:() => CommunicationChannel()),
    'Contact': TypeInfo(TypeOf.Class, create:() => Contact()),
    'List<CommunicationChannel>': TypeInfo(TypeOf.Class, create:() => <CommunicationChannel>[]),
    'Address': TypeInfo(TypeOf.Class, create:() => Address()),
    'FinancialRoutingNumber': TypeInfo(TypeOf.Class, create:() => FinancialRoutingNumber()),
    'FinancialAccount': TypeInfo(TypeOf.Class, create:() => FinancialAccount()),
    'FinancialInstitutionInformation': TypeInfo(TypeOf.Class, create:() => FinancialInstitutionInformation()),
    'TransactionalParty': TypeInfo(TypeOf.Class, create:() => TransactionalParty()),
    'List<Contact>': TypeInfo(TypeOf.Class, create:() => <Contact>[]),
    'Invoice': TypeInfo(TypeOf.Class, create:() => Invoice()),
    'DocumentReference': TypeInfo(TypeOf.Class, create:() => DocumentReference()),
    'ShipmentTransportationInformation': TypeInfo(TypeOf.Class, create:() => ShipmentTransportationInformation()),
    'Quantity': TypeInfo(TypeOf.Class, create:() => Quantity()),
    'TransactionalItem': TypeInfo(TypeOf.Class, create:() => TransactionalItem()),
    'SerialNumberRange': TypeInfo(TypeOf.Class, create:() => SerialNumberRange()),
    'TransactionalItemDimension': TypeInfo(TypeOf.Class, create:() => TransactionalItemDimension()),
    'TransactionalItemLogisticUnitInformation': TypeInfo(TypeOf.Class, create:() => TransactionalItemLogisticUnitInformation()),
    'List<TransactionalItemDimension>': TypeInfo(TypeOf.Class, create:() => <TransactionalItemDimension>[]),
    'TransactionalItemDataCarrierAndIdentification': TypeInfo(TypeOf.Class, create:() => TransactionalItemDataCarrierAndIdentification()),
    'TradeItemWaste': TypeInfo(TypeOf.Class, create:() => TradeItemWaste()),
    'TransactionalItemOrganicInformation': TypeInfo(TypeOf.Class, create:() => TransactionalItemOrganicInformation()),
    'TransactionalItemData': TypeInfo(TypeOf.Class, create:() => TransactionalItemData()),
    'List<TransactionalItem>': TypeInfo(TypeOf.Class, create:() => <TransactionalItem>[]),
    'List<SerialNumberRange>': TypeInfo(TypeOf.Class, create:() => <SerialNumberRange>[]),
    'List<TradeItemWaste>': TypeInfo(TypeOf.Class, create:() => <TradeItemWaste>[]),
    'Colour': TypeInfo(TypeOf.Class, create:() => Colour()),
    'Size': TypeInfo(TypeOf.Class, create:() => Size()),
    'TradeItemClassification': TypeInfo(TypeOf.Class, create:() => TradeItemClassification()),
    'TransactionalTradeItem': TypeInfo(TypeOf.Class, create:() => TransactionalTradeItem()),
    'List<TransactionalItemData>': TypeInfo(TypeOf.Class, create:() => <TransactionalItemData>[]),
    'List<Colour>': TypeInfo(TypeOf.Class, create:() => <Colour>[]),
    'TaxInformation': TypeInfo(TypeOf.Class, create:() => TaxInformation()),
    'AllowanceCharge': TypeInfo(TypeOf.Class, create:() => AllowanceCharge()),
    'InvoiceAllowanceCharge': TypeInfo(TypeOf.Class, create:() => InvoiceAllowanceCharge()),
    'Extension': TypeInfo(TypeOf.Class, create:() => Extension()),
    'InvoiceLineItem': TypeInfo(TypeOf.Class, create:() => InvoiceLineItem()),
    'List<InvoiceAllowanceCharge>': TypeInfo(TypeOf.Class, create:() => <InvoiceAllowanceCharge>[]),
    'InvoiceTotals': TypeInfo(TypeOf.Class, create:() => InvoiceTotals()),
    'InvoiceClass': TypeInfo(TypeOf.Class, create:() => InvoiceClass()),
    'List<InvoiceLineItem>': TypeInfo(TypeOf.Class, create:() => <InvoiceLineItem>[]),
    'InvoiceMessage': TypeInfo(TypeOf.Class, create:() => InvoiceMessage()),
    'GetInvoiceById': TypeInfo(TypeOf.Class, create:() => GetInvoiceById()),
});

Dart GetInvoiceById DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/invoice/{Id} HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InvoiceMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
  <Header>
    <documentIdentification>
      <creationDateAndTime>0001-01-01T00:00:00</creationDateAndTime>
      <identifier>String</identifier>
      <type>String</type>
    </documentIdentification>
    <receiver>
      <contactInformation>
        <ContactInformation />
      </contactInformation>
      <identifier>
        <authority>String</authority>
        <text>String</text>
      </identifier>
    </receiver>
    <sender>
      <contactInformation>
        <ContactInformation />
      </contactInformation>
      <identifier>
        <authority>String</authority>
        <text>String</text>
      </identifier>
    </sender>
  </Header>
  <Invoice>
    <AvpList>
      <AvpList>
        <Code>String</Code>
        <Value>String</Value>
      </AvpList>
    </AvpList>
    <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
    <CurrencyCode>String</CurrencyCode>
    <DocumentActionCode>ADD</DocumentActionCode>
    <DocumentStatusCode>ADDITIONAL_TRANSMISSION</DocumentStatusCode>
    <DocumentStructureVersion>String</DocumentStructureVersion>
    <LastUpdateDateTime>0001-01-01T00:00:00</LastUpdateDateTime>
    <RevisionNumber>0</RevisionNumber>
    <Buyer>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </Buyer>
    <CountryOfSupplyOfGoods>String</CountryOfSupplyOfGoods>
    <DeliveryNote>
      <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
      <EntityIdentification>String</EntityIdentification>
      <LineItemNumber>0</LineItemNumber>
      <RevisionNumber>0</RevisionNumber>
    </DeliveryNote>
    <Invoice>
      <CreationDate>0001-01-01T00:00:00</CreationDate>
      <EntityIdentification>String</EntityIdentification>
      <RevisionNumber>0</RevisionNumber>
    </Invoice>
    <InvoiceIdentification>String</InvoiceIdentification>
    <InvoiceLineItem>
      <InvoiceLineItem>
        <AmountExclusiveAllowancesCharges>0</AmountExclusiveAllowancesCharges>
        <AmountInclusiveAllowancesCharges>0</AmountInclusiveAllowancesCharges>
        <DeliveryNote>String</DeliveryNote>
        <ExtendedProperties />
        <InvoiceAllowanceCharge>
          <InvoiceAllowanceCharge>
            <AllowanceCharge>
              <AllowanceChargeAmount>0</AllowanceChargeAmount>
              <AllowanceChargeDescription>String</AllowanceChargeDescription>
              <AllowanceChargePercentage>0</AllowanceChargePercentage>
              <AllowanceChargeType>String</AllowanceChargeType>
              <AllowanceOrChargeType>String</AllowanceOrChargeType>
              <AmountPerUnit>0</AmountPerUnit>
              <BaseAmount>0</BaseAmount>
              <BaseNumberOfUnits>String</BaseNumberOfUnits>
              <BracketIdentifier>String</BracketIdentifier>
              <EffectiveDateType>0001-01-01T00:00:00</EffectiveDateType>
              <SequenceNumber>String</SequenceNumber>
              <SettlementType>String</SettlementType>
              <SpecialServiceType>String</SpecialServiceType>
            </AllowanceCharge>
            <LeviedDutyFeeTax>
              <TaxAmount>0</TaxAmount>
              <TaxPercentage>0</TaxPercentage>
            </LeviedDutyFeeTax>
          </InvoiceAllowanceCharge>
        </InvoiceAllowanceCharge>
        <InvoicedQuantity>
          <CodeListVersion>String</CodeListVersion>
          <MeasurementUnitCode>String</MeasurementUnitCode>
          <Value>0</Value>
        </InvoicedQuantity>
        <ItemPriceBaseQuantity>0</ItemPriceBaseQuantity>
        <ItemPriceExclusiveAllowancesCharges>0</ItemPriceExclusiveAllowancesCharges>
        <ItemPriceInclusiveAllowancesCharges>0</ItemPriceInclusiveAllowancesCharges>
        <LineNumber>0</LineNumber>
        <ParentLineItemNumber>String</ParentLineItemNumber>
        <PromotionalDeal>
          <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
          <EntityIdentification>String</EntityIdentification>
          <LineItemNumber>0</LineItemNumber>
          <RevisionNumber>0</RevisionNumber>
        </PromotionalDeal>
        <RecommendedRetailPrice>0</RecommendedRetailPrice>
        <RetailPriceExcludingExcise>0</RetailPriceExcludingExcise>
        <TaxInformation>
          <TaxAmount>0</TaxAmount>
          <TaxPercentage>0</TaxPercentage>
        </TaxInformation>
        <TradeAgreement>String</TradeAgreement>
        <TransactionalTradeItem>
          <AdditionalTradeItemIdentification>
            <AvpList>
              <Code>String</Code>
              <Value>String</Value>
            </AvpList>
          </AdditionalTradeItemIdentification>
          <AvpList>
            <AvpList>
              <Code>String</Code>
              <Value>String</Value>
            </AvpList>
          </AvpList>
          <ButterFatReference>String</ButterFatReference>
          <Colour>
            <Colour>
              <ColourCode>String</ColourCode>
              <ColourDescription>String</ColourDescription>
            </Colour>
          </Colour>
          <Gtin>String</Gtin>
          <ItemTypeCode>String</ItemTypeCode>
          <ProductVariantIdentifier>String</ProductVariantIdentifier>
          <Size>
            <DescriptiveSize>String</DescriptiveSize>
            <SizeCode>String</SizeCode>
          </Size>
          <TradeItemClassification>
            <AdditionalTradeItemClassificationCode>
              <AvpList>
                <Code>String</Code>
                <Value>String</Value>
              </AvpList>
            </AdditionalTradeItemClassificationCode>
            <GpcAttribute>
              <AvpList>
                <Code>String</Code>
                <Value>String</Value>
              </AvpList>
            </GpcAttribute>
            <GpcCategoryCode>String</GpcCategoryCode>
            <GpcCategoryName>String</GpcCategoryName>
          </TradeItemClassification>
          <TradeItemDataOwner>String</TradeItemDataOwner>
          <TradeItemDescription>String</TradeItemDescription>
          <TradeItemQuantity>0</TradeItemQuantity>
          <TransactionalItemData>
            <TransactionalItemData>
              <AvailableForSaleDate>0001-01-01T00:00:00</AvailableForSaleDate>
              <AvpList>
                <AvpList>
                  <Code>String</Code>
                  <Value>String</Value>
                </AvpList>
              </AvpList>
              <BatchNumber>String</BatchNumber>
              <BestBeforeDate>0001-01-01T00:00:00</BestBeforeDate>
              <CountryOfOrigin>String</CountryOfOrigin>
              <ItemExpirationDate>0001-01-01T00:00:00</ItemExpirationDate>
              <ItemInContactWithFoodProduct>false</ItemInContactWithFoodProduct>
              <LotNumber>String</LotNumber>
              <PackagingDate>0001-01-01T00:00:00</PackagingDate>
              <ProductQualityIndication>String</ProductQualityIndication>
              <ProductionDate>0001-01-01T00:00:00</ProductionDate>
              <SellByDate>0001-01-01T00:00:00</SellByDate>
              <SerialNumber xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:string>String</d8p1:string>
              </SerialNumber>
              <SerialNumberRange>
                <SerialNumberRange>
                  <MaximumValue>String</MaximumValue>
                  <MinimumValue>String</MinimumValue>
                </SerialNumberRange>
              </SerialNumberRange>
              <ShelfLife>String</ShelfLife>
              <TradeItemQuantity>0</TradeItemQuantity>
              <TradeItemWaste>
                <TradeItemWaste>
                  <TypeOfWaste>
                    <AvpList>
                      <Code>String</Code>
                      <Value>String</Value>
                    </AvpList>
                  </TypeOfWaste>
                  <WasteIdentification>String</WasteIdentification>
                </TradeItemWaste>
              </TradeItemWaste>
              <TransactionalItemDataCarrierAndIdentification>
                <DataCarrier>String</DataCarrier>
                <Gs1TransactionalItemIdentificationKey>String</Gs1TransactionalItemIdentificationKey>
              </TransactionalItemDataCarrierAndIdentification>
              <TransactionalItemDimensions>
                <TransactionalItemDimension>
                  <Depth>String</Depth>
                  <Height>String</Height>
                  <MeasurementUnitCode>String</MeasurementUnitCode>
                  <Width>String</Width>
                </TransactionalItemDimension>
              </TransactionalItemDimensions>
              <TransactionalItemLogisticUnitInformation>
                <DimensionsOfLogisticUnit>
                  <TransactionalItemDimension>
                    <Depth>String</Depth>
                    <Height>String</Height>
                    <MeasurementUnitCode>String</MeasurementUnitCode>
                    <Width>String</Width>
                  </TransactionalItemDimension>
                </DimensionsOfLogisticUnit>
                <MaximumStackingFactor>0</MaximumStackingFactor>
                <NumberOfLayers>0</NumberOfLayers>
                <NumberOfUnitsPerLayer>0</NumberOfUnitsPerLayer>
                <NumberOfUnitsPerPallet>0</NumberOfUnitsPerPallet>
                <PackageTypeCode>String</PackageTypeCode>
                <PackagingTerms>String</PackagingTerms>
                <ReturnablePackageTransportCostPayment>String</ReturnablePackageTransportCostPayment>
              </TransactionalItemLogisticUnitInformation>
              <TransactionalItemOrganicInformation>
                <IsTradeItemOrganic>false</IsTradeItemOrganic>
                <OrganicCertification>String</OrganicCertification>
              </TransactionalItemOrganicInformation>
              <TransactionalItemVolume>
                <TransactionalItem>
                  <MeasurementType>String</MeasurementType>
                  <MeasurementUnitCode>String</MeasurementUnitCode>
                  <MeasurementValue>String</MeasurementValue>
                </TransactionalItem>
              </TransactionalItemVolume>
              <TransactionalItemWeight>
                <TransactionalItem>
                  <MeasurementType>String</MeasurementType>
                  <MeasurementUnitCode>String</MeasurementUnitCode>
                  <MeasurementValue>String</MeasurementValue>
                </TransactionalItem>
              </TransactionalItemWeight>
            </TransactionalItemData>
          </TransactionalItemData>
        </TransactionalTradeItem>
      </InvoiceLineItem>
    </InvoiceLineItem>
    <InvoiceTotals>
      <BaseAmount>0</BaseAmount>
      <PrepaidAmount>0</PrepaidAmount>
      <PrepaidAmountDate>0001-01-01T00:00:00</PrepaidAmountDate>
      <TotalAmountInvoiceAllowancesCharges>0</TotalAmountInvoiceAllowancesCharges>
      <TotalInvoiceAmount>0</TotalInvoiceAmount>
      <TotalInvoiceAmountPayable>0</TotalInvoiceAmountPayable>
      <TotalLineAmountInclusiveAllowancesCharges>0</TotalLineAmountInclusiveAllowancesCharges>
      <TotalTaxAmount>0</TotalTaxAmount>
    </InvoiceTotals>
    <Payee>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </Payee>
    <Payer>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </Payer>
    <PaymentTerms>String</PaymentTerms>
    <PurchaseOrder>
      <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
      <EntityIdentification>String</EntityIdentification>
      <LineItemNumber>0</LineItemNumber>
      <RevisionNumber>0</RevisionNumber>
    </PurchaseOrder>
    <SalesOrder>
      <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
      <EntityIdentification>String</EntityIdentification>
      <LineItemNumber>0</LineItemNumber>
      <RevisionNumber>0</RevisionNumber>
    </SalesOrder>
    <Seller>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </Seller>
    <ShipFrom>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </ShipFrom>
    <ShipTo>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </ShipTo>
    <ShipmentTransportationInformation>
      <Carrier>
        <AdditionalPartyIdentification>
          <AvpList>
            <Code>String</Code>
            <Value>String</Value>
          </AvpList>
        </AdditionalPartyIdentification>
        <Gln>String</Gln>
        <Name>String</Name>
        <Address>
          <City>String</City>
          <CountryCode>String</CountryCode>
          <PostalCode>String</PostalCode>
          <ProvinceCode>String</ProvinceCode>
          <StreetAddressOne>String</StreetAddressOne>
          <StreetAddressThree>String</StreetAddressThree>
          <StreetAddressTwo>String</StreetAddressTwo>
        </Address>
        <CommunicationChannel>
          <AvpList>
            <Code>String</Code>
            <Value>String</Value>
          </AvpList>
        </CommunicationChannel>
        <Contact>
          <Contact>
            <CommunicationChannel>
              <CommunicationChannel>
                <CommunicationChannelCode>String</CommunicationChannelCode>
                <CommunicationChannelName>String</CommunicationChannelName>
                <CommunicationValue>String</CommunicationValue>
              </CommunicationChannel>
            </CommunicationChannel>
            <ContactTypeCode>String</ContactTypeCode>
            <DepartmentName>String</DepartmentName>
            <JobTitle>String</JobTitle>
            <PersonName>String</PersonName>
            <Responsibility>String</Responsibility>
          </Contact>
        </Contact>
        <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
        <EntityIdentification>String</EntityIdentification>
        <FinancialInstitutionInformation>
          <ExportersCode>String</ExportersCode>
          <FinancialAccount>
            <Name>String</Name>
            <Number>String</Number>
            <NumberTypeCode>String</NumberTypeCode>
          </FinancialAccount>
          <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
          <FinancialInstitutionName>String</FinancialInstitutionName>
          <FinancialRoutingNumber>
            <Number>String</Number>
            <NumberTypeCode>String</NumberTypeCode>
          </FinancialRoutingNumber>
          <SwiftCode>String</SwiftCode>
        </FinancialInstitutionInformation>
      </Carrier>
      <FreightForwarder>
        <AdditionalPartyIdentification>
          <AvpList>
            <Code>String</Code>
            <Value>String</Value>
          </AvpList>
        </AdditionalPartyIdentification>
        <Gln>String</Gln>
        <Name>String</Name>
        <Address>
          <City>String</City>
          <CountryCode>String</CountryCode>
          <PostalCode>String</PostalCode>
          <ProvinceCode>String</ProvinceCode>
          <StreetAddressOne>String</StreetAddressOne>
          <StreetAddressThree>String</StreetAddressThree>
          <StreetAddressTwo>String</StreetAddressTwo>
        </Address>
        <CommunicationChannel>
          <AvpList>
            <Code>String</Code>
            <Value>String</Value>
          </AvpList>
        </CommunicationChannel>
        <Contact>
          <Contact>
            <CommunicationChannel>
              <CommunicationChannel>
                <CommunicationChannelCode>String</CommunicationChannelCode>
                <CommunicationChannelName>String</CommunicationChannelName>
                <CommunicationValue>String</CommunicationValue>
              </CommunicationChannel>
            </CommunicationChannel>
            <ContactTypeCode>String</ContactTypeCode>
            <DepartmentName>String</DepartmentName>
            <JobTitle>String</JobTitle>
            <PersonName>String</PersonName>
            <Responsibility>String</Responsibility>
          </Contact>
        </Contact>
        <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
        <EntityIdentification>String</EntityIdentification>
        <FinancialInstitutionInformation>
          <ExportersCode>String</ExportersCode>
          <FinancialAccount>
            <Name>String</Name>
            <Number>String</Number>
            <NumberTypeCode>String</NumberTypeCode>
          </FinancialAccount>
          <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
          <FinancialInstitutionName>String</FinancialInstitutionName>
          <FinancialRoutingNumber>
            <Number>String</Number>
            <NumberTypeCode>String</NumberTypeCode>
          </FinancialRoutingNumber>
          <SwiftCode>String</SwiftCode>
        </FinancialInstitutionInformation>
      </FreightForwarder>
    </ShipmentTransportationInformation>
    <SupplierAccountReceivable>String</SupplierAccountReceivable>
    <TradeAgreement>
      <CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
      <EntityIdentification>String</EntityIdentification>
      <LineItemNumber>0</LineItemNumber>
      <RevisionNumber>0</RevisionNumber>
    </TradeAgreement>
    <UltimateConsignee>
      <AdditionalPartyIdentification>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </AdditionalPartyIdentification>
      <Gln>String</Gln>
      <Name>String</Name>
      <Address>
        <City>String</City>
        <CountryCode>String</CountryCode>
        <PostalCode>String</PostalCode>
        <ProvinceCode>String</ProvinceCode>
        <StreetAddressOne>String</StreetAddressOne>
        <StreetAddressThree>String</StreetAddressThree>
        <StreetAddressTwo>String</StreetAddressTwo>
      </Address>
      <CommunicationChannel>
        <AvpList>
          <Code>String</Code>
          <Value>String</Value>
        </AvpList>
      </CommunicationChannel>
      <Contact>
        <Contact>
          <CommunicationChannel>
            <CommunicationChannel>
              <CommunicationChannelCode>String</CommunicationChannelCode>
              <CommunicationChannelName>String</CommunicationChannelName>
              <CommunicationValue>String</CommunicationValue>
            </CommunicationChannel>
          </CommunicationChannel>
          <ContactTypeCode>String</ContactTypeCode>
          <DepartmentName>String</DepartmentName>
          <JobTitle>String</JobTitle>
          <PersonName>String</PersonName>
          <Responsibility>String</Responsibility>
        </Contact>
      </Contact>
      <DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
      <EntityIdentification>String</EntityIdentification>
      <FinancialInstitutionInformation>
        <ExportersCode>String</ExportersCode>
        <FinancialAccount>
          <Name>String</Name>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialAccount>
        <FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
        <FinancialInstitutionName>String</FinancialInstitutionName>
        <FinancialRoutingNumber>
          <Number>String</Number>
          <NumberTypeCode>String</NumberTypeCode>
        </FinancialRoutingNumber>
        <SwiftCode>String</SwiftCode>
      </FinancialInstitutionInformation>
    </UltimateConsignee>
  </Invoice>
</InvoiceMessage>