encode<V> static method
Implementation
static V encode<V>(
TokenCompany instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.address != null) {
AccountSupportAddress.encode(
instance.address!,
container.nestedSingleValueContainer('address').encoder,
);
}
if (instance.addressKana != null) {
AccountAddressKana.encode(
instance.addressKana!,
container.nestedSingleValueContainer('address_kana').encoder,
);
}
if (instance.addressKanji != null) {
AccountAddressKana.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) {
AccountOwnershipDeclaration.encode(
instance.ownershipDeclaration!,
container.nestedSingleValueContainer('ownership_declaration').encoder,
);
}
if (instance.ownershipDeclarationShownAndSigned != null) {
container.encodeBool(
'ownership_declaration_shown_and_signed',
instance.ownershipDeclarationShownAndSigned!,
);
}
if (instance.phone != null) {
container.encodeString(
'phone',
instance.phone!,
);
}
if (instance.registrationNumber != null) {
container.encodeString(
'registration_number',
instance.registrationNumber!,
);
}
if (instance.structure != null) {
AccountStructure.encode(
instance.structure!,
container.nestedSingleValueContainer('structure').encoder,
);
}
if (instance.taxId != null) {
container.encodeString(
'tax_id',
instance.taxId!,
);
}
if (instance.taxIdRegistrar != null) {
container.encodeString(
'tax_id_registrar',
instance.taxIdRegistrar!,
);
}
if (instance.vatId != null) {
container.encodeString(
'vat_id',
instance.vatId!,
);
}
if (instance.verification != null) {
AccountVerification.encode(
instance.verification!,
container.nestedSingleValueContainer('verification').encoder,
);
}
return container.value;
}