idempotency key delivery fix

This commit is contained in:
Stephan D
2026-01-21 16:50:47 +01:00
parent 87f99be01d
commit bd5dfb4f26
11 changed files with 63 additions and 24 deletions

View File

@@ -16,14 +16,15 @@ 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<PaymentQuoteX> getQuotation(String organizationRef, QuotePaymentRequest request) async {
_logger.fine('Quoting payment for organization $organizationRef');
final response = await AuthorizationService.getPOSTResponse(
_objectType,
'/quote/$organizationRef',
request.toJson(),
);
return PaymentQuoteResponse.fromJson(response).quote.toDomain();
final resp = PaymentQuoteResponse.fromJson(response);
return PaymentQuoteX.build(quote: resp.quote.toDomain(), idempotencyKey: resp.idempotencyKey);
}
static Future<PaymentQuotes> getMultiQuotation(String organizationRef, QuotePaymentsRequest request) async {