encode<V> static method

V encode<V>(
  1. PaymentMethodDetailsInteracPresentReceipt instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  PaymentMethodDetailsInteracPresentReceipt instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.accountType != null) {
    container.encodeString(
      'account_type',
      instance.accountType!,
    );
  }
  if (instance.applicationCryptogram != null) {
    container.encodeString(
      'application_cryptogram',
      instance.applicationCryptogram!,
    );
  }
  if (instance.applicationPreferredName != null) {
    container.encodeString(
      'application_preferred_name',
      instance.applicationPreferredName!,
    );
  }
  if (instance.authorizationCode != null) {
    container.encodeString(
      'authorization_code',
      instance.authorizationCode!,
    );
  }
  if (instance.authorizationResponseCode != null) {
    container.encodeString(
      'authorization_response_code',
      instance.authorizationResponseCode!,
    );
  }
  if (instance.cardholderVerificationMethod != null) {
    container.encodeString(
      'cardholder_verification_method',
      instance.cardholderVerificationMethod!,
    );
  }
  if (instance.dedicatedFileName != null) {
    container.encodeString(
      'dedicated_file_name',
      instance.dedicatedFileName!,
    );
  }
  if (instance.terminalVerificationResults != null) {
    container.encodeString(
      'terminal_verification_results',
      instance.terminalVerificationResults!,
    );
  }
  if (instance.transactionStatusInformation != null) {
    container.encodeString(
      'transaction_status_information',
      instance.transactionStatusInformation!,
    );
  }
  return container.value;
}