encode<V> static method

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

Implementation

static V encode<V>(
  AccountCapabilities instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.acssDebitPayments != null) {
    container.encodeString(
      'acss_debit_payments',
      instance.acssDebitPayments!,
    );
  }
  if (instance.affirmPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.affirmPayments!,
      container.nestedSingleValueContainer('affirm_payments').encoder,
    );
  }
  if (instance.afterpayClearpayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.afterpayClearpayPayments!,
      container
          .nestedSingleValueContainer('afterpay_clearpay_payments')
          .encoder,
    );
  }
  if (instance.amazonPayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.amazonPayPayments!,
      container.nestedSingleValueContainer('amazon_pay_payments').encoder,
    );
  }
  if (instance.auBecsDebitPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.auBecsDebitPayments!,
      container.nestedSingleValueContainer('au_becs_debit_payments').encoder,
    );
  }
  if (instance.bacsDebitPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.bacsDebitPayments!,
      container.nestedSingleValueContainer('bacs_debit_payments').encoder,
    );
  }
  if (instance.bancontactPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.bancontactPayments!,
      container.nestedSingleValueContainer('bancontact_payments').encoder,
    );
  }
  if (instance.bankTransferPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.bankTransferPayments!,
      container.nestedSingleValueContainer('bank_transfer_payments').encoder,
    );
  }
  if (instance.blikPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.blikPayments!,
      container.nestedSingleValueContainer('blik_payments').encoder,
    );
  }
  if (instance.boletoPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.boletoPayments!,
      container.nestedSingleValueContainer('boleto_payments').encoder,
    );
  }
  if (instance.cardIssuing != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.cardIssuing!,
      container.nestedSingleValueContainer('card_issuing').encoder,
    );
  }
  if (instance.cardPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.cardPayments!,
      container.nestedSingleValueContainer('card_payments').encoder,
    );
  }
  if (instance.cartesBancairesPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.cartesBancairesPayments!,
      container
          .nestedSingleValueContainer('cartes_bancaires_payments')
          .encoder,
    );
  }
  if (instance.cashappPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.cashappPayments!,
      container.nestedSingleValueContainer('cashapp_payments').encoder,
    );
  }
  if (instance.epsPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.epsPayments!,
      container.nestedSingleValueContainer('eps_payments').encoder,
    );
  }
  if (instance.fpxPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.fpxPayments!,
      container.nestedSingleValueContainer('fpx_payments').encoder,
    );
  }
  if (instance.giropayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.giropayPayments!,
      container.nestedSingleValueContainer('giropay_payments').encoder,
    );
  }
  if (instance.grabpayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.grabpayPayments!,
      container.nestedSingleValueContainer('grabpay_payments').encoder,
    );
  }
  if (instance.idealPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.idealPayments!,
      container.nestedSingleValueContainer('ideal_payments').encoder,
    );
  }
  if (instance.indiaInternationalPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.indiaInternationalPayments!,
      container
          .nestedSingleValueContainer('india_international_payments')
          .encoder,
    );
  }
  if (instance.jcbPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.jcbPayments!,
      container.nestedSingleValueContainer('jcb_payments').encoder,
    );
  }
  if (instance.klarnaPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.klarnaPayments!,
      container.nestedSingleValueContainer('klarna_payments').encoder,
    );
  }
  if (instance.konbiniPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.konbiniPayments!,
      container.nestedSingleValueContainer('konbini_payments').encoder,
    );
  }
  if (instance.legacyPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.legacyPayments!,
      container.nestedSingleValueContainer('legacy_payments').encoder,
    );
  }
  if (instance.linkPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.linkPayments!,
      container.nestedSingleValueContainer('link_payments').encoder,
    );
  }
  if (instance.mobilepayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.mobilepayPayments!,
      container.nestedSingleValueContainer('mobilepay_payments').encoder,
    );
  }
  if (instance.oxxoPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.oxxoPayments!,
      container.nestedSingleValueContainer('oxxo_payments').encoder,
    );
  }
  if (instance.p24Payments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.p24Payments!,
      container.nestedSingleValueContainer('p24_payments').encoder,
    );
  }
  if (instance.paynowPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.paynowPayments!,
      container.nestedSingleValueContainer('paynow_payments').encoder,
    );
  }
  if (instance.promptpayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.promptpayPayments!,
      container.nestedSingleValueContainer('promptpay_payments').encoder,
    );
  }
  if (instance.revolutPayPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.revolutPayPayments!,
      container.nestedSingleValueContainer('revolut_pay_payments').encoder,
    );
  }
  if (instance.sepaDebitPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.sepaDebitPayments!,
      container.nestedSingleValueContainer('sepa_debit_payments').encoder,
    );
  }
  if (instance.sofortPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.sofortPayments!,
      container.nestedSingleValueContainer('sofort_payments').encoder,
    );
  }
  if (instance.swishPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.swishPayments!,
      container.nestedSingleValueContainer('swish_payments').encoder,
    );
  }
  if (instance.taxReportingUs1099K != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.taxReportingUs1099K!,
      container.nestedSingleValueContainer('tax_reporting_us_1099_k').encoder,
    );
  }
  if (instance.taxReportingUs1099Misc != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.taxReportingUs1099Misc!,
      container
          .nestedSingleValueContainer('tax_reporting_us_1099_misc')
          .encoder,
    );
  }
  if (instance.transfers != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.transfers!,
      container.nestedSingleValueContainer('transfers').encoder,
    );
  }
  if (instance.treasury != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.treasury!,
      container.nestedSingleValueContainer('treasury').encoder,
    );
  }
  if (instance.usBankAccountAchPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.usBankAccountAchPayments!,
      container
          .nestedSingleValueContainer('us_bank_account_ach_payments')
          .encoder,
    );
  }
  if (instance.zipPayments != null) {
    AccountCapabilitiesAcssDebitPayments.encode(
      instance.zipPayments!,
      container.nestedSingleValueContainer('zip_payments').encoder,
    );
  }
  return container.value;
}