copyWith method
Transaction
copyWith({
- String? id,
- DateTime? dateCreated,
- HipayTransactionStatus? status,
- int? amount,
- HipayPaymentMethod? paymentMethod,
- Customer? customer,
- List<
HipayItem> ? items, - List<
HipaySplit> ? splits,
Implementation
Transaction copyWith({
String? id,
DateTime? dateCreated,
HipayTransactionStatus? status,
int? amount,
HipayPaymentMethod? paymentMethod,
Customer? customer,
List<HipayItem>? items,
List<HipaySplit>? splits,
}) {
return Transaction(
id: id ?? this.id,
dateCreated: dateCreated ?? this.dateCreated,
status: status ?? this.status,
amount: amount ?? this.amount,
paymentMethod: paymentMethod ?? this.paymentMethod,
customer: customer ?? this.customer,
items: items ?? this.items,
splits: splits ?? this.splits,
);
}