encode<V> static method

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

Implementation

static V encode<V>(
  IssuingNetworkTokenMastercard instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.cardReferenceId != null) {
    container.encodeString(
      'card_reference_id',
      instance.cardReferenceId!,
    );
  }
  container.encodeString(
    'token_reference_id',
    instance.tokenReferenceId,
  );
  container.encodeString(
    'token_requestor_id',
    instance.tokenRequestorId,
  );
  if (instance.tokenRequestorName != null) {
    container.encodeString(
      'token_requestor_name',
      instance.tokenRequestorName!,
    );
  }
  return container.value;
}