UsageExperimental.xml

326 lines | 12.753 kB Blame History Raw Download
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  ~ Copyright 2014 The Billing Project, 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.
  -->

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

    <effectiveDate>2013-02-08T00:00:00+00:00</effectiveDate>
    <catalogName>Usage</catalogName>

    <!-- TBD
    Defines the billingMode for all recurring subscription in that catalog:
    Goal is to avoid to end up in a situation where a user could switch plan and suddenly his
    recurring billing goes from IN_ADVANCE to IN_ARREAR or the reverse.
    -->
    <recurringBillingMode>IN_ADVANCE</recurringBillingMode>

    <currencies>
        <currency>BTC</currency>
    </currencies>

    <products>
        <product name="Dummy">
            <category>BASE</category>
        </product>
        <product name="CapacityInAdvance">
            <category>BASE</category>
        </product>
        <product name="ConsumableInAdvancePrepayCredit">
            <category>BASE</category>
        </product>
        <product name="ConsumableInAdvanceTopUp">
            <category>BASE</category>
        </product>
        <product name="CapacityInArrear">
            <category>BASE</category>
        </product>
        <product name="ConsumableInArrear">
            <category>BASE</category>
        </product>
    </products>


    <plans>

        <!-- Shows main layout -->
        <plan name="dummy-annual">
            <product>Dummy</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>
                <!-- New Fixed section (maybe not needed,. but for consistency with recurring, usage sections) -->
                <fixed>
                    <fixedPrice>
                        <price>
                        </price>
                    </fixedPrice>
                </fixed>
                <!-- New recurring section:
                     - Embeds its own billingPeriod
                     - Its billingMode is catalog level
                 -->
                <recurring>
                    <billingPeriod>ANNUAL</billingPeriod>
                    <recurringPrice>
                        <price>
                            <!-- ... -->
                        </price>
                    </recurringPrice>
                </recurring>
                <usages>
                    <usage billingMode="IN_ADVANCE" usageType="CONSUMABLE">
                        <!-- ... -->
                    </usage>
                </usages>
            </finalPhase>
        </plan>


        <plan name="capacity-in-advance-monthly">
            <product>CapacityInAdvance</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>

                <usages>
                    <usage billingMode="IN_ADVANCE" usageType="CAPACITY">
                        <billingPeriod>MONTHLY</billingPeriod>
                        <limits>
                            <limit>
                                <unit>members</unit>
                                <max>100</max>
                            </limit>
                        </limits>
                        <prices>
                            <recurringPrice>
                                <price>
                                    <currency>BTC</currency>
                                    <value>100.00</value>
                                </price>
                            </recurringPrice>
                        </prices>
                    </usage>
                </usages>
            </finalPhase>
        </plan>


        <plan name="consumable-in-advance-prepay-credit-monthly">
            <product>ConsumableInAdvancePrepayCredit</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>
                <usages>
                    <usage billingMode="IN_ADVANCE" usageType="CONSUMABLE">
                        <billingPeriod>MONTHLY</billingPeriod>
                        <blocks>
                            <block>
                                <unit>minutes</unit>
                                <size>1000</size>
                                <prices>
                                    <!-- could be either fixed (with NO_BILLING_PERIOD) )or recurring:
                                    * In the case of fixed price, we buy one block of units
                                    * In the case of recurring price, we buy one block of units for each period
                                    -->
                                    <recurringPrice>
                                        <price>
                                            <currency>BTC</currency>
                                            <value>0.10</value>
                                        </price>
                                    </recurringPrice>
                                </prices>
                            </block>
                        </blocks>
                        <!-- We could instead define the price here as we did for capacity-in-advance if we want to 'bundle' linit/units -->
                    </usage>
                </usages>
            </finalPhase>
        </plan>


        <plan name="consumable-in-advance-topup">
            <product>ConsumableInAdvanceTopUp</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>

                <usages>
                    <usage billingMode="IN_ADVANCE" usageType="CONSUMABLE">
                        <billingPeriod>NO_BILLING_PERIOD</billingPeriod>
                        <blocks>
                            <block>
                                <unit>fasttrack_tokens</unit>
                                <size>10</size>
                                <min>5</min>

                                <prices>
                                    <fixedPrice>
                                        <price>
                                            <currency>BTC</currency>
                                            <value>0.10</value>
                                        </price>
                                    </fixedPrice>
                                </prices>
                            </block>
                        </blocks>
                    </usage>
                </usages>
            </finalPhase>
        </plan>


        <plan name="capacity-in-arrear">
            <product>CapacityInArrear</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>

                <usages>
                    <usage billingMode="IN_ARREAR" usageType="CAPACITY">
                        <billingPeriod>MONTHLY</billingPeriod>
                        <tiers>
                            <tier>
                                <limits>
                                    <limit>
                                        <unit>bandwith (Meg/sec)</unit>
                                        <max>100</max>
                                    </limit>
                                    <limit>
                                        <unit>members</unit>
                                        <max>500</max>
                                    </limit>
                                </limits>
                                <prices>
                                    <fixedPrice>
                                        <price>
                                            <currency></currency>
                                            <value></value>
                                        </price>
                                    </fixedPrice>
                                    <recurringPrice>
                                        <price>
                                            <currency></currency>
                                            <value></value>
                                        </price>
                                    </recurringPrice>
                                </prices>
                            </tier>
                            <tier>
                                <limits>
                                    <limit>
                                        <unit>bandwith (Meg/sec)</unit>
                                        <max>100</max>
                                    </limit>
                                    <limit>
                                        <unit>members</unit>
                                        <max>1000</max>
                                    </limit>
                                </limits>
                                <prices>
                                    <fixedPrice>
                                        <price>
                                            <currency></currency>
                                            <value></value>
                                        </price>
                                    </fixedPrice>
                                    <recurringPrice>
                                        <price>
                                            <currency></currency>
                                            <value></value>
                                        </price>
                                    </recurringPrice>
                                </prices>
                            </tier>
                        </tiers>
                    </usage>
                </usages>
            </finalPhase>
        </plan>


        <plan name="consumable-in-arrear">
            <product>ConsumableInArrear</product>
            <initialPhases>
            </initialPhases>
            <finalPhase type="EVERGREEN">
                <duration>
                    <unit>UNLIMITED</unit>
                </duration>
                <usages>
                    <usage billingMode="IN_ARREAR" usageType="CONSUMABLE">
                        <billingPeriod>MONTHLY</billingPeriod>
                        <tiers>
                            <tier>
                                <blocks>
                                    <block>
                                        <unit>minutes</unit>
                                        <size>1000</size>
                                        <prices>
                                            <fixedPrice>
                                                <price>
                                                    <currency>BTC</currency>
                                                    <value>0.5</value>
                                                </price>
                                            </fixedPrice>
                                        </prices>
                                    </block>
                                    <block>
                                        <unit>Mbytes</unit>
                                        <size>512</size>
                                        <prices>
                                            <fixedPrice>
                                                <price>
                                                    <currency>BTC</currency>
                                                    <value>0.3</value>
                                                </price>
                                            </fixedPrice>
                                        </prices>
                                    </block>
                                </blocks>
                            </tier>
                        </tiers>
                    </usage>
                </usages>
            </finalPhase>
        </plan>


    </plans>
    <priceLists>
        <defaultPriceList name="DEFAULT">
            <plans>
                <plan>capacity-in-advance-annual</plan>
            </plans>
        </defaultPriceList>
    </priceLists>
</catalog>