Product.fromJson constructor
Product.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Product.fromJson(Map<String, dynamic> json) {
return Product(
productArn: json['ProductArn'] as String,
activationUrl: json['ActivationUrl'] as String?,
categories: (json['Categories'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
companyName: json['CompanyName'] as String?,
description: json['Description'] as String?,
integrationTypes: (json['IntegrationTypes'] as List?)
?.whereNotNull()
.map((e) => (e as String).toIntegrationType())
.toList(),
marketplaceUrl: json['MarketplaceUrl'] as String?,
productName: json['ProductName'] as String?,
productSubscriptionResourcePolicy:
json['ProductSubscriptionResourcePolicy'] as String?,
);
}