encode<V> static method

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

Implementation

static V encode<V>(
  RegistrationCa instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.provinceStandard != null) {
    TaxProductRegistrationsResourceCountryOptionsCaProvinceStandard.encode(
      instance.provinceStandard!,
      container.nestedSingleValueContainer('province_standard').encoder,
    );
  }
  TaxProductRegistrationsResourceCountryOptionsCanadaType.encode(
    instance.type,
    container.nestedSingleValueContainer('type').encoder,
  );
  return container.value;
}