forked from eclipse-tractusx/bpdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): eclipse-tractusx#183 Gate API: Add Street Name Suffix and …
…Prefix Fields - add PhysicalPostalAddressGateResponse
- Loading branch information
1 parent
cc6a88b
commit 84d9ed3
Showing
19 changed files
with
232 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...n/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/response/LogisticAddressGateResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.bpdm.gate.api.model.response | ||
|
||
import io.swagger.v3.oas.annotations.media.ArraySchema | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
import org.eclipse.tractusx.bpdm.common.dto.response.AddressIdentifierResponse | ||
import org.eclipse.tractusx.bpdm.common.dto.response.AddressStateResponse | ||
import org.eclipse.tractusx.bpdm.common.dto.response.AlternativePostalAddressResponse | ||
import org.eclipse.tractusx.bpdm.common.dto.response.PhysicalPostalAddressResponse | ||
import java.time.Instant | ||
|
||
|
||
@Schema(name = "LogisticAddressGateResponse", description = "Logistic address ") | ||
data class LogisticAddressGateResponse( | ||
|
||
@get:Schema(description = "Business Partner Number of this address") | ||
val bpna: String, | ||
|
||
@get:Schema( | ||
description = "Name of the logistic address of the business partner. This is not according to official\n" + | ||
"registers but according to the name the uploading sharing member chooses." | ||
) | ||
val name: String? = null, | ||
|
||
@ArraySchema(arraySchema = Schema(description = "Address status")) | ||
val states: Collection<AddressStateResponse> = emptyList(), | ||
|
||
@ArraySchema(arraySchema = Schema(description = "All identifiers of the Address")) | ||
val identifiers: Collection<AddressIdentifierResponse> = emptyList(), | ||
|
||
@get:Schema(description = "Physical postal address") | ||
val physicalPostalAddress: PhysicalPostalAddressResponse, | ||
|
||
@get:Schema(description = "Alternative postal address") | ||
val alternativePostalAddress: AlternativePostalAddressResponse? = null, | ||
|
||
@get:Schema(description = "BPN of the related legal entity, if available") | ||
val bpnLegalEntity: String?, | ||
|
||
@get:Schema(name = "isLegalAddress", description = "Flag if this is the legal address of its related legal entity") | ||
val isLegalAddress: Boolean = false, | ||
|
||
@get:Schema(description = "BPN of the related site, if available") | ||
val bpnSite: String?, | ||
|
||
@get:Schema(name = "isMainAddress", description = "Flag if this is the main address of its related site") | ||
val isMainAddress: Boolean = false, | ||
|
||
@get:Schema(description = "The timestamp the business partner data was created") | ||
val createdAt: Instant, | ||
|
||
@get:Schema(description = "The timestamp the business partner data was last updated") | ||
val updatedAt: Instant | ||
) |
46 changes: 46 additions & 0 deletions
46
...in/org/eclipse/tractusx/bpdm/gate/api/model/response/PhysicalPostalAddressGateResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
******************************************************************************/ | ||
|
||
package org.eclipse.tractusx.bpdm.gate.api.model.response | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
import org.eclipse.tractusx.bpdm.common.dto.BasePhysicalAddressDto | ||
import org.eclipse.tractusx.bpdm.common.dto.response.AreaDistrictResponse | ||
import org.eclipse.tractusx.bpdm.common.dto.response.BasePostalAddressResponse | ||
import org.eclipse.tractusx.bpdm.common.service.DataClassUnwrappedJsonDeserializer | ||
import org.eclipse.tractusx.bpdm.gate.api.model.StreetGateDto | ||
|
||
@JsonDeserialize(using = DataClassUnwrappedJsonDeserializer::class) | ||
@Schema(name = "PhysicalPostalGateAddress", description = "Physical Postal Address Part") | ||
data class PhysicalPostalAddressGateResponse( | ||
|
||
@field:JsonUnwrapped | ||
val baseAddress: BasePostalAddressResponse, | ||
|
||
@get:Schema(description = "Street") | ||
val street: StreetGateDto? = null, | ||
|
||
@field:JsonUnwrapped | ||
val areaPart: AreaDistrictResponse, | ||
|
||
@field:JsonUnwrapped | ||
val basePhysicalAddress: BasePhysicalAddressDto | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.