Article constructor

Article({
  1. required String id,
  2. String? name,
  3. String? description,
  4. int? unitPriceCents,
  5. num? vatRate,
  6. String? unit,
  7. String? number,
  8. String? ean,
  9. String? internalCode,
  10. String? groupId,
  11. String? revenueGroupId,
  12. bool stockTracked = false,
  13. String? stockKind,
  14. List<String> stockLocationIds = const [],
  15. int? minStock,
  16. Map<String, int> minStockByLocation = const {},
  17. bool active = true,
  18. Map<String, String>? externalIds,
  19. Map<String, String>? metadata,
  20. String? variantGroupId,
  21. Map<String, String>? variantAttributes,
  22. String? createdAt,
  23. String? updatedAt,
  24. int? purchasePriceMicros,
  25. bool? hasPurchasePriceMicros,
})

Implementation

Article({
  required this.id,
  this.name,
  this.description,
  this.unitPriceCents,
  this.vatRate,
  this.unit,
  this.number,
  this.ean,
  this.internalCode,
  this.groupId,
  this.revenueGroupId,
  this.stockTracked = false,
  this.stockKind,
  this.stockLocationIds = const [],
  this.minStock,
  this.minStockByLocation = const {},
  this.active = true,
  this.externalIds,
  this.metadata,
  this.variantGroupId,
  this.variantAttributes,
  this.createdAt,
  this.updatedAt,
  this.purchasePriceMicros,
  bool? hasPurchasePriceMicros,
}) : hasPurchasePriceMicros = hasPurchasePriceMicros ?? purchasePriceMicros != null;