encode<V> static method

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

Implementation

static V encode<V>(
  AccountSessionFeatures instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.capturePayments != null) {
    container.encodeBool(
      'capture_payments',
      instance.capturePayments!,
    );
  }
  if (instance.destinationOnBehalfOfChargeManagement != null) {
    container.encodeBool(
      'destination_on_behalf_of_charge_management',
      instance.destinationOnBehalfOfChargeManagement!,
    );
  }
  if (instance.disputeManagement != null) {
    container.encodeBool(
      'dispute_management',
      instance.disputeManagement!,
    );
  }
  if (instance.refundManagement != null) {
    container.encodeBool(
      'refund_management',
      instance.refundManagement!,
    );
  }
  return container.value;
}