<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation>Title: Configure Reporting Codes - Edit - request schema</xs:documentation>
    <xs:documentation>Edit a reporting code</xs:documentation>
    <xs:documentation>Version 1.0 : 2018-11-05.  Initial schema creation</xs:documentation>
  </xs:annotation>
  <xs:element name="reportingcode">
    <xs:complexType>
      <xs:all>
        <xs:element minOccurs="0" maxOccurs="1" name="remoteusername">
          <xs:annotation>
            <xs:documentation>Where available, the name of the user in the remote system.</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="200" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="1" maxOccurs="1" name="code">
          <xs:annotation>
            <xs:documentation>The unique code for reporting</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:minLength value="1" />
              <xs:maxLength value="50" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="description">
          <xs:annotation>
            <xs:documentation>A description for the reporting code</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:maxLength value="10000" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" name="statistics">
          <xs:annotation>
            <xs:documentation>The 'statistics' element is included in another schema where this object is defined, but is not used in this schema.</xs:documentation>
            <xs:documentation>To ensure the object can be passed between service methods without manipulation, 'statistics' is also included here.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
            </xs:sequence>
            <xs:anyAttribute processContents="skip" />
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="category" use="required">
        <xs:annotation>
          <xs:documentation>The reporting code category</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="NotSpecified">
              <xs:annotation>
                <xs:documentation>No filter will be applied for this field.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Promotion">
              <xs:annotation>
                <xs:documentation>Only provide Reporting Group Codes that are defined for Promotions.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CampaignCoupon">
              <xs:annotation>
                <xs:documentation>Only provide Reporting Group Codes that are defined for Campaign/Coupons.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MissedPromotion">
              <xs:annotation>
                <xs:documentation>Only provide Reporting Group Codes that are defined for Missed Promotions.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:anyAttribute processContents="skip" />
    </xs:complexType>
  </xs:element>
</xs:schema>