encode<V> static method

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

Implementation

static V encode<V>(
  AccountUpdateOptionsSettings instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bacsDebitPayments != null) {
    AccountBacsDebitPayments.encode(
      instance.bacsDebitPayments!,
      container.nestedSingleValueContainer('bacs_debit_payments').encoder,
    );
  }
  if (instance.branding != null) {
    AccountBranding.encode(
      instance.branding!,
      container.nestedSingleValueContainer('branding').encoder,
    );
  }
  if (instance.cardIssuing != null) {
    AccountCardIssuing.encode(
      instance.cardIssuing!,
      container.nestedSingleValueContainer('card_issuing').encoder,
    );
  }
  if (instance.cardPayments != null) {
    AccountCardPayments.encode(
      instance.cardPayments!,
      container.nestedSingleValueContainer('card_payments').encoder,
    );
  }
  if (instance.invoices != null) {
    AccountInvoices.encode(
      instance.invoices!,
      container.nestedSingleValueContainer('invoices').encoder,
    );
  }
  if (instance.payments != null) {
    AccountPayments.encode(
      instance.payments!,
      container.nestedSingleValueContainer('payments').encoder,
    );
  }
  if (instance.payouts != null) {
    AccountPayouts.encode(
      instance.payouts!,
      container.nestedSingleValueContainer('payouts').encoder,
    );
  }
  if (instance.treasury != null) {
    AccountCardIssuing.encode(
      instance.treasury!,
      container.nestedSingleValueContainer('treasury').encoder,
    );
  }
  return container.value;
}