encode<V> static method

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

Implementation

static V encode<V>(
  IssuingAuthorizationVerificationData instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'address_line1_check',
    instance.addressLine1Check,
  );
  IssuingAuthorizationVerificationDataAddressLine1Check.encode(
    instance.addressPostalCodeCheck,
    container.nestedSingleValueContainer('address_postal_code_check').encoder,
  );
  if (instance.authenticationExemption != null) {
    IssuingAuthorizationAuthenticationExemption.encode(
      instance.authenticationExemption!,
      container
          .nestedSingleValueContainer('authentication_exemption')
          .encoder,
    );
  }
  IssuingAuthorizationVerificationDataAddressLine1Check.encode(
    instance.cvcCheck,
    container.nestedSingleValueContainer('cvc_check').encoder,
  );
  IssuingAuthorizationVerificationDataAddressLine1Check.encode(
    instance.expiryCheck,
    container.nestedSingleValueContainer('expiry_check').encoder,
  );
  if (instance.postalCode != null) {
    container.encodeString(
      'postal_code',
      instance.postalCode!,
    );
  }
  if (instance.threeDSecure != null) {
    IssuingAuthorizationThreeDSecure.encode(
      instance.threeDSecure!,
      container.nestedSingleValueContainer('three_d_secure').encoder,
    );
  }
  return container.value;
}