encode<V> static method

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

Implementation

static V encode<V>(
  PaypalSellerProtection instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.disputeCategories != null) {
    container.encodeList(
      'dispute_categories',
      (container) => instance.disputeCategories!.forEach((el) =>
          PaymentMethodDetailsPaypalSellerProtectionDisputeCategoriesItem
              .encode(
            el,
            container.nestedSingleValueContainer().encoder,
          )),
    );
  }
  PaymentMethodDetailsPaypalSellerProtectionStatus.encode(
    instance.status,
    container.nestedSingleValueContainer('status').encoder,
  );
  return container.value;
}