PathResponse.fromJson constructor

PathResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PathResponse.fromJson(Map<String, dynamic> json) => new PathResponse(
    json['destination_amount'] as String,
    json['destination_asset_type'] as String,
    json['destination_asset_code'] as String,
    json['destination_asset_issuer'] as String,
    json['source_amount'] as String,
    json['source_asset_type'] as String,
    json['source_asset_code'] as String,
    json['source_asset_issuer'] as String,
    json['path'] == null
        ? null
        : (json['path'] as List)
            ?.map((e) =>
                e == null ? null : Asset.fromJson(e as Map<String, dynamic>))
            ?.toList(),
    json['_links'] == null
        ? null
        : new PathResponseLinks.fromJson(
            json['_links'] as Map<String, dynamic>))
  ..rateLimitLimit = convertInt(json['rateLimitLimit'])
  ..rateLimitRemaining = convertInt(json['rateLimitRemaining'])
  ..rateLimitReset = convertInt(json['rateLimitReset']);