encode<V> static method

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

Implementation

static V encode<V>(
  SessionWechatPay instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.appId != null) {
    container.encodeString(
      'app_id',
      instance.appId!,
    );
  }
  container.encodeString(
    'client',
    instance.client,
  );
  if (instance.setupFutureUsage != null) {
    container.encodeString(
      'setup_future_usage',
      'none',
    );
  }
  return container.value;
}