diff --git a/openapi/openapi.json b/openapi/openapi.json index e074adea3..75ec31699 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -11143,6 +11143,10 @@ "type": "string", "description": "Italian Banking Association numeric code used to identify banks or credit institutions" }, + "cart": { + "type": "boolean", + "description": "If the bundle is valid for cart payments" + }, "description": { "type": "string" }, @@ -11441,6 +11445,10 @@ "$ref": "#/components/schemas/CIBundleFee" } }, + "cart": { + "type": "boolean", + "description": "If the bundle is valid for cart payments" + }, "ciBundleId": { "type": "string", "description": "Creditor institution bundle's id" @@ -13141,6 +13149,10 @@ "$ref": "#/components/schemas/PSPBundleTaxonomy" } }, + "cart": { + "type": "boolean", + "description": "If the bundle is valid for cart payments" + }, "description": { "type": "string" }, @@ -14765,6 +14777,11 @@ "description": " modification date", "format": "date-time" }, + "primitive_version": { + "type": "integer", + "description": "Primitive number version", + "format": "int32" + }, "wrapperStatus": { "type": "string", "description": "channel's validation status", @@ -15229,4 +15246,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/mapper/ChannelMapper.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/mapper/ChannelMapper.java index 05fa94749..fe861dfe5 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/mapper/ChannelMapper.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/mapper/ChannelMapper.java @@ -571,6 +571,7 @@ public static WrapperChannel toWrapperChannel(Channel model) { wrapperChannel.setEnabled(model.getEnabled()); wrapperChannel.setBrokerDescription(model.getBrokerDescription()); wrapperChannel.setWrapperStatus(WrapperStatus.APPROVED); + wrapperChannel.setPrimitiveVersion(model.getPrimitiveVersion()); return wrapperChannel; } @@ -655,6 +656,7 @@ public static WrapperChannelResource toWrapperChannelResource(WrapperChannel wra wrapperChannelResource.setWrapperStatus(wrapperChannel.getWrapperStatus()); wrapperChannelResource.setModifiedAt(wrapperChannel.getModifiedAt()); wrapperChannelResource.setCreatedAt(wrapperChannel.getCreatedAt()); + wrapperChannelResource.setPrimitiveVersion(wrapperChannel.getPrimitiveVersion()); return wrapperChannelResource; diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/ChannelResource.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/ChannelResource.java index 8e64481cd..55536a68b 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/ChannelResource.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/ChannelResource.java @@ -26,4 +26,8 @@ public class ChannelResource { @JsonProperty("broker_description") @Schema(description = "Broker description. Read only field") protected String brokerDescription; + + @JsonProperty("primitive_version") + @Schema(description = "Primitive number version") + private Integer primitiveVersion; } diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/WrapperChannelResource.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/WrapperChannelResource.java index 33c63ec84..e7b8b7fac 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/WrapperChannelResource.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/channels/WrapperChannelResource.java @@ -33,4 +33,8 @@ public class WrapperChannelResource { @NotNull private WrapperStatus wrapperStatus; + @Schema(description = "Primitive number version") + @JsonProperty("primitive_version") + private Integer primitiveVersion; + } diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/BundleResource.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/BundleResource.java index c26c76cba..a452b5de0 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/BundleResource.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/BundleResource.java @@ -55,4 +55,6 @@ public class BundleResource { private Boolean digitalStamp; @Schema(description = "If the payment can be payed only with a tax stamp, mutually exclusive with digitalStamp") private Boolean digitalStampRestriction; + @Schema(description = "If the bundle is valid for cart payments") + private Boolean cart; } diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/Bundle.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/Bundle.java index d8dd10fa8..8c625c760 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/Bundle.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/Bundle.java @@ -54,6 +54,8 @@ public class Bundle { private Boolean digitalStamp; @Schema(description = "If the payment can be payed only with a tax stamp, mutually exclusive with digitalStamp") private Boolean digitalStampRestriction; + @Schema(description = "If the bundle is valid for cart payments") + private Boolean cart; private String pspBusinessName; private String urlPolicyPsp; diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/BundleRequest.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/BundleRequest.java index 23e7bbe9b..32dcc25fc 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/BundleRequest.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/commissionbundle/client/BundleRequest.java @@ -46,4 +46,6 @@ public class BundleRequest { private LocalDate validityDateFrom; @Schema(description = "Date after which the bundle is expired") private LocalDate validityDateTo; + @Schema(description = "If the bundle is valid for cart payments") + private Boolean cart; } diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/Channel.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/Channel.java index 58a302399..7f6a3f790 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/Channel.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/Channel.java @@ -20,6 +20,8 @@ public class Channel { protected Boolean enabled; @JsonProperty("broker_description") protected String brokerDescription; + @JsonProperty("primitive_version") + protected Integer primitiveVersion; @JsonIgnore private Instant createdAt = Instant.now(); //FIXME when these fields will be available from apiConfig diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/ChannelDetails.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/ChannelDetails.java index bd9d7115c..1cbe29507 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/ChannelDetails.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/channel/ChannelDetails.java @@ -149,9 +149,6 @@ public class ChannelDetails extends Channel { @NotNull private Boolean agid; - @JsonProperty("primitive_version") - private Integer primitiveVersion; - @JsonProperty("payment_types") private List paymentTypeList; diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/wrapper/WrapperChannel.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/wrapper/WrapperChannel.java index bf6a8e2ff..b19e8edb1 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/wrapper/WrapperChannel.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/model/connector/wrapper/WrapperChannel.java @@ -25,4 +25,7 @@ public class WrapperChannel { @JsonProperty(required = true) @NotNull private WrapperStatus wrapperStatus; + + @JsonProperty("primitive_version") + private Integer primitiveVersion; } diff --git a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/service/ChannelService.java b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/service/ChannelService.java index 809ff9385..1ab60348b 100644 --- a/src/main/java/it/pagopa/selfcare/pagopa/backoffice/service/ChannelService.java +++ b/src/main/java/it/pagopa/selfcare/pagopa/backoffice/service/ChannelService.java @@ -321,6 +321,7 @@ private WrapperChannels buildEnrichedWrapperChannels(Channels channels) { if (optionalWrapperEntities.isPresent()) { WrapperEntityChannels wrapperEntities = optionalWrapperEntities.get(); wrapperChannel.setCreatedAt(wrapperEntities.getCreatedAt()); + wrapperChannel.setPrimitiveVersion(channel.getPrimitiveVersion()); } return wrapperChannel; }).toList();