toAssociationStatus method

AssociationStatus toAssociationStatus()

Implementation

AssociationStatus toAssociationStatus() {
  switch (this) {
    case 'NOT_ASSOCIATED':
      return AssociationStatus.notAssociated;
    case 'ASSOCIATED_WITH_OWNER_ACCOUNT':
      return AssociationStatus.associatedWithOwnerAccount;
    case 'ASSOCIATED_WITH_SHARED_ACCOUNT':
      return AssociationStatus.associatedWithSharedAccount;
    case 'PENDING_ASSOCIATION':
      return AssociationStatus.pendingAssociation;
    case 'PENDING_DISASSOCIATION':
      return AssociationStatus.pendingDisassociation;
  }
  throw Exception('$this is not known in enum AssociationStatus');
}