
org.onepf.opfiab.samsung.model.SamsungPurchasedItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opfiab-samsung Show documentation
Show all versions of opfiab-samsung Show documentation
Adds Samsung billing provider
The newest version!
package org.onepf.opfiab.samsung.model;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import org.json.JSONException;
import org.onepf.opfiab.samsung.SamsungUtils;
import java.util.Date;
public class SamsungPurchasedItem extends SamsungBillingModel {
private static final String KEY_SUBSCRIPTION_END_DATE = "mSubscriptionEndDate";
@NonNull
private final ItemType itemType;
@Nullable
private final Date subscriptionEndDate;
public SamsungPurchasedItem(@NonNull final String originalJson) throws JSONException {
super(originalJson);
this.itemType = SamsungUtils.getItemType(jsonObject);
final String dateString = jsonObject.optString(KEY_SUBSCRIPTION_END_DATE);
this.subscriptionEndDate = SamsungUtils.parseDate(dateString);
}
@NonNull
public ItemType getItemType() {
return itemType;
}
@Nullable
public Date getSubscriptionEndDate() {
return subscriptionEndDate;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy