toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'transactionType': transactionType.wire,
      'amountMinorUnits': amountMinorUnits,
      'currency': currency,
      'idempotencyKey': idempotencyKey,
      if (referenceId != null) 'referenceId': referenceId,
      if (description != null) 'description': description,
      'allowedEntryModes':
          allowedEntryModes.map((e) => e.wire).toList(growable: false),
      if (preferredEntryModes.isNotEmpty)
        'preferredEntryModes':
            preferredEntryModes.map((e) => e.wire).toList(growable: false),
      'requestSignature': requestSignature,
      if (timeout != null) 'timeoutMs': timeout!.inMilliseconds,
      if (metadata != null) 'metadata': metadata,
    };