toJson method
Implementation
Map<String, dynamic> toJson() {
Map<String, String> result = {
'sell_asset': sellAsset,
'buy_asset': buyAsset,
'context': context
};
if (sellAmount != null) {
result['sell_amount'] = sellAmount!;
}
if (buyAmount != null) {
result['buy_amount'] = buyAmount!;
}
if (expireAfter != null) {
result['expire_after'] = expireAfter!.toIso8601String();
}
if (sellDeliveryMethod != null) {
result['sell_delivery_method'] = sellDeliveryMethod!;
}
if (buyDeliveryMethod != null) {
result['buy_delivery_method'] = buyDeliveryMethod!;
}
if (countryCode != null) {
result['country_code'] = countryCode!;
}
return result;
}