toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      if (product != null) "product": encodeValue(product),
      if (productId != null) "product_id": encodeValue(productId),
      if (price != null) "price": encodeValue(price),
      if (priceId != null) "price_id": encodeValue(priceId),
      if (usage != null) "usage": encodeValue(usage),
      if (expiresAt != null) "expires_at": encodeValue(expiresAt),
      if (presentation != null) "presentation": encodeValue(presentation),
      "quantity": encodeValue(quantity),
    };