Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAS-1146] feat: Introduce new boolean "cart" for bundles #452

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -13141,6 +13149,10 @@
"$ref": "#/components/schemas/PSPBundleTaxonomy"
}
},
"cart": {
"type": "boolean",
"description": "If the bundle is valid for cart payments"
},
"description": {
"type": "string"
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -15229,4 +15246,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ public class WrapperChannelResource {
@NotNull
private WrapperStatus wrapperStatus;

@Schema(description = "Primitive number version")
@JsonProperty("primitive_version")
private Integer primitiveVersion;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ public class ChannelDetails extends Channel {
@NotNull
private Boolean agid;

@JsonProperty("primitive_version")
private Integer primitiveVersion;

@JsonProperty("payment_types")
private List<String> paymentTypeList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ public class WrapperChannel {
@JsonProperty(required = true)
@NotNull
private WrapperStatus wrapperStatus;

@JsonProperty("primitive_version")
private Integer primitiveVersion;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading