PurchaseResult.fromJSON constructor
PurchaseResult.fromJSON(
- Map<String, dynamic> json
)
Implementation
factory PurchaseResult.fromJSON(Map<String, dynamic> json) {
return PurchaseResult(
responseCode: (json['responseCode'] as num?)?.toInt(),
debugMessage: json['debugMessage']?.toString(),
code: json['code']?.toString(),
message: json['message']?.toString(),
productId: json['productId']?.toString(),
productIds: _parseProductIds(json['productIds']),
productType: json['productType']?.toString(),
isEmptyProductList: json['isEmptyProductList'] as bool?,
subResponseCodeAndroid: parseSubResponseCodeAndroid(
json['subResponseCodeAndroid'] ?? json['subResponseCode'],
),
purchaseTokenAndroid: json['purchaseTokenAndroid']?.toString(),
);
}