1.0.3 • Published 5 years ago

apple-pricing-matrix v1.0.3

Weekly downloads
167
License
MIT
Repository
github
Last release
5 years ago

Programmatic access to Apple's in-app-purchase pricing matrix

Provides lookups for Apple's pricing tiers, accurate as of 2019-05-08

Getting started

$ yarn add apple-pricing-matrix
import {
  getTier,
  getLocaleTier,
  getLocaleCurrency,
  getUSDRate,
} from 'apple-pricing-matrix';

const tier1 = getTier('1'); // returns object mapping iso country code to tiering data for tier 1 purchases

const tier3Germany = getLocaleTier('3', 'DE'); // returns tier 3 data for Germany

const germanCurrency = getLocaleCurrency('DE'); // returns the currency used by Apple for a supported iso country code

const dollarRate = getUSDRate('5', 'JP'); // returns the USD conversion rate used by Apple for the given tier and country code

Tests

To run the test suite, first install the dependencies, then run yarn test:

$ yarn
$ yarn test

License

MIT