<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  ~ Copyright 2010-2013 Ning, Inc.
  ~
  ~ Ning licenses this file to you under the Apache License, version 2.0
  ~ (the "License"); you may not use this file except in compliance with the
  ~ License.  You may obtain a copy of the License at:
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
  ~ License for the specific language governing permissions and limitations
  ~ under the License.
  -->

<!-- 
Use cases covered so far:
	Tiered Product (Pistol/Shotgun/Assault-Rifle)
	Multiple changeEvent plan policies
	Multiple PlanAlignment (see below, trial add-on alignments and rescue discount package)
	Product transition rules
	Add on (Scopes, Hoster)
	Multi-pack addon (Extra-Ammo)
	Addon Trial aligned to base plan (holster-monthly-regular)
	Addon Trial aligned to creation (holster-monthly-special)
	Rescue discount package (assault-rifle-annual-rescue)
	Plan phase with a reccurring and a one off (refurbish-maintenance)
	Phan with more than 2 phase (gunclub discount plans)
		
Use Cases to do:
	Tiered Add On
	Riskfree period
	


 -->
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="CatalogSchema.xsd ">

	<effectiveDate>2011-01-01T00:00:00+00:00</effectiveDate>
	<catalogName>Firearms</catalogName>

	<currencies>
		<currency>USD</currency>
		<currency>EUR</currency>
		<currency>GBP</currency>
	</currencies>
	
	<products>
		<product name="Pistol">
			<category>BASE</category>
		</product>
		<product name="Shotgun">
			<category>BASE</category>
            <available>
                <addonProduct>Telescopic-Scope</addonProduct>
                <addonProduct>Laser-Scope</addonProduct>
            </available>
		</product>
		<product name="Assault-Rifle">
			<category>BASE</category>
			<included> 
				<addonProduct>Telescopic-Scope</addonProduct>
			</included>
			<available>
				<addonProduct>Laser-Scope</addonProduct>
			</available>
		</product>
		<product name="Telescopic-Scope">
			<category>ADD_ON</category>
		</product>
		<product name="Laser-Scope">
			<category>ADD_ON</category>
		</product>
		<product name="Holster">
			<category>ADD_ON</category>
		</product>
		<product name="Extra-Ammo">
			<category>ADD_ON</category>
		</product>
		<product name="Refurbish-Maintenance">
			<category>ADD_ON</category>
		</product>
	</products>
	 
	<rules>
		<changePolicy>
			<changePolicyCase> 
				<phaseType>TRIAL</phaseType>
				<policy>IMMEDIATE</policy>
			</changePolicyCase>
            <changePolicyCase> 
                <toProduct>Assault-Rifle</toProduct>
                <policy>IMMEDIATE</policy>
            </changePolicyCase>
            <changePolicyCase> 
                <fromProduct>Pistol</fromProduct>            
                <toProduct>Shotgun</toProduct>
                <policy>IMMEDIATE</policy>
            </changePolicyCase>
			<changePolicyCase> 
				<toPriceList>rescue</toPriceList>
				<policy>END_OF_TERM</policy>
			</changePolicyCase>
			<changePolicyCase> 
				<fromBillingPeriod>MONTHLY</fromBillingPeriod>
				<toBillingPeriod>ANNUAL</toBillingPeriod>
				<policy>IMMEDIATE</policy>
			</changePolicyCase>
			<changePolicyCase> 
				<fromBillingPeriod>ANNUAL</fromBillingPeriod>
				<toBillingPeriod>MONTHLY</toBillingPeriod>
				<policy>END_OF_TERM</policy>
			</changePolicyCase>
			<changePolicyCase> 
				<policy>END_OF_TERM</policy>
			</changePolicyCase>
		</changePolicy>
		<changeAlignment>
			<changeAlignmentCase>
				<toPriceList>rescue</toPriceList>
				<alignment>CHANGE_OF_PLAN</alignment>
			</changeAlignmentCase>
			<changeAlignmentCase>
				<fromPriceList>rescue</fromPriceList>
				<toPriceList>rescue</toPriceList>
				<alignment>CHANGE_OF_PRICELIST</alignment>
			</changeAlignmentCase>
            <changeAlignmentCase>
                <alignment>START_OF_SUBSCRIPTION</alignment>
            </changeAlignmentCase>
		</changeAlignment>
		<cancelPolicy>
			<cancelPolicyCase>
				<phaseType>TRIAL</phaseType>
				<policy>IMMEDIATE</policy>
			</cancelPolicyCase>
            <cancelPolicyCase>
                <policy>END_OF_TERM</policy>
            </cancelPolicyCase>
		</cancelPolicy>
		<createAlignment>
		    <createAlignmentCase>
		        <product>Laser-Scope</product>
                <alignment>START_OF_SUBSCRIPTION</alignment>
            </createAlignmentCase>
            <createAlignmentCase>
                <alignment>START_OF_BUNDLE</alignment>
            </createAlignmentCase>
		</createAlignment>
		<billingAlignment>
			<billingAlignmentCase>
				<productCategory>ADD_ON</productCategory>
				<alignment>BUNDLE</alignment>
			</billingAlignmentCase>
			<billingAlignmentCase>
				<billingPeriod>ANNUAL</billingPeriod>
				<alignment>SUBSCRIPTION</alignment>
			</billingAlignmentCase>
			<billingAlignmentCase>
				<alignment>ACCOUNT</alignment>
			</billingAlignmentCase>
		</billingAlignment>
		<priceList>
			<priceListCase>
				<fromPriceList>rescue</fromPriceList>
				<toPriceList>DEFAULT</toPriceList>
			</priceListCase>
		</priceList>
	</rules>

	<plans>
		<plan name="pistol-monthly">
			<product>Pistol</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice> <!-- empty price implies $0 -->
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>GBP</currency><value>29.95</value></price>
					<price><currency>EUR</currency><value>29.95</value></price> 
					<price><currency>USD</currency><value>29.95</value></price>								
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="shotgun-monthly">
			<product>Shotgun</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice></fixedPrice>
				    <!-- no price implies $0 -->
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
					<number>-1</number>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>249.95</value></price>								
					<price><currency>EUR</currency><value>149.95</value></price>
					<price><currency>GBP</currency><value>169.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="assault-rifle-monthly">
			<product>Assault-Rifle</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>599.95</value></price>								
					<price><currency>EUR</currency><value>349.95</value></price>
					<price><currency>GBP</currency><value>399.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="pistol-annual">
			<product>Pistol</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>199.95</value></price>								
					<price><currency>EUR</currency><value>199.95</value></price>
					<price><currency>GBP</currency><value>199.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="shotgun-annual">
			<product>Shotgun</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>2399.95</value></price>								
					<price><currency>EUR</currency><value>1499.95</value></price>
					<price><currency>GBP</currency><value>1699.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="assault-rifle-annual">
			<product>Assault-Rifle</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>5999.95</value></price>								
					<price><currency>EUR</currency><value>3499.95</value></price>
					<price><currency>GBP</currency><value>3999.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="pistol-annual-gunclub-discount">
			<product>Pistol</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
				<phase type="DISCOUNT">
					<duration>
						<unit>MONTHS</unit>
						<number>6</number>
					</duration>
					<billingPeriod>MONTHLY</billingPeriod>
					<recurringPrice>
						<price><currency>USD</currency><value>9.95</value></price>								
						<price><currency>EUR</currency><value>9.95</value></price>
						<price><currency>GBP</currency><value>9.95</value></price>
					</recurringPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>199.95</value></price>								
					<price><currency>EUR</currency><value>199.95</value></price>
					<price><currency>GBP</currency><value>199.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="shotgun-annual-gunclub-discount">
			<product>Shotgun</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
				<phase type="DISCOUNT">
					<duration>
						<unit>MONTHS</unit>
						<number>6</number>
					</duration>
					<billingPeriod>MONTHLY</billingPeriod>
					<recurringPrice>
						<price><currency>USD</currency><value>19.95</value></price>								
						<price><currency>EUR</currency><value>49.95</value></price>
						<price><currency>GBP</currency><value>69.95</value></price>
					</recurringPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>2399.95</value></price>								
					<price><currency>EUR</currency><value>1499.95</value></price>
					<price><currency>GBP</currency><value>1699.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="assault-rifle-annual-gunclub-discount">
			<product>Assault-Rifle</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
				<phase type="DISCOUNT">
					<duration>
						<unit>MONTHS</unit>
						<number>6</number>
					</duration>
					<billingPeriod>MONTHLY</billingPeriod>
					<recurringPrice>
						<price><currency>USD</currency><value>99.95</value></price>								
						<price><currency>EUR</currency><value>99.95</value></price>
						<price><currency>GBP</currency><value>99.95</value></price>
						</recurringPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>5999.95</value></price>								
					<price><currency>EUR</currency><value>3499.95</value></price>
					<price><currency>GBP</currency><value>3999.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="laser-scope-monthly">
		<product>Laser-Scope</product>
           <initialPhases>
              <phase type="DISCOUNT">
                 <duration>
                    <unit>MONTHS</unit>
                    <number>1</number>
                  </duration>
                 <billingPeriod>MONTHLY</billingPeriod>
                    <recurringPrice>
                      <price><currency>USD</currency><value>999.95</value></price>                             
                      <price><currency>EUR</currency><value>499.95</value></price>
                      <price><currency>GBP</currency><value>999.95</value></price>
                      </recurringPrice>
                </phase>
            </initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>1999.95</value></price>								
					<price><currency>EUR</currency><value>1499.95</value></price>
					<price><currency>GBP</currency><value>1999.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="telescopic-scope-monthly">
			<product>Telescopic-Scope</product>
			<initialPhases>
              <phase type="DISCOUNT">
                 <duration>
                    <unit>MONTHS</unit>
                    <number>1</number>
                  </duration>
                 <billingPeriod>MONTHLY</billingPeriod>
                    <recurringPrice>
                      <price><currency>USD</currency><value>399.95</value></price>                             
                      <price><currency>EUR</currency><value>299.95</value></price>
                      <price><currency>GBP</currency><value>399.95</value></price>
                      </recurringPrice>
                </phase>
            </initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>999.95</value></price>								
					<price><currency>EUR</currency><value>499.95</value></price>
					<price><currency>GBP</currency><value>999.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="extra-ammo-monthly">
			<product>Extra-Ammo</product>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>999.95</value></price>								
					<price><currency>EUR</currency><value>499.95</value></price>
					<price><currency>GBP</currency><value>999.95</value></price>
				</recurringPrice>
			</finalPhase>
			<plansAllowedInBundle>-1</plansAllowedInBundle> <!-- arbitrary number of these (multipack) -->
		</plan>
		<plan name="holster-monthly-regular">
			<product>Holster</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>199.95</value></price>								
					<price><currency>EUR</currency><value>199.95</value></price>
					<price><currency>GBP</currency><value>199.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="holster-monthly-special">
			<product>Holster</product>
			<initialPhases>
				<phase type="TRIAL">
					<duration>
						<unit>DAYS</unit>
						<number>30</number>
					</duration>
					<billingPeriod>NO_BILLING_PERIOD</billingPeriod>
					<fixedPrice>
					</fixedPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>199.95</value></price>								
					<price><currency>EUR</currency><value>199.95</value></price>
					<price><currency>GBP</currency><value>199.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="assault-rifle-annual-rescue">
			<product>Assault-Rifle</product>
			<initialPhases>
				<phase type="DISCOUNT">
					<duration>
						<unit>YEARS</unit>
						<number>1</number>
					</duration>
					<billingPeriod>ANNUAL</billingPeriod>
					<recurringPrice>
						<price><currency>USD</currency><value>5999.95</value></price>								
						<price><currency>EUR</currency><value>3499.95</value></price>
						<price><currency>GBP</currency><value>3999.95</value></price>
					</recurringPrice>
				</phase>
			</initialPhases>
			<finalPhase type="EVERGREEN">
				<duration>
					<unit>UNLIMITED</unit>
				</duration>
				<billingPeriod>ANNUAL</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>5999.95</value></price>								
					<price><currency>EUR</currency><value>3499.95</value></price>
					<price><currency>GBP</currency><value>3999.95</value></price>
				</recurringPrice>
			</finalPhase>
		</plan>
		<plan name="refurbish-maintenance">
			<product>Refurbish-Maintenance</product>
			<finalPhase type="FIXEDTERM">
				<duration>
					<unit>MONTHS</unit>
					<number>12</number>
				</duration>
				<billingPeriod>MONTHLY</billingPeriod>
				<recurringPrice>
					<price><currency>USD</currency><value>199.95</value></price>								
					<price><currency>EUR</currency><value>199.95</value></price>
					<price><currency>GBP</currency><value>199.95</value></price>
				</recurringPrice>
				<fixedPrice>
					<price><currency>USD</currency><value>599.95</value></price>								
					<price><currency>EUR</currency><value>599.95</value></price>
					<price><currency>GBP</currency><value>599.95</value></price>
				</fixedPrice>
			</finalPhase>
		</plan>
	</plans>
	<priceLists>
		<defaultPriceList name="DEFAULT"> 
			<plans>
				<plan>pistol-monthly</plan>
				<plan>shotgun-monthly</plan>
				<plan>assault-rifle-monthly</plan>
				<plan>pistol-annual</plan>
				<plan>shotgun-annual</plan>
				<plan>assault-rifle-annual</plan>
				<plan>laser-scope-monthly</plan>
				<plan>telescopic-scope-monthly</plan>
				<plan>extra-ammo-monthly</plan>
				<plan>holster-monthly-regular</plan>
				<plan>refurbish-maintenance</plan>
			</plans>
		</defaultPriceList>
		<childPriceList name="gunclubDiscount">
			<plans>
				<plan>pistol-monthly</plan>
				<plan>shotgun-monthly</plan>
				<plan>assault-rifle-monthly</plan>
				<plan>pistol-annual-gunclub-discount</plan>
				<plan>shotgun-annual-gunclub-discount</plan>
				<plan>assault-rifle-annual-gunclub-discount</plan>
				<plan>holster-monthly-special</plan>
			</plans>
		</childPriceList>
		<childPriceList name="rescue">
			<plans>
				<plan>assault-rifle-annual-rescue</plan>
			</plans>
		</childPriceList>
	</priceLists>

</catalog>
