small fixes for single payout and big chunck for multiple payouts
This commit is contained in:
@@ -16,18 +16,24 @@ class QuotationService {
|
||||
static final _logger = Logger('service.payment.quotation');
|
||||
static const String _objectType = Services.payments;
|
||||
|
||||
static Future<PaymentQuote> getQuotation(String organizationRef, QuotePaymentRequest request) async {
|
||||
static Future<PaymentQuote> getQuotation(
|
||||
String organizationRef,
|
||||
QuotePaymentRequest request,
|
||||
) async {
|
||||
_logger.fine('Quoting payment for organization $organizationRef');
|
||||
final response = await AuthorizationService.getPOSTResponse(
|
||||
_objectType,
|
||||
'/quote/$organizationRef',
|
||||
_objectType,
|
||||
'/quote/$organizationRef',
|
||||
request.toJson(),
|
||||
);
|
||||
final parsed = PaymentQuoteResponse.fromJson(response);
|
||||
return parsed.quote.toDomain(idempotencyKey: parsed.idempotencyKey);
|
||||
}
|
||||
|
||||
static Future<PaymentQuotes> getMultiQuotation(String organizationRef, QuotePaymentsRequest request) async {
|
||||
static Future<PaymentQuotes> getMultiQuotation(
|
||||
String organizationRef,
|
||||
QuotePaymentsRequest request,
|
||||
) async {
|
||||
_logger.fine('Quoting payments for organization $organizationRef');
|
||||
final response = await AuthorizationService.getPOSTResponse(
|
||||
_objectType,
|
||||
@@ -35,7 +41,6 @@ class QuotationService {
|
||||
request.toJson(),
|
||||
);
|
||||
final parsed = PaymentQuotesResponse.fromJson(response);
|
||||
final idempotencyKey = response['idempotencyKey'] as String?;
|
||||
return parsed.quote.toDomain(idempotencyKey: idempotencyKey);
|
||||
return parsed.quote.toDomain();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user