encode<V> static method

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

Implementation

static V encode<V>(
  PaymentIntentNextActionSwishQrCode instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.data != null) {
    container.encodeString(
      'data',
      instance.data!,
    );
  }
  if (instance.imageUrlPng != null) {
    container.encodeString(
      'image_url_png',
      instance.imageUrlPng!,
    );
  }
  if (instance.imageUrlSvg != null) {
    container.encodeString(
      'image_url_svg',
      instance.imageUrlSvg!,
    );
  }
  return container.value;
}