CommerceProduct.fromJson constructor

CommerceProduct.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CommerceProduct.fromJson(Map<String, dynamic> json) {
  return CommerceProduct(
    productId: json['product_id'] ?? '',
    duration: json['duration'] ?? -1,
    quantity: json['quantity'] ?? 1,
  );
}