encode<V> static method

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

Implementation

static V encode<V>(
  PaymentIntentNextActionKonbini instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeDateTime(
    'expires_at',
    instance.expiresAt,
  );
  if (instance.hostedVoucherUrl != null) {
    container.encodeString(
      'hosted_voucher_url',
      instance.hostedVoucherUrl!,
    );
  }
  PaymentIntentNextActionKonbiniStores.encode(
    instance.stores,
    container.nestedSingleValueContainer('stores').encoder,
  );
  return container.value;
}