toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'number': number,
    'securityCode': cvv,
    'expiry': {
      'month': expiryMonth,
      'year': expiryYear,
    },
    if (holderName != null) 'holderName': holderName,
  };
}