Package com.skava.payment.web
Class CollectionPropertyController
java.lang.Object
com.skava.payment.web.CollectionPropertyController
@RestController
@RequestMapping("/collections/{collectionId}/properties")
public class CollectionPropertyController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<CollectionProperty>
getCollectionPropertyById
(String version, long businessId, String locale, long collectionId, String name) Fetch the collection property based on the the given collection property nameorg.springframework.http.ResponseEntity<List<CollectionProperty>>
patchCollectionProperty
(String version, long businessId, String locale, long collectionId, List<CollectionProperty> collectionProperties) Updates the collection properties which are existing under a collectionorg.springframework.http.ResponseEntity<List<CollectionProperty>>
updateCollectionProperty
(String version, long collectionId, long businessId, String locale, List<CollectionProperty> collectionProperties) Updates the all collection properties which are existing under a collection
-
Constructor Details
-
CollectionPropertyController
public CollectionPropertyController()
-
-
Method Details
-
getCollectionPropertyById
@ResponseStatus(FOUND) @GetMapping("/{name}") @PreAuthorize("hasPrivilegeForServiceAndCollection(\'payment/view/collectionproperty\', #businessId, \'payment\', #collectionId) ") public org.springframework.http.ResponseEntity<CollectionProperty> getCollectionPropertyById(@RequestHeader(value="x-version-id",required=false,defaultValue="8.19.7") String version, @RequestParam(value="businessId",required=true) long businessId, @RequestHeader(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @PathVariable(value="collectionId",required=true) @AuditField(field="Collection Id") long collectionId, @PathVariable(value="name",required=true) @AuditField(field="Collection property name") String name) Fetch the collection property based on the the given collection property name- Parameters:
version
- Indicates the version of the API to be used.businessId
- This parameter contains the businessId of the collection.locale
- API Response and error messages will be responded in the mentioned locale.collectionId
- This field holds a valid collection identifier of this microservice and requested operation will be performed on this collection identifier. Collection is the top most entity of a microservice under which all the other entities/resources reside. Each collection represents an instance of the microservice with configured properties and these properties c an be modified to bring in a different behavior per collection of the same microservice. Store association is the process of associating a microservice collection to a store along with its respective sub-entity. This way storefront can fetch/store the required information from that respective association.name
- This field holds the Unique name of collection property under a collection which will be fetched.- Returns:
- Returns the
CollectionProperty
.
-
updateCollectionProperty
@ResponseStatus(OK) @PutMapping @PreAuthorize("hasPrivilegeForServiceAndCollection(\'payment/update/collectionproperty\', #businessId, \'payment\', #collectionId) ") public org.springframework.http.ResponseEntity<List<CollectionProperty>> updateCollectionProperty(@RequestHeader(value="x-version-id",required=false,defaultValue="8.19.7") String version, @PathVariable(value="collectionId",required=true) @AuditField(field="Collection Id") long collectionId, @RequestParam(value="businessId",required=true) long businessId, @RequestHeader(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @RequestBody(required=true) @AuditField(field="Collection property list request") List<CollectionProperty> collectionProperties) Updates the all collection properties which are existing under a collection- Parameters:
version
- Indicates the version of the API to be used.collectionId
- This field holds a valid collection identifier of this microservice and requested operation will be performed on this collection identifier. Collection is the top most entity of a microservice under which all the other entities/resources reside. Each collection represents an instance of the microservice with configured properties and these properties c an be modified to bring in a different behavior per collection of the same microservice. Store association is the process of associating a microservice collection to a store along with its respective sub-entity. This way storefront can fetch/store the required information from that respective association.businessId
- This parameter contains the businessId of the collection.locale
- API Response and error messages will be responded in the mentioned locale.collectionProperties
- Contains the collection property information in list- Returns:
- Returns the
CollectionProperty
.
-
patchCollectionProperty
@ResponseStatus(OK) @PatchMapping @PreAuthorize("hasPrivilegeForServiceAndCollection(\'payment/update/collectionproperty\', #businessId, \'payment\', #collectionId) ") public org.springframework.http.ResponseEntity<List<CollectionProperty>> patchCollectionProperty(@RequestHeader(value="x-version-id",required=false,defaultValue="8.19.7") String version, @RequestParam(value="businessId",required=true) long businessId, @RequestHeader(value="locale",required=false,defaultValue="en_US") @IgnoreAudit String locale, @PathVariable(value="collectionId",required=true) @AuditField(field="Collection Id") long collectionId, @RequestBody(required=true) @AuditField(field="Collection property list request") List<CollectionProperty> collectionProperties) Updates the collection properties which are existing under a collection- Parameters:
version
- Indicates the version of the API to be used.businessId
- This parameter contains the businessId of the collection.locale
- API Response and error messages will be responded in the mentioned locale.collectionId
- This field holds a valid collection identifier of this microservice and requested operation will be performed on this collection identifier. Collection is the top most entity of a microservice under which all the other entities/resources reside. Each collection represents an instance of the microservice with configured properties and these properties c an be modified to bring in a different behavior per collection of the same microservice. Store association is the process of associating a microservice collection to a store along with its respective sub-entity. This way storefront can fetch/store the required information from that respective association.collectionProperties
- Contains the collection properties information in list- Returns:
- Returns the
CollectionProperty
.
-