Transaction class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
- Transaction({@JsonKey.new(name: 'amountDetails') required Amount amount, @JsonKey.new(name: 'reasonForPayment') required String description, @JsonKey.new(name: 'merchantReference') String? reference, @Default.new('BASIC') String transactionType, @Default.new('') String resultUrl, @Default.new('') String returnUrl})
-
Create transaction instance
constfactory
-
Transaction.fromJson(Map<
String, dynamic> json) -
factory
Properties
- amount → Amount
-
Amount in value and currency
no setterinherited
-
copyWith
→ $TransactionCopyWith<
Transaction> -
Create a copy of Transaction
with the given fields replaced by the non-null parameter values.
no setterinherited
- description → String
-
Reason for payment
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- reference → String?
-
Reference from the merchant system
no setterinherited
- resultUrl → String
-
Result URL - HTTP callback endpoint on your server for receiving event
notifications
no setterinherited
- returnUrl → String
-
Return URL redirects users back to the originating page during a
checkout flow
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transactionType → String
-
Type of transaction
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Transaction value)) → TResult -
Available on Transaction, provided by the TransactionPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Transaction value)?) → TResult? -
Available on Transaction, provided by the TransactionPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Transaction value)?, {required TResult orElse()}) → TResult -
Available on Transaction, provided by the TransactionPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(Amount amount, String description, String? reference, String transactionType, String resultUrl, String returnUrl)?, {required TResult orElse()}) → TResult -
Available on Transaction, provided by the TransactionPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Transaction to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(Amount amount, String description, String? reference, String transactionType, String resultUrl, String returnUrl)) → TResult -
Available on Transaction, provided by the TransactionPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(Amount amount, String description, String? reference, String transactionType, String resultUrl, String returnUrl)?) → TResult? -
Available on Transaction, provided by the TransactionPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited