@NotNull
    public SkuManager mapSku(String sku, String storeName, @NotNull String storeSku) {
        checkSkuMappingParams(sku, storeName, storeSku);

        Map<String, String> skuMap = sku2storeSkuMappings.get(storeName);
        if (skuMap == null) {
            skuMap = new HashMap<String, String>();
            sku2storeSkuMappings.put(storeName, skuMap);
        } else if (skuMap.containsKey(sku)) {
            throw new SkuMappingException("Already specified SKU. sku: "
                    + sku + " -> storeSku: " + skuMap.get(sku));
        }

        Map<String, String> storeSkuMap = storeSku2skuMappings.get(storeName);
        if (storeSkuMap == null) {
            storeSkuMap = new HashMap<String, String>();
            storeSku2skuMappings.put(storeName, storeSkuMap);
        } else if (storeSkuMap.get(storeSku) != null) {
            throw new SkuMappingException("Ambiguous SKU mapping. You try to map sku: "
                    + sku + " -> storeSku: " + storeSku
                    + ", that is already mapped to sku: " + storeSkuMap.get(storeSku));
        }

        skuMap.put(sku, storeSku);
        storeSkuMap.put(storeSku, sku);
        return this;
    }
@ NotNull public SkuManager mapSku ( String sku , String storeName , @ NotNull String storeSku ) { checkSkuMappingParams ( sku , storeName , storeSku ) ; Map < String , String > skuMap = sku2storeSkuMappings . get ( storeName ) ; if ( skuMap == null ) { skuMap = new HashMap < String , String > ( ) ; sku2storeSkuMappings . put ( storeName , skuMap ) ; } else if ( skuMap . containsKey ( sku ) ) { throw new SkuMappingException ( "Already specified SKU. sku: " + sku + " -> storeSku: " + skuMap . get ( sku ) ) ; } Map < String , String > storeSkuMap = storeSku2skuMappings . get ( storeName ) ; if ( storeSkuMap == null ) { storeSkuMap = new HashMap < String , String > ( ) ; storeSku2skuMappings . put ( storeName , storeSkuMap ) ; } else if ( storeSkuMap . get ( storeSku ) != null ) { throw new SkuMappingException ( "Ambiguous SKU mapping. You try to map sku: " + sku + " -> storeSku: " + storeSku + ", that is already mapped to sku: " + storeSkuMap . get ( storeSku ) ) ; } skuMap . put ( sku , storeSku ) ; storeSkuMap . put ( storeSku , sku ) ; return this ; }
Maps a store-specific SKU to an internal base SKU.
The best approach is to use SKU like <code>com.companyname.application.item</code>.
Such SKU fits most of stores, so it doesn't need to be mapped.
If this approach is not applicable, use an internal application SKU in the code (usually it is a SKU for Google Play)
and map SKU from other stores using this method. OpenIAB will map SKU in both directions,
so you can use only your internal SKU

@param sku       - The internal SKU
@param storeSku  - The store-specific SKU. Shouldn't duplicate already mapped values
@param storeName - @see {@link IOpenAppstore#getAppstoreName()}
or {@link org.onepf.oms.OpenIabHelper#NAME_AMAZON}
{@link org.onepf.oms.OpenIabHelper#NAME_GOOGLE}
@return Instance of {@link org.onepf.oms.SkuManager}.
@throws org.onepf.oms.SkuMappingException If mapping can't be done.
@see #mapSku(String, java.util.Map)