encode<V> static method

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

Implementation

static V encode<V>(
  PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeList(
    'discounts',
    (container) =>
        instance.discounts.forEach((el) => LineItemsDiscountAmount.encode(
              el,
              container.nestedSingleValueContainer().encoder,
            )),
  );
  container.encodeList(
    'taxes',
    (container) => instance.taxes.forEach((el) => LineItemsTaxAmount.encode(
          el,
          container.nestedSingleValueContainer().encoder,
        )),
  );
  return container.value;
}