<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns="https://api.gunengine.com/ingest/XMLSchema/feed/v1/offers"
           targetNamespace="https://api.gunengine.com/ingest/XMLSchema/feed/v1/offers"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified"
>
    <xs:complexType name="productType">
        <xs:all>
            <xs:element name="upc" type="xs:string"/>
            <xs:element name="mpn" type="xs:string" minOccurs="0"/>
            <xs:element name="title" type="xs:string"/>
            <xs:element name="url" type="xs:anyURI"/>
            <xs:element name="availability">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="in stock"/>
                        <xs:enumeration value="out of stock"/>
                        <xs:enumeration value="backorder"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="price" type="xs:decimal"/>
            <xs:element name="map" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="yes"/>
                        <xs:enumeration value="no"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="shipping_price" minOccurs="0">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:maxLength value="60"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="image_url" type="xs:anyURI" minOccurs="0"/>
            <xs:element name="caliber" type="xs:string" minOccurs="0"/>
            <xs:element name="numrounds" type="xs:positiveInteger" minOccurs="0"/>
            <xs:element name="brand" type="xs:string" minOccurs="0"/>
            <xs:element name="model" type="xs:string" minOccurs="0"/>
        </xs:all>
        <xs:attribute name="type" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:element name="productlist">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="product" type="productType" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
