Quotation
This commit is contained in:
@@ -5,9 +5,9 @@ import 'package:pshared/api/requests/payment/quotes.dart';
|
||||
import 'package:pshared/api/responses/payment/quotation.dart';
|
||||
import 'package:pshared/api/responses/payment/quotes.dart';
|
||||
import 'package:pshared/data/mapper/payment/payment_quote.dart';
|
||||
import 'package:pshared/data/mapper/payment/quotes.dart';
|
||||
import 'package:pshared/models/payment/quote.dart';
|
||||
import 'package:pshared/models/payment/quotes.dart';
|
||||
import 'package:pshared/data/mapper/payment/quote/quotes.dart';
|
||||
import 'package:pshared/models/payment/quote/quote.dart';
|
||||
import 'package:pshared/models/payment/quote/quotes.dart';
|
||||
import 'package:pshared/service/authorization/service.dart';
|
||||
import 'package:pshared/service/services.dart';
|
||||
|
||||
@@ -16,15 +16,15 @@ class QuotationService {
|
||||
static final _logger = Logger('service.payment.quotation');
|
||||
static const String _objectType = Services.payments;
|
||||
|
||||
static Future<PaymentQuoteX> 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',
|
||||
request.toJson(),
|
||||
);
|
||||
final resp = PaymentQuoteResponse.fromJson(response);
|
||||
return PaymentQuoteX.build(quote: resp.quote.toDomain(), idempotencyKey: resp.idempotencyKey);
|
||||
final parsed = PaymentQuoteResponse.fromJson(response);
|
||||
return parsed.quote.toDomain(idempotencyKey: parsed.idempotencyKey);
|
||||
}
|
||||
|
||||
static Future<PaymentQuotes> getMultiQuotation(String organizationRef, QuotePaymentsRequest request) async {
|
||||
|
||||
Reference in New Issue
Block a user