Transaction.fromMap constructor
Transaction.fromMap(
- String oldId,
- Map body
)
Implementation
Transaction.fromMap(String oldId, Map body) : super.fromMap(oldId, body) {
this.type = HitCategory.TRANSACTION;
this.affiliation = body['ta'] ?? "";
this.transactionId = body['tid'] ?? "";
// Add revenue
this.revenue = body['tr'];
// Add shipping
this.shipping = body['ts'];
// Add Tax
this.tax = body['tt'];
// Add currency
this.currency = body['tc'];
// Add coupon code
this.couponCode = body['tcc'];
// Add paymentMethod
this.paymentMethod = body['pm'];
// Add shippingMethod
this.shippingMethod = body['sm'];
// Add item count
this.itemCount = body['icn'];
}