﻿<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio Developer Edition 9.0.11.3078 (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:include schemaLocation=".\recCliente.xsd" />
  <xs:element name="pedido">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="itens">
          <xs:complexType>
            <xs:attribute name="CodProduto" type="xs:int" />
            <xs:attribute name="Quantidade" type="xs:decimal" />
            <xs:attribute name="ValorUnitario" type="xs:decimal" />
            <xs:attribute name="ValorTotal" />
          </xs:complexType>
        </xs:element>
        <xs:element name="parcelas">
          <xs:complexType>
            <xs:attribute name="Data" type="xs:dateTime" />
            <xs:attribute name="Valor" type="xs:decimal" />
			<xs:attribute name="NossoNumero" type="xs:string" />
			<xs:attribute name="NumeroDocumento" type="xs:string" />
			<xs:attribute name="Sequencia" type="xs:string" />
			<xs:attribute name="FinanceiroTipoDocumentoIDERP" type="xs:string" />
			<xs:attribute name="BancoIDERP" type="xs:string" />
          </xs:complexType>
        </xs:element>
        <xs:element ref="cliente" />
      </xs:sequence>
      <xs:attribute name="CPFCNPJ">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="14" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="EmpresaCNPJ" type="xs:string" use="required" />
      <xs:attribute name="CodigoECommerceIntegracao" type="xs:integer" use="required"></xs:attribute>
      <xs:attribute name="NumeroPedido" type="xs:integer" use="required" />
      <xs:attribute name="DataEmissao" type="xs:dateTime" />
      <xs:attribute name="ValorTotal" type="xs:decimal" use="required" />
      <xs:attribute name="DescontoPercentual" type="xs:decimal" use="required" />
      <xs:attribute name="ValorFrete" type="xs:decimal" use="required" />
      <xs:attribute name="TipoFrete" type="xs:string" use="required" />
      <xs:attribute name="TransportadorCPFCNPJ" type="xs:string" use="required" />
      <xs:attribute name="FormaPagamento" type="xs:string" use="required" />
      <xs:attribute name="BandeiraCartaoID" type="xs:integer" use="optional" />
      <xs:attribute name="FormaEnvio" type="xs:string" use="required" />
      <xs:attribute name="Observacao" type="xs:string" use="required" />
      <xs:attribute name="Status" type="xs:integer" use="required" />
      <!--<xs:attribute name="EnderecoEntrega">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="200" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="NumeroEntrega">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="50" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="ComplementoEntrega">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="100" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="BairroEntrega">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="150" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="CidadeIBGEEntrega" type="xs:int" />
      <xs:attribute name="CEPEntrega">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="8" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>-->
    </xs:complexType>
  </xs:element>
</xs:schema>
