
Data::Apple::PriceTier - Utility for Apple (App|Mac) Store's price tier.

# class interface
my $price = Data::Apple::PriceTier->price_for(
currency => 'Euro',
tier => 1,
); # => 0.79
my $proceed = Data::Apple::PriceTier->proceed_for(
country => 'Japan',
tier => 1,
); # => 60
# object interface
my $us_tier = Data::Apple::PriceTier->new( country => 'U.S.' );
my $price = $us_tier->price_for_tier(1); # => 0.99

Data::Apple::PriceTier is a simple utility module that helps you to convert Apple's price tier to real currencies. It's useful to create server-side implementation of In-App purchases that supports multiple currencies.

$price = Data::Apple::PriceTier->price_for( currency => 'US$', tier => 1 );
Return customer price for %args
Supported %args is:
Specify target country or currency. Either country or currency is required.
Specify target price tier. Required.
$proceed = Data::Apple::PriceTier->proceed_for( currency => 'Yen', tier => 1 );
Return your proceed for %args. Supported args is same as above price_for method.
my @prices = Data::Apple::PriceTier->prices( country => 'Japan' );
my @prices = Data::Apple::PriceTier->prices( currency => 'Yen' );
Return customer price list for given country or currency.
Note: this list start with tier 1. $prices[0] represent tier 1 price not Free price.
my @proceeds = Data::Apple::PriceTier->proceeds( country => 'Japan' );
my @proceeds = Data::Apple::PriceTier->proceeds( currency => 'Yen' );
Return your proceed list for given country or currency.
Create Data::Apple::PriceTier object and return it. See `INSTANCE METHODS` showed below for more detail.
List of countries that Apple (and this module) supports.
List of currencies that Apple (and this module) supports.
Return list of supported countries and currencies at once.

Return customer price for $tier with <$obj>'s country.
Return your proceed for $tier with <$obj>'s country.

Daisuke Murase <typester@cpan.org>

Copyright (c) 2012 KAYAC Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.