Skip to content

Commit 1cbb508

Browse files
[SELC-7439] feat: added attributes legalForm and payment into response for api v1/tokens
1 parent 55e00c8 commit 1cbb508

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

src/main/docs/openapi/api-selfcare-onboarding-docs.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,17 @@
22402240
}
22412241
}
22422242
},
2243+
"PaymentResponse" : {
2244+
"type" : "object",
2245+
"properties" : {
2246+
"iban" : {
2247+
"type" : "string"
2248+
},
2249+
"holder" : {
2250+
"type" : "string"
2251+
}
2252+
}
2253+
},
22432254
"CheckManagerRequest" : {
22442255
"required" : [ "productId", "userId" ],
22452256
"type" : "object",
@@ -2677,6 +2688,9 @@
26772688
"items" : {
26782689
"type" : "string"
26792690
}
2691+
},
2692+
"legalForm" : {
2693+
"type" : "string"
26802694
}
26812695
}
26822696
},
@@ -2805,6 +2819,9 @@
28052819
"billing" : {
28062820
"$ref" : "#/components/schemas/BillingResponse"
28072821
},
2822+
"payment" : {
2823+
"$ref" : "#/components/schemas/PaymentResponse"
2824+
},
28082825
"signContract" : {
28092826
"type" : "boolean"
28102827
},

src/main/java/it/pagopa/selfcare/external_api/mapper/TokenMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public interface TokenMapper {
2727
@Mapping(target = "expiringDate", source = "expiringDate", qualifiedByName = "toOffsetDateTime")
2828
@Mapping(target = "updatedAt", source = "updatedAt", qualifiedByName = "toOffsetDateTime")
2929
@Mapping(target = "activatedAt", source = "activatedAt", qualifiedByName = "toOffsetDateTime")
30+
@Mapping(target = "institutionUpdate.payment", source = "payment")
3031
TokenOnboardedUsers toEntity(OnboardingGet response);
3132

3233
@Named("toOffsetDateTime")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package it.pagopa.selfcare.external_api.model.institution;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public class Payment {
7+
private String iban;
8+
private String holder;
9+
}

src/main/java/it/pagopa/selfcare/external_api/model/onboarding/InstitutionUpdate.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package it.pagopa.selfcare.external_api.model.onboarding;
22

33
import it.pagopa.selfcare.external_api.model.institution.GPUData;
4+
import it.pagopa.selfcare.external_api.model.institution.Payment;
45
import it.pagopa.selfcare.onboarding.common.InstitutionType;
56
import it.pagopa.selfcare.external_api.model.institution.GeographicTaxonomy;
67
import lombok.Data;
@@ -22,6 +23,7 @@ public class InstitutionUpdate {
2223
private PaymentServiceProvider paymentServiceProvider;
2324
private DataProtectionOfficer dataProtectionOfficer;
2425
private GPUData gpuData;
26+
private Payment payment;
2527
private List<GeographicTaxonomy> geographicTaxonomies;
2628
private String rea;
2729
private String shareCapital;
@@ -30,4 +32,5 @@ public class InstitutionUpdate {
3032
private String supportPhone;
3133
private Boolean imported;
3234
private List<String> atecoCodes;
35+
private String legalForm;
3336
}

src/main/resources/swagger/api-docs.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,12 @@
18821882
"type" : "string",
18831883
"enum" : [ "AS", "CON", "GPU", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ]
18841884
},
1885+
"legalForm" : {
1886+
"type" : "string"
1887+
},
1888+
"payment" : {
1889+
"$ref" : "#/components/schemas/Payment"
1890+
},
18851891
"paymentServiceProvider" : {
18861892
"$ref" : "#/components/schemas/PaymentServiceProvider"
18871893
},
@@ -2342,6 +2348,18 @@
23422348
}
23432349
}
23442350
},
2351+
"Payment" : {
2352+
"title" : "Payment",
2353+
"type" : "object",
2354+
"properties" : {
2355+
"holder" : {
2356+
"type" : "string"
2357+
},
2358+
"iban" : {
2359+
"type" : "string"
2360+
}
2361+
}
2362+
},
23452363
"PaymentServiceProvider" : {
23462364
"title" : "PaymentServiceProvider",
23472365
"type" : "object",

0 commit comments

Comments
 (0)