encode<V> static method

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

Implementation

static V encode<V>(
  PaymentLinkLineItemsItem instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.adjustableQuantity != null) {
    SessionAdjustableQuantity.encode(
      instance.adjustableQuantity!,
      container.nestedSingleValueContainer('adjustable_quantity').encoder,
    );
  }
  container.encodeString(
    'price',
    instance.price,
  );
  container.encodeInt(
    'quantity',
    instance.quantity,
  );
  return container.value;
}