Get unlimited public & private packages + team-based management with npm Teams.Learn more »

apple-pricing-matrix

1.0.3 • Public • Published

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

Install

npm i apple-pricing-matrix

DownloadsWeekly Downloads

384

Version

1.0.3

License

MIT

Unpacked Size

2.31 MB

Total Files

16

Last publish

Collaborators

  • avatar