We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@GetMapping(value = "/product", produces = MediaType.APPLICATION_JSON_VALUE) @PreAuthorize(ConstantsRoles.USERS_WITH_FETCH_ACCESS) @PostAuthorize("@postAuthorizeValidator.hasAccess(returnObject)") MappingJacksonValue productFind( @RequestHeader(value = ConstantsDefaultValues.X_CLIENT) String xClient, @RequestHeader(value = ConstantsDefaultValues.X_INTERNAL_CLIENT, required = false) String xInternalClient, @RequestParam(name = "relatedParty.id", required = false) String relatedPartyId, @RequestParam(name = "relatedParty.role", required = false) String relatedPartyRole, @RequestParam(required = false) String fields, @RequestParam(name = "billingAccount.id", required = false) String billingAccountId, @RequestParam(name = "paymentIds", required = false) String[] paymentIds );
@Override public MappingJacksonValue productFind(String xClient, String xInternalClient, String relatedPartyId, String relatedPartyRole, String fields, String billingAccountId, String[] paymentIds) { HashMap<String, String> searchCriteriaMap = new HashMap<>(); searchCriteriaMap.put(BILLING_ACCOUNT_ID, billingAccountId); if (paymentIds != null) { searchCriteriaMap.put(PAYMENT_IDS, String.join(",", paymentIds)); } return wrapperService.productFind(fields, searchCriteriaMap, Collections.emptyList()); } **wrapperService** public MappingJacksonValue productFind(String fields, Map<String, String> searchCriteriaMap, List<String> contractNrList) { List<Product> productsFromFind = productService.productFind(searchCriteriaMap, contractNrList); return WrapperUtil.setWrapper(productsFromFind, WrapperUtil.searchCriteriaJsonPostFiltering(searchCriteriaMap), ProductServiceUtil.fieldsValuesValidation(fields));
}
mock wrapperService
yaml description: Contract for retrieving a product by billingAccountId request: method: GET url: /v1/product queryParameters: relatedParty.id: "3635318" billingAccount.id: "138672149" headers: Content-Type: application/json X-Client: test X-Internal-Client: test response: status: 200 body: - id: "co_68290814" href: "/productInventoryManagement/v1/product/co_68290814" isCustomerVisible: true name: "766174030" activated: "2024-10-04T11:44:05.000+02:00" startDate: "2024-10-02T11:44:05.000+02:00" status: "active" "@type": "contract" place: - name: "-, null, 00000" productOffering: id: "7603" "@referredType": "ProductOffering" productRelationship: - type: "product" product: id: "385662383" billingAccount: - id: "138672149" relatedParty: - id: "3635318" role: "OWNER" "@referredType": "INDIVIDUAL"
yaml
The text was updated successfully, but these errors were encountered:
hello @smh
Sorry, something went wrong.
Can you please provide which version of sc contract you are using, what the concrete problem is and what's not working fine?
No branches or pull requests
@GetMapping(value = "/product", produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize(ConstantsRoles.USERS_WITH_FETCH_ACCESS)
@PostAuthorize("@postAuthorizeValidator.hasAccess(returnObject)")
MappingJacksonValue productFind(
@RequestHeader(value = ConstantsDefaultValues.X_CLIENT) String xClient,
@RequestHeader(value = ConstantsDefaultValues.X_INTERNAL_CLIENT, required = false) String xInternalClient,
@RequestParam(name = "relatedParty.id", required = false) String relatedPartyId,
@RequestParam(name = "relatedParty.role", required = false) String relatedPartyRole,
@RequestParam(required = false) String fields,
@RequestParam(name = "billingAccount.id", required = false) String billingAccountId,
@RequestParam(name = "paymentIds", required = false) String[] paymentIds
);
}
mock wrapperService
yaml
description: Contract for retrieving a product by billingAccountId
request:
method: GET
url: /v1/product
queryParameters:
relatedParty.id: "3635318"
billingAccount.id: "138672149"
headers:
Content-Type: application/json
X-Client: test
X-Internal-Client: test
response:
status: 200
body:
- id: "co_68290814"
href: "/productInventoryManagement/v1/product/co_68290814"
isCustomerVisible: true
name: "766174030"
activated: "2024-10-04T11:44:05.000+02:00"
startDate: "2024-10-02T11:44:05.000+02:00"
status: "active"
"@type": "contract"
place:
- name: "-, null, 00000"
productOffering:
id: "7603"
"@referredType": "ProductOffering"
productRelationship:
- type: "product"
product:
id: "385662383"
billingAccount:
- id: "138672149"
relatedParty:
- id: "3635318"
role: "OWNER"
"@referredType": "INDIVIDUAL"
The text was updated successfully, but these errors were encountered: