AppCore
Loading...
Searching...
No Matches
ECardBusinessLogic.h
Go to the documentation of this file.
1#ifndef CARDBUSINESSLOGIC_H
2#define CARDBUSINESSLOGIC_H
3
4#include <string>
5
6#include "core/common/eplatform.h"
7#include "appcore/ticketissuelogic/ETicketIssueLogicDefines.h"
8#include "appcore/cardfacade/ECardFacadeDefines.h"
9
10namespace EM
11{
12 namespace Strojcek
13 {
14 namespace VstupneUdaje
15 {
16 class CappingInformationData;
17
18 namespace TarifnySystem
19 {
20 class ETarifa;
21 class ETarifnePasmo;
22 }
23 }
24 }
25 namespace TicketIssueLogic
26 {
27 class DLL_API ECardBusinessLogic
28 {
29 private:
31 ECardBusinessLogic();
33 public:
35
42 static EIssueLogicDefines::ReturnValues GetDepartmentNumberFromCard( unsigned long &departmentNumber );
43
47 DEPRECATED( static bool GetValidCustomerProfileIndex( unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff ) );
48
56 static bool IsCustomerProfileValidByTariff( unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff );
57
64 static EIssueLogicDefines::ReturnValues CheckCardNetworkWithTariffNetwork( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork );
65
66 static bool GetDiscountTypeByCardType( unsigned short cardType, EM::CardFacade::ECardFacadeDefines::CardTypeStandard standard, bool timeTicket, unsigned char &discountType );
67 static bool GetDiscountTypeByCardType( unsigned char cardTypeID, bool timeTicket, unsigned char &discountType );
68
73 DEPRECATED( static bool GetCustomerProfileName( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile ) );
74
81 static bool GetCustomerProfileName( unsigned char customerProfileIndex, std::string &customerProfile );
82
83 static bool GetNameAndSurname( std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled );
84
85 static bool GetBornNumber( unsigned short &year, unsigned short &month, unsigned short &day, bool &showingEnabled );
86
90 static EIssueLogicDefines::ReturnValues GetCardTypeID( unsigned char &cardTypeID, unsigned char validCustomerProfileIndex );
91
98 static EIssueLogicDefines::ReturnValues GetCardType( unsigned short &cardType, const unsigned char validCustomerProfileIndex );
99
105 static bool GetWalletBalanceText( std::string &walletBalance );
106
112 static bool IsHomeCompanyCard( bool &isHomeCompanyCard );
113
120 static EIssueLogicDefines::ReturnValues IsAllowedCompanyCard( bool &isAllowedCompanyCard );
121
137
144 static EIssueLogicDefines::ReturnValues GetCardNetworkID( unsigned long &cardNetworkID );
145
152 static EIssueLogicDefines::ReturnValues IsSupportedProfileValidityStartOnCard( bool &isSupportedProfileValidityStart );
153
171 static EIssueLogicDefines::ReturnValues GetCustomerProfileValidity( unsigned long &customerProfileValidityStart, unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex );
172
176 static bool IsCityCard();
177
196 static EIssueLogicDefines::ReturnValues GetTariffFromCard( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
197
211 static EIssueLogicDefines::ReturnValues GetOneWayTicketPriceListRowFromCard( unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow );
212
219 static EIssueLogicDefines::ReturnValues IsAllowedCardTypeForCardActivation( bool &isAllowedCardTypeForCardActivation );
220
229 static EIssueLogicDefines::ReturnValues IsAnyCustomerProfileValid( unsigned char &firstValidCustomerProfile, unsigned long timeToCompareProfileValidityTo = 0 );
230
239 static EIssueLogicDefines::ReturnValues IsCustomerProfileValidByDate( unsigned char customerProfileIndex, unsigned long timeToCompareProfileValidityTo = 0 );
240
250
259
267 static EIssueLogicDefines::ReturnValues GetNIDFromTimeTicket( const unsigned char timeTicketIndex, unsigned long &timeTicketNID );
268
276 static EIssueLogicDefines::ReturnValues GetNIDFromOneWayTicket( const unsigned char oneWayTicketIndex, unsigned long &oneWayTicketNID );
277
284 static EIssueLogicDefines::ReturnValues GetUTNFromTimeTicket( const unsigned char timeTicketIndex, long &urbanTransportNumber );
285
293
301 static EIssueLogicDefines::ReturnValues GetCappingInformation( unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData );
302
303 private:
320 static EIssueLogicDefines::ReturnValues TryProlongStudentCardDiscountValidity( unsigned long &customerProfileValidity );
321
322 static EIssueLogicDefines::ReturnValues GetTariffFromTimeTicket( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
323 static EIssueLogicDefines::ReturnValues GetTariffFromOneWayTicket( CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
324
330 static bool IsCustomerProfileValidityException( const unsigned char customerProfileIndex );
331
332 static bool GetTariffDetails( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned char &tariffDiscountType, bool &isTimeTicketTariff );
333 };
334 }
335}
336
337#endif // CARDBUSINESSLOGIC_H
#define DLL_API
Definition ECardFacadeDefines.h:8
CardFacadeType
Definition ECardFacadeDefines.h:162
CardTypeStandard
Definition ECardFacadeDefines.h:248
static EIssueLogicDefines::ReturnValues IsCustomerProfileValidByDate(unsigned char customerProfileIndex, unsigned long timeToCompareProfileValidityTo=0)
IsCustomerProfileValidByDate - checks time validity of a customer profile on given index.
static EIssueLogicDefines::ReturnValues GetCappingInformation(unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData)
GetCappingInformation - gains capping information data from tariff system and from card data structur...
static EIssueLogicDefines::ReturnValues IsSupportedLineTripProtectNumberOnCard(bool &isSupportedFlagsOnCard)
IsSupportedLineTripProtectNumberOnCard - Function checks feature on card.
static bool GetCustomerProfileName(unsigned char customerProfileIndex, std::string &customerProfile)
Get name of card type (text representation of card type)
static EIssueLogicDefines::ReturnValues GetCardType(unsigned short &cardType, const unsigned char validCustomerProfileIndex)
GetCardType - method returns card type (NOT card type ID) at desired customer profile index.
static bool GetDiscountTypeByCardType(unsigned char cardTypeID, bool timeTicket, unsigned char &discountType)
static EIssueLogicDefines::ReturnValues EvaluateCardTypeForInvalidCustomerProfile(unsigned short &cardType)
EvaluateCardTypeForInvalidCustomerProfile - evaluates tariff system settings for invalid customer pro...
static EIssueLogicDefines::ReturnValues GetCardTypeID(unsigned char &cardTypeID, unsigned char validCustomerProfileIndex)
Get card type ID by card type and card standard from card facade.
static bool GetWalletBalanceText(std::string &walletBalance)
Get balance of electronic wallet on card in form of "amount currency".
static bool IsCityCard()
Checks city code flag on card( SCS strcuture EAppIssuer::Get/Set IssuerType, ECardDataFacadeCommon::G...
static EIssueLogicDefines::ReturnValues GetUTNFromTimeTicket(const unsigned char timeTicketIndex, long &urbanTransportNumber)
GetUTNFromTimeTicket - check if time ticket supports urban transport number (UTN),...
static EIssueLogicDefines::ReturnValues GetDepartmentNumberFromCard(unsigned long &departmentNumber)
Function gets department number from card (or from purse)
static bool IsHomeCompanyCard(bool &isHomeCompanyCard)
IsHomeCompanyCard.
static EIssueLogicDefines::ReturnValues IsAnyCustomerProfileValid(unsigned char &firstValidCustomerProfile, unsigned long timeToCompareProfileValidityTo=0)
IsAnyCustomerProfileValid - loops all customer profiles on card and checks their time validity.
static EIssueLogicDefines::ReturnValues GetCardNetworkID(unsigned long &cardNetworkID)
GetCardNetworkID - gains network ID from country code and netwrok on card.
static bool GetDiscountTypeByCardType(unsigned short cardType, EM::CardFacade::ECardFacadeDefines::CardTypeStandard standard, bool timeTicket, unsigned char &discountType)
static EIssueLogicDefines::ReturnValues CheckCardWalletISOPayUnitCodeValidity(bool &walletPayUnitValidity)
CheckCardWalletISOPayUnitCodeValidity - check if card has wallet with valid ISO pay unit code.
static bool IsCustomerProfileValidByTariff(unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
Checks if customer profile on specified index can use specified tariff.
static EIssueLogicDefines::ReturnValues IsSupportedProfileValidityStartOnCard(bool &isSupportedProfileValidityStart)
IsSupportedProfileValidityStartOnCard.
static EIssueLogicDefines::ReturnValues IsAllowedCardTypeForCardActivation(bool &isAllowedCardTypeForCardActivation)
IsAllowedCardTypeForCardActivation.
static bool GetNameAndSurname(std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled)
static bool GetBornNumber(unsigned short &year, unsigned short &month, unsigned short &day, bool &showingEnabled)
static EIssueLogicDefines::ReturnValues IsAnyValidFareProviderForCurrentCompanyNumber()
IsAnyValidFareProviderForCurrentCompanyNumber - checks if there are valid commonData and if all virtu...
static EIssueLogicDefines::ReturnValues GetCustomerProfileValidity(unsigned long &customerProfileValidityStart, unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex)
Wrapper for customer profile validity on card.
DEPRECATED(static bool GetValidCustomerProfileIndex(unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff))
static EIssueLogicDefines::ReturnValues CheckCardNetworkWithTariffNetwork(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork)
check if the network on card is the same for selling tariff
static EIssueLogicDefines::ReturnValues GetTariffFromCard(CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff)
GetTariffFromCard - Get tariff from card by ticketIndex.
static EIssueLogicDefines::ReturnValues GetNIDFromOneWayTicket(const unsigned char oneWayTicketIndex, unsigned long &oneWayTicketNID)
GetNIDFromOneWayTicket - calculates network ID from country code and network code.
static EIssueLogicDefines::ReturnValues GetOneWayTicketPriceListRowFromCard(unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow)
GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket.
DEPRECATED(static bool GetCustomerProfileName(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile))
static EIssueLogicDefines::ReturnValues GetNIDFromTimeTicket(const unsigned char timeTicketIndex, unsigned long &timeTicketNID)
GetNIDFromTimeTicket - check if time ticket supports network id (NID), then calculate NID from countr...
static EIssueLogicDefines::ReturnValues IsAllowedCompanyCard(bool &isAllowedCompanyCard)
IsAllowedCompanyCard.
ReturnValues
Definition ETicketIssueLogicDefines.h:50
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7