encode<V> static method

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

Implementation

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