Giter Site home page Giter Site logo

yyppaag / app_store_pricing_matrix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kenn/app_store_pricing_matrix

0.0 1.0 0.0 130 KB

App Store Pricing Matrix

Home Page: https://rubygems.org/gems/app_store_pricing_matrix

License: MIT License

Ruby 100.00%

app_store_pricing_matrix's Introduction

App Store Pricing Matrix

Build Status

A simple module that holds currencies and prices from the Apple's iOS App Store.

Install

gem install app_store_pricing_matrix

Usage

price = AppStorePricingMatrix.find_by(tier: 1, country: 'US')

price.country                     # => "United States"
price.country_code                # => "US"
price.currency_symbol             # => "$"
price.currency_code               # => "USD"
price.wholesale_price             # => 0.7
price.retail_price                # => 0.99
price.formatted_retail_price      # => "$0.99"
price.formatted_wholesale_price   # => "$0.70"
AppStorePricingMatrix.stems
# => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 510, 530, 550, 560, 570, 580, 590]

AppStorePricingMatrix.countries
# => ["US", "CA", "MX", "AU", "NZ", "JP", "CN", "SG", "HK", "TW", "ID", "IN", "RU", "TR", "IL", "ZA", "SA", "AE", "GB", "DK", "SE", "CH", "NO", "LU", "MT", "CY", "DE", "FR", "AT", "BG", "EE", "SK", "BE", "CZ", "LV", "LT", "NL", "ES", "IT", "SI", "GR", "IE", "PL", "PT", "FI", "RO", "HU", "KR"]

AppStorePricingMatrix.currencies
# => ["USD", "CAD", "MXN", "AUD", "NZD", "JPY", "CNY", "SGD", "HKD", "TWD", "IDR", "INR", "RUB", "TRY", "ILS", "ZAR", "SAR", "AED", "GBP", "DKK", "SEK", "CHF", "NOK", "EUR"]

Updating the price

The pricing matrix JSON is taken from Apple's hidden API at the following URL.

https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/#{AppStoreID}/pricing/matrix

The URL is accessible when you are logged in to iTunes Connect with your browser.

When you need to update the pricing matrix,

  1. Login to iTunes Connect with your developer account.
  2. Run rake aspm:open and enter any App Store ID that you own.
  3. Your default browser will launch and load the JSON. Copy the entire content and paste into input/pricing_matrix.json.
  4. Run rake to check if anything is broken.
  5. Send a pull request with updated input/pricing_matrix.json.

Changelog

v3.0.0 (May 2, 2016)

  • Complete overhaul. Now we use the JSON data fetched from Apple's hidden API.

v2.1.0 (October 26, 2012)

  • Based on v14.
  • Added RUB, TRY, INR, IDR, ILS, ZAR, SAR and AED

v2.0.0 (July 18, 2012)

  • Based on v13.
  • Added SGD, HKD and TWD.
  • CURRENCY_MAP and REVERSE_CURRENCY_MAP are removed. They are all self-referential now.
  • CUSTOMER_CURRENCIES and DEVELOPER_CURRENCIES are removed. Use CURRENCIES instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.