parsePurchaseState function
Implementation
PurchaseState parsePurchaseState(String state) {
switch (state) {
case 'PURCHASED':
return PurchaseState.PURCHASED;
case 'REFUNDED':
return PurchaseState.REFUNDED;
}
throw StateError('state is not defined');
}