small fixes for single payout and big chunck for multiple payouts

This commit is contained in:
Arseni
2026-02-05 21:58:37 +03:00
parent 8034847e46
commit b9748b8ab2
37 changed files with 1708 additions and 224 deletions

View File

@@ -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();
}
}