encode<V> static method

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

Implementation

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