encode<V> static method
Implementation
static V encode<V>(
AccountCreateOptionsBusinessProfile instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.annualRevenue != null) {
AccountAnnualRevenue.encode(
instance.annualRevenue!,
container.nestedSingleValueContainer('annual_revenue').encoder,
);
}
if (instance.estimatedWorkerCount != null) {
container.encodeInt(
'estimated_worker_count',
instance.estimatedWorkerCount!,
);
}
if (instance.mcc != null) {
container.encodeString(
'mcc',
instance.mcc!,
);
}
if (instance.monthlyEstimatedRevenue != null) {
MandateSingleUse.encode(
instance.monthlyEstimatedRevenue!,
container
.nestedSingleValueContainer('monthly_estimated_revenue')
.encoder,
);
}
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
if (instance.productDescription != null) {
container.encodeString(
'product_description',
instance.productDescription!,
);
}
if (instance.supportAddress != null) {
AccountSupportAddress.encode(
instance.supportAddress!,
container.nestedSingleValueContainer('support_address').encoder,
);
}
if (instance.supportEmail != null) {
container.encodeString(
'support_email',
instance.supportEmail!,
);
}
if (instance.supportPhone != null) {
container.encodeString(
'support_phone',
instance.supportPhone!,
);
}
if (instance.supportUrl != null) {
container.encodeString(
'support_url',
instance.supportUrl!,
);
}
if (instance.url != null) {
container.encodeString(
'url',
instance.url!,
);
}
return container.value;
}