encode<V> static method

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

Implementation

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