encode<V> static method
Implementation
static V encode<V>(
LegalEntityCompany instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.address != null) {
Address.encode(
instance.address!,
container.nestedSingleValueContainer('address').encoder,
);
}
if (instance.addressKana != null) {
LegalEntityCompanyAddressKana.encode(
instance.addressKana!,
container.nestedSingleValueContainer('address_kana').encoder,
);
}
if (instance.addressKanji != null) {
LegalEntityCompanyAddressKana.encode(
instance.addressKanji!,
container.nestedSingleValueContainer('address_kanji').encoder,
);
}
if (instance.directorsProvided != null) {
container.encodeBool(
'directors_provided',
instance.directorsProvided!,
);
}
if (instance.executivesProvided != null) {
container.encodeBool(
'executives_provided',
instance.executivesProvided!,
);
}
if (instance.exportLicenseId != null) {
container.encodeString(
'export_license_id',
instance.exportLicenseId!,
);
}
if (instance.exportPurposeCode != null) {
container.encodeString(
'export_purpose_code',
instance.exportPurposeCode!,
);
}
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
if (instance.nameKana != null) {
container.encodeString(
'name_kana',
instance.nameKana!,
);
}
if (instance.nameKanji != null) {
container.encodeString(
'name_kanji',
instance.nameKanji!,
);
}
if (instance.ownersProvided != null) {
container.encodeBool(
'owners_provided',
instance.ownersProvided!,
);
}
if (instance.ownershipDeclaration != null) {
IssuingCardholderUserTermsAcceptance.encode(
instance.ownershipDeclaration!,
container.nestedSingleValueContainer('ownership_declaration').encoder,
);
}
if (instance.phone != null) {
container.encodeString(
'phone',
instance.phone!,
);
}
if (instance.structure != null) {
container.encodeString(
'structure',
instance.structure!,
);
}
if (instance.taxIdProvided != null) {
container.encodeBool(
'tax_id_provided',
instance.taxIdProvided!,
);
}
if (instance.taxIdRegistrar != null) {
container.encodeString(
'tax_id_registrar',
instance.taxIdRegistrar!,
);
}
if (instance.vatIdProvided != null) {
container.encodeBool(
'vat_id_provided',
instance.vatIdProvided!,
);
}
if (instance.verification != null) {
LegalEntityCompanyVerification.encode(
instance.verification!,
container.nestedSingleValueContainer('verification').encoder,
);
}
return container.value;
}