small fixes for single payout and big chunck for multiple payouts
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import 'package:pshared/api/requests/payment/base.dart';
|
||||
|
||||
|
||||
class InitiatePaymentsRequest extends PaymentBaseRequest {
|
||||
final String quoteRef;
|
||||
|
||||
const InitiatePaymentsRequest({
|
||||
required super.idempotencyKey,
|
||||
super.metadata,
|
||||
required this.quoteRef,
|
||||
});
|
||||
|
||||
factory InitiatePaymentsRequest.fromJson(Map<String, dynamic> json) {
|
||||
return InitiatePaymentsRequest(
|
||||
idempotencyKey: json['idempotencyKey'] as String,
|
||||
metadata: (json['metadata'] as Map<String, dynamic>?)?.map(
|
||||
(key, value) => MapEntry(key, value as String),
|
||||
),
|
||||
quoteRef: json['quoteRef'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return <String, dynamic>{
|
||||
'idempotencyKey': idempotencyKey,
|
||||
'metadata': metadata,
|
||||
'quoteRef': quoteRef,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user