encode<V> static method

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

Implementation

static V encode<V>(
  MandatePaypal instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.billingAgreementId != null) {
    container.encodeString(
      'billing_agreement_id',
      instance.billingAgreementId!,
    );
  }
  if (instance.payerId != null) {
    container.encodeString(
      'payer_id',
      instance.payerId!,
    );
  }
  return container.value;
}