encode<V> static method
Implementation
static V encode<V>(
DisputeEvidence instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.accessActivityLog != null) {
container.encodeString(
'access_activity_log',
instance.accessActivityLog!,
);
}
if (instance.billingAddress != null) {
container.encodeString(
'billing_address',
instance.billingAddress!,
);
}
if (instance.cancellationPolicy != null) {
FileOrId.encode(
instance.cancellationPolicy!,
container.nestedSingleValueContainer('cancellation_policy').encoder,
);
}
if (instance.cancellationPolicyDisclosure != null) {
container.encodeString(
'cancellation_policy_disclosure',
instance.cancellationPolicyDisclosure!,
);
}
if (instance.cancellationRebuttal != null) {
container.encodeString(
'cancellation_rebuttal',
instance.cancellationRebuttal!,
);
}
if (instance.customerCommunication != null) {
FileOrId.encode(
instance.customerCommunication!,
container.nestedSingleValueContainer('customer_communication').encoder,
);
}
if (instance.customerEmailAddress != null) {
container.encodeString(
'customer_email_address',
instance.customerEmailAddress!,
);
}
if (instance.customerName != null) {
container.encodeString(
'customer_name',
instance.customerName!,
);
}
if (instance.customerPurchaseIp != null) {
container.encodeString(
'customer_purchase_ip',
instance.customerPurchaseIp!,
);
}
if (instance.customerSignature != null) {
FileOrId.encode(
instance.customerSignature!,
container.nestedSingleValueContainer('customer_signature').encoder,
);
}
if (instance.duplicateChargeDocumentation != null) {
FileOrId.encode(
instance.duplicateChargeDocumentation!,
container
.nestedSingleValueContainer('duplicate_charge_documentation')
.encoder,
);
}
if (instance.duplicateChargeExplanation != null) {
container.encodeString(
'duplicate_charge_explanation',
instance.duplicateChargeExplanation!,
);
}
if (instance.duplicateChargeId != null) {
container.encodeString(
'duplicate_charge_id',
instance.duplicateChargeId!,
);
}
if (instance.productDescription != null) {
container.encodeString(
'product_description',
instance.productDescription!,
);
}
if (instance.receipt != null) {
FileOrId.encode(
instance.receipt!,
container.nestedSingleValueContainer('receipt').encoder,
);
}
if (instance.refundPolicy != null) {
FileOrId.encode(
instance.refundPolicy!,
container.nestedSingleValueContainer('refund_policy').encoder,
);
}
if (instance.refundPolicyDisclosure != null) {
container.encodeString(
'refund_policy_disclosure',
instance.refundPolicyDisclosure!,
);
}
if (instance.refundRefusalExplanation != null) {
container.encodeString(
'refund_refusal_explanation',
instance.refundRefusalExplanation!,
);
}
if (instance.serviceDate != null) {
container.encodeString(
'service_date',
instance.serviceDate!,
);
}
if (instance.serviceDocumentation != null) {
FileOrId.encode(
instance.serviceDocumentation!,
container.nestedSingleValueContainer('service_documentation').encoder,
);
}
if (instance.shippingAddress != null) {
container.encodeString(
'shipping_address',
instance.shippingAddress!,
);
}
if (instance.shippingCarrier != null) {
container.encodeString(
'shipping_carrier',
instance.shippingCarrier!,
);
}
if (instance.shippingDate != null) {
container.encodeString(
'shipping_date',
instance.shippingDate!,
);
}
if (instance.shippingDocumentation != null) {
FileOrId.encode(
instance.shippingDocumentation!,
container.nestedSingleValueContainer('shipping_documentation').encoder,
);
}
if (instance.shippingTrackingNumber != null) {
container.encodeString(
'shipping_tracking_number',
instance.shippingTrackingNumber!,
);
}
if (instance.uncategorizedFile != null) {
FileOrId.encode(
instance.uncategorizedFile!,
container.nestedSingleValueContainer('uncategorized_file').encoder,
);
}
if (instance.uncategorizedText != null) {
container.encodeString(
'uncategorized_text',
instance.uncategorizedText!,
);
}
return container.value;
}