api_keys.go
func (k *APIKey) UnmarshalJSON(data []byte) error {
	type Alias APIKey
	aux := &struct {
		Created *string `json:"created,omitempty"`
		*Alias
	}{
		Alias: (*Alias)(k),
	}
	if err := json.Unmarshal(data, &aux); err != nil {
		return err
	}

	if created, err := time.Parse(createdTimeLayout, *aux.Created); err != nil {
		return err
	} else {
		k.Created = &created
	}

	return nil
}
func (k *APIKey) UnmarshalJSON(data []byte) error {
	type Alias APIKey
	aux := &struct {
		Created *string `json:"created,omitempty"`
		*Alias
	}{
		Alias: (*Alias)(k),
	}
	if err := json.Unmarshal(data, &aux); err != nil {
		return err
	}

	if created, err := time.Parse(createdTimeLayout, *aux.Created); err != nil {
		return err
	} else {
		k.Created = &created
	}

	return nil
}
// UnmarshalJSON is a custom method for handling datetime unmarshalling