encode<V> static method

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

Implementation

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