encode<V> static method

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

Implementation

static V encode<V>(
  TreasuryFinancialAccountPlatformRestrictions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.inboundFlows != null) {
    container.encodeString(
      'inbound_flows',
      instance.inboundFlows!,
    );
  }
  if (instance.outboundFlows != null) {
    TreasuryFinancialAccountPlatformRestrictionsInboundFlows.encode(
      instance.outboundFlows!,
      container.nestedSingleValueContainer('outbound_flows').encoder,
    );
  }
  return container.value;
}