<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
	attributeFormDefault="unqualified">
	<xs:element name="returnMerchandiseAuthorization">
		<xs:annotation>
			<xs:documentation>RUC RMA message interface</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="messageId" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The transaction's unique tracking ID from sender’s side that is unique across all transmissions including other interfaces</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="64"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="rmaNumber">
					<xs:annotation>
						<xs:documentation>Unique RMA identifier</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="17"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="clientId">
					<xs:annotation>
						<xs:documentation>Client identifier. It will be provided by Radial Commerce Ltd at the time of integration.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="10"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="distributionCentre">
					<xs:annotation>
						<xs:documentation>Distribution centre code. Radial's warehouse that is going to receive the returns. It will be provided by Radial team at the time of implementation.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="15"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="orderReference" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The order number associated  with this RMA. This is the ordeId which is sent to Radial in the Order feed. If this is provided and the orderId does not exist on Radial systems then the feed will be rejected.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="50"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="creationTimeStamp" type="xs:dateTime">
					<xs:annotation>
						<xs:documentation>RMA creation Timestamp </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="customerAddress" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Customer address details</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:all>
							<xs:element name="title" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer salutation. I.e. Mr.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="30"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="companyName" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Company name if the customer is a company</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="department" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer department.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="100"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="firstName">
								<xs:annotation>
									<xs:documentation>Customer first name.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="lastName">
								<xs:annotation>
									<xs:documentation>Customer last name.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="address1">
								<xs:annotation>
									<xs:documentation>Customer address field.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="address2" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer address 2 filed.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="city">
								<xs:annotation>
									<xs:documentation>Customer city.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="100"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="postCode">
								<xs:annotation>
									<xs:documentation>Customer post code.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="55"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="state" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer county or region.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="100"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="country">
								<xs:annotation>
									<xs:documentation>Two letter country codes as per ISO 3166-1 alpha-2</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="2"/>
										<xs:pattern value="[a-zA-Z]{2}"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="phone" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer contact number.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="30"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="mobile" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer mobile number.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="20"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="email" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Customer email address</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
						</xs:all>
					</xs:complexType>
				</xs:element>
				<xs:element name="line" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>RMA line. Each line holds a single qty of an SKU. Hence, 'x' quantity of a single SKU must be sent in 'x' lines. </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:all>
							<xs:element name="lineNumber">
								<xs:annotation>
									<xs:documentation>Sequence number representing the line position within this return message.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:int"/>
								</xs:simpleType>
							</xs:element>
							<xs:element name="sku">
								<xs:annotation>
									<xs:documentation>Unique product identifier that will be used by Radial to communicate with the web-store on all feeds.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="50"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="productName" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Product name of the sku</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="255"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="reasonDescription" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Human readable return reason  description. The same as are printed on advice note. I.e. Too big, Too small, Wrong colour, etc.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="100"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="returnReasonCode">
								<xs:annotation>
									<xs:documentation>Radial iternal return reason code. The codes will be decided at the time of integration.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="20"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="stockPool" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Stock pool, also known as "stock grade" of the returned item. For instance grade "A" is the good stock. Grade "B" or "C" is the stock that cannot be sold to end customer again.
										Default value is grade "A"</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="25"/>
										<xs:enumeration value="A"/>
										<xs:enumeration value="B"/>
										<xs:enumeration value="C"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="qtyUom" minOccurs="0">
								<xs:annotation>
									<xs:documentation>unit of measurement that the quantity is in. Note that the qty is still considered 1 for each line.</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="8"/>
										<xs:enumeration value="unit"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="attributeOne" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Line level attributes to send extra information. The information sent here must be agreed upon with the Radial team at the time of integration</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="50"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="attributeTwo" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Line level attributes to send extra information. The information sent here must be agreed upon with the Radial team at the time of integration</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="50"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="attributeThree" minOccurs="0">
								<xs:annotation>
									<xs:documentation>Line level attributes to send extra information. The information sent here must be agreed upon with the Radial team at the time of integration</xs:documentation>
								</xs:annotation>
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:maxLength value="50"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element default="1" minOccurs="0" name="quantityReturned"
								type="xs:positiveInteger">
								<xs:annotation>
									<xs:documentation>The expected quantity from customer</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:all>
					</xs:complexType>
				</xs:element>
				<xs:element name="carrierTrackingBarcode" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Carrier tracking barcode if known. Used in customer return process to identify the RMA in Radial systems
String up to 50 characters / Optional</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="50"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
