<!--
		SIF Implementation Specification (Australia) 3.4.3


		(April 5, 2018)
		
		Infrastructure Version: v3
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/au/3.4" targetNamespace="http://www.sifassociation.org/datamodel/au/3.4" elementFormDefault="qualified" version="3.4.3">
  <xs:complexType name="DebtorType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>High</privacyRating>
      </xs:appinfo>
      <xs:documentation>
        This object is used to capture general information about debtors.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="BilledEntity">
        <xs:complexType>
          <xs:annotation>
            <xs:appinfo>
              <sifChar>M</sifChar>
              <privacyRating>High</privacyRating>
            </xs:appinfo>
            <xs:documentation>Id of the entity referred to by this object (e.g., student, employee, organization).</xs:documentation>
          </xs:annotation>
          <xs:simpleContent>
            <xs:extension base="IdRefType">
              <xs:attribute name="SIF_RefObject" use="required">
                <xs:annotation>
                  <xs:appinfo>
                    <sifChar>M</sifChar>
                    <privacyRating>High</privacyRating>
                  </xs:appinfo>
                  <xs:documentation>SIF object referenced by BilledEntity.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="StudentPersonal" />
                    <xs:enumeration value="StudentContactPersonal" />
                    <xs:enumeration value="StaffPersonal" />
                    <xs:enumeration value="VendorInfo" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Addresses of the debtor to be used for billing. These addresses override any addresses found in the Billed Entity.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BillingName" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Name of the entity to be used for billing (e.g. company name rather than individual name).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BillingNote" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Note about billing requirements.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Discount" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Any discount amount applicable to this debtor (e.g. family discount for scholarship, number of children enrolled). Is a percentage.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="SIF_MetadataType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType">
      <xs:annotation>
        <xs:appinfo>
          <sifChar>M</sifChar>
          <privacyRating>High</privacyRating>
        </xs:appinfo>
        <xs:documentation>Debtor Id.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="Debtor" type="DebtorType">
    <xs:key name="DebtorKey1">
      <xs:selector xpath="./Debtor" />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="DebtorCollectionType">
    <xs:sequence>
      <xs:element name="Debtor" type="DebtorType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Debtors" type="DebtorCollectionType" />

</xs:schema>