func (v RecurringTransactionFrequency) IsValid() bool {
	for _, existing := range allowedRecurringTransactionFrequencyEnumValues {
		if existing == v {
			return true
		}
	}
	return false
}
IsValid return true if the value is valid for the enum, false otherwise
package plaid
import (
	"encoding/json"
	"fmt"
)
type RecurringTransactionFrequency string
const (
	RECURRINGTRANSACTIONFREQUENCY_UNKNOWN RecurringTransactionFrequency = "UNKNOWN"
	RECURRINGTRANSACTIONFREQUENCY_WEEKLY RecurringTransactionFrequency = "WEEKLY"
	RECURRINGTRANSACTIONFREQUENCY_BIWEEKLY RecurringTransactionFrequency = "BIWEEKLY"
	RECURRINGTRANSACTIONFREQUENCY_SEMI_MONTHLY RecurringTransactionFrequency = "SEMI_MONTHLY"
	RECURRINGTRANSACTIONFREQUENCY_MONTHLY RecurringTransactionFrequency = "MONTHLY"
)
var allowedRecurringTransactionFrequencyEnumValues = []RecurringTransactionFrequency{
	"UNKNOWN",
	"WEEKLY",
	"BIWEEKLY",
	"SEMI_MONTHLY",
	"MONTHLY",
}
func (v *RecurringTransactionFrequency) UnmarshalJSON(src []byte) error {
	var value string
	err := json.Unmarshal(src, &value)
	if err != nil {
		return err
	}
	enumTypeValue := RecurringTransactionFrequency(value)
	for _, existing := range allowedRecurringTransactionFrequencyEnumValues {
		if existing == enumTypeValue {
			*v = enumTypeValue
			return nil
		}
	}
	return fmt.Errorf("%+v is not a valid RecurringTransactionFrequency", value)
}
func NewRecurringTransactionFrequencyFromValue(v string) (*RecurringTransactionFrequency, error) {
	ev := RecurringTransactionFrequency(v)
	if ev.IsValid() {
		return &ev, nil
	} else {
		return nil, fmt.Errorf("invalid value '%v' for RecurringTransactionFrequency: valid values are %v", v, allowedRecurringTransactionFrequencyEnumValues)
	}
}