Class MembershipPriceCategoryServiceImpl
java.lang.Object
ch.tocco.nice2.optional.membershiporder.impl.action.invoice.services.MembershipPriceCategoryServiceImpl
- All Implemented Interfaces:
MembershipPriceCategoryService
@Component
public class MembershipPriceCategoryServiceImpl
extends Object
implements MembershipPriceCategoryService
-
Constructor Summary
ConstructorDescriptionMembershipPriceCategoryServiceImpl
(InvoiceRecipientService invoiceRecipientService, OrderPriceCategoryService orderPriceCategoryService) -
Method Summary
Modifier and TypeMethodDescriptiongetPriceCategoryForMembership
(Entity membership, InvoicePropertiesContribution properties) Get the price category for a membership gets the related price categories of as well the Membership_type as the related billing address and returns the one with the lower level.
-
Constructor Details
-
MembershipPriceCategoryServiceImpl
public MembershipPriceCategoryServiceImpl(InvoiceRecipientService invoiceRecipientService, OrderPriceCategoryService orderPriceCategoryService)
-
-
Method Details
-
getPriceCategoryForMembership
public Tuple2<Entity,Entity> getPriceCategoryForMembership(Entity membership, InvoicePropertiesContribution properties) Description copied from interface:MembershipPriceCategoryService
Get the price category for a membership gets the related price categories of as well the Membership_type as the related billing address and returns the one with the lower level. (if the level is equal, the Price_category of the Membership_type will be used)- Specified by:
getPriceCategoryForMembership
in interfaceMembershipPriceCategoryService
- Returns:
- Tuple2 containing 2 entities. Tuple._1 Price_category entity; Tuple._2 Price_category "source" entity (either the Membership_type or the Address entity)
-