/*
 * Copyright 2014 Uwe Trottmann
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.battlelancer.seriesguide.billing.amazon;

/**
 * Contains all In App Purchase products definition.
 */
public enum AmazonSku {

    SERIESGUIDE_SUB("seriesguide-sub");

    private final String sku;

    public String getSku() {
        return this.sku;
    }

    private AmazonSku(final String sku) {
        this.sku = sku;
    }

    public static AmazonSku fromSku(final String sku) {
        if (SERIESGUIDE_SUB.getSku().equals(sku)) {
            return SERIESGUIDE_SUB;
        }
        return null;
    }

}

@@ -670,16 +670,23 @@
 all 
-In App P
+Amazon in-app p
 urch
@@ -708,16 +708,17 @@
 finition
+s
 .%0A */%0Apu
@@ -748,40 +748,253 @@
     
-SERIESGUIDE_SUB(%22seriesguide-sub
+/**%0A     * The yearly subscription with a trial month. Unlocks access to everything.%0A     */%0A    SERIESGUIDE_SUB(%22seriesguide-sub%22),%0A    /**%0A     * The one-time purchase. Unlocks access to everything.%0A     */%0A    SERIESGUIDE_PASS(%22x-pass-2014-10
 %22);%0A
@@ -1090,24 +1090,16 @@
  %7D%0A%0A    
-private 
 AmazonSk
@@ -1305,16 +1305,116 @@
       %7D%0A
+        if (SERIESGUIDE_PASS.getSku().equals(sku)) %7B%0A            return SERIESGUIDE_PASS;%0A        %7D%0A
         

Add pass Amazon SKU.