encode<V> static method

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

Implementation

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