encode<V> static method

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

Implementation

static V encode<V>(
  TreasurySharedResourceBillingDetails instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  Address.encode(
    instance.address,
    container.nestedSingleValueContainer('address').encoder,
  );
  if (instance.email != null) {
    container.encodeString(
      'email',
      instance.email!,
    );
  }
  if (instance.name != null) {
    container.encodeString(
      'name',
      instance.name!,
    );
  }
  return container.value;
}