Skip to content

Commit

Permalink
flyttet klasser som kun brukes av PdlKlient over i external.pdl
Browse files Browse the repository at this point in the history
  • Loading branch information
jankroken-nav committed Oct 8, 2024
1 parent beb3649 commit 7b2ac84
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 53 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
sealed class Ident {
abstract val ident: String

@JsonIgnoreProperties(ignoreUnknown = true)
internal data class IdenterResponse(
val data: IdenterDataResponse? = null,
private val errors: List<PdlError>? = null
) {
val error: PdlError? = errors?.firstOrNull()
}
sealed class FolkeregisterIdent : Ident() {

internal data class IdenterDataResponse(
val hentIdenter: HentIdenter? = null
)

internal data class HentIdenter(
val identer: List<IdentInformasjon>
)

internal data class IdentInformasjon(
val ident: String,
val gruppe: IdentGruppe
)

enum class IdentGruppe {
AKTORID,
FOLKEREGISTERIDENT,
NPID
}
data class Gjeldende(
override val ident: String
) : FolkeregisterIdent()

data class Historisk(
override val ident: String
) : FolkeregisterIdent()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.domain
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl

class IdentHistorikk(
private val identer: Set<Ident.FolkeregisterIdent>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl

import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
internal data class IdenterResponse(
val data: IdenterDataResponse? = null,
private val errors: List<PdlError>? = null
) {
val error: PdlError? = errors?.firstOrNull()
}

internal data class IdenterDataResponse(
val hentIdenter: HentIdenter? = null
)

internal data class HentIdenter(
val identer: List<IdentInformasjon>
)

internal data class IdentInformasjon(
val ident: String,
val gruppe: IdentGruppe
)

enum class IdentGruppe {
AKTORID,
FOLKEREGISTERIDENT,
NPID
}

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.external.pdl

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.domain.Ident
import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.domain.IdentHistorikk
import no.nav.pensjon.opptjening.omsorgsopptjening.start.innlesning.barnetrygd.domain.PersonId
import java.time.LocalDateTime

Expand Down

0 comments on commit 7b2ac84

Please sign in to comment.