fromResponse static method

CardResult fromResponse(
  1. SuccessResponse response
)

Convert success response to card entity

@param response @return

Implementation

static CardResult fromResponse(SuccessResponse response) {
    return CardResult()
      ..status = response.data!['status'] as String?
      ..mask = response.data!['mask'] as String?
      ..network = response.data!['network'] as String?
      ..type = response.data!['type'] as String?
      ..bin = response.data!['bin'] as String?
      ..last = response.data!['last'] as String?
      ..hash = response.data!['hash'] as String?
      ..address = response.data!['address'] as String?
      ..country = response.data!['country'] as String?
      ..state = response.data!['state'] as String?
      ..city = response.data!['city'] as String?
      ..zip = response.data!['zip'] as String?
      ..email = response.data!['email'] as String?
      ..phone = response.data!['phone'] as String?;
}