encode<V> static method
Implementation
static V encode<V>(
SourceTypeCard instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.addressLine1Check != null) {
container.encodeString(
'address_line1_check',
instance.addressLine1Check!,
);
}
if (instance.addressZipCheck != null) {
container.encodeString(
'address_zip_check',
instance.addressZipCheck!,
);
}
if (instance.brand != null) {
container.encodeString(
'brand',
instance.brand!,
);
}
if (instance.country != null) {
container.encodeString(
'country',
instance.country!,
);
}
if (instance.cvcCheck != null) {
container.encodeString(
'cvc_check',
instance.cvcCheck!,
);
}
if (instance.description != null) {
container.encodeString(
'description',
instance.description!,
);
}
if (instance.dynamicLast4 != null) {
container.encodeString(
'dynamic_last4',
instance.dynamicLast4!,
);
}
if (instance.expMonth != null) {
container.encodeInt(
'exp_month',
instance.expMonth!,
);
}
if (instance.expYear != null) {
container.encodeInt(
'exp_year',
instance.expYear!,
);
}
if (instance.fingerprint != null) {
container.encodeString(
'fingerprint',
instance.fingerprint!,
);
}
if (instance.funding != null) {
container.encodeString(
'funding',
instance.funding!,
);
}
if (instance.iin != null) {
container.encodeString(
'iin',
instance.iin!,
);
}
if (instance.issuer != null) {
container.encodeString(
'issuer',
instance.issuer!,
);
}
if (instance.last4 != null) {
container.encodeString(
'last4',
instance.last4!,
);
}
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
if (instance.threeDSecure != null) {
container.encodeString(
'three_d_secure',
instance.threeDSecure!,
);
}
if (instance.tokenizationMethod != null) {
container.encodeString(
'tokenization_method',
instance.tokenizationMethod!,
);
}
return container.value;
}