updated document upload according to fresh api
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class PaymentOperationDTO {
|
||||
final String? stepRef;
|
||||
final String? operationRef;
|
||||
final String? gateway;
|
||||
final String? code;
|
||||
final String? state;
|
||||
final String? label;
|
||||
@@ -12,6 +13,7 @@ class PaymentOperationDTO {
|
||||
const PaymentOperationDTO({
|
||||
this.stepRef,
|
||||
this.operationRef,
|
||||
this.gateway,
|
||||
this.code,
|
||||
this.state,
|
||||
this.label,
|
||||
@@ -25,6 +27,7 @@ class PaymentOperationDTO {
|
||||
PaymentOperationDTO(
|
||||
stepRef: _asString(json['stepRef'] ?? json['step_ref']),
|
||||
operationRef: _asString(json['operationRef'] ?? json['operation_ref']),
|
||||
gateway: _asString(json['gateway']),
|
||||
code: _asString(json['code']),
|
||||
state: _asString(json['state']),
|
||||
label: _asString(json['label']),
|
||||
@@ -39,6 +42,7 @@ class PaymentOperationDTO {
|
||||
Map<String, dynamic> toJson() => <String, dynamic>{
|
||||
'stepRef': stepRef,
|
||||
'operationRef': operationRef,
|
||||
'gateway': gateway,
|
||||
'code': code,
|
||||
'state': state,
|
||||
'label': label,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'package:pshared/data/dto/payment/operation.dart';
|
||||
import 'package:pshared/models/payment/execution_operation.dart';
|
||||
|
||||
|
||||
extension PaymentOperationDTOMapper on PaymentOperationDTO {
|
||||
PaymentExecutionOperation toDomain() => PaymentExecutionOperation(
|
||||
stepRef: stepRef,
|
||||
operationRef: operationRef,
|
||||
gateway: gateway,
|
||||
code: code,
|
||||
state: state,
|
||||
label: label,
|
||||
@@ -20,6 +20,7 @@ extension PaymentExecutionOperationMapper on PaymentExecutionOperation {
|
||||
PaymentOperationDTO toDTO() => PaymentOperationDTO(
|
||||
stepRef: stepRef,
|
||||
operationRef: operationRef,
|
||||
gateway: gateway,
|
||||
code: code,
|
||||
state: state,
|
||||
label: label,
|
||||
|
||||
Reference in New Issue
Block a user